michbeck100 / pimatic-hap

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

Add Humidity sensors #12

Closed tjandt closed 8 years ago

tjandt commented 8 years ago

I have some humidity sensors attached to my pimatic. How could these be exposed to homekit?

michbeck100 commented 8 years ago

What plugin are you using to connect the sensors? I would have a look if its possible to add support.

tjandt commented 8 years ago

I'm using pimatic-dht-sensors ... Temperature is working fine only Humidity is missing at the moment. If I could help you feel free to get in touch.

michbeck100 commented 8 years ago

pimatic-dht-sensors is misusing the TemperatureSensor class. A TemperatureSensor from pimatic doesn't support humidity, only temperature. Since pimatic-hap currently just supports the features of the base class, measuring humidity would require a rewrite of the dht sensors plugin.

tjandt commented 8 years ago

So I should get in contact with the developer of https://github.com/pimatic/pimatic-dht-sensors ?

michbeck100 commented 8 years ago

You could also create a fork of the plugin and make the changes by yourself. Then submit a pull request. Maybe I'll find the time to make the changes, but i don't have any device to test.

tjandt commented 8 years ago

Which class should be used? Or should I create a new HumiditySensor class? Just to understand which information is needed that you plugin can expose this humidity information via HomeKit

michbeck100 commented 8 years ago

HomeKit itself does differentiate between temperature sensor and humidity sensor. One solution would be to create a new device class, the other way would be, to change the way pimatic-hap recognizes device capabilities. I have to think about this, but it's probably easier to go for the second way, since there are more plugins out there that use the same way to measure humidity

tjandt commented 8 years ago

okay so if I should test something or if you need something we can use my setup. I'll try to support you as good as possible ;)

rspaargaren commented 8 years ago

I can do the same, I was already exloring your code and the related hap-nodeJS code. As I have more devices also a PIR device. But I have to learn more on the basics of java, koffie, promise etc....

michbeck100 commented 8 years ago

Should be working with the next release ;-)

tjandt commented 8 years ago

cool ... I'll give it a try after christmas ;) thanks for your work