eklem / greenhouse-automation

Greenhouse automation based on Raspberry Pi and Node-red
MIT License
1 stars 1 forks source link

Test automation hat - blink some lights #22

Open eklem opened 3 years ago

eklem commented 3 years ago

Test the automation hat and the node-red-contrib-automation-hat library by blinking some lights, using time as a trigger.

eklem commented 3 years ago

Getting input working, but not changing any lights so far:

[{"id":"f4d7ea37.eb84c8","type":"tab","label":"test simple","disabled":false,"info":"Just trying to fire off a light on the automation hat. Should try to set up a breadboard with a led connected to the relay?"},{"id":"d72afcd6.95ae3","type":"rpi-automation-hat out","z":"f4d7ea37.eb84c8","name":"","x":780,"y":400,"wires":[]},{"id":"b5279347.1913","type":"change","z":"f4d7ea37.eb84c8","name":"Warn LED","rules":[{"t":"set","p":"topic","pt":"msg","to":"light.warn","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":540,"y":520,"wires":[["d72afcd6.95ae3"]]},{"id":"c1ed767d.d94b38","type":"change","z":"f4d7ea37.eb84c8","name":"Turn off Warn LED","rules":[{"t":"set","p":"payload","pt":"msg","to":"off","tot":"str"},{"t":"set","p":"topic","pt":"msg","to":"light.warn","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":530,"y":400,"wires":[["d72afcd6.95ae3"]]},{"id":"4259f741.672908","type":"rpi-mouse","z":"f4d7ea37.eb84c8","name":"","butt":"1","x":130,"y":440,"wires":[["b5279347.1913","faf859e8.e54bb8"]],"outputLabels":["0"]},{"id":"e384d1cd.14ef2","type":"rpi-mouse","z":"f4d7ea37.eb84c8","name":"","butt":"2","x":120,"y":380,"wires":[["c1ed767d.d94b38","9646051a.998658"]],"outputLabels":["1"]},{"id":"9646051a.998658","type":"debug","z":"f4d7ea37.eb84c8","name":"right","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":290,"y":280,"wires":[]},{"id":"faf859e8.e54bb8","type":"debug","z":"f4d7ea37.eb84c8","name":"left","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":270,"y":580,"wires":[]},{"id":"e292ac2e.fede3","type":"timerswitch","z":"f4d7ea37.eb84c8","name":"","ontopic":"","offtopic":"","onpayload":"","offpayload":"","disabled":false,"schedules":[],"x":110,"y":680,"wires":[[]]}]
eklem commented 3 years ago

To trigger a flow at a specific time

eklem commented 3 years ago

Maybe check the Python examples: https://learn.pimoroni.com/tutorial/sandyj/getting-started-with-automation-hat-and-phat

eklem commented 3 years ago

And test to take out the hat out and see what node-red says then.