waltervl wrote: ↑Thursday 28 September 2023 21:38
You can switch on debugging, see the wiki page troubleshooting.
Hello, I think I got it:
Code: Select all
2023-09-30 07:41:24.559 [7f98d6ff80] Status: User: domo (IP: 192.168.1.100) initiated a switch command (318/Planning actif/Set Level)
2023-09-30 07:41:24.560 [7f98d6ff80] Debug: MAIN SwitchLight idx:318 cmd:Set Level lvl:30
2023-09-30 07:41:24.561 [7f98d6ff80] Debug: MAIN SwitchLightInt : switchcmd:Set Level level:30 HWid:23 sd:23 00000000 1 244 62 18
2023-09-30 07:41:24.565 [7f927fbf80] Debug: SQLH HandleOnOffAction: OnAction:http://127.0.0.1:8080/json.htm?type=command¶m=setactivetimerplan&activeTimerPlan=2
2023-09-30 07:41:24.566 [7f927fbf80] Debug: SQLH AddTask: Request to add task: idx=0, DelayTime=0.200000, Command='', Level=0, Color='{INVALID}', RelatedEvent=''
2023-09-30 07:41:24.567 [7f927fbf80] Debug: SQLH UpdateValueInt Planning actif HwID:23 DevID:00000000 Type:244 sType:62 nValue:2 sValue:30
2023-09-30 07:41:24.577 [7f927fbf80] Planning Select: Light/Switch (Planning actif)
2023-09-30 07:41:24.577 [7f927fbf80] Debug: CWebServer::GetJSonPage :getdevices :/json.htm?type=command¶m=getdevices&rid=318
2023-09-30 07:41:24.587 [7f98d6ff80] Debug: Web ACLF: 192.168.1.100 - - [30/Sep/2023:07:41:24.556 +0200] "GET /json.htm?type=command¶m=switchlight&idx=318&switchcmd=Set%20Level&level=30&passcode= HTTP/1.1" 200 47 "http://192.168.1.31:8080/" "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0"
2023-09-30 07:41:24.778 [7f9a572f80] Debug: SQLH: Do Task ItemType:6 Cmd: Value:http://127.0.0.1:8080/json.htm?type=command¶m=setactivetimerplan&activeTimerPlan=2
2023-09-30 07:41:24.781 [7f98d6ff80] Debug: [web:8080] Host:127.0.0.1 Uri:/json.htm?type=command¶m=setactivetimerplan&activeTimerPlan=2
2023-09-30 07:41:24.781 [7f98d6ff80] Debug: [web:8080] Request Headers:
Host: 127.0.0.1:8080
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/602.36 (KHTML, like Gecko) Chrome/53.0.38679.0 Safari/602.37
Accept: */*
Accept-Encoding: deflate, gzip, br
2023-09-30 07:41:24.783 [7f98d6ff80] Debug: [web:8080] IP (127.0.0.1) is within Trusted network range!
2023-09-30 07:41:24.783 [7f98d6ff80] Debug: [web:8080] isPage 1 isAction 0 isUpgrade 0 needsAuthentication 1 isAuthenticated 1 (domo)
2023-09-30 07:41:24.784 [7f98d6ff80] Debug: CWebServer::GetJSonPage :setactivetimerplan :/json.htm?type=command¶m=setactivetimerplan&activeTimerPlan=2
2023-09-30 07:41:24.785 [7f98d6ff80] Status: Scheduler Timerplan changed (0 - default)
2023-09-30 07:41:24.794 [7f98d6ff80] Debug: Web ACLF: 127.0.0.1 - - [30/Sep/2023:07:41:24.781 +0200] "GET /json.htm?type=command¶m=setactivetimerplan&activeTimerPlan=2 HTTP/1.1" 200 54 - "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/602.36 (KHTML, like Gecko) Chrome/53.0.38679.0 Safari/602.37"
At 2023-09-30 07:41:24.561 you see requested change for level 30 (with action :
http://127.0.0.1:8080/json.htm?type=com ... imerPlan=2), right on this side (matching virtual selector button I pressed).
At 2023-09-30 07:41:24.781 / 2023-09-30 07:41:24.784 command passed match hereupper action.
2023-09-30 07:41:24.785 message says it changed... for level 0 (default), not 2 (the requested one).
If I select level 20 / planning idx 1 with selection done correctly, I have:
Code: Select all
2023-09-30 07:53:50.941 [7f98d6ff80] Status: User: domo (IP: 192.168.1.100) initiated a switch command (318/Planning actif/Set Level)
2023-09-30 07:53:50.941 [7f98d6ff80] Debug: MAIN SwitchLight idx:318 cmd:Set Level lvl:20
2023-09-30 07:53:50.942 [7f98d6ff80] Debug: MAIN SwitchLightInt : switchcmd:Set Level level:20 HWid:23 sd:23 00000000 1 244 62 18
2023-09-30 07:53:50.944 [7f927fbf80] Debug: SQLH HandleOnOffAction: OnAction:http://127.0.0.1:8080/json.htm?type=command¶m=setactivetimerplan&ActiveTimerPlan=1
2023-09-30 07:53:50.944 [7f927fbf80] Debug: SQLH AddTask: Request to add task: idx=0, DelayTime=0.200000, Command='', Level=0, Color='{INVALID}', RelatedEvent=''
2023-09-30 07:53:50.945 [7f927fbf80] Debug: SQLH UpdateValueInt Planning actif HwID:23 DevID:00000000 Type:244 sType:62 nValue:2 sValue:20
2023-09-30 07:53:50.949 [7f927fbf80] Planning Select: Light/Switch (Planning actif)
2023-09-30 07:53:50.949 [7f927fbf80] Debug: CWebServer::GetJSonPage :getdevices :/json.htm?type=command¶m=getdevices&rid=318
2023-09-30 07:53:50.955 [7f98d6ff80] Debug: Web ACLF: 192.168.1.100 - - [30/Sep/2023:07:53:50.940 +0200] "GET /json.htm?type=command¶m=switchlight&idx=318&switchcmd=Set%20Level&level=20&passcode= HTTP/1.1" 200 47 "http://192.168.1.31:8080/" "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0"
2023-09-30 07:53:51.168 [7f9a572f80] Debug: SQLH: Do Task ItemType:6 Cmd: Value:http://127.0.0.1:8080/json.htm?type=command¶m=setactivetimerplan&ActiveTimerPlan=1
2023-09-30 07:53:51.170 [7f98d6ff80] Debug: [web:8080] Host:127.0.0.1 Uri:/json.htm?type=command¶m=setactivetimerplan&ActiveTimerPlan=1
2023-09-30 07:53:51.170 [7f98d6ff80] Debug: [web:8080] Request Headers:
Host: 127.0.0.1:8080
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/602.36 (KHTML, like Gecko) Chrome/53.0.38679.0 Safari/602.37
Accept: */*
Accept-Encoding: deflate, gzip, br
2023-09-30 07:53:51.170 [7f98d6ff80] Debug: [web:8080] IP (127.0.0.1) is within Trusted network range!
2023-09-30 07:53:51.171 [7f98d6ff80] Debug: [web:8080] isPage 1 isAction 0 isUpgrade 0 needsAuthentication 1 isAuthenticated 1 (domo)
2023-09-30 07:53:51.171 [7f98d6ff80] Debug: CWebServer::GetJSonPage :setactivetimerplan :/json.htm?type=command¶m=setactivetimerplan&ActiveTimerPlan=1
2023-09-30 07:53:51.171 [7f98d6ff80] Status: Scheduler Timerplan changed (1 - Holiday)
2023-09-30 07:53:51.178 [7f98d6ff80] Debug: Web ACLF: 127.0.0.1 - - [30/Sep/2023:07:53:51.170 +0200] "GET /json.htm?type=command¶m=setactivetimerplan&ActiveTimerPlan=1 HTTP/1.1" 200 54 - "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/602.36 (KHTML, like Gecko) Chrome/53.0.38679.0 Safari/602.37"
At 2023-09-30 07:53:50.941 button for level 20 is pressed
At 2023-09-30 07:53:51.171 the intended action is done (level 20 action is
http://127.0.0.1:8080/json.htm?type=com ... imerPlan=1) and planning 1 is stelected.
For reference, the plannings I have setup with their idx (back to normal one selection, here, that also works from selector):
Code: Select all
$ curl 'http://127.0.1.1:8080/json.htm?type=command¶m=gettimerplans'
{
"result" :
[
{
"Active" : false,
"Name" : "AtHome",
"idx" : 2
},
{
"Active" : true,
"Name" : "default",
"idx" : 0
},
{
"Active" : false,
"Name" : "Empty",
"idx" : 3
},
{
"Active" : false,
"Name" : "Holiday",
"idx" : 1
},
{
"Active" : false,
"Name" : "tempoR",
"idx" : 4
}
],
"status" : "OK",
"title" : "GetTimerPlans"
}
+ as already mentioned, direct API selection (for instance: curl '
http://127.0.1.1:8080/json.htm?type=com ... imerPlan=2') works for all levels. Only selector switch selection with actions cause issues for levels != 0 or 1.
I'll shut debug now as very verbose but keep whole file if needed.