在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:metbosch/homebridge-http-temperature开源软件地址:https://github.com/metbosch/homebridge-http-temperature开源编程语言:JavaScript 100.0%开源软件介绍:homebridge-http-temperatureSupports http/https devices on HomeBridge Platform. This version only supports temperature sensors returning a JSON with the data or the raw data. This plug-in acts as an interface between a web endpoint and homebridge only. You will still need some dedicated hardware to expose the web endpoints with the temperature information. In my case, I used an Arduino board with Wifi capabilities. Installation
ConfigurationThe available fields in the config.json file are:
ExamplesThe following sections provide different configuration examples.
For a ready-to-go example, see the Minimal HTTP"accessories": [
{
"accessory": "HttpTemperature",
"name": "Outside Temperature",
"url": "http://IP/path/to/endpoint"
}
] HTTPS + Auth + JSON-field"accessories": [
{
"accessory": "HttpTemperature",
"name": "Outside Temperature",
"url": "https://IP/path/to/endpoint",
"field_name": "temperature",
"auth": {
"user": "test",
"pass": "1234"
}
}
] With this configuration, the endpoint should return a JSON with (at least) a {
"temperature": 25.8
} Advanced JSON parsingIf the defined endpoint returns something more complicated like: {
"time": "YYYY-MM-DD HH:MM:SS",
"device_info": {
...
},
"values": [
{
"temp1": 31.5,
"temp2": 24.1
},
{
"temp1": 27.8,
"temp2": 29.3
}
]
} The configuration to get "accessories": [
{
"accessory": "HttpTemperature",
"name": "Outside Temperature",
"url": "https://IP/path/to/endpoint",
"field_name": "values.[0].temp2",
}
] |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论