Expose GPIO modules (Raspberry Pi, Beaglebone, PCF8754, PiFace2 etc.) and digital sensors (LM75 etc.) to an MQTT server for remote control and monitoring.
MIT License
465
stars
157
forks
source link
CONFIG_SCHEMA is missing payload defaults in digital_outputs node #159
[x] I have read the README.md file and visited the Github Wiki to see if the information there helps.
Describe the bug
Runtime error occurs in logging message if payload_on and payload_off are not configured for digital outputs
Expected behavior
"ON" and "OFF" should be used as default payload for digital outputs when nothing is configured.
Error messages and traceback
(ERROR): Exception while handling received MQTT message:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/pi_mqtt_gpio/server.py", line 528, in on_msg
handle_set(topic_prefix, msg)
File "/usr/local/lib/python2.7/dist-packages/pi_mqtt_gpio/server.py", line 221, in handle_set
if payload not in (output_config["on_payload"], output_config["off_payload"]):
KeyError: 'on_payload'
Describe the bug Runtime error occurs in logging message if payload_on and payload_off are not configured for digital outputs
Expected behavior "ON" and "OFF" should be used as default payload for digital outputs when nothing is configured.
Error messages and traceback
Config
Hardware
System:
Additional context I think there are simply two lines missing in init.py: default "ON" between 264/265 default "OFF" between 268/269