Comments (4)
Hi @JeremiahChurch,
who is restarting your mqtt-io? Are you using supervisor?
CancelledError says, that something killed your task...
Greetings
Benni
from mqtt-io.
who is restarting your mqtt-io? Are you using supervisor? CancelledError says, that something killed your task...
Apologies @BenjiU , I swear I had included that but I must have copy/pasted over it.
Using supervisor with a virtual env exactly as described in the docs. Only difference is config file path
from mqtt-io.
No Problem, may you please try without supervisor? Maybe supervisor does not recognice correct startup of mqtt-io and kills it.
from mqtt-io.
unfortunately similar outcome run directly
jchurch@aircompressor:~ $ sudo supervisorctl stop mqtt_io
mqtt_io: stopped
jchurch@aircompressor:~ $ /home/jchurch/ve/bin/python -m mqtt_io config.yml
2023-10-06 10:20:08 mqtt_io.server [INFO] Digital output 'primary_pump_enable' current value is True (raw: True)
2023-10-06 10:20:09 mqtt_io.server [INFO] Digital output 'secondary_pump_enable' current value is False (raw: False)
2023-10-06 10:20:10 mqtt_io.server [INFO] Digital output 'drain_enable' current value is False (raw: False)
2023-10-06 10:20:10 mqtt_io.server [INFO] Digital output 'unused_relay' current value is False (raw: False)
2023-10-06 10:20:10 mqtt_io.server [INFO] Connecting to MQTT...
2023-10-06 10:20:10 mqtt_io.server [INFO] Connected to MQTT
2023-10-06 10:20:10 mqtt_io.server [INFO] Subscribed to topic: 'aircomp/output/primary_pump_enable/set'
2023-10-06 10:20:10 mqtt_io.server [INFO] Subscribed to topic: 'aircomp/output/primary_pump_enable/set_on_ms'
2023-10-06 10:20:10 mqtt_io.server [INFO] Subscribed to topic: 'aircomp/output/primary_pump_enable/set_off_ms'
2023-10-06 10:20:10 mqtt_io.server [INFO] Subscribed to topic: 'aircomp/output/drain_enable/set'
2023-10-06 10:20:10 mqtt_io.server [INFO] Subscribed to topic: 'aircomp/output/drain_enable/set_on_ms'
2023-10-06 10:20:10 mqtt_io.server [INFO] Subscribed to topic: 'aircomp/output/drain_enable/set_off_ms'
2023-10-06 10:20:10 mqtt_io.server [INFO] Subscribed to topic: 'aircomp/output/secondary_pump_enable/set'
2023-10-06 10:20:10 mqtt_io.server [INFO] Subscribed to topic: 'aircomp/output/secondary_pump_enable/set_on_ms'
2023-10-06 10:20:10 mqtt_io.server [INFO] Subscribed to topic: 'aircomp/output/secondary_pump_enable/set_off_ms'
2023-10-06 10:20:10 mqtt_io.server [INFO] Subscribed to topic: 'aircomp/output/unused_relay/set'
2023-10-06 10:20:10 mqtt_io.server [INFO] Subscribed to topic: 'aircomp/output/unused_relay/set_on_ms'
2023-10-06 10:20:10 mqtt_io.server [INFO] Subscribed to topic: 'aircomp/output/unused_relay/set_off_ms'
2023-10-06 10:21:00 mqtt_io.server [ERROR] Exception in critical task:
Traceback (most recent call last):
File "/usr/lib/python3.9/asyncio/locks.py", line 226, in wait
await fut
asyncio.exceptions.CancelledError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.9/asyncio/tasks.py", line 492, in wait_for
fut.result()
asyncio.exceptions.CancelledError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/jchurch/ve/lib/python3.9/site-packages/asyncio_mqtt/client.py", line 217, in _wait_for
return await asyncio.wait_for(*args, **kwargs)
File "/usr/lib/python3.9/asyncio/tasks.py", line 494, in wait_for
raise exceptions.TimeoutError() from exc
asyncio.exceptions.TimeoutError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/jchurch/ve/lib/python3.9/site-packages/mqtt_io/mqtt/asyncio_mqtt.py", line 32, in inner
await func(*args, **kwargs)
File "/home/jchurch/ve/lib/python3.9/site-packages/mqtt_io/mqtt/asyncio_mqtt.py", line 94, in publish
await self._client.publish(
File "/home/jchurch/ve/lib/python3.9/site-packages/asyncio_mqtt/client.py", line 136, in publish
await self._wait_for(confirmation.wait(), timeout=timeout)
File "/home/jchurch/ve/lib/python3.9/site-packages/asyncio_mqtt/client.py", line 219, in _wait_for
raise MqttError('Operation timed out')
asyncio_mqtt.error.MqttError: Operation timed out
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/jchurch/ve/lib/python3.9/site-packages/mqtt_io/server.py", line 1218, in _main_loop
await asyncio.gather(*self.critical_tasks)
File "/home/jchurch/ve/lib/python3.9/site-packages/mqtt_io/server.py", line 1071, in _mqtt_keep_alive_loop
await self.mqtt.publish(MQTTMessageSend(
File "/home/jchurch/ve/lib/python3.9/site-packages/mqtt_io/mqtt/asyncio_mqtt.py", line 34, in inner
raise MQTTException from exc
mqtt_io.mqtt.MQTTException
2023-10-06 10:21:02 mqtt_io.server [INFO] Reconnecting to MQTT broker (infinite retries remaining)
2023-10-06 10:21:02 mqtt_io.server [INFO] Connecting to MQTT...
2023-10-06 10:21:02 mqtt_io.server [INFO] Connected to MQTT
from mqtt-io.
Related Issues (20)
- Stream sensor (serial) not reliable
- Running mqtt-io as a service on Raspberry Pi
- Version 2.2.9 is not available on PyPI HOT 4
- Pinned PyYAML version incompatible with latest Cython 3.0.0 HOT 6
- In case of reconnection to MQTT broker subscriptions are lost
- pip fails on pyyaml, poetry fails on requests.utils on a raspberry pi zero w HOT 8
- How to add and reuse values in config files? HOT 1
- Chip has no attribute 'OPEN_BY_NAME' - Orange Pi Zero HOT 2
- KeyError when trying to run on Orange Pi Zero 2W, Ubuntu 22.04 HOT 2
- Raspberry pi 5 support? HOT 1
- use RPIO instead of RPi.GPIO
- Separate Devices Running MQTT IO Are Recognized as a Single Device in Home Assistant HOT 1
- MQTT Io On OrangePi 5 HOT 1
- Issues with paho-mqtt 2.0 HOT 4
- Crash using gpiod HOT 1
- Release version 2.3.0
- New version not working HOT 10
- Wont Connect to MQTT Broker and getting error in log from python script HOT 2
- DHT22 Adafruit_DHT problem HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mqtt-io.