Possible Maker API bug causing loop to turn off virtual switch every 30 seconds?

When creating a rule in rule machine after installing and setting up maker API for a virtual switch (that is also controlled by google home automation app) to post to a site upon the switch state changing to off, the maker API gets caught in a loop and shuts off the switch every 30 seconds (according to the logs). Removing and re-installing Maker API after rules are created resolved the problem. Removing virtual device from google home and disabling google home app did not fix the issue.

I had 3 virtual switches, the issue only happened on the two where I created or modified the rules after maker API was setup. The switch that had already been setup with rules did not have this issue.

Two general recommendations are to include your platform version (e.g. 2.3.x) and model (e.g. C-x) when posting an issue.

More relevant to your issue... I would suggest posting screenshots of various parts of your setup and some logs. Maybe start with the Events log for the affected virtual switch and turn on and post any logs from the Maker API instance.

If this is happening:

Then I would expect something that is using the Maker API instance, i.e. an external system such as Node RED or similar, would be initiating a command through Maker API. I would review any systems like NR you have connected to Maker API to see if thay are triggering the virtual switch in some way.

If you do not have any external system using Maker API, then it seems odd to me for you to be seeing what you are. If it is causing problems you could always disable the instance of Maker API and setup a new one, if that is feasible.

Personally I like to setup separate instances of Maker API for very specific use cases, such as a Maker API instance for InluxDB logging, a separate one for integrating my Garmin watch, etc. That way I can isolate any issues and/or restrict interactions that may be problematic.

2 Likes

Also check that your preferences don't have the option to auto off

4 Likes

Sometimes it can be the simplest things....

3 Likes

That was my first thought and it was off. I even tried turning auto off on and then back off in case it was not showing the correct value. The issue still happened. I did have something external calling the 'off' rule that was by design. That was not what was causing this, I even shut down that device to ensure it was not sending the command.
Hub: C5
Firmware 2.4.4.156

I will see if I can get it to repeat the issue and post the logs. Deleting that instance of Maker API and re-installing resolved the issue.

1 Like

I would expect that you could possibly now have a periodic error citing a request to an app that no longer exists as MakerAPI is only a conduit. Could be lucky and by eliminating MakerAPI also eliminated the trigger source for the external app.

1 Like