bpennypacker / SenseME-Indigo-Plugin

Indigo Plugin for 'Big Ass Solutions' Haiku Fans with SenseME
GNU General Public License v2.0
5 stars 4 forks source link

Polling of fan status in runConcurrentThread(self) broken #2

Closed ZachBenz closed 7 years ago

ZachBenz commented 7 years ago

A couple of problems:

  1. the IP of the fan is hardcoded as 0.0.0.0
  2. The loop assumes there is only one fan, and tries to open a socket to it, rather than waiting to open a socket to the current device for the plugin in the iteration over devices - i.e.:

    for dev in indigo.devices.iter("self")
ZachBenz commented 7 years ago

I rearranged the code to encapsulate getting the fan status in a new method (getFanStatus), which runConcurrentThread (and deviceStartComm) simply call upon.