dan-r/HomeAssistant-Ohme

Ability to capture smart schedule

RaptorG opened this issue · 9 comments

Is your feature request related to a problem? Please describe.
Ohme sends a smart schedule for time slots. Some of these time slots are outside of peak hours.

Describe the solution you'd like
Ability read these slots.

Describe alternatives you've considered
Ohme sends these as push notifications, is it possible to receive notification in HA integration and parse them

Additional context
knowing additional smart slots would help in automating to disable PV battery outside of Off peak hours.

So for the next slot start/end sensors and charge slot active binary sensor, we do know when the charge slots are. I don't know of an easy way to get the notification content but I parse the coordinates for the graph on the Ohme app home screen with this logic.

Getting when all the slots are would be relatively straightforward, but the reason I haven't presented that is I dont think theres a nice way to present it in Home Assistant.

Thanks for your response. Sorry I don't know python much so its mostly French and Greek to me.

Assuming Octopus provide upto 5 smart slots then additional 4 sensors can be set with a value of Unavailable , Not Allocated, Off or Unknown.
Something like
sensor.ohme_next_slot [the earliest slot ]
sensor.ohme_2nd_slot
sensor.ohme_3rd_slot
sensor.ohme_4th_slot
sensor.ohme_5th_slot

I have enabled history on Android notifications for Ohme App so I can see how many slots do they usually assign.
Might I suggest taking a look at https://github.com/megakid/ha_octopus_intelligent. BTW this integration doesn't work with Ohme.

The problem is that AFAIK the number of slots is effectively unlimited, and I've seen screenshots listing 10+ slots. You'd then need a start and an end for each slot.

Maybe a text sensor with a comma seperated list? Eg:
00:30-02:00, 02:30-03:00, 04:00-05:30
I guess it depends how you're planning to use the info

That should do. I don't yet know how but should be possible to parse text sensor values. E.g. Values between comma as
slot_1_start> time_value and slot_1_end> time_value
slot_2_start> time_value and slot_2_end> time_value
slot_3_start> time_value and slot_3_end> time_value
and so on and do something at that time.

Basically, I have an PV battery, which I would like to stop draining which is easy enough during Off Peak. During Peak I can read Power Draw or Car Charging or Charge Slot Active sensor state. e.g. if power draw is above 0 and car charging is on then disable battery discharge. Enable discharge when the sensors flip.

If the slot time is known then it would be possible to charge battery on AC and reliably stop as well. Am I making it more complicated than it should be?

I'm not too sure in your specific case - I'd have given up at: do x when charge slot active :)

I've made a start on the charge slots sensor in v0.4.3-beta.2 (beta instructions). Mind testing it out?

Screenshot 2024-01-26 at 11 31 23

As with the other charge slots logic, it gets all its data from the 'charge graph' coordinates on the home page of the app so might have some weird bugs to squash.

Many thanks, this much appreciated. I am working this Friday and Saturday. Will try and test it out this Sunday.

If it helps. I have Eddi and Harvi [myenergi solar diverter] with 3 CT clamps. The 3rd CT clamp is on the EV Circuit and set to Battery Storage Only. It can sense the current when EV is charging. However, it somewhat unreliable as quite often Ohme wakes up, resulting in current draw going up and down. I don't have a problem detecting when EV is charging or not but haven't been able to fine tune base line current draw when EV is not charging, causing triggers when EV is not charging. Not a huge problem in itself but it triggers EV not charging routines randomly.

I've been trying it out over my past couple of charges and seems to be reliable. Let me know how you get on.

image

image

I can now see the slots. I am yet to figure out what's the best way to utilise these and charge battery during these slots.
image