Search found 63 matches

by commodore white
Sunday 26 June 2016 23:02
Forum: LUA
Topic: delta t lua
Replies: 15
Views: 1679

Re: delta t lua

You REALLY should check out http://www.domoticz.com/forum/viewtopic.php?f=23&t=10834. You'll find it a whole lot easier to access device values rather than mess with JSON. To help with printing out floating point variables, I use a slightly modified print statement defined thus: local printf = funct...
by commodore white
Saturday 21 May 2016 7:12
Forum: Forum feedback
Topic: Bluetooth (LE) Protocol Addition
Replies: 1
Views: 1168

Re: Bluetooth (LE) Protocol Addition

The idea of being able to use fitness bands for two factor authentication, location or presence detection is very appealing so I'd definitely vote for this. No other takers?
by commodore white
Friday 20 May 2016 15:39
Forum: LUA
Topic: Vocal announcement - Good Morning Script
Replies: 73
Views: 11554

Re: Vocal announcement - Good Morning Script

Liked this script so much, I created another. It seemed a shame that I only ever got one weather report so this dzVents script checks the weather every hour and, if its changed and someone walks into the room, they'll get a weather update. I'll probably drive us nuts in a few days but its fun for no...
by commodore white
Monday 16 May 2016 21:08
Forum: Scripts [cleaning in progress]
Topic: Counting every time the temperature exceeds x
Replies: 6
Views: 690

Re: Counting every time the temperature exceeds x

dzVents has a lot of documentation, more than Domoticz. Theres a few examples in the documentation. Nice thing is youll not have to deal with commandArrays, no looking up multiple tables, doing stupid arithmetic on dates is thing of the past, complex triggers are a breeze. Try it. You'll like it soo...
by commodore white
Monday 16 May 2016 20:45
Forum: LUA
Topic: how to change the status of a sensor ?
Replies: 2
Views: 511

Re: how to change the status of a sensor ?

Hi. Quite a few sensors exhibit that behaviour. Best use the door sensor to change the state of dummy device and base your logic the the dummy device. Change the dummy device state as your heart desires. What has .. My use case is : My Mailbox switches On when receiving mails and returns Off at midn...
by commodore white
Monday 16 May 2016 20:15
Forum: LUA
Topic: Vocal announcement - Good Morning Script
Replies: 73
Views: 11554

Re: Vocal announcement - Good Morning Script

Hi korniza. Pleased to hear you got it working and that you spotted my deliberate error in forgetting to tell you that you needed a device called THB from which you can derive the outside temperature. Hi jmleglise. I incorporated your two suggestion - they work a treat. The birthday announce thingy ...
by commodore white
Monday 16 May 2016 0:29
Forum: LUA
Topic: Vocal announcement - Good Morning Script
Replies: 73
Views: 11554

Re: Vocal announcement - Good Morning Script

Thanks jmleglise, I was wondering the best best way to convert wind directions to something pronounceable.

Peter
by commodore white
Sunday 15 May 2016 23:19
Forum: LUA
Topic: Vocal announcement - Good Morning Script
Replies: 73
Views: 11554

Re: dzVents: Vocal announcement - Good Morning Script

I get an error if I copy&paste as a lua script to events. Error: EventSystem: Lua script goodMorning did not return a commandArray How can I use this script? :oops: You need to install dzVents. Follow the install instructions here github.com/dannybloe/dzVents/tree/dev then copy/paste the script int...
by commodore white
Sunday 15 May 2016 19:12
Forum: LUA
Topic: Vocal announcement - Good Morning Script
Replies: 73
Views: 11554

dzVents: Vocal announcement - Good Morning Script

Hi y'all. My Good Morning script is heavily based on the original with the exception that it relies on dzVent plug-in for domoticz. Little benefit in doing so other than it obviates the need for a domoticz variable. My version has a chatty date intro that probably need improvement but it'll do for n...
by commodore white
Friday 13 May 2016 22:41
Forum: Scripts [cleaning in progress]
Topic: Counting every time the temperature exceeds x
Replies: 6
Views: 690

Re: Counting every time the temperature exceeds x

You should check out the developer version of dzVents. It enables you keep a timestamped list of temperatures in a data array then do simple stats on the list. The following is an example from the documentation. It would be easy to add criteria so that only temperatures above a certain value were lo...
by commodore white
Friday 13 May 2016 17:06
Forum: Scripts [cleaning in progress]
Topic: Create lua array from uservariable with multiple elements
Replies: 3
Views: 660

Re: Create lua array from uservariable with multiple elements

Might be an idea to have a look a dzVents. It has the capability of storing variables from one invocation of your script to the next, and probably what you're looking for, the ability to share variables between scripts, so-called global variables. You'll be able to put the complex structures in the ...
by commodore white
Friday 13 May 2016 14:56
Forum: LUA
Topic: Vocal announcement - Good Morning Script
Replies: 73
Views: 11554

Sorted: Re: Vocal announcement - Good Morning Script

I'm modifying this script for use with dzVents. Though I don't think thats a root cause, I get this error: 2016-05-13 13:29:35.691 LUA: An error occured when calling event handler GoodMorning 2016-05-13 13:29:35.691 LUA: /home/pi/domoticz/scripts/lua/scripts/GoodMorning.lua:41: attempt to call a nil...
by commodore white
Friday 13 May 2016 14:26
Forum: LUA
Topic: Vocal announcement - Good Morning Script
Replies: 73
Views: 11554

Re: Vocal announcement - Good Morning Script

Scones wrote:I've got a MAX2PLAY Squeezebox / LMS multi-room setup at home using RPi's as both the server and room players (using PiCorePlayer)
Did you get anywhere with this. I was hoping for something similar though my LMS is based on a Joggler or two.

Peter
by commodore white
Wednesday 04 May 2016 0:46
Forum: Scripts [cleaning in progress]
Topic: Notification if sensor is not online
Replies: 2
Views: 614

Re: Notification if sensor is not online

You should check out dzvents. It has a short example script that runs every 5 minutes that does exactly what you're after. You can keep your existing scripts as dzvents will run silently in the background. Convert your scripts if you need extra flexibility regarding triggers or you need to carry dat...
by commodore white
Friday 08 April 2016 19:28
Forum: Heating/cooling
Topic: Heating finally automated using HomeEasy HE105
Replies: 45
Views: 15798

dzVents home heating using HomeEasy HE105

Thanks for the inspiration for deploying my HE105. I've used the code already listed in this thread as a model upon which to write my own, but this time using the dzVents add-on. The code allows for a list of thermometers which are averaged to get the current temperature. Thermometers which have not...
by commodore white
Wednesday 06 April 2016 22:14
Forum: dzVents Lua Framework
Topic: Introducing dzVents - Domoticz Lua file based event scripting made e-z!
Replies: 337
Views: 37317

Re: Introducing dzVents - Domoticz Lua file based event scripting made e-z!

One of the triggers for my dzVents central heating script uses events driven from a room thermometer. The script gets to run twice for each device interrupt: once with the name envKitchen, and again with the name envKitchen_Temperature. The upshot is that things that my script is supposed to do once...
by commodore white
Wednesday 06 April 2016 21:09
Forum: dzVents Lua Framework
Topic: Introducing dzVents - Domoticz Lua file based event scripting made e-z!
Replies: 337
Views: 37317

Re: Introducing dzVents - Domoticz Lua file based event scripting made e-z!

I am trying to write a script that relies on a device id. According to the documentation the method is ".id" Here is a fragment of my code: (53) printf("Device is: %s (%s)", _device.name, _device.id) (54) print("Alarm "..domoticz.devices['Alarm'].id) When the script executes while dzVent logging lev...
by commodore white
Monday 28 March 2016 0:07
Forum: dzVents Lua Framework
Topic: Introducing dzVents - Domoticz Lua file based event scripting made e-z!
Replies: 337
Views: 37317

X10 siren state

The value for X10Siren.bState does not return the correct boolean, its always "false". X10Siren states are "All On" and "All Off".

Peter
by commodore white
Saturday 26 March 2016 1:00
Forum: dzVents Lua Framework
Topic: Introducing dzVents - Domoticz Lua file based event scripting made e-z!
Replies: 337
Views: 37317

Re: Introducing dzVents - Domoticz Lua file based event scripting made e-z!

To make dzVents easier to read/write/document might I suggest you add something like:

Code: Select all

domoticz.timedEvent
and its inverse:

Code: Select all

domoticz.deviceEvent
... such that "domoticz.timedEvent" evaluates to true if the script is running because a scheduled event became due, else false.

Peter
by commodore white
Friday 25 March 2016 22:01
Forum: LUA
Topic: Simple Lua state file utility.
Replies: 8
Views: 1132

Re: Simple Lua state file utility.

I put my persistent storage system together with the primary requirement of trying to restore a secure state across systems reboots. For example, I didnt want the system to go down with secuity enabled only to have an insecure and inconsistent state on reboot. In your example, Danny, I'm not sure ho...