So, my Secure Thermostats (SRT323 and SRT321), which require custom Groovy drivers and cloud execution will stop working in about 3 weeks, just as the temperature drops here in the UK.
By cut and paste, trial and error, and copious logging, I have an Edge driver 75% working but only alpha quality.
I am stuck on capabilities.thermostatOperatingState, specifically:
local function operating_state_report_handler(self, device, cmd)
local event = nil
local state = cmd.args.operating_state
log.info("operating_state_report_handler state: ", state)
if state == 0 then ā IDLE
log.info(āoperating_state_report_handler - IDLEā)
event = capabilities.thermostatOperatingState.thermostatOperatingState.idle()
elseif state == 1 then ā HEATING
log.info(āoperating_state_report_handler - HEATINGā)
event = capabilities.thermostatOperatingState.thermostatOperatingState.heating()
else
log.info(āoperating_state_report_handler - UNKNOWN ā IDLEā)
event = capabilities.thermostatOperatingState.thermostatOperatingState.idle()
end
log.info(āoperating_state_report_handler - ready to set_fieldā)
device:set_field(OPERATING_STATE, state, {persist = true})
log.info(āoperating_state_report_handler - set_field doneā)
if (event ~= nil) then
log.info("operating_state_report_handler event: ", event)
device:emit_event(event)
end
end
Any help appreciated.
Aidan