tellsticknet
tellsticknet copied to clipboard
ImportError when running tellsticknet mqtt
Goal: Listen for sensor data, send to MQTT (letting Home Assistant do the rest)
Here are my settings: Ubuntu 22.04 with Python 3.10.12. TellStick Net (firmware 17). MQTT server running on the same subnet.
- cd ~
- git clone https://github.com/molobrakos/tellsticknet.git
- cd tellsticknet
- pip install .
- nano ~/.config/mosquitto_pub with contents: -h 192.168.10.59 # the actual ip for my already running MQTT server -p 1883 -username ThisIsMyUsernameForMyMQTTserver -pw ThisIsMyPasswordForMyMQTTserver
Now I can run e.g 'tellsticknet --ip 192.168.10.180 listen' and I also get data from a bunch of sensors.
However, when I try to run 'tellsticknet mqtt -d -vv' I get the following error:
23-12-25 12:48.16 INFO (MainThread) [tellsticknet.main] Debug is on
23-12-25 12:48.16 DEBUG (MainThread) [asyncio] Using selector: EpollSelector
23-12-25 12:48.16 DEBUG (MainThread) [tellsticknet.main] checking for config file /home/anders/.local/bin/tellsticknet.conf
23-12-25 12:48.16 DEBUG (MainThread) [tellsticknet.main] checking for config file /home/anders/.local/bin/.tellsticknet.conf
23-12-25 12:48.16 DEBUG (MainThread) [tellsticknet.main] checking for config file /home/anders/tellsticknet.conf
23-12-25 12:48.16 DEBUG (MainThread) [tellsticknet.main] checking for config file /home/anders/.tellsticknet.conf
23-12-25 12:48.16 DEBUG (MainThread) [tellsticknet.main] checking for config file /home/anders/.config/tellsticknet.conf
23-12-25 12:48.16 DEBUG (MainThread) [asyncio] Close <_UnixSelectorEventLoop running=False closed=False debug=True>
Traceback (most recent call last):
File "/home/anders/.local/bin/tellsticknet", line 8, in
Can anyone help with this? Also, I am wondering about the file ~/.config/tellsticknet.conf. Is that a file I have to fill in myself all together? By using 'tellsticknet --ip 192.168.10.180 listen' I do get protocol, model and sensorid, so I guess I could (should?).
The final goal is to get 'tellsticknet mqtt' running and then let Home Assistant do the rest. This last month (dec 2023) has been a real pain with Telldus Live, so I was really glad that I found this on GitHub. I also have a TellStick ZNet v2 in another subnet, but that is something Home Assistant already has support for with the local API.
To me it seems like a "simple" fix in the source code to get things referenced correctly, but I do not have enough competence to find out where to fix it. Hopefully someone can!
Having the same issue, with the same error messages when trying to start the mqtt gateway. I am running Python 3.9, but as said same errors.
mosquitto_pub and config seem to be working fine (I can e.g. manage to switch a light on or off), as wel as listen for values. Only have issues with the mqtt connection.
Had the same issue and this fixed it for me: pip install "websockets==8.1"
I also needed to add every sensor I want to track in homeassistant to tellsticknet.conf
I also manually added the mqtt sensors to configuration.yaml as I wanted to group them inside one device and added force_update: true so that sensor values are updated every time new data is received (normally only updated when data is changed).
It was typo in tellsticknet.conf -file. Left separator "---" in the end of file and after removing it works.
I can't get this to work. I tried with Ubuntu 22.04 and Debian 11.
I am using christers updated fork (hbmqtt replaced with amqtt).I can find my tellsticknet from local network and get sensor values. Mqtt won't get to work.
This is from Ubuntu (with tellsticknet mqtt -vv -d):
24-06-11 21:31.21 DEBUG (MainThread) [tellsticknet.mqtt] Setting up devices
24-06-11 21:31.21 DEBUG (MainThread) [amqtt.client] Watch broker disconnection
24-06-11 21:31.21 DEBUG (MainThread) [amqtt.mqtt.protocol.handler] Task cancelled, reader loop ending
24-06-11 21:31.21 DEBUG (MainThread) [amqtt.mqtt.protocol.handler] Broker closed connection
24-06-11 21:31.21 DEBUG (MainThread) [amqtt.mqtt.protocol.handler] Reader coro stopped
24-06-11 21:31.21 DEBUG (MainThread) [amqtt.mqtt.protocol.handler] Stopping 0 puback waiters
24-06-11 21:31.21 DEBUG (MainThread) [amqtt.mqtt.protocol.handler] Stopping 0 pucomp waiters
24-06-11 21:31.21 DEBUG (MainThread) [amqtt.mqtt.protocol.handler] Stopping 0 purec waiters
24-06-11 21:31.21 DEBUG (MainThread) [amqtt.mqtt.protocol.handler] Stopping 0 purel waiters
24-06-11 21:31.21 DEBUG (MainThread) [amqtt.mqtt.protocol.handler] waiting for tasks to be stopped
24-06-11 21:31.21 DEBUG (MainThread) [asyncio] Close <_UnixSelectorEventLoop running=False closed=False debug=True>
Traceback (most recent call last):
File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/coolbiz/temp/tellsticknet/tellsticknet/main.py", line 269, in
And this is what comes from Debian:
24-06-11 21:33.34 DEBUG (MainThread) [tellsticknet.mqtt] Setting up devices
24-06-11 21:33.34 DEBUG (MainThread) [amqtt.client] Watch broker disconnection
24-06-11 21:33.34 DEBUG (MainThread) [amqtt.mqtt.protocol.handler] Task cancelled, reader loop ending
24-06-11 21:33.34 DEBUG (MainThread) [amqtt.mqtt.protocol.handler] Broker closed connection
24-06-11 21:33.34 DEBUG (MainThread) [amqtt.mqtt.protocol.handler] Reader coro stopped
24-06-11 21:33.34 DEBUG (MainThread) [amqtt.mqtt.protocol.handler] Stopping 0 puback waiters
24-06-11 21:33.34 DEBUG (MainThread) [amqtt.mqtt.protocol.handler] Stopping 0 pucomp waiters
24-06-11 21:33.34 DEBUG (MainThread) [amqtt.mqtt.protocol.handler] Stopping 0 purec waiters
24-06-11 21:33.34 DEBUG (MainThread) [amqtt.mqtt.protocol.handler] Stopping 0 purel waiters
24-06-11 21:33.34 DEBUG (MainThread) [amqtt.mqtt.protocol.handler] waiting for tasks to be stopped
24-06-11 21:33.34 DEBUG (MainThread) [asyncio] Close <_UnixSelectorEventLoop running=False closed=False debug=True>
Traceback (most recent call last):
File "/home/coolbiz/.local/bin/tellsticknet", line 8, in
Any help is apreciated.