Telldus - MQTT converter Home assistant compatible. Optional user defined MQTT topic mapping still wtih home assistant support.
There are two json files:
/etc/telldus-mqtt/telldus-mqtt.json
/etc/telldus-mqtt/telldus-mqtt-homeassistant.json
The home assistant topics are required to self detect telldus activity, but the default topics are very long and not mapped to its physical meaning.
To do this there is topic-translation that maps the home automation telldus topics to user defined topics that has a physical meaning. Additional short form name for correspondance to how sensor/device should be presented in home assistant.
There is an alternate approach if the mqtt topics are of no interest, to just live with the long topics and add name in home assistant software instead.
The file
/etc/telldus-mqtt/telldus-mqtt.json
Has host, username and password for MQTT broker that must be configured.
opkg update
opkg install telldus-mqtt
At install daemon is already enabled and started. Manual steps for the same.
service telldus-mqtt enable
service telldus-mqtt start
To test-run telldus-mqtt and check output run
telldus-mqtt --nodaemon --debug
To check service output
logread | grep telldus-mqtt
To check output from remotes you can check the output with --raw flagrun
telldus-mqtt --nodaemon --raw
sudo apt-add-repository ppa:mosquitto-dev/mosquitto-ppa
sudo apt-get update
sudo apt-get install mosquitto mosquitto-dev
Install locations
- /usr/bin/
- /usr/sbin/
- /usr/includemosquitto.h
- /etc/mosquitto/
sudo apt install mosquitto libmosquitto-dev
sudo apt install pkg-config libconfuse-dev libftdi-dev libcjson-dev
git clone [email protected]:PeterFromSweden/telldus.git
cd telldus/telldus-core
cmake -B build
cmake --build build
sudo cmake --install build
Install locations -- TODO: change install prefix to /usr
- /usr/local
To fix library path (if troublesome)
export LD_LIBRARY_PATH=/usr/local/lib
cd <telldus-mqtt>
cmake -B build
cmake --build build
Run telldus-mqtt...
S### Install telldus-mqtt
sudo cmake --install build
sudo apt install libcjson-dev
https://vcpkg.io/en/getting-started.html
c:
cd \
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg && bootstrap-vcpkg.bat
vcpkg install cJson
vcpkg install pthreads
vcpkg integrate install
Mosquitto can be installed with vcpkg but this is slow and MAY have problem with threads. There is an installer that can be used:
https://mosquitto.org/download/
TelldusCenter-2.1.2.exe
http://download.telldus.com/TellStick/Software/TelldusCenter/TelldusCenter-2.1.2.exe
NOTE: Browser tricks needed nowadays to download non-https links!
Cmake extension used for building and debugging. settings.json:
"cmake.configureSettings": {
"CMAKE_TOOLCHAIN_FILE": "C:/vcpkg/scripts/buildsystems/vcpkg.cmake"
},
cd <telldus-mqtt>
cmake -B build
cmake --build build
Run telldus-mqtt...
Windows: Administrator cmd window
Linux: sudo
cmake --install build