mec icon indicating copy to clipboard operation
mec copied to clipboard

set_boost_charge appears to work correctly but the schedule on Zappi does not match.

Open rjpearce opened this issue 4 years ago • 2 comments

Bit of a strange one for you.

The set_boost_charge works appears to work fine, the API calls occur and the correct schedule appears in the MyEnergi app, but the schedule on the Zappi device itself does not match.

If you try an edit the slots in the app they all appear unset. I thought it might be a problem with types but I set a slot on the app and the types are identical.

DEBUG slt <class 'int'>
DEBUG bsh <class 'int'>
DEBUG bsm <class 'int'>
DEBUG bdh <class 'int'>
DEBUG bdm <class 'int'>
DEBUG bdd <class 'str'>

I have raised a myenergi support ticket to try and get some insight. My own api is moving into setting Zappi schedules shortly will see if I run into the same issue.

./set_boost_charge.py 
Will aim to add 10.0kWh at 7.2kW by 8am
Zappi is currently in mode Fault/Startup. (it didn't like set_mode.sh, i manually changed it back to eco+ on zappi)
Setting boost times without car connected?
Start 02:30 End 03:00 (duration 00:30) days Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday
Start 04:30 End 05:30 (duration 01:00) days Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday
Estimaged charge cost 21.1 pence

Boost Slot 11+12 blank. Other slots as follows:

{ 'boost_days': 'Mon,Tue,Wed,Thu,Fri,Sat,Sun', 'boost_slot': 13, 'boost_start_hour': 4, 'boost_start_minute': 30, 'boot_duration_hours': 1, 'boot_durations_mins': 0 }

{ 'boost_days': 'Mon,Tue,Wed,Thu,Fri,Sat,Sun', 'boost_slot': 14, 'boost_start_hour': 2, 'boost_start_minute': 30, 'boot_duration_hours': 0, 'boot_durations_mins': 30 }

rjpearce avatar Jul 03 '20 22:07 rjpearce

Odd as you say. I don't typically use boost charge at this time of year, but I do see the app showing the same values as the script set, and I've observed the Zappi charge on schedule when I forgot to clear them after some testing so I'm afraid I'm unable to replicate this. I have both a V1 and V2 hardware, and the app is showing correct data for both, I've only checked the boost is actually working on the V1.

One possibility is comms problems between the Myenergi servers and the Zappi itself, most likely in the radio link between the hub and the zappi. There's a "cmt" entry in the json which is "last sent command status", 254 means accepted, 0-10 are retry values and there's another value (253?) for failure, it would be worth checking what value this has.

I've also never seen a Zappi mode of Fault/Startup here so maybe there's something bigger going on.

ashleypittman avatar Jul 04 '20 16:07 ashleypittman

I've seen this recently using my own scripts, I've also tried with the 'mec' ones and I get similar results. Very strange, all scripts run fine setting via the api, I can then make a call to get the boost and it appears to be ok, but go out to the zappy and its not updated. I've left for over an hour before and still nothing.
Even if I do it from the android app I get inconsistent results.
I've found the API flaky at best, with timeouts and sometimes no data at all. I can only assume that there is/are similar issues with the sync to the zappi itself, sometimes you get the schedule synced ok, others maybe after a certain amount of attempts it just gives up. Not great, I'll continue to monitor and see if I can find a workaround.

bazza2000 avatar Jul 30 '20 17:07 bazza2000