Easy to use, 100% Lua-based event scripting framework.
Moderator: leecollings
Mitroram
Posts: 3 Joined: Thursday 19 December 2019 20:20
Target OS: Windows
Domoticz version:
Contact:
Post
by Mitroram » Friday 21 February 2020 19:23
Hello everyone,,
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.
mobdro lucky patcher kodi
Code: Select all
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:
Spoiler: show Code: Select all
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
Last edited by
Mitroram on Sunday 23 February 2020 9:57, edited 1 time in total.
waaren
Posts: 6028 Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:
Post
by waaren » Friday 21 February 2020 20:44
Mitroram wrote: ↑ Friday 21 February 2020 19:23
Hopefully I am doing something dumb and there is an easy fix.
Most of the functions, methods, commands and settings in dzVents are case sensitive.
Can you try again with
updateSetPoint
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>>
dzVents wiki
Users browsing this forum: No registered users and 1 guest