petski/pimatic-mochad — pull request #4 by edorsey (2014-11-30 03:10:30+00:00)
Title: Add RF protocol to device unit

This resolves petski/pimatic-mochad#3 by adding protocol support. It adds a new field to the device unit schema called protocol, this defaults to "pl", but can also be "rf".

I also fixed what appear to be a bug that prevented me from ever toggling lights on or off once, the regex wasn't matching for me, so I modified to match so that the device's state got updated properly. I didn't take the time to fully understand what the purpose of `lastSeen` is, but this made it work well for me.