Page 1 of 1
Different working mode for commandArray since some versions
Posted: Thursday 25 May 2023 17:38
by Thorgal789
Hello IDK if it's normal but since some version I have a curious issue.
I have some dimmable light that have stoped working with
Code: Select all
commandArray['Deconz - Dimmer salon'] = 'off'
But still working with
Code: Select all
commandArray['Deconz - Dimmer salon'] = 'Set Level: 0'
It's normal ? I have same issue for "on" ofc, and it's here the problem, for "off" I can use this workaround.
Re: Different working mode for commandArray since some versions
Posted: Saturday 27 May 2023 8:42
by Thorgal789
I m the only one with this change ? So the problem is from my side ?
Re: Different working mode for commandArray since some versions
Posted: Saturday 27 May 2023 12:31
by HansieNL
I'm not sure if on/off is case sensitive On/Off.
Can you try with capital O?
Re: Different working mode for commandArray since some versions
Posted: Saturday 27 May 2023 17:14
by Thorgal789
IDK what was happen, was an old script, so haven't changed it.
But you are right, it have worked with "On" and "Off"
Thx, I have spent perhaps 1h on it .......
Re: Different working mode for commandArray since some versions
Posted: Saturday 27 May 2023 21:43
by psubiaco
Any device in Domoticz has:
*
one integer value (usually set to 0=OFF, 1=ON, and 10=Level1 20=Level2 for selector switches)
*
one string value, that can store many information, for example "Value1;Value2;Value3;..." for devices like Temp+Hum, meters, ...
You can check this, using a lua script, printing the value of
otherdevices["Deconz - Dimmer salon"]
otherdevices_svalues["Deconz - Dimmer salon"]
When you set commandArray["Deconz - Dimmer salon"]="Set Level 80"
automatically domoticz set the value to 80% and set the integer value to 1 (On).
When you set commandArray["Deconz - Dimmer salon"]="Set Level 0"
automatically domoticz set the value to 0% and set the integer value to 0 (Off).
Maybe this can help you finding the problem?
Please note that in my scripts I do not separate the level value by ":" but I just write "Set Level N"
You can find some scripts examples here:
https://github.com/CreasolTech/domoticz_lua_scripts
Good luck
Re: Different working mode for commandArray since some versions
Posted: Sunday 11 June 2023 9:48
by Thorgal789
Ok so the bug is back.
And it's not from code.
I need to restart domoticz for LUA script are able to send commandArray. I think the last time I have restarted too.
Still on investigation.