Skip to content

Instantly share code, notes, and snippets.

@ptath
Created March 21, 2019 18:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ptath/85670ef17859c649eeab7c927a9c8f04 to your computer and use it in GitHub Desktop.
Save ptath/85670ef17859c649eeab7c927a9c8f04 to your computer and use it in GitHub Desktop.
Part of HomeBridge config for homebridge-mqttting and sonoff-tasmota, temperature and humidity sensor (DHT11)
"accessories": [
{
"accessory": "mqttthing",
"type": "temperatureSensor",
"name": "temp1",
"url": "mqtt://192.168.1.10",
"caption": "Метка 1",
"topics": {
"getCurrentTemperature": {
"topic": "tele/esptest/SENSOR",
"apply": "return parseFloat(JSON.parse(message).DHT11.Temperature);"
}
}
},
{
"accessory": "mqttthing",
"type": "humiditySensor",
"name": "hum1",
"url": "mqtt://192.168.1.10",
"caption": "Метка 2",
"topics": {
"getCurrentRelativeHumidity": {
"topic": "tele/esptest/SENSOR",
"apply": "return parseFloat(JSON.parse(message).DHT11.Humidity);"
}
}
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment