homeassistant-apsystems_ecur icon indicating copy to clipboard operation
homeassistant-apsystems_ecur copied to clipboard

Add "Zero Export" for ECU-C devices?

Open hautamik opened this issue 4 months ago • 0 comments

I have recently installed solar panel system using APSystems' ECU-C. Most of my smallish home automation is done with Node Red, but I'm keen to start using Home Assistant. I found this ECU-related component which seems to be usable with my system, but I am hoping I could use HA to set my ECU-C's Zero Export when electricity price goes below zero.

Unfortunately my experience in programming dates from 1980's coding (in COBOL), so I'm not easily able to fork and start adding my own code. I was able to find out that ECU-C can be controlled with certain URL and HTTP POST method to set and unset Zero Export.

Using curl:

curl --location 'http://[ECU-C IP ADDRESS]/index.php/meter/set_meter_display_funcs' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'meter_func=1' \
--data-urlencode 'this_func=1' \
--data-urlencode 'power_limit=0'

'meter_func=1' sets Zero Export on, and 'meter_func=0' sets it off. Power_limit takes the power in Watts, so to restrict outbound energy to 1 kW, one should 'use power_limit=1000'.

From the web page source I could find out that 0 (zero) as response means success. I guess some other response is a failure.

Does this make any sense, could it be possible to implement this feature with given information?

hautamik avatar Oct 06 '24 14:10 hautamik