MQTT plugin for Tellstick ZNet Lite v2?

Moderator: Telldus

Post Reply
flyvert
Posts: 8
Joined: Wed Jan 02, 2019 8:23 pm

MQTT plugin for Tellstick ZNet Lite v2?

Post by flyvert » Sat Jan 12, 2019 12:44 pm

I just upgraded from Tellstick Net to a ZNet Lite v2

Is there any plugin or LUA, etc script available so that I can have my new Tellstick hardware to publish sensordata via MQTT?

My broker sit on a Raspberry PI on local LAN so I would prefer if the Tellstick made a local "publish" instead of going via some cloud service.

I don't mind programming a bit, e.g having Tellstick LUA to post sensor data to a Raspberry Python script which makes MQTT publish is also a viable solution (but MQTT "publish" from the Tellstick straight to the MQTT broker on my LAN would "rock"!)

Any ideas are welcome!

Cheers!
/f

flyvert
Posts: 8
Joined: Wed Jan 02, 2019 8:23 pm

Re: MQTT plugin for Tellstick ZNet Lite v2?

Post by flyvert » Sun Jan 20, 2019 3:26 pm

I have come a bit further on the MQTT topic by studying the https://media.readthedocs.org/pdf/tells ... server.pdf.

So I took a Raspberry PI and downloaded the Tellstick Server and Tellstick Server Plugins from GitHub

$ git clone https://github.com/telldus/tellstick-server.git
$ git clone https://github.com/telldus/tellstick-server-plugins.git

The ./tellstick.sh setup threw an error about "npm not found" so I installed it:
$ sudo apt-get install npm

I also installed virtualenv (sudo apt-get install python virtualenv) and re-ran ./tellstick.sh setup but there were still a quite some errors thrown by npm.

npm WARN package.json tellstick-local-access@0.1.0 No description
npm WARN package.json tellstick-local-access@0.1.0 No repository field.
npm WARN package.json tellstick-local-access@0.1.0 No README data
npm WARN package.json tellstick-local-access@0.1.0 No license field.
npm ERR! TypeError: Request path contains unescaped characters
npm ERR! at new ClientRequest (_http_client.js:127:13)
...
...
...



Anyway, I guessed that I could still build the MQTT Client egg locally despite this error, right or wrong?

I then ran gpg and punched in my name /email and updated the mqtt-client/setup.py to have same values.
$ gpg --gen-key

Finally I ran build-plugin
$ ./tellstick.sh build-plugin plugins/mqtt-client

This output a 76 kb large MQTT_Client-1.0.zip which I subsequently attempted to upload to my Tellstick ZNet Lite v2

Unfortunately, there seem to be something wrong with the PGP / publisher info - the "accept unverified" dialog does not output any publisher data and when clicking the Yes button a script error is thrown at row 248 in plugins.js (Unhandled Promise Rejection: ReferenceError: Can't find variable: reject)?

Skärmavbild 2019-01-20 kl. 15.48.10.png
Skärmavbild 2019-01-20 kl. 15.48.10.png (69.79 KiB) Viewed 710 times

The manifest.yml of the ZIP file contains the author and email I entered into gpg and a key.pub file is there as well.

author: my name
author-email: my email
category: notifications
color: '#660066'
description: Plugin to connect to a MQTT broker
icon: mqtt.png
key: key.pub
name: MQTT Client
package-version: 1
packages:
- paho_mqtt-1.4.0-py2.7.egg
- MQTT_Client-1.0-py2.7.egg
version: '1.0'


Can someone shed some light on my wrong doings please?

Does Telldus provide a pre-compiled version I can use instead of making this home brew?

jeremyc
Posts: 3
Joined: Tue May 07, 2019 7:12 pm

Re: MQTT plugin for Tellstick ZNet Lite v2?

Post by jeremyc » Thu May 09, 2019 10:57 am

How did you solve this? I have come as far as you describe in your message and stuck at the same place.

viewtopic.php?f=1&t=14954&sid=6dd5b0724 ... 956#p50199

Post Reply