I found this container a few weeks ago, and I’m now running it on a few Pi’s. Thank you very much for this, @mliljedahl Or många tack! It solved a problem for me, I had a bunch of Tellstick Duos, but the Pi’s running them had to be kept on Stretch because the later versions did not work with the Telldus system for Linux.
What I do is to set it up so it doesn’t get discovered by Hass and instead filter the output through Node-RED, with a flow that’s at the bottom of this mesage. My Docker container is set up like this:
version: '3'
services:
telldus-core-mqtt:
image: mliljedahl/telldus-core-mqtt:1.2.1
container_name: telldus-core-mqtt
restart: unless-stopped
environment:
- TDM_BASE_TOPIC=nodered
- TDM_STATE_TOPIC=telldus
- TDM_MQTT_SERVER=192.168.1.101
- TDM_MQTT_USER=""
- TDM_MQTT_PASS=""
- TDM_REPEAT_CMD=1
devices:
- /dev/bus/usb:/dev/bus/usb:rwm
volumes:
- ./tellstick.conf:/etc/tellstick.conf:ro
[
{
"id": "f95a94b1.1ac588",
"type": "mqtt out",
"z": "b61f4f80.052e5",
"name": "",
"topic": "eg/Tellstick.Temperatur",
"qos": "",
"retain": "",
"broker": "36159a16.2aa98e",
"x": 820,
"y": 200,
"wires": []
},
{
"id": "c2aec37e.1e3df",
"type": "debug",
"z": "b61f4f80.052e5",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"x": 730,
"y": 40,
"wires": []
},
{
"id": "bba8ff458f65e729",
"type": "function",
"z": "b61f4f80.052e5",
"name": "Telldus-temperatursensorer med fuktighet",
"func": "var protocol = \"Med fuktighet\";\nvar id = msg.topic.split('/')[1];\nvar tmp = msg.payload[0].temperature;\nvar hum = msg.payload[1].humidity;\nmsg.payload = protocol+','+id+','+tmp+','+hum;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 580,
"y": 100,
"wires": [
[
"af2ff4441ca446f2"
]
]
},
{
"id": "4cfad1d29a46a937",
"type": "mqtt in",
"z": "b61f4f80.052e5",
"name": "",
"topic": "telldus/#",
"qos": "2",
"datatype": "auto-detect",
"broker": "36159a16.2aa98e",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 80,
"y": 40,
"wires": [
[
"45dad75475f19265"
]
]
},
{
"id": "9ff6da3936482a75",
"type": "debug",
"z": "b61f4f80.052e5",
"name": "debug 9",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 540,
"y": 200,
"wires": []
},
{
"id": "45dad75475f19265",
"type": "switch",
"z": "b61f4f80.052e5",
"name": "",
"property": "topic",
"propertyType": "msg",
"rules": [
{
"t": "cont",
"v": "temperature",
"vt": "str"
},
{
"t": "cont",
"v": "humidity",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 230,
"y": 40,
"wires": [
[
"5863c2ed79913b0e"
],
[
"ebc36c14ac7d40bd"
]
]
},
{
"id": "806ee8564dc7bc10",
"type": "join",
"z": "b61f4f80.052e5",
"name": "",
"mode": "custom",
"build": "array",
"property": "payload",
"propertyType": "msg",
"key": "payload",
"joiner": "\\n",
"joinerType": "str",
"accumulate": false,
"timeout": "1",
"count": "2",
"reduceRight": false,
"reduceExp": "",
"reduceInit": "",
"reduceInitType": "num",
"reduceFixup": "",
"x": 90,
"y": 120,
"wires": [
[
"9ff6da3936482a75",
"ebf20d56dac64f35"
]
]
},
{
"id": "af2ff4441ca446f2",
"type": "rbe",
"z": "b61f4f80.052e5",
"name": "",
"func": "rbe",
"gap": "",
"start": "",
"inout": "out",
"septopics": false,
"property": "payload",
"topi": "topic",
"x": 850,
"y": 120,
"wires": [
[
"c2aec37e.1e3df",
"f95a94b1.1ac588"
]
]
},
{
"id": "ebf20d56dac64f35",
"type": "switch",
"z": "b61f4f80.052e5",
"name": "",
"property": "payload[1].humidity",
"propertyType": "msg",
"rules": [
{
"t": "nnull"
},
{
"t": "else"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 270,
"y": 120,
"wires": [
[
"bba8ff458f65e729"
],
[
"4a29b078af7dafe1"
]
]
},
{
"id": "4a29b078af7dafe1",
"type": "function",
"z": "b61f4f80.052e5",
"name": "Telldus-temperatursensorer uten fuktighet",
"func": "var protocol = \"Uten fuktighet\";\nvar id = msg.topic.split('/')[1];\nvar tmp = msg.payload[0].temperature;\nmsg.payload = protocol+','+id+','+tmp;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 580,
"y": 140,
"wires": [
[
"af2ff4441ca446f2"
]
]
},
{
"id": "5863c2ed79913b0e",
"type": "rbe",
"z": "b61f4f80.052e5",
"name": "",
"func": "rbe",
"gap": "",
"start": "",
"inout": "out",
"septopics": true,
"property": "payload",
"topi": "payload[0].temperature",
"x": 370,
"y": 20,
"wires": [
[
"806ee8564dc7bc10"
]
]
},
{
"id": "ebc36c14ac7d40bd",
"type": "rbe",
"z": "b61f4f80.052e5",
"name": "",
"func": "rbe",
"gap": "",
"start": "",
"inout": "out",
"septopics": true,
"property": "payload",
"topi": "payload[0].humidity",
"x": 370,
"y": 60,
"wires": [
[
"806ee8564dc7bc10"
]
]
},
{
"id": "36159a16.2aa98e",
"type": "mqtt-broker",
"name": "Hytte-Pi",
"broker": "192.168.1.101",
"port": "1883",
"clientid": "",
"usetls": false,
"compatmode": true,
"keepalive": "60",
"cleansession": true,
"birthTopic": "",
"birthQos": "0",
"birthPayload": "",
"closeTopic": "",
"closePayload": "",
"willTopic": "",
"willQos": "0",
"willPayload": ""
}
]