yelloish6 / Agamemnon

Agamemnon Home Automation
0 stars 0 forks source link

ToDo: Read Light Status #1

Open yelloish6 opened 8 years ago

yelloish6 commented 8 years ago

For the lights page, implement reading of light status.

yelloish6 commented 8 years ago

Manged to read status with createGPIOButton. Add pull-down in HW to avoid random toggling of the label.

yelloish6 commented 8 years ago

First try to implement styling on Living button based on value of GPIO27. Work on bacon.js code:

button = webiopi().createSequenceButton("living", "Living", 22, 200, "01"); var state = webiopi().digitalRead(27); var style = (state == 1) ? "HIGH" : "LOW"; button.attr("class", style); content.append(button);

digitalRead not working yet

yelloish6 commented 8 years ago

Added Callback for digitalRead. styling change still not working. Trying with "autoChangeButton" using macros: https://groups.google.com/forum/#!searchin/webiopi/change$20style$20based$20on$20gpio$20value/webiopi/J9ypXqtsuhw/JfIzWlI7gqUJ