homebridge-mi-hygrothermograph
homebridge-mi-hygrothermograph copied to clipboard
Publish dew point approximation to mqtt
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.
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?
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 no worries, I'll try to find the time to bring it over the finish line. Thanks for your input and effort!
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