michbeck100 / pimatic-hap

Pimatic homekit bridge
GNU General Public License v2.0
30 stars 10 forks source link

Temperature and switch update #8

Closed rspaargaren closed 8 years ago

rspaargaren commented 8 years ago

In version 3.2 there is something wrong with the temperature indication = 0, the contact status does not update and the switch update (on/off) does not update. In the debug log of pimatic the updates are submitted to hap. The value of a dimmer is updated that works. Also I can switch on off via eve. I have done a complete fresh install. Both phone and pimatic.

michbeck100 commented 8 years ago

Getting the current temperature isn't a feature of the base implementation of HeatingThermostat in pimatic (see devices.coffee line 443). But there are some implementations that deliver the current temperature. This is what i was trying to show. If your device doesn't support this, HomeKit will always show a value of 0. I will try to change this, so it will show the target temperature. This wouldn't be really accurate, but i think it's better than nothing.

michbeck100 commented 8 years ago

if I change the state of a switch from the pimatic web app, the state changes in my home kit app, too. Same for the contact. Do i understand you correct?

rspaargaren commented 8 years ago

Hi in the previous version I did not have the problems as mentioned in this post. So I had an indication of the temp sensor. If I switch in Pimatic app eve does not get updated. If I switch in eve Pimatic does get updated. So it looks like a one way direction for that. Maybe the last change influenced this behaviour?

michbeck100 commented 8 years ago

Could you post the devices section of your config.json? So i can get an idea of the devices that aren't working.

rspaargaren commented 8 years ago

Hi these are the four different devices I can see in eve. However I had to reconnect this morning and the switches are now working as a status update! Only the temp is still indicating 0 and the contact does not indicate.

This is part of the debug log:

debug [pimatic-hap]: contact sensor state changed. Notifying iOS devices. debug [pimatic-homeduino]: contact1: { id: 43962, all: false, contact: false, unit: 9 }

I have removed the == null at line 106 and now the temp is indicated again.

{ "id": "KAKU_TEL", "name": "Lamp Televisie", "class": "HomeduinoRFSwitch", "protocols": [ { "name": "switch1", "options": { "id": 1337110, "unit": 1 } { "id": "KAKU_KAST_DEUR", "name": "Kast Deur", "class": "HomeduinoRFContactSensor", "protocols": [ { "name": "contact1", "options": { "unit": 9, "id": 43962 } } { "id": "KAKU_KAST_DEUR", "name": "Kast Deur", "class": "HomeduinoRFContactSensor", "protocols": [ { "name": "contact1", "options": { "unit": 9, "id": 43962 } } { "id": "KAKU_BANK", "name": "Lamp Bank", "class": "HomeduinoRFDimmer", "protocols": [ { "name": "dimmer1", "options": { "id": 1337110, "unit": 0 }, "send": true, "receive": true } ] },

michbeck100 commented 8 years ago

Thanks to your hint i found the error. Commit 336ade85dd79b7a9e5480eb41c5b3eeff39cb7af fixes it. Very embarrassing :flushed: