easee_hass icon indicating copy to clipboard operation
easee_hass copied to clipboard

FR: Schedules on Chargers (No need to poll)

Open skela opened this issue 3 years ago • 3 comments

Noticed some GET requests to the basic_charge_plan and weekly_charge_plan, and heard from @olalid that you poll for schedule info. Which I guess probably makes sense since the chargingSchedule observation via SignalR was either not emitted, or unreliable.

You don't need to do that anymore, observation 62 contains a json string containing the schedule that's stored on the charger (whether it be a weekly or basic charge plan).

/// Charging schedule [json] [String] static const int ChargingSchedule = 62;

skela avatar Jan 25 '22 17:01 skela

Closing this since this seems to have changed and it is again necessary to poll for schedule info (which we do every 10 minutes).

olalid avatar May 20 '22 16:05 olalid

@olalid

They are working on re-introducing Observation 62 (it was accidentally removed when they moved to a new way of storing schedules on the chargers). Should be possible with a cloud side change, that might be released in the coming 2 weeks.

skela avatar May 20 '22 18:05 skela

observation 62 is back.

skela avatar Jun 14 '22 21:06 skela

The parsing of the data from observation 62 is rather complex to shoehorn in to the integration, so opting for a solution which still uses polling, but only polls when observation 62 is received.

olalid avatar Oct 10 '22 16:10 olalid

Hmm. Seems like observation 62 is not sent out anymore. Has it been disabled again?

olalid avatar Oct 19 '22 18:10 olalid

It should be, let me check now. Which API endpoint are u using to set the schedules?

skela avatar Oct 19 '22 20:10 skela

yeah, thats frustrating, ill try and find out more info tomorrow - it didnt work for me either.

skela avatar Oct 19 '22 20:10 skela

We poll /api/chargers/EHxxx/basic_charge_plan and /api/chargers/EHxxx/weekly_charge_plan, but we were planning to only poll when observation 62 was received. Which obviously will not work if 62 is not sent out. I have mainly tested by changing the schedule in the app, so not really setting them from HA. It did work some weeks ago when I tested last time.

olalid avatar Oct 19 '22 23:10 olalid

Yup, i found out today, the Cloud guys broke it again when migrating to a new system. I'll let u know once its fixed, sorry for the inconvenience again, and I really appreciate u looking to implement your suggested change here.

skela avatar Oct 20 '22 16:10 skela

Finally I got around to removing the polling completely. (Well it falls back to polling if the SignalR stream does not connect, but otherwise not).

olalid avatar May 06 '23 09:05 olalid

Excellent, thank you.

skela avatar May 06 '23 12:05 skela