Page 1 of 1

Timer setting deactivated on scenes

Posted: Monday 26 August 2024 7:59
by Patricen
Hello,

I mentioned that when switching from timerplan something weird happens.
Example :
I do have a timed scene that runs when I'm using a timerplan "At home"
This timer goes off when selected timerplan is set to "away" (normal behaviour).

The issue is that when settling timerplan back to "At home" the timer keeps deactivated, i the have to set each event back to "on" within the timer settings.
Does anyone encounter the same issue?

Re: Timer setting deactivated on scenes

Posted: Monday 26 August 2024 13:29
by lost
On my side, I have some weird page refresh issue but don't know if this is something specific to my setup, as I change timer plans not using tabs/menus but a virtual selector switch that kicks scripted timer plan change using HTTP/JSON API.

So, when from switch page I change timer plan using this selector, If a check another switch that use timer plans I see no change, as if timer plan was not switched at all... but is is (and timer trigerred events are on par with changed timer plan anyway): Just force-reloading the page fixes this presentation issue.

Not sure you're in the same kind of problem, but you may try reloading page.

Re: Timer setting deactivated on scenes

Posted: Monday 26 August 2024 18:45
by Patricen
Indeed, it looks like we do have the same way to change timerplan, using JSON that has not the same behaviour as if changing timerplan from parameters menu.
It looks like there's a bug

Re: Timer setting deactivated on scenes

Posted: Monday 26 August 2024 23:03
by waltervl
Please check with F12 in a browser if the JSON that is used to switch the timerplan from GUI is different than you use.

Re: Timer setting deactivated on scenes

Posted: Tuesday 27 August 2024 10:51
by lost
waltervl wrote: Monday 26 August 2024 23:03 Please check with F12 in a browser if the JSON that is used to switch the timerplan from GUI is different than you use.
Hello, if I switch using my virtual switch/published API, unfortunately, I only see what's triggered by browser in network tab, not the "script" API access triggered for the level:

Code: Select all

json.htm?type=command&param=switchlight&idx=XXX&switchcmd=Set%20Level&level=20&passcode=
This action (level 20) triggers this API that is not seen there:

Code: Select all

json.htm?type=command&param=setactivetimerplan&ActiveTimerPlan=1
If I then go to settings, previous action anyway really did the timer plan switch to nb1 and switching back to default nb0 from here, I indeed see an undocumented API on top of the trace (as all switch page is reloaded in such case so that's no a single liner trace here):

Code: Select all

json.htm?type=command&param=getdevices&filter=all&used=true&favorite=1&order=[Order]&plan=0
Anyway, on my side with the API published in wiki the switch is for sure done. It's just a presentation issue (as the switch page is then not automatically reloaded) fixed by a manual page reload.

Re: Timer setting deactivated on scenes

Posted: Tuesday 27 August 2024 17:55
by waltervl
The original poster states that with the official way to switch the timerplan from menu setup-settings it works. So that should be the way to switch. I am wondering if that JSON command is the same as the documented one. It could well be that the JSON command has changed over time.

Re: Timer setting deactivated on scenes

Posted: Wednesday 28 August 2024 8:01
by lost
Its never a good point to change APIs without good reasons. Checking what is done by browser may help finding some hidden ones when needed (at ones own risks for maintenance over versions) but IMO no more.
+here menu one is a bit cumbersome and not on par with last year changes/harmonization.

Re: Timer setting deactivated on scenes

Posted: Friday 30 August 2024 13:41
by waltervl
I did not say there was no good reason for a possible change. I did not even mention there was a change. I only wanted the one that has issues verify that the API call was still the same or changed.