I had a strange issue with one of my particle devices tonight. They didn’t all do it but just this one. Basically I have a particle function that turns on relays to open or close a water valve when I send a 1 it opens the valve and when I send a 0 it closes the valve.
I mainly control this through my smartthings hub by sending an http request to particle. This has been stably running for probably a good six months now. Til tonight I noticed my pool overflowing and I looked in smartthings it showed the valve was closed but water was clearly running. Craaaaaap at first I faulted smartthings cause they have had issues lately.
I ran a few tests to find the culprit. If i turned off the device from smartthings my valve would close as its supposed to then immediately open back up. If i sent my 1 or 0 to my particle function directly from the console it behaved as expected without doing the extra unexpected command. And at first this solidified my conviction that smartthings was at fault however, when I looked in the smartthings log it only sent the commands that it was supposed to.
I have several photons controlling relays through smartthings using the same method so I thought I would test those and they behaved as expected. To make sure it wasn’t a fluke and didn’t just fix itself before I tested the other devices I tried the problem device one more time and the same thing happened. On a hunch I decided the first thing I would try is power cycling my photon. After I power cycled that photon it is back to behaving as suspected…
This is definitely a strange error. Is it possible that it somehow had two registered instances in the cloud or something like that until I forced it to reconnect? It’s definitely odd behavior and was on the particle side of things. I’ll definintely put some more checks and balances in my code to make sure it wont leave the valve open too long for any reason even if it thinks it had an external command to do so.
Any thoughts on what could have caused this? I know that AWS had some issues or something today but I never saw anything put out by particle as having any incidents.