Page 1 of 1
Event twice triggered
Posted: Wednesday 21 December 2016 0:39
by juankar
I have seen that my thermostat (Qubino ZMNHID1) triggers an associated event twice when I change its Mode (and I can not read the value of the thermostat Mode in lua).
Looking the log I see that device reports the mode status twice, although controller sends just one command GET.
Is it a question of OpenZwave or a config param or...?
Re: Event twice triggered
Posted: Wednesday 21 December 2016 7:08
by jannl
Do you check in your device script which device triggered the event? Remember every device script is run with every device change
Re: Event twice triggered
Posted: Wednesday 21 December 2016 21:25
by juankar
This script from Domoticz wiki is very useful
Code: Select all
for deviceName,deviceValue in pairs(devicechanged) do
print ("Device based event fired on '"..deviceName.."', value '"..tostring(deviceValue).."'");
end
And log shows when and which script is triggered. And I'm sure that the script is triggered twice when I change the thermostate mode.
And digging in log I can see that this device send one command Get but receive two answers to this command get. So I think that every answer trigger the event.
The question is then why Qubino ZMNHID1 returns to answers to one command Get?
Although I patched this issue using a user var.