Search found 1100 matches

by dannybloe
Thursday 18 January 2018 22:00
Forum: dzVents Lua Framework
Topic: dzVents timer with switch
Replies: 9
Views: 113

Re: dzVents timer with switch

Read the troubleshooting section in the docs.
by dannybloe
Thursday 18 January 2018 9:51
Forum: dzVents Lua Framework
Topic: triggerInfo.trigger for device change?
Replies: 6
Views: 98

Re: triggerInfo.trigger for device change?

Looks good to me, give it a try.. hire some burglars perhaps to help...
by dannybloe
Wednesday 17 January 2018 17:28
Forum: LUA
Topic: On/off thermostate script in Lua or Dzvents?
Replies: 1
Views: 55

Re: On/off thermostate script in Lua or Dzvents?

dzVents is Lua but with a data model helping you to interact with everything that comes from Domoticz. But all the code you write is pure 100% Lua.
by dannybloe
Wednesday 17 January 2018 10:36
Forum: dzVents Lua Framework
Topic: Device Array Help.
Replies: 1
Views: 38

Re: Device Array Help.

So, without looking too deep into your code I'd do it with a dummy switch: return { on = { devices = { 'door', 'window' } }, execute = function(dz, item) if (dz.devices('door').active or dz.devices('window').active) then dz.devices('openEntries').switchOn().checkFirst() -- update dummy switch else d...
by dannybloe
Wednesday 17 January 2018 9:55
Forum: dzVents Lua Framework
Topic: Using a variable as a setpoint?
Replies: 7
Views: 178

Re: Using a variable as a setpoint?

Then it's probably something like this: return { on = { devices = { 'Sleepmode' }, }, execute = function(domoticz) if (domoticz.devices('Sleepmode').state == 'On' then domoticz.devices('LivingRoomLight').switchOff() local nightTimeSetpoint = domoticz.variables('Night_temp').value domoticz.devices('T...
by dannybloe
Tuesday 16 January 2018 17:57
Forum: dzVents Lua Framework
Topic: .forMin() no longer working
Replies: 4
Views: 93

Re: .forMin() no longer working

Not before the PR gets merged. It’s ready though.
by dannybloe
Tuesday 16 January 2018 17:02
Forum: dzVents Lua Framework
Topic: afterSec(x)
Replies: 24
Views: 1415

Re: afterSec(x)

Ah, yeah, uf curse. Just checking if you were paying attention here :-p
by dannybloe
Tuesday 16 January 2018 15:59
Forum: dzVents Lua Framework
Topic: .forMin() no longer working
Replies: 4
Views: 93

Re: .forMin() no longer working

Yes, that's a bug in Domoticz. We fixed that in the pull-request for dzVents 2.4.
by dannybloe
Tuesday 16 January 2018 15:57
Forum: dzVents Lua Framework
Topic: afterSec(x)
Replies: 24
Views: 1415

Re: afterSec(x)

Yes, that's the educated guess ;-)
by dannybloe
Tuesday 16 January 2018 15:51
Forum: dzVents Lua Framework
Topic: Using a variable as a setpoint?
Replies: 7
Views: 178

Re: Using a variable as a setpoint?

I don't know what you mean with 'sleep mode'.
by dannybloe
Tuesday 16 January 2018 15:47
Forum: dzVents Lua Framework
Topic: afterSec(x)
Replies: 24
Views: 1415

Re: afterSec(x)

you can try domoticz.variables('SoundSiren').set(domoticz.variables('SoundSiren'))
I think that the queued items are cleared when you set a new value.
by dannybloe
Tuesday 16 January 2018 14:13
Forum: dzVents Lua Framework
Topic: afterSec(x)
Replies: 24
Views: 1415

Re: afterSec(x)

In the upcoming dzVents 2.4 you can do device.cancelQueuedCommands(). Until then you can try device.setState(device.state)).
by dannybloe
Tuesday 16 January 2018 13:37
Forum: dzVents Lua Framework
Topic: dzVents script for heating control
Replies: 7
Views: 266

Re: dzVents script for heating control

No, that's not a typo. That parameter is the device that triggered the script.
by dannybloe
Sunday 14 January 2018 21:13
Forum: dzVents Lua Framework
Topic: dzVents script for heating control
Replies: 7
Views: 266

Re: dzVents script for heating control

Owh.. that's interesting. It is actually there but not documented. I made sure it is in 2.4.0. For now you can do: domoticz.settings['Domoticz url'] In 2.4 you can do this: domoticz.settings.url domoticz.settings.serverPort domoticz.settings.webRoot Right now you can get the port: local port = globa...
by dannybloe
Sunday 14 January 2018 18:27
Forum: dzVents Lua Framework
Topic: dzVents script for heating control
Replies: 7
Views: 266

Re: dzVents script for heating control

Nice. On tip for better readability (shorter lines) is to rename domoticz with dz.
by dannybloe
Sunday 14 January 2018 18:23
Forum: dzVents Lua Framework
Topic: http://<espeasyip>/control?cmd=PWM,13,500 in dzVents
Replies: 7
Views: 238

Re: http://<espeasyip>/control?cmd=PWM,13,500 in dzVents

Yup.. that's it. But in this case I'd do it differently: in Domoticz edit the switch and enter these two http urls as the on and off actions. Then you can do just switchOn() and switchOff() in your code.
by dannybloe
Sunday 14 January 2018 13:06
Forum: dzVents Lua Framework
Topic: How do i check for days in an IF statement?
Replies: 13
Views: 279

Re: How do i check for days in an IF statement?

Ah, it's easy to learn and very similar to javascript. You just have to learn a couple of syntactic difference and read about Lua tables. Not so hard. There's no dzVents data model in python though.
by dannybloe
Sunday 14 January 2018 12:56
Forum: dzVents Lua Framework
Topic: How do i check for days in an IF statement?
Replies: 13
Views: 279

Re: How do i check for days in an IF statement?

Ow crap, I always forget those nasty [ ]:

Code: Select all

devices = {
           ['Sensor_SK_PenM'] = { 'on mon, tue, wed, thu, fri' }
        },
Lua is weird.
by dannybloe
Sunday 14 January 2018 12:14
Forum: dzVents Lua Framework
Topic: How do i check for days in an IF statement?
Replies: 13
Views: 279

Re: How do i check for days in an IF statement?

No, it is not a comparision but a declaration. 'devices' inside the 'on'-section is a Lua table where each member is either a singleton (device name or id) or a key/value item (where in this case key is 'Sensor_SK_PenM' and value is again a Lua table (array) with timer rules. There can be more rules...