pihome-shc / pihome

PiHome - Smart Heating, Ventilation and Air Conditioning (HVAC)
http://www.pihome.eu
Other
52 stars 25 forks source link

Home Assistant integration #447

Closed JSa1987 closed 3 years ago

JSa1987 commented 3 years ago

I made some changes to the API to allow a better integration with Home Assistant. The idea is for PiHome to still run the whole logic but to be able to monitor the status from Home Assistant.

This allows the temperature of the zones, boiler status and battery info to be monitored from a dashboard in Home Assistant. In addition, the Zone Boost can be triggered from the Home Assistant dashboard.

I can write a little how to on how to setup the Home Assistant side to work with this.

JSa1987 commented 3 years ago

This is an example of how the dashboard can be setup on Home Assistant: HA Dashboard

Below are screenshots of how this dashboard looks like in the Home Assistant iOS app: HA iOS Dashboard 1 HA iOS Dashboard 2 HA iOS Dashboard 3

pihome-shc commented 3 years ago

@JSa1987 thank you for your work, can you write how to and i can publish this on PiHome website, PiHome version 1.77 is final version and new version MaxAir is under development, this update compatible with new version or can you have look if you have free time. https://github.com/pihome-shc/PiHomeHVAC

JSa1987 commented 3 years ago

@pihome-shc what would be the best format to write this up? Would a text document with some screenshot work got you?

I had a look at https://github.com/pihome-shc/PiHomeHVAC :

pihome-shc commented 3 years ago

@JSa1987 you can do text or rich text format and if you can take images as well that would great. @twa127 is working on MaxAir i haven't had that much time to go through the code.

twa127 commented 3 years ago

@JSa1987 you are correct the boiler_logs table has now been incorporated in to the controller_zone_logs table, the controller (old boiler) has a zone_id = 1

JSa1987 commented 3 years ago

@twa127 thank you for the info, it should be an easy fix to adjust getBoiler.php for MaxAir. Could you confirm that when the boiler is started a row is created in controller_zone_logs with stop_datetime = NULL and then a new row is created with the actual stop time when the boiler is stop?

twa127 commented 3 years ago

When the system controller turns ON a new row is created with stop_datetime = NULL, when the system_controller turns OFF the stop_datetime is set to the current time and the stop_cause is set. The process repeats the next time system controller turns ON and OFF

JSa1987 commented 3 years ago

Very good that is the same as it was in PiHome for the boiler_logs, therefore the same logic should work (i.e. the boiler is ON if stop_datetime = NULL). I will submit a Pull request with the modified files also for pihome-shc/PiHomeHVAC .

JSa1987 commented 3 years ago

@pihome-shc attached is a little article that explain how to setup the integration in Home Assistant. HA Intergration for PiHome.docx

pihome-shc commented 3 years ago

@JSa1987 thank you for your effort. i will post this on PiHome website.