Thanks for posting the code. I just started coding a Python script for my Raspberry PI 2. My plan is to recognize when the garage door switch is open and then send my cell a text if is is not closed within a certain time period because I don't believe that there is away to do this with the Almond+ rules engine. The Python script uses the ws4py package that can be found at
https://ws4py.readthedocs.org/en/latest/ I have included my starting script. So far it just logs in to the almond+ and keeps reporting the almond+ messages to the screen.
from ws4py.client.threadedclient import WebSocketClient
class DummyClient(WebSocketClient):
def opened(self):
print "Connected"
def closed(self, code, reason=None):
print "Closed down", code, reason
def received_message(self, m):
print m
if __name__ == '__main__':
try:
ws = DummyClient('ws://your ip address:7681/your user/your password')
ws.connect()
ws.run_forever()
except KeyboardInterrupt:
ws.close()