cflurin / homebridge-mqtt

Homebridge-mqtt is a Plugin for Homebridge.
Apache License 2.0
229 stars 38 forks source link

TemperatureSensor shows no decimal place #79

Closed drheck closed 5 years ago

drheck commented 5 years ago

Hallo, i am using the TemperatureSensor. If i set the value to 21.4 i can see only 23.0 on the iPhone!? I createt the Sensor like this: mosquitto_pub -t homebridge/to/add -m '{"name": "multi_sensorT","service_name": "temperature","service": "TemperatureSensor","CurrentTemperature": {"minValue": -50, "maxValue": 100, "minStep": 0.1}}' Then i set the value: mosquitto_pub -t homebridge/to/set -m '{"name": "multi_sensorT", "service_name": "temperature", "characteristic": "Current Temperature", "value": 21.4}' If i let get the accessories: mosquitto_pub -t homebridge/to/get -m '{"name":"*"}' I get: {"multi_sensorH":{"services":{"humidity":"HumiditySensor"},"characteristics":{"humidity":{"CurrentRelativeHumidity":0}}},"multi_sensorT":{"services":{"temperature":"TemperatureSensor"},"characteristics":{"temperature":{"CurrentTemperature":21.4}}}} So the value is 21.4 - but not on the iPhone (it shows: 21.0)!

Could you fix this? Thank you, Peter

cflurin commented 5 years ago

Hi, No issue on my iPhone.

drheck commented 5 years ago

Hi,

i am a newbee with these tools. I have startet last week…

where can i find the version info?

  1. homebridge version
  2. homebridge-mqtt version (should be the latest, because i have installed last Friday)

IOS = iPhone 8 with the newest version. No App Only Apple Homekit.

A further question: Where could I find information for all the Accessories? I am using an own developed ESP Sketch in C++ for my garagedoor. How can I set the state to closed? (0=open, 1=is opening, ?=closed, ? = is closing. What must I subscribe for getting the event when the Garagedoor in Homekit is klicked and I have to open/close the garage?

Thank you, Peter

Mit freundlichen Grüßen Dr.-Ing. Peter Heck


Dr.-Ing. Peter Heck Beethovenstraße 5 67685 Weilerbach

Telefon: +49 6374 993322 Mobiltelefon: +49 172 6124786

Von: cflurin notifications@github.com Gesendet: Montag, 22. April 2019 03:19 An: cflurin/homebridge-mqtt homebridge-mqtt@noreply.github.com Cc: drheck drheck@outlook.com; Author author@noreply.github.com Betreff: Re: [cflurin/homebridge-mqtt] TemperatureSensor shows no decimal place (#79)

Hi, No issue on my iPhone.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/cflurin/homebridge-mqtt/issues/79#issuecomment-485297738, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AL4JMTRJOOMW6ZS2CL5SJZLPRUG7XANCNFSM4HHMNXPA.

cflurin commented 5 years ago

You can find the version in the package.json. On a Raspberry Pi starting homebridge will also print the homebridge-mqtt version.

Please read the README:

HomeKitTypes.js describes all the predifined Services, Characteristcs, format and properties for the value

https://github.com/KhaosT/HAP-NodeJS/blob/master/lib/gen/HomeKitTypes.js

Have a look in the Wiki, I think there is a GarageDoor example.

You can try adding a TemperatureSensor with the default settings also without minValue, maxValue and minStep and see how it works.

drheck commented 5 years ago

Hi,

i tested: mosquitto_pub -t homebridge/to/remove -m '{"name": "multi_sensorT"}' --removed mosquitto_pub -t homebridge/to/add -m '{"name":"multi_sensorT","service_name":"temperature","service":"TemperatureSensor"}' --added On iPhone 0.0 mosquitto_pub -t homebridge/to/set -m '{"name": "multi_sensorT", "service_name": "temperature", "characteristic": "CurrentTemperature", "value": 22.22}' On iPhone: 22.0

Here the Versions:

Apr 22 15:06:36 hbridge3 homebridge[467]: [2019-4-22 15:06:36] Loaded plugin: homebridge-mqtt Apr 22 15:06:36 hbridge3 homebridge[467]: homebridge API version: 2.2 Apr 22 15:06:36 hbridge3 homebridge[467]: [2019-4-22 15:06:36] Registering platform 'homebridge-mqtt.mqtt' Apr 22 15:06:36 hbridge3 homebridge[467]: [2019-4-22 15:06:36] --- Apr 22 15:06:37 hbridge3 homebridge[467]: [2019-4-22 15:06:37] Loaded plugin: homebridge-tuya-lan Apr 22 15:06:37 hbridge3 homebridge[467]: [2019-4-22 15:06:37] Registering platform 'homebridge-tuya-lan.TuyaLan' Apr 22 15:06:37 hbridge3 homebridge[467]: [2019-4-22 15:06:37] --- Apr 22 15:06:37 hbridge3 systemd[1]: Started Session c2 of user pi. Apr 22 15:06:37 hbridge3 ntpd[846]: Soliciting pool server 94.16.113.67 Apr 22 15:06:37 hbridge3 ntpd[846]: Soliciting pool server 2a01:4f8:191:946a::2 Apr 22 15:06:38 hbridge3 ntpd[846]: Soliciting pool server 178.63.9.110 Apr 22 15:06:38 hbridge3 ntpd[846]: Soliciting pool server 31.25.153.77 Apr 22 15:06:38 hbridge3 homebridge[467]: [2019-4-22 15:06:38] Loaded plugin: homebridge-zway Apr 22 15:06:38 hbridge3 homebridge[467]: [2019-4-22 15:06:38] Registering accessory 'homebridge-zway.ZWayServer' Apr 22 15:06:38 hbridge3 homebridge[467]: [2019-4-22 15:06:38] Registering platform 'homebridge-zway.ZWayServer' Apr 22 15:06:38 hbridge3 homebridge[467]: [2019-4-22 15:06:38] --- Apr 22 15:06:38 hbridge3 homebridge[467]: [2019-4-22 15:06:38] Loaded config.json with 0 accessories and 4 platforms. Apr 22 15:06:38 hbridge3 homebridge[467]: [2019-4-22 15:06:38] --- Apr 22 15:06:38 hbridge3 homebridge[467]: [2019-4-22 15:06:38] Loading 4 platforms... Apr 22 15:06:38 hbridge3 homebridge[467]: [2019-4-22 15:06:38] [ZWayServer] Initializing ZWayServer platform... Apr 22 15:06:38 hbridge3 homebridge[467]: [2019-4-22 15:06:38] [HomebridgeAutomower] Initializing HomebridgeAutomower platform... Apr 22 15:06:38 hbridge3 homebridge[467]: [2019-4-22 15:06:38] [MQTT Bridge] Initializing mqtt platform... Apr 22 15:06:38 hbridge3 homebridge[467]: [2019-4-22 15:06:38] [MQTT Bridge] homebridge-mqtt v0.5.1 Apr 22 15:06:38 hbridge3 homebridge[467]: [2019-4-22 15:06:38] [TuyaLan] Initializing TuyaLan platform... Apr 22 15:06:38 hbridge3 homebridge[467]: [2019-4-22 15:06:38] [MQTT Bridge] Number of cached Accessories: 3 Apr 22 15:06:38 hbridge3 homebridge[467]: [2019-4-22 15:06:38] [MQTT Bridge] clientId = homebridge-mqtt_51bf1934 Apr 22 15:06:38 hbridge3 homebridge[467]: [2019-4-22 15:06:38] [MQTT Bridge] Connecting..

Mit freundlichen Grüßen Dr.-Ing. Peter Heck


Dr.-Ing. Peter Heck Beethovenstraße 5 67685 Weilerbach

Telefon: +49 6374 993322 Mobiltelefon: +49 172 6124786

Von: cflurin notifications@github.com Gesendet: Montag, 22. April 2019 16:11 An: cflurin/homebridge-mqtt homebridge-mqtt@noreply.github.com Cc: drheck drheck@outlook.com; Author author@noreply.github.com Betreff: Re: [cflurin/homebridge-mqtt] TemperatureSensor shows no decimal place (#79)

You can find the version in the package.json. On a Raspberry Pi starting homebridge will also print the homebridge-mqtt version.

Please read the README:

HomeKitTypes.js describes all the predifined Services, Characteristcs, format and properties for the value e.g.:

https://github.com/KhaosT/HAP-NodeJS/blob/master/lib/gen/HomeKitTypes.js

Have a look in the Wiki, I think there is a GarageDoor example.

You can try adding a TemperatureSensor with the default settings also without minValue, maxValue and minStep and see how it works.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/cflurin/homebridge-mqtt/issues/79#issuecomment-485428311, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AL4JMTSTNPKGYIRVLB3P7ATPRXBNVANCNFSM4HHMNXPA.

bohtho commented 5 years ago

Home.app sadly rounds temperatures to the nearest half degree.

drheck commented 5 years ago

Okay. That is it.

22.2 -> 22.0 22.6 -> 22.5 22.8 -> 23.0

Thank you.

Mit freundlichen Grüßen Dr.-Ing. Peter Heck


Dr.-Ing. Peter Heck Beethovenstraße 5 67685 Weilerbach

Telefon: +49 6374 993322 Mobiltelefon: +49 172 6124786

Von: bohtho notifications@github.com Gesendet: Montag, 22. April 2019 17:51 An: cflurin/homebridge-mqtt homebridge-mqtt@noreply.github.com Cc: drheck drheck@outlook.com; Author author@noreply.github.com Betreff: Re: [cflurin/homebridge-mqtt] TemperatureSensor shows no decimal place (#79)

Home.app sadly rounds temperatures to the nearest half degree.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/cflurin/homebridge-mqtt/issues/79#issuecomment-485456467, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AL4JMTQ3UOYCPFHWARIPYOTPRXNHFANCNFSM4HHMNXPA.

cflurin commented 5 years ago

You might try EVE, actually I use both apps on my iPhone.