Closed raufis27 closed 7 years ago
Seems to be the wrong unit. 65.6°C is 150°F. I guess the Home App and Siri respect the setting in iOS language preferences, there you can choose between Fahrenheit and Celsius.
Well, I have other temp sensor in homekit - Ecobee - and it displays °F. iOS settings also setup for °F. Also when I ask siri what is temperature she says 160 °F (not celsius ).
So I switched from F to C in iOS settings and got 66 instead of 150. So looks like it reversed.
hmm... So the 65° OpenHAB reports is the correct value in Fahrenheit but homekit2mqtt treats it like it's Celsius. Have to see if there is a TemperatureDisplayUnits Characteristic for the TemperatureSensor, I know the Thermostat has this, but I'm not sure if TemperatureSensor can use this too... Will have to try and if it works I will create a config option for that.
ok, thank you! Also there is a problem with outlet item. I'll open another topic for it.
as far as i understood homekit is internally working with celsius only. So I added an optional conversion to the TemperatureSensor Accessory. Just add the config option fahrenheit like this:
"TemperatureSensor": {
"service": "TemperatureSensor",
"name": "TemperatureSensor",
"topic": {
"statusTemperature": "TemperatureSensor/Temperature"
},
"config": {
"fahrenheit": true
},
"manufacturer": "Generic",
"model": "TemperatureSensor"
},
Would be glad to hear if this works for you, Regards, Sebastian
Here is an error:
/usr/local/lib/node_modules/homekit2mqtt/accessories/TemperatureSensor.js:5
log.debug('converting', value, '°F to °C');
^
ReferenceError: log is not defined
at convertTemperature (/usr/local/lib/node_modules/homekit2mqtt/accessories/TemperatureSensor.js:5:9)
at sensor.addService.getCharacteristic.setProps.on.callback (/usr/local/lib/node_modules/homekit2mqtt/accessories/TemperatureSensor.js:27:37)
at emitThree (events.js:116:13)
at emit (events.js:194:7)
at Characteristic.getValue (/usr/local/lib/node_modules/homekit2mqtt/node_modules/hap-nodejs/lib/Characteristic.js:129:10)
at Bridge.<anonymous> (/usr/local/lib/node_modules/homekit2mqtt/node_modules/hap-nodejs/lib/Accessory.js:650:20)
at Array.forEach (native)
at Bridge.Accessory._handleGetCharacteristics (/usr/local/lib/node_modules/homekit2mqtt/node_modules/hap-nodejs/lib/Accessory.js:614:8)
at emitMany (events.js:127:13)
at HAPServer.emit (events.js:201:7
Sorry. My fault. Just pushed an update (v0.6.8) that should fix this.
Same error, what should I do to get updates ? I am updating using - sudo npm install -g homekit2mqtt --unsafe-perm
Sorry, rushed. I got update.
Did you get the 0.6.8? Perhaps there is some lag in npmjs's cdn, you could also try to install this specific version by doing sudo npm install -g homekit2mqtt@0.6.8 --unsafe-perm
seems we're both too fast ;-))
:) you are awesome! Looks like it works. I am waiting for OH to push update from sensor. Thank you. I have another question regarding "GarageDoor", may I ask here or open another topic ?
i would prefer separate issues :)
Confirmed. Fixed. Thank you!
Hello and thanks for project!
For some reason temperature sensor displays wrong value. F.e openHAB reports 65.60 to MQTT topic but HomeKit displays 150. Any ideas ?