The configuration shows both methods for the plant sensors as for the switch bot as well. The switch bot is used by me as a door opener (Türöffner) and I use a shell command to operate it. This is done with homebridge-cmdtrigger.
The rest is the mqttthing configuration for three plants (Dracaena, Fittonia, and Schnittlauch):
CodeAlles anzeigen"accessories": [ { "accessory": "CmdTrigger", "name": "Türöffner", "command": "/usr/bin/gatttool -t random -b E4:FC:66:1E:5D:3E --char-write-req -a 0x0016 -n 570101", "delay": "1000" }, { "accessory": "mqttthing", "type": "humiditySensor", "name": "Fittonia", "url": "http://homepi.lan:1883", "logMqtt": true, "topics": { "getCurrentRelativeHumidity": { "topic": "miflora/Fittonia", "apply": "return JSON.parse(message).moisture" } }, "history": true }, { "accessory": "mqttthing", "type": "humiditySensor", "name": "Schnittlauch", "url": "http://homepi.lan:1883", "logMqtt": true, "topics": { "getCurrentRelativeHumidity": { "topic": "miflora/Schnittlauch", "apply": "return JSON.parse(message).moisture" } }, "history": true }, { "accessory": "mqttthing", "type": "humiditySensor", "name": "Dracaena", "url": "http://homepi.lan:1883", "logMqtt": true, "topics": { "getCurrentRelativeHumidity": { "topic": "miflora/Dracaena", "apply": "return JSON.parse(message).moisture" } }, "history": true } ]
thanks,
its works ![]()
it seems mqttthing doesn't support combined sensors yet
but it is not a big problem, i think