homebridge-mi-hygrothermograph icon indicating copy to clipboard operation
homebridge-mi-hygrothermograph copied to clipboard

Publish dew point approximation to mqtt

Open micampe opened this issue 4 years ago • 4 comments

Dew point is a more interesting value to assess human comfort than just pure temperature and humidity, this change calculates an approximation and publishes it to an mqtt topic.

Elgato Eve supports a custom characteristic for dew point as well, so it could be published there too.

Note that this change depends on my previous pull request for the configuration UI #129.

micampe avatar Jan 23 '21 09:01 micampe

Many thanks for you PR. I think it would be interesting to add the dew point characteristic, would you like to add it?

I also think that we should add new methods for "setting" and getting the dewPoint instead of using the setter/getter pairs for humidity and temperature. So on scanner.on("temperatureChange") and scanner.on("humidityChange") we could use a new method called setDewPoint() or updateDewPoint() which would use your dewPoint getter to publish the value on the MQTT-topic and update the elgato characteristic. What do you think?

hannseman avatar Apr 17 '21 18:04 hannseman

Yes, that seems very reasonable. I can do it but I’m not very fluent in js/node and currently busy with other things so I’m not sure I’ll be able to pick it back up.

micampe avatar Apr 19 '21 07:04 micampe

@micampe no worries, I'll try to find the time to bring it over the finish line. Thanks for your input and effort!

hannseman avatar Apr 19 '21 09:04 hannseman

File Coverage Lines Branches Missing
All files 100% 100% 100% :white_check_mark:

Minimum allowed coverage is 100%

Generated by :monkey: cobertura-action against 9911ce9e0ab3636a28b0f87fd068ecd9d136c1f6

github-actions[bot] avatar Apr 19 '21 13:04 github-actions[bot]