I am working an a dzVents script to control my CT100 Plus Radio Thermostat z-wave thermostats. I can read the set point, but I get an error when I try to updatesetpoint. See my script and log listing below. Hopefully I am doing something dumb and there is an easy fix.
return {
on = {
devices = {
'Away Switch'
}
},
execute = function(domoticz, device)
if (device.state == 'On') then
domoticz.log('Read the current Set Point: ' .. domoticz.devices('Down Stairs Set').setPoint, domoticz.LOG_INFO)
domoticz.devices('Down Stairs Set').updatesetpoint(10)
domoticz.log('Device ' .. device.name .. ' was changed to away, 50F', domoticz.LOG_INFO)
else
domoticz.log('Device ' .. device.name .. ' was changed to home, 68F', domoticz.LOG_INFO)
end
end
}
The log listing is:
2018-01-01 17:30:14.885 (Away Switch) Light/Switch (Away Switch)
2018-01-01 17:30:14.925 dzVents: Debug: Dumping domoticz data to /home/pi/domoticz/scripts/dzVents//domoticzData.lua
2018-01-01 17:30:14.932 dzVents: Debug: dzVents version: 2.3.0
2018-01-01 17:30:14.932 dzVents: Debug: Event trigger type: device
2018-01-01 17:30:14.963 dzVents: Debug: Found module in /home/pi/domoticz/scripts/dzVents/generated_scripts folder: Temp Switch dzV
2018-01-01 17:30:14.985 dzVents: Debug: Device-adapter found for Away Switch: Switch device adapter
2018-01-01 17:30:14.994 dzVents: Debug: Processing device-adapter for Away Switch: Switch device adapter
2018-01-01 17:30:14.995 dzVents: Debug: Device-event for: Away Switch value: On
2018-01-01 17:30:14.995 dzVents: Debug: Searching for scripts for changed item: Away Switch
2018-01-01 17:30:14.995 dzVents: Info: Handling events for: "Away Switch", value: "On"
2018-01-01 17:30:14.995 dzVents: Info: ------ Start internal script: Temp Switch dzV: Device: "Away Switch (Away Switch)", Index: 35
2018-01-01 17:30:14.996 dzVents: Debug: Device-adapter found for Down Stairs Set: Thermostat setpoint device adapter
2018-01-01 17:30:14.996 dzVents: Debug: Processing device-adapter for Down Stairs Set: Thermostat setpoint device adapter
2018-01-01 17:30:14.997 dzVents: Info: Read the current Set Point: 72
2018-01-01 17:30:14.997 Error: dzVents: Error: An error occured when calling event handler Temp Switch dzV
2018-01-01 17:30:14.997 Error: dzVents: Error: ...cz/scripts/dzVents/generated_scripts/Temp Switch dzV.lua:11: attempt to call field 'updatesetpoint' (a nil value)
2018-01-01 17:30:14.997 dzVents: Info: ------ Finished Temp Switch dzV
z-Wave Thermostat error
Moderator: leecollings
-
- Posts: 11
- Joined: Sunday 06 April 2014 2:26
- Target OS: Raspberry Pi / ODroid
- Domoticz version: v3.8160
- Location: USA
- Contact:
Re: z-Wave Thermostat error
It appears that updatesetpoint is case sensitive. When I change to updateSetPoint the script started working.
-
- Posts: 1355
- Joined: Friday 29 August 2014 11:26
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Ermelo
- Contact:
Re: z-Wave Thermostat error
yup.. that's Lua.
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
Who is online
Users browsing this forum: No registered users and 1 guest