zepiaf / hydroqc

Hydro Quebec API wrapper.
MIT License
9 stars 4 forks source link

[Discussion] What platform are you integrating with? #16

Open mdallaire opened 2 years ago

mdallaire commented 2 years ago

I thought it might be a good thing to know what people are working with when automating for Hydro winter credits to share ideas.

Software I am using home-assistant, node-red and emqx (mqtt) running on a Kubernetes cluster.

Electric Loads My loads are controlled by the following:

Logic / automations Currently most of my Hydro related automations are in Node-Red where I have a flow that fetches my email looking for the Hydro notification and then parses everything to set input_datetimes in home-assistant. I plan to change this logic to use the current project once it is a bit more mature. Some of my power management logic is described in this comment

zepiaf commented 2 years ago

Software Home-assistant, HA automations and mosquito mqtt running on a crappy server in a VM

Loads Baseboards only : mysa thermostats through homekit controller My A/C is used for heat when exterior temp is <10 C but is not super effective for downstairs (mini-split) I have a bunch of other stuff in there, no z-wave/zigbee (all wifi) running through ESP8266 and TP Link api I wish my car was electric but so far it's not :)

Logic / automations I have a very crude setup : 3 automations are used to update input_datetime helper from MQTT 3 automation handle 3 events:

Obviously this is temporary and I plan to improve a bit, but hey, that's my first winter with the winter credit ...

Future upgrades

clauderobi commented 2 years ago

Electric loads

Software My own python software running on the Omega2

I created some electronic boards with relays, opto-relays and opto-couplers to interface the existing thermostats, zone valves and the furnace phases. I can control individually the 10KW phases as well as turn on / off the per floor valves. I built this around an Omega2m which runs Linux. The connectivity is WiFI.

I also installed one-wire temperature sensors throughput the house, which I access via a gateway that offers an HTTP API.

Currently, only the furnace is controlled

Logic The software controlling the furnace has different mode but due to the extremely large inertia, I found out that driving the demand from the thermostats is not very good; for example, on sunny day, to avoid the room temperature to raise above 25 or even 27C in the afternoon, I must not turn on the furnace during the night before... But on cloudy days I must at least have 33 or 66% So I currently drive the furnace on a schedule, that gets adjusted depending on Hydro....

This software also runs a Web server

Future Currently I adjust the schedule manually so the next step is to integrate this API to select 1 profile or another. I also need to use a weather forecast to select a sunny day / cloudy day profile.

I would like to add the ability to control the garage baseboards and the water tank but I am waiting for Siemens to release their controllable breakers.

I will also look at adding a Wifi module to the heat pumps units but it is not clear that there is a decent public API.

mdallaire commented 2 years ago

I will also look at adding a Wifi module to the heat pumps units but it is not clear that there is a decent public API.

Look into https://github.com/ccutrer/waterfurnace_aurora. My geothermal heat pump was a classic "you need to buy our wifi dongle for this crazy price, then send us all you data and we won't give you access to it beyond basic remote thermostat". ccutrer figured out all the modbus registers for the system and created this package which give total control over it via mqtt, It might be a source of inspiration if you want to go down that rabbit hole.

jchretien commented 2 years ago

How would you integrate it in HassOS ?

I tried using AppDaemon 4 Add-on without luck, it looks like that only works with official python projects from https://pypi.org/

Maybe I could figure out how they package their projects and fit your project somehow?

Otherwise I could setup another VM with Python 3 on it and use MQTT Integration in HassOS but that would involve managing an extra machine just for that, I wish I could package everything in a single VM.

Thanks for your great work, I can't wait to use it!

zepiaf commented 2 years ago

Hey @jchretien, we're not there yet unfortunately. So far it would work from any host in the same network as your mqtt broker. If you can schedule mqtt.py tu run with the virtual env, it should work on windows, linux or a mac. If you don't know how we might be able to help you figure a script to that.

clauderobi commented 2 years ago

I am not familiar with HassOS nor Appdaemon but I would suspect that you are missing some packages that the project here needs. You may or may not be able to fix that. But if not, beside the extra VM route you mentioned, you could instead use a container that has python3 in it. And, if needed, add the needed packages. I would use a container based on Alpine to keep the size as little as possible; but python itself will add a lot....

zepiaf commented 2 years ago

Lets move this to the new discussion for that topic