Enigmatheatre / HomeSeer_Arduino_Plugin

This is to house parts of a plugin allowing integration of Arduino Boards with the Home Automation program Homeseer
3 stars 0 forks source link

Logic change to make connection issues more visible #3

Open RawLiquid opened 10 years ago

RawLiquid commented 10 years ago

I suggest splitting up the code that sends control info to the boards and NOT feeding the updated values back to Homeseer, Instead have that handled by a seperate incoming data event.

There are a few benefits that come to mind, 1) any possible connection issues are immediately obvious as the device you are controlling won't show any artificial change since the status won't get updated until the board initiates that change. 2) status update requests then become possible (Homeseer could then ask the plugin for the status and instead of just returning 0, it could ask the board for the current status of the device) 3) users would then be able to update pins programatically and have those updates show in homeseer by sending the status update

RawLiquid commented 10 years ago

so the flow of an output changing low to high would be something like user clicks on in homeseer plugin sends command string to arduino arduino processes command, then sends a reply with the device code and status plugin updates homeseer device status to the reply value