martomi / chiadog

A watch dog providing a peace in mind that your Chia farm is running smoothly 24/7.
MIT License
457 stars 120 forks source link

MQTT - Paho MQTT module was not found #226

Closed baerrs closed 3 years ago

baerrs commented 3 years ago

Describe the bug

I cant get a message via MQTT.

Error Msg: [2021-06-05 18:20:33] [ ERROR] --- Message delivery failed because the Paho MQTT module was not found. Please refer to INTEGRATIONS.md for help on resolving this issue. (mqtt_notifier.py:109) [2021-06-05 18:20:33] [ ERROR] --- Failed to send events over mqtt (notify_manager.py:64)

config.ymal: mqtt: enable: true daily_stats: true wallet_events: true topic: chia/chiadog/alert qos: 1 retain: false credentials: host: '192.168.1.149' port: 1883

I can run the test in INTEGRATIONS.md, and see the message in my mqtt broker (I get warnings about no user name and password) HOST=192.168.1.149 PORT=1883 TOPIC=TestChiadogMQTT python3 -m unittest tests.notifier.test_mqtt_notifier WARNING:root:You did not provide a username and password for connecting to the MQTT Broker. This might be indicative of a misconfigured config file .WARNING:root:You did not provide a username and password for connecting to the MQTT Broker. This might be indicative of a misconfigured config file .WARNING:root:You did not provide a username and password for connecting to the MQTT Broker. This might be indicative of a misconfigured config file .

Ran 3 tests in 0.043s

Environment:

baerrs commented 3 years ago

2021-06-05 19_36_28-MQTT Explorer

baerrs commented 3 years ago

When i do the test, i see the traffic via tcpdump, When I start chiadog, and it fails, there is no traffic.

baerrs commented 3 years ago

OK, I think i kind of figured it out.
Though Paho MQTT module was installed on my server, it somehow wasn't installed in the venv environment. I started the venv, ran the install for paho mqtt, and now when I run the ./start.sh it does not give errors and says it connected.

I'm not receiving messages yet on the mqtt server but its a start.

pieterhelsen commented 3 years ago

Did you figure out what the issue was?

pieterhelsen commented 3 years ago

Closed due to inactivity