sumnerboy12 / mqtt-gpio-monitor

Python script for sending/receiving commands to/from GPIO pins via MQTT messages
46 stars 23 forks source link

GPIO Output update #31

Closed datafx closed 4 years ago

datafx commented 5 years ago

Fix for issue #25 and move GPIO output pin configuration out of the main script and into the ini.

datafx commented 5 years ago

Ok, I think I have it fixed this time. I bought a new raspberry pi to test so I didn't have to pull my setup apart (for science!). You can now configure your output pins through the INI and they are all initialized properly as input or output pins. My log file now shows the following and I'm able to control the outputs via MQTT. 2018-10-05 09:19:32,977 DEBUG Initialising GPIO input pin 10... 2018-10-05 09:19:32,979 DEBUG Initialising GPIO output pin 8... 2018-10-05 09:19:33,310 INFO Connected to xxx.xxx.xxx.xxx:8883 2018-10-05 09:19:33,335 DEBUG Incoming message for pin 8 -> 0 2018-10-05 09:19:38,787 DEBUG Incoming message for pin 8 -> 1 2018-10-05 09:19:40,738 DEBUG Incoming message for pin 8 -> 0