Failed. The continuous loop managed to run 3 days until one of the virtual switches failed to shut off at the time set up in power allowance of the automation which stops the loop. So basically 2 virtual switches running the above loop whether locally or in the cloud fail in about 2 to 3 days . This is without any connection to my real switch yet so no signal issues.
For now Iâm back to my $15. digital timer which runs without issue. I may set this up and run the same test in Webcore if I find the time.
So glad you caught that. I didnât even think to check anything being I had this fail so many times in the past when it was in the cloud. However, I did have a good feeling this time when it made it to three says when previously it was more like 2 days but that went away quickly when it failed. I did check and failure was right at hub reboot time. Test is restarted.
A question about webCoRE. What happens after a internet disconnect, hub reboot or power failure? Will the on/off loop restart automatically or does it require intervention?
Using triggers (think of action verbs) such as Stays, Changes, Rises, Happens, etc., the timer will reset once power is restored. Using conditions (think of the current state) such as Is, Was, Changed, etc., it will need something to trigger the Piston such as all conditions being met.
So it sounds like your webCoRE Piston suggestion above will automatically resume after a power failure being it is using âstaysâ. I guess I will move onto webCoRE. Thanks for your help.
Another approach that you could try to develop your automation, is the Rules API. With it, you can define your conditional statements in a simple JSON format.
See the example below that describes the next workflow:
IfGE-SmartSwith is ON
Wait 1 minute and turn OFF
Wait 19 minutes and turn ON
This basic Rule will maintain the loop active, as it detects the switch state as ON.
It took a bit but I managed to get webCoRE loaded and running and created the piston as you suggested. It works nicely but doesnât start back up after a power failure. If I manually change the state of the switch it starts back up.
Hi Erick,
Thanks for your suggestion of the rules API and the example you provided. Where do I even begin with this? I did some searching on Rules API and it started mentioning loading Postman and things started to look complicated. Can you point me in the right direction or should I just leave this one alone?
thanks,
Mike
I think I came up with something in webCoRE that works, is pretty simple and automatically restarts after after a power failure. I will need to let it run for a few days to be sure but initially it looks good:
Every 20 minutes
Turn on
Wait 1 minute
Turn off
Wait 19 minutes
The more you play around with webCoRE, the more you will realize that there are multiple ways to create a Piston to achieve the same result. The timers are more advanced but yeah, that should work even without the last wait segment.
I have failsafes built into most of my Pistons which are basically additional If blocks for checks and balances.
You can create your Rule Automation using either Postman or Insomnia. Personally, Iâd suggest you to use Insomnia, as it has a simplier and intuitive UI to perform your API calls. Please, follow the steps below:
First, you must create a Personal Access Token that youâll be using at your Requests Headers to the SmartThings API.
Then, you must get the list of your devices making a GET HTTP Request at the SmartThings Devies API and track your GE SmartSwitchâs Id.
Finally, update the JSON file from above with your GE SmartSwitch Id and make a POST Http Request to the Rules API.