Garage mote troubleshooting

Started by spark, October 13, 2015, 03:30:08 PM

spark

Thanks, Felix.   The problem is just timing rather than the position of the magnets.  The loop is simply detecting a new change too quickly as the door is moving.  In addition, the current sketch is "manually" changing the STATUS upon receiving a command over the radio, rather then allowing the "state engine" to calculate the current status.

I rewrote how this works and consolidated the logic into a function.  If the new status is OPEN or CLOSED, I added a delay loop to be sure everything is settled before actually changing the status.  This seems to be rock solid and much more stable for my installation.  Finally, for peace-of-mind, I added a timer to send the current status to the gateway every so often.

I submitted a pull request to you in case you are interested in incorporating.

Felix

Thanks for the contribution, i will review.