Hi everyone,
I'm taking a stab at developing an Indigo plug-in for an alarm system that I have setup using an Arduino.
The Arduino has an ethernet shield and monitors the state of a door. When the door state changes from open to close or vice versa, the Arduino will send the new state in a small JSON payload via multicast UDP.
I'm using (taken from the SDK examples that I downloaded). The way that I have things setup currently in plugin.py
1. deviceStartedComm() contains the code to setup the socket and multicast port
2. runConcurrentThread has been modified to call the sock.recv() function which blocks waiting for broadcast data to arrive.
My question: is it ok for the runConcurrentThread function to block waiting on data?