Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does this perform a one-time export of data? #15

Open
Valdorama opened this issue Oct 1, 2024 · 5 comments
Open

Does this perform a one-time export of data? #15

Valdorama opened this issue Oct 1, 2024 · 5 comments

Comments

@Valdorama
Copy link

I'm interested in trying this out and wondering how to use it to integrate electricity usage date with Home Assistant. If this tool does a one-time export, would it make sense to have Home Assistant run it periodically (e.g. once daily, specifying the previous one day as start and end dates)?

@tedpearson
Copy link
Owner

Hey there! Sorry about the delayed response.

The whole idea of the tool is to run it periodically. I run it daily with a config looking back 5 days, overwriting any existing data with the same exact value.

I have not yet looked into integrating with Home Assistant, as all my personal metrics are in my VictoriaMetrics instance rather than Home Assistant. I do have a deployment of Home Assistant for a few automations I do with some switches. Perhaps some day I will have time to look into integrating, or someone else will.

Let me know if you have any more questions!

@wishx
Copy link

wishx commented Nov 8, 2024

I do have a deployment of Home Assistant for a few automations I do with some switches. Perhaps some day I will have time to look into integrating, or someone else will.

There are a lot of smarthub.coop users all over the country looking for help integrating this information in to Home Assistant, myself included. Any help you would be willing to offer would be appreciate by hundreds.

@tedpearson
Copy link
Owner

@wishx - Did a little googling around this issue today. It seems Home Assistant do not really want to support "delayed" data importing, which is why so many people are searching for solutions. I've found two posts on the HA forums that seem to be working for people to do this sort of thing. Both of these directly modify the HA database instead of integrating with HA.

I'm not sure if I want to build a direct integration with HA via direct database modification. Perhaps a better method would be to add a CSV export ability and recommend using https://github.com/patrickvorgers/Home-Assistant-Import-Energy-Data to integrate.

@wishx
Copy link

wishx commented Nov 17, 2024

@tedpearson Thanks for the update. I had also scoured all I could find in the search engines about it and, like you, have little desire to directly modify the database.

I did, however, find @smue86's HA-Electric-Usage-Downloader, which worked at one time, but no longer seems to. I think it's probably much closer to what I and several other HA/COOP users are looking for. @smue86 had also forked your repo, I assume to work on their HACS integration.
Link: https://github.com/smue86/ha-electric-usage-downloader

Right now, I have the only issue open with @smue86's integration, but others are starting to pour in, which tells me there's definitely interest in getting it working, as it seems to be the only domain.coop importer that's automated out there.
Link: smue86/ha-electric-usage-downloader#1

It feels like we're getting closer to getting it to work, but we're really just kind of poking in the dark. :/

@tedpearson
Copy link
Owner

@wishx I took a look at ha-electric-usage-downloader. It seems this project is set up for co-ops that have a way to provide realtime usage data, and it's set up as a HA sensor with 15-minute sampling. If your co-op has that ability, that's the way to go, since you don't have do that hard work of importing delayed data into HA as discussed in my previous comment.

However, my electric co-op, at least for my meter, only provides data up to at most the last day. In fact sometimes it's a few days behind. The approach @smue86 is using won't work for my use case or for any co-op that doesn't provide real-time data. I am guessing he forked this repo before figuring out that he wanted to try another approach to more easily get data into HA.

tl;dr - This project is for downloading delayed co-op usage data. It cannot be an HA sensor as done in ha-electric-usage-downloader. So the best idea I've seen so far is directly modifying the HA database.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants