i have 2 rpi’s one with hassio witch has mosquito and node red installed on it and everything looks like its working everything connects no errors in the logs. on my second pi i have a scrip to control the gpio pin for the relay via mqtt thats also connects fine. my problem is when i send the message to turn on or off the relay nothing happens although it says the message has been sent i have tried from pc hassio node red my phone and all say they have sent and have been connected to the server.
even in node red if i set a mqtt up to the debug nothing shows it has been sent
any help would be great
python -m pi_mqtt_gpio.server config.yml
Traceback (most recent call last):
File “/usr/lib/python2.7/runpy.py”, line 174, in _run_module_as_main
“main”, fname, loader, pkg_name)
File “/usr/lib/python2.7/runpy.py”, line 72, in _run_code
exec code in run_globals
File “/home/pi/.local/lib/python2.7/site-packages/pi_mqtt_gpio/server.py”, line 539, in
with open(args.config) as f:
IOError: [Errno 2] No such file or directory: ‘config.yml’
Hi there !
same here: install of pi-mqtt-gpio goes fine (just gives me the PATH warning) then run
python -m pi_mqtt_gpio.server config.yml
gives me this
Traceback (most recent call last):
File “/usr/lib/python2.7/runpy.py”, line 174, in _run_module_as_main
“main”, fname, loader, pkg_name)
File “/usr/lib/python2.7/runpy.py”, line 72, in _run_code
exec code in run_globals
File “/home/pi/.local/lib/python2.7/site-packages/pi_mqtt_gpio/server.py”, line 539, in
with open(args.config) as f:
IOError: [Errno 2] No such file or directory: ‘config.yml’
You have to create a yaml file, which can be copy and paste from the github repo examples. I found config.yaml too genric, so I did mine as mqtt_config.yaml, and passed it as the attribute.
This makes the server run, and communicate with the broker. I get communication back and forth, but it is not toggling the GPIO pins. More investigating to be done…