Describe the bug
My understanding is getUrl is only used for the 'pull' way. But when I config MQTT, it still ask for getUrl:
[1/4/2022, 11:30:05 PM] [BedRoom] Initializing HTTP-TEMPERATURE accessory...
[1/4/2022, 11:30:05 PM] [BedRoom] Property 'getUrl' is required!
[1/4/2022, 11:30:05 PM] [BedRoom] Aborting...
[1/4/2022, 11:30:05 PM] [BedRoom] Accessory HTTP-TEMPERATURE returned empty set of services; not adding it to the bridge.
If I give it a getUrl, it can connect to the broker but it still getting the value from getUrl instead of MQTT
[1/4/2022, 11:32:18 PM] [BedRoom] Initializing HTTP-TEMPERATURE accessory...
[1/4/2022, 11:32:18 PM] [BedRoom] MQTT connecting to broker...
[1/4/2022, 11:32:18 PM] [BedRoom] MQTT Connected!
[1/4/2022, 11:32:18 PM] [BedRoom] Subscribing to existing topic: BedRoom/temperature
[1/4/2022, 11:32:18 PM] [BedRoom] MQTT successfully subscribed to topic 'BedRoom/temperature. Granted [{"topic":"BedRoom/temperature","qos":1}]'
Expected behavior
Expected the getUrl property is optional or will be ignored if mqtt config is present.
To Reproduce
- Setup mqtt server
- Connect to it using below config
Version (output of npm list -g homebridge homebridge-http-temperature-sensor)
- homebridge: v1.3.9
- homebridge-http-temperature-sensor: v1.0.10
Configuration
{
"accessory": "HTTP-TEMPERATURE",
"name": "BedRoom",
"unit": "celsius",
"statusCache": "5000",
"mqtt": {
"host": "127.0.0.1",
"port": 1883,
"subscriptions": [
{
"topic": "BedRoom/temperature",
"characteristic": "CurrentTemperature",
"messagePattern": "(-?[0-9]{1,3}(.[0-9]{1,3}))"
}
]
}
}
Describe the bug
My understanding is
getUrlis only used for the 'pull' way. But when I config MQTT, it still ask forgetUrl:If I give it a
getUrl, it can connect to the broker but it still getting the value fromgetUrlinstead of MQTTExpected behavior
Expected the
getUrlproperty is optional or will be ignored ifmqttconfig is present.To Reproduce
Version (output of
npm list -g homebridge homebridge-http-temperature-sensor)Configuration
{ "accessory": "HTTP-TEMPERATURE", "name": "BedRoom", "unit": "celsius", "statusCache": "5000", "mqtt": { "host": "127.0.0.1", "port": 1883, "subscriptions": [ { "topic": "BedRoom/temperature", "characteristic": "CurrentTemperature", "messagePattern": "(-?[0-9]{1,3}(.[0-9]{1,3}))" } ] } }