-
-
Notifications
You must be signed in to change notification settings - Fork 44
Integration back to HomeAssistant #49
Comments
Hi @llluis ,
I would be very much interested about getting your code! even if it is not finished! Do you want to share? Thanks |
Hi @richie256 |
@llluis Hello ! |
Hey @titilambert, great idea, thanks! Agreed with custom stuff, but it's much more user friendly through custom_components. I'll keep this one till the MQTT is done. Any reason to split the MQTT impl in 2, and hosting in gitlab half of it? |
What do you mean by:
|
You have mqtt-hass-base on gitlab and mqtt-daemon (which extends it) here. I didn't understand the separation. I made a few changes to make it work inside HA: I thought to repackage everything to be able to create a custom_component (remove the blocking loop, for instance). |
There you go. Delete after import. |
Hi llluis, I am using your custom component and so far I am able to get both sensors (yesterday_total_consumption and yesterday_average_temperature) but unless I restart HA I don't get updated data every day. Any ideas what is the issue. Thks . |
@Normand9999, I fixed 2-3 bugs already since I posted this. I was waiting on @titilambert to publish the code so I could commit the changes. This includes a change in this lib for which I submitted a pull request. There is still one bug I couldn't fix to have it updating everyday without errors, I'm still in the learning curve of HomeAssistant HTTP session. As soon as I get it fixed, I'll share. |
For all of you waiting, I published the working version at https://github.com/llluis/home-assistant/tree/master/config/custom_components/hydroquebec Note that it will pull my pyhydroquebec fork, which contains minor changes to work on HA. |
@llluis how do you install this and run this on home assistant |
I've been able to make pyhydroquebec work on Version 3.0.0 but now I'm also struggling on understanding on how to make it work through MQTT or directly with Home Assistant |
So i got this working for home assistant. These are the steps that i did.
sensor:
I hope this helps someone. Cheers. |
tks p0pp3t0n, got it working on docker with your explanation |
I'm using hassio so i'm not sure how to get it to work |
After rebooting all sensors from hydro quebec are gone ! not sure what happen nothing in the logs about that.. |
I'm on the same boat. Running hassio and can't run pip3 install. I also get the same No module named 'pyhydroquebec' error. |
This may help some people trying to get Hydro Quebec data back into their HA instance. My solution was to host a docker container with docker-compose. The data is sent to my MQTT server. The sensors are recognized by HA and automatically configured. Below is the abridged docker-compose configuration I've used.
The volume mount contains a single file called
|
Thank you so much Luc. I have been looking for some instructions for months. This really helped ! For anyone who is interested these are additional details how I did it:
Cheers |
Merci @lucboudreau I was not able to go the docker route however, since I use a raspberry pi, and I can't find an arm version of the docker. Is there one? In the meantime, I used @p0pp3t0n solution (which is deprecated from ha, I know) and it works. Thanks! |
Got the same error. It seems HA will run the pip command after restart and will get the module, because of the mention of it in manifest.json... So just ignore and restart. It worked for me. Hope this helps. |
Thanks @lucboudreau. I had never used Docker before. I read and learned. It's always fun to learn new things. Here's what I've done for those who, like me, are wondering how to use Docker-Compose.
You will have to replace in the volume section the text before the colon by the directory where will be the file pyhydroquebec.yaml ex: /home/user/pyhydroquebec:/etc/pyhydroquebec becomes for me /home/monusager/pyhydroquebec:/etc/pyhydroquebec
Enter your credential and contract number for the Hydro-Québec site in the file.
To automate the start-up of my container I have created a systemctl service |
Thanks for posting this @lucboudreau and @betelz . I managed to get Home Assistant connected with pyhydroquebec docker via MQTT. Any advice on how I can now use the |
I use mini-graph-card (Installed from HACS). Here is the Lovelace YAML I use for this card.
I didn't try the Energy Tab yet. |
Thank you @betelz that worked perfectly! |
I think this may interest some of you guy's: #64 TL;DR I've created a hass add-on for pyhydroquebec, surely far from perfect but I got everything working for most arch and looking for feedback, so feel free to test and report issue! |
@arsenicks at this point, I don't think this repo is maintained. Do you have plan to maybe fork and maintained an image of your own? |
@petebdeblois Yeah that's what I realised in the last few days. According to my research @titilambert hasn't posted since january 24 here but he's still active on Github as far as I can see(his last PR nov. 5 on other projects). So to answer your question I have no plan to fork and maintain this repo, my contribution was aiming at using pyhydroquebec and create an easy to use add-on for HASS. I would be happy to step in if the owner of this repos clearly state he doesn't want to maintain it anymore, but unfortunately I don't think I have the python skills required to maintain and review code.. seeing all those PR lined up, I'm pretty sure there's skilled people here that could step in. I would be happy to help for everything I can if needed.. But again, I think we really need to hear from @titilambert at this time.. One of his last post state he's been off a little bit waiting for HQ to send him test user and password for unit tests. My guess, he's probably dead waiting for HQ according to my experience with them.. TL;DR No plan Like that, will still work on the hass add-on, maybe a custom integration available in HACS in near future. We need to know the state of this project before anything can be done, otherwise we'll fragment the community and it will be more confusing than anything. |
Great add-on arsenicks. I was able to get yesterday total consumption and yesterday average temperature using a custom component for the last year (not through MQTT) but with your add-on I have much more entities which is great. Thanks you for sharing the information. |
@arsenicks Hi nice work. I installed and run it. I missed the info about the 2 config files, but once I read it again I got it working. Anyway to get it to play nice with the new energy tracking functionality in Home assistant? https://developers.home-assistant.io/docs/core/entity/sensor/#long-term-statistics |
Yes, take a look at this comment: arsenicks/pyhydroquebec-hass-addons#9 (comment) I haven't try because I got my Hilo setup so I don't use the add-on anymore.. So if anyone in the community want to step up fork and maintain it that would be great I could give permission on my repo too. But I know myself, if I don't use it anymore I probably won't put too much effort into that... There's only 24h in a day after all! |
Ok cool, sorry I missed this. Thanks again, have fun with Hilo--how do you like it? |
It's been great so far. I don't like the light dimmer tho, but the thermostat are great.. The integration into HA has to be rebuilt from scratch following an update on Hilo side the day I got my installation done.. So far the new integration work great with fre bugs but it's fun! |
Hi @titilambert,
First of all, thanks for your work!
What's your plan to integrate this back to HA?
I created a custom component and am successfully polling my daily consumption back to HA (using parts of the old official component). We know this couldn't become an official integration anymore, but are we gonna provide a custom template?
Also, I ran your MQTT daemon and I see you are creating messages with the definition of a sensor. Are you planning to run the script outside HA and use MQTT Discovery?
Right now I'm running everything from custom_components as it's easier without accessing the host OS.
The text was updated successfully, but these errors were encountered: