change Setpoint with delay?

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

Post Reply
renerene
Posts: 356
Joined: Wednesday 03 August 2016 11:36
Target OS: -
Domoticz version:
Contact:

change Setpoint with delay?

Post by renerene »

Code: Select all

domoticz.devices('SVT Setpoint Normal').updateSetPoint(tempNormalDefault).afterMin(vertraging) 
this is not not working; afterMin works probably only with switches:

2019-01-11 18:02:35.590 Status: dzVents: Error (2.4.9): dzSVTThermostaat: ...z/scripts/dzVents/generated_scripts/dzSVTThermostaat.lua:152: attempt to call field 'afterMin' (a nil value)

suggestions?
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: change Setpoint with delay?

Post by waaren »

renerene wrote: Friday 11 January 2019 18:03

Code: Select all

domoticz.devices('SVT Setpoint Normal').updateSetPoint(tempNormalDefault).afterMin(vertraging) 
this is not not working; afterMin works probably only with switches:

2019-01-11 18:02:35.590 Status: dzVents: Error (2.4.9): dzSVTThermostaat: ...z/scripts/dzVents/generated_scripts/dzSVTThermostaat.lua:152: attempt to call field 'afterMin' (a nil value)

suggestions?
According to the wiki this should work. Is this a zwave setPoint device ?
If you don't know please insert domoticz.devices('SVT Setpoint Normal').dump() somewhere in the beginning your script and send the complete dump (you find it in the domoticz logfile to me) If you prefer via PM.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
renerene
Posts: 356
Joined: Wednesday 03 August 2016 11:36
Target OS: -
Domoticz version:
Contact:

Re: change Setpoint with delay?

Post by renerene »

it is a 'thermostat Setpoint' dummy switch
If you don't know please insert domoticz.devices('SVT Setpoint Normal').dump() somewhere in the beginning your script and send the complete dump (you find it in the domoticz logfile to me) If you prefer via PM.
Here is the result of .dump():
Spoiler: show
2019-01-11 19:04:59.961 Status: dzVents: > month: 1
2019-01-11 19:04:59.961 Status: dzVents: > bState: false
2019-01-11 19:04:59.961 Status: dzVents: > setState()
2019-01-11 19:04:59.961 Status: dzVents: > updateCounter()
2019-01-11 19:04:59.961 Status: dzVents: > timedOut: false
2019-01-11 19:04:59.961 Status: dzVents: > idx: 941
2019-01-11 19:04:59.961 Status: dzVents: > description:
2019-01-11 19:04:59.961 Status: dzVents: > _adapters:
2019-01-11 19:04:59.961 Status: dzVents: > 1: Thermostat setpoint device adapter
2019-01-11 19:04:59.961 Status: dzVents: > setVolume()
2019-01-11 19:04:59.961 Status: dzVents: > updateBarometer()
2019-01-11 19:04:59.961 Status: dzVents: > pause()
2019-01-11 19:04:59.961 Status: dzVents: > hardwareId: 23
2019-01-11 19:04:59.961 Status: dzVents: > updateElectricity()
2019-01-11 19:04:59.962 Status: dzVents: > signalLevel: 12
2019-01-11 19:04:59.962 Status: dzVents: > _nValue: 1
2019-01-11 19:04:59.962 Status: dzVents: > switchOn()
2019-01-11 19:04:59.962 Status: dzVents: > id: 941
2019-01-11 19:04:59.962 Status: dzVents: > unit: 4
2019-01-11 19:04:59.962 Status: dzVents: > updateLux()
2019-01-11 19:04:59.962 Status: dzVents: > updateDistance()
2019-01-11 19:04:59.962 Status: dzVents: > _state: 20.5
2019-01-11 19:04:59.962 Status: dzVents: > toggleSwitch()
2019-01-11 19:04:59.962 Status: dzVents: > _data:
2019-01-11 19:04:59.962 Status: dzVents: > data:
2019-01-11 19:04:59.962 Status: dzVents: > hardwareType: Smart Virtual Thermostat
2019-01-11 19:04:59.962 Status: dzVents: > hardwareID: 23
2019-01-11 19:04:59.962 Status: dzVents: > hardwareName: SVT-thermostaat
2019-01-11 19:04:59.962 Status: dzVents: > protected: false
2019-01-11 19:04:59.962 Status: dzVents: > _state: 20.5
2019-01-11 19:04:59.962 Status: dzVents: > unit: 4
2019-01-11 19:04:59.962 Status: dzVents: > _nValue: 1
2019-01-11 19:04:59.963 Status: dzVents: > hardwareTypeValue: 94
2019-01-11 19:04:59.963 Status: dzVents: > setPoint: 20.5
2019-01-11 19:04:59.963 Status: dzVents: > icon: override_mini
2019-01-11 19:04:59.963 Status: dzVents: > timedOut: false
2019-01-11 19:04:59.963 Status: dzVents: > lastUpdate: 2019-01-11 19:04:00
2019-01-11 19:04:59.963 Status: dzVents: > switchTypeValue: 0
2019-01-11 19:04:59.963 Status: dzVents: > baseType: device
2019-01-11 19:04:59.963 Status: dzVents: > deviceType: Thermostat
2019-01-11 19:04:59.963 Status: dzVents: > rawData:
2019-01-11 19:04:59.963 Status: dzVents: > 1: 20.5
2019-01-11 19:04:59.963 Status: dzVents: > signalLevel: 12
2019-01-11 19:04:59.963 Status: dzVents: > batteryLevel: 255
2019-01-11 19:04:59.963 Status: dzVents: > changed: false
2019-01-11 19:04:59.963 Status: dzVents: > subType: SetPoint
2019-01-11 19:04:59.963 Status: dzVents: > deviceID: 00170004
2019-01-11 19:04:59.963 Status: dzVents: > id: 941
2019-01-11 19:04:59.963 Status: dzVents: > switchType: On/Off
2019-01-11 19:04:59.964 Status: dzVents: > description:
2019-01-11 19:04:59.964 Status: dzVents: > lastLevel: 0
2019-01-11 19:04:59.964 Status: dzVents: > name: SVT Setpoint Normal
2019-01-11 19:04:59.964 Status: dzVents: > dump()
2019-01-11 19:04:59.964 Status: dzVents: > isVariable: false
2019-01-11 19:04:59.964 Status: dzVents: > updateSetPoint()
Script
domoticz.devices('SVT Setpoint Normal').updateSetPoint(23)
domoticz.devices('SVT Setpoint Normal').updateSetPoint(21).afterMin(2)

Log
2019-01-11 19:19:50.247 Status: dzVents: Debug: dzSVTThermostaat: Constructed timed-command: 23
2019-01-11 19:19:50.247 Status: dzVents: Debug: dzSVTThermostaat: Constructed timed-command: 21
2019-01-11 19:19:50.251 Status: dzVents: Error (2.4.9): dzSVTThermostaat: An error occured when calling event handler dzSVTThermostaat
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: change Setpoint with delay?

Post by waaren »

renerene wrote: Friday 11 January 2019 18:03

Code: Select all

domoticz.devices('SVT Setpoint Normal').updateSetPoint(tempNormalDefault).afterMin(vertraging) 
this is not not working; afterMin works probably only with switches:

2019-01-11 18:02:35.590 Status: dzVents: Error (2.4.9): dzSVTThermostaat: ...z/scripts/dzVents/generated_scripts/dzSVTThermostaat.lua:152: attempt to call field 'afterMin' (a nil value)

suggestions?
Fixed in latest domoticz beta V4.10360 (dzVents 2.4.10) !
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest