To everyone but especially @wutu
I built a mysensors mqtt client on an esp8266 mysensors gateway (GatewayESP8266MQTTClient.ino from mysensors dev repo) and that works now (*).
(Edit: I did not program it. I simply downloaded it.)
So my mymensors node sends data through the mysensors gateway to my mosquitto broker.
When I use the mosquitto_sub -v -t 'mygateway1-out/#'
command I see:
mosquitto_sub -v -t 'mygateway1-out/#'
mygateway1-out/2/0/1/0/0 9.1
mygateway1-out/2/0/1/0/0 11.2
mygateway1-out/2/0/1/0/0 9.3
mygateway1-out/2/0/1/0/0 11.0
mygateway1-out/2/0/1/0/0 10.7
mygateway1-out/2/0/1/0/0 11.2
(The “2” after the “out/” is the node id, the final number the temperature: cloudy day with sunshine, hence the fluctuations in temperature)
I setup the plugin:
{
"plugin": "mqtt",
"host": "192.168.144.128",
"port": 1883
}
And configured a device:
{
"class": "MqttSensor",
"id": "EspMyMQTT",
"name": "EspMQTT",
"attributes": [
{
"name": "tuin temperatuur",
"topic": "mygateway1-out/2",
"type": "number",
"unit": "°C",
"acronym": "Tuin-Temperature"
}
]
},
Obviously the topic is not correct in the device but I can’t figure it out. I checked of course the plugin page and a coiple of the other topics here, and tried some combinations, but simply can’t get ti to work and don’t see anything either in the pimatic log.
(*): Once everything works I will write a HowTo.