I am having issues trying to use virtual switches in Mode Manager (MM)
I have defined two modes that I intend to set with virtual switch: Vacations , and Energy Saving. The switches are defined on on dashboard.
I was trying to use Mode Manager to activate the mode in response to a virtual switch activation.
So I configured in MM 'Set Modes with Switches, Switches ON ' to use the matching virtual switches activation to 'ON'. When I tried to use the virtual switch to change to the matching mode, no mode change occured
LOG show that the virtual switch ON / OFF sequence was detected. No Mode Manager action followed.
So in order to troubleshoot, I perform the following.
Replaced virtual switch in MM with physical switches 'ON' activation. SUCCESS chosen mode is activated by MM (no need to revert back to OFF).
Disabled MM, and wrote rules in rule machine to activate the mode in response to the virtual switch pressed. SUCCESS
So it seems that MM has issue activating modes by switches when a virtual switch is chosen . Known issue ? Running FW 2.3.4:130
Please show a screenshot of logs for this, like @tray_e did above. There is nothing special about virtual switches; they send the same events as every other kind of switch.
Looking at the logs, it gets even more puzzling to me !
According to the log, everything behaved as it should.
At 22:09:28 the virtual switch for vacation mode was activated and the MM report setting the mode as expected. Same for at 22:09:52 when I turned on the energey saving mode.
But the issue that I observe when either of both mode is active is that :
On the dashboard, the mode still show 'evening', refreshing the page do not fix that
On the apps, the MM status displayed is also 'evening'.
So it seems that there is a discrepancy between the log stating that MM has set the mode and the visualisation of the status from either the dashboard or the Apps display.
If I run the rule machine rules, setting the mode on the Vswitch input. I see on both the dashboard and the apps status the proper mode.
app:32023-01-06 22:09:52.732infoMode set to Economie_Energie from Evening by VSwitch - Mode Energy Saving turned on
dev:932023-01-06 22:09:52.693infoVSwitch - Mode Energy Saving was turned on
app:32023-01-06 22:09:42.797infoMode set to Vacances from Evening by VSwitch - Mode Vacations turned off caused return from Away
dev:922023-01-06 22:09:42.760infoVSwitch - Mode Vacations was turned off
app:32023-01-06 22:09:28.586infoMode set to Vacances from Evening by VSwitch - Mode Vacations turned on
These are not dynamic pages. Don't rely on the app name to tell you what the actual mode is. Either open the Mode Manager app or Settings / Modes to see what the mode is.
Thanks for the info. But opening MM or settings 'Modes' still show a 'timed' mode after activating either of the two events , even if the virtual switch activation and mode change are logged as being done.
When I use a Rule to set the modes (see example below). I can instantly see the change in the dashboard, MM or settings Mode views.
Rule Machine Rule to Set up vacation mode that does work
In that case, in my dashboard, it immediately changes .
I have a workaround using the RM script to trigger the vacation/energy saving modes and have them consistantly displayed. But I am really unable to get it functional using the MM settings using a vswitch. Using a physical switch as a MM switch trigger works as fine as using the RM scripts.
Both instances, I just used the highlighted virtual switches.
Your dashboard screenshots show it properly. When your Vswitch - Mode Vacations is Off, your mode is not Vacations. When it is on, it shows Vacations in the mode. Maybe you should show the same dashboard without using the RM to show how it looks when it is NOT working along with the log entries.
Also realize that if you are not using the dashboard to flip the switches, there may be a lag depending on your refresh settings on the dashboard. I had noticed this as well. If I told Google to turn on a Virtual Switch while watching a dashboard, it was not updating instantly. However, when I used the dashboard switch, it would update the mode instantly.
Yes, I renamed the mode a long time ago. There is no other mode with the name 'vacances'.
Just in case, i hit 'update' in Mode settings, to be sure that the name was well defined and redid the test. I also hit update in MM definition screen just in case
No changes, MM is still using the 'OLD mode name' I also see the same type of behaviour for the presence sensor that was renamed, MM is still using the old name and there is no way to get it to use the new one.
I just tested this on a new hub, and changing a mode name in Settings / Modes did change the name for that mode in Mode Manager. So I'm not sure what you have going on. See the PM I am about to send you.