Page 1 of 1

2023-1:Diming lights not working in URL

Posted: Tuesday 28 March 2023 22:49
by m3mojo
Hi!
I just upgraded to 2023-1 and everything works great, but one thing: it seems like the dimming via urls changed:

/json. htm?type=command&param=switchlight&idx=244&switchcmd=Set%20Level&level=20

Leads to

2023-03-28 22:42:31 .507 Status: User: *** (IP: ***) initiated a switch command (244/HAB Lichtgruppe 1/Set Level)
2023-03-28 22:42:31 .515 Status: LUA: Handledevicenumber: 1 - Device based event fired on 'HAB Lichtgruppe 1', value 'On', svalue '31'

It does not matter what number "level" has, it always recognizes "31" as svalue. If I put "&level=0" it switches off, but every other Number >= 1 leads to "31" .

The json answer is always
"{
"status" : "OK",
"title" : "SwitchLight"
}"

Any ideas?
Thank you and keep up the good work!!

Re: 2023-1:Diming lights not working in URL

Posted: Wednesday 29 March 2023 8:50
by waltervl
Seems that there is a lua script running that sets the level back to 31

Re: 2023-1:Diming lights not working in URL

Posted: Saturday 19 August 2023 16:26
by thaui
There must be a mistake. If I use the json command setcolbrightnessvalue the device is going to 100%.

os.execute("curl \"http://127.0.0.1:8080/json.htm?type=com ... hite=false\"")

The json command switchlight is not dimming the device but the percentage is shown in the GUI as reduced
os.execute("curl \"http://127.0.0.1:8080/json.htm?type=com ... tchcmd=Set Level&level=50\"")