wernerhp / ha.integration.load_shedding

A Home Assistant integration to track your load schedding schedule.
MIT License
113 stars 21 forks source link

Can I have more that one area / zone/ block? #46

Open DravenSA opened 1 year ago

DravenSA commented 1 year ago

Not an Issue, more of a question So today it would seem that we were on Block 2 for the longest time and now we have been moved to block 7

can i add a second block? would like to track block 2 and block 7

wernerhp commented 1 year ago

Not currently, but it's on the roadmap. Made some API usage optimisation to allow for more areas. Started work on config options, but got a bit busy with the silly season. Might look at finishing it up over the holidays.

DravenSA commented 1 year ago

Sounds great, With Stage 6 now set, Sometimes was fall under one of 3 areas, so its a real mess from Eskom side. But you must also enjoy your Holiday time too:-)

emeyedeejay commented 1 year ago

He folks ... any progress on this one?

I would like to add a loadshedding schedule for a family member's dashboard who lives in a different zone.

Thanks! Mike

emeyedeejay commented 1 year ago

Not currently, but it's on the roadmap. Made some API usage optimisation to allow for more areas. Started work on config options, but got a bit busy with the silly season. Might look at finishing it up over the holidays.

Hey @wernerhp - #loveyourwork!

Did you get any further with multiple zones?

Re your comment on API optimisation - I was planning on using a different API token for each area of interest. e.g. for my father who is in a different zone, I would get him to register for a token and then use that to fetch his zone's info.

Were you thinking of having it all in one integration "device"? I saw it as a second/third etc. device in the integration... more like: image

Thanks man ... really cool integration!

tinuva commented 1 year ago

Re your comment on API optimisation - I was planning on using a different API token for each area of interest. e.g. for my father who is in a different zone, I would get him to register for a token and then use that to fetch his zone's info.

@emeyedeejay Warning, if you use more than 1x free token from the same ip address, your ip address gets blacklisted for a few days and then you will get 0 information on this integration. If you want to do more than 50x api calls a day, you need to upgrade to one of the tokens that allow more than 50.

Highly recommend you upgrade if you do more than 1 area. Its not a free service, and its actually very useful and ESP is running a business. The APP allows multiple zones because it makes money with ads. The API can't do ads so the only way of making money is by you upgrading.

emeyedeejay commented 1 year ago

Re your comment on API optimisation - I was planning on using a different API token for each area of interest. e.g. for my father who is in a different zone, I would get him to register for a token and then use that to fetch his zone's info.

@emeyedeejay Warning, if you use more than 1x free token from the same ip address, your ip address gets blacklisted for a few days and then you will get 0 information on this integration. If you want to do more than 50x api calls a day, you need to upgrade to one of the tokens that allow more than 50.

Highly recommend you upgrade if you do more than 1 area. Its not a free service, and its actually very useful and ESP is running a business. The APP allows multiple zones because it makes money with ads. The API can't do ads so the only way of making money is by you upgrading.

Thank you - I had read that before and was going to check out the sub again too 👍

wernerhp commented 1 year ago

@emeyedeejay

Did you get any further with multiple zones?

I have not. Haven't had time to work on this unfortunately. Moved and been pretty busy.

getafix6 commented 1 year ago

+1 for this feature, please! Need to monitor multiple areas for work sites

slipx06 commented 1 year ago

Thanks for this useful integration. I would also like to add another area.

DravenSA commented 8 months ago

Adding in a little reminder about this feature. Now that City Power has taken over from the Eskom schedule, they are bouncing us around zones, first it was 2, then 3 back to 2 again, 3 and 2 in the same day, now i think we are back to 3. And that is just in the last 2 weeks. Please Please Please, can we track multiple zones.

slipx06 commented 8 months ago

@DravenSA the way I achieved this was to run two instances of the integration. I created a fork for the second instance that changes the name to Loadshedding 2. You can add my custom respository https://github.com/slipx06/ha.integration.load_shedding to HACS for the second instance. I adjusted the update interval to every 90 minutes instead of 60 minutes. It works perfectly fine. You need to use the same API key otherwise your IP will get blacklisted. With both areas I only use around 36 API calls.

I also manually edited the original integration to reduce the update interval. You need to change the custom_components/load_shedding/const.py file. Look for the setting below and change it to 5400

STAGE_UPDATE_INTERVAL: Final = 3600

image

DravenSA commented 8 months ago

@slipx06 What a fantastic work around, I love it. Now i can set up my automations with 2 triggers, one for each area, and a condition of a toggle switch, (off Area 2 and On area 3) I know it is not foolproof, but City power is just moving blocks every few days, and i would rather have to toggle a helper switch, than have to set up the integration every time. Much appreciated for your time, and very clear instructions.