Sonnenbatterie with APIv2 / Webhook

@Roli1 it took me a while to figure out. First you need to set it to manual mode then send it a discharge rate of 0. I use HA to create switches and rates then I use Node Red to construct the Url’s. Have you enabled the JSON local API?
I have created the curl below, took me a while to get it right:

curl -H 'Auth-Token: 1234567790xxxxxxxxx' -H 'Content-Type: application/x-www-form-urlencoded' -X POST "http://192.168.xx.xx:80/api/v2/setpoint/discharge/0" -d ''

put in your token number, IP address and the zero can be replaced with what ever discharge rate you need.

Loads of useful info here, and I’ve gotten the data from the battery into the HA energy tab and also managed to get the Node Red commands to change the operation mode of the battery from reading through. Has anyone been able to set a TOU schedule this way?

I’ve tried copying the nodes from the examples here to try and send info using ‘EM_ToU_Schedule’ and some information from a German forum which gives a format of:

{“EM_ToU_Schedule”:"[{“start”:“22:00”,“stop”:“03:00”,“threshold_p_max”:500} ,{“start”:“20:00”,“stop”:“22:00”,“threshold_p_max”:0}]"}

But I don’t really know what I’m doing and I think my attempt at JSON is probably gibberish. :crazy_face:

I didn’t bother with it as its a bit of work. Might be easier if you want it, create the schedule in the battery then turn between automatic and TOU mode via HA. Although if you have the buttons working then you can do all that within HA and node red via an automation.

2 Likes

I’m hoping to leave it on ToU but vary the charging amount in the Octopus Go window. So don’t discharge in that window (to stop the battery charge being dumped into my car if it’s plugged in) and then if there’s not likely to be sun the next day then charge the battery fully, if it’s likely to be a bit sunny then half charge it and if it’s going to be full sun then don’t charge at all. Got a few days off over the holiday period so I’ll see if I can teach myself enough to make it work!

That is exactly what I’m doing now with my battery. I figure out how much solar there will be over time periods of the day versus house needs, then make up the difference. The car one is WIP as I found the myenergi API very slow to respond but good enough.

So I got as far as figuring out a way to set the value to charge at overnight in the front end and then send it via a switch, by heavily borrowing from the work above. Setting the times as well alluded me, mostly because the Octopus Go window is fixed so I wasn’t very motivated to figure out formating the times into something workable in the time that I had today. (Maybe I’ll come back to that another time, but ideally I want to get something working with the solar forecast to automatically pick a charge rate for the battery after sunset each day.)

Hopefully this is formatted so that it can be imported in case someone else would find it useful…

[{"id":"e3d838c12c8b1eaa","type":"api-current-state","z":"6c4d4ceb2f682dd2","name":"ToU Charge Rate","server":"10c30ee8.cda2b1","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_number.tou_charge_rate","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"charge_rate","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":410,"y":140,"wires":[["9c248a8040ab9dd8"]]},{"id":"0dc79320d5d2bab1","type":"server-state-changed","z":"6c4d4ceb2f682dd2","name":"Switch TOU Power","server":"10c30ee8.cda2b1","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"switch.sonnen_tou_power","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":170,"y":200,"wires":[["ca0080b4a3377aa4","9c248a8040ab9dd8","e3d838c12c8b1eaa"],[]]},{"id":"ca0080b4a3377aa4","type":"delay","z":"6c4d4ceb2f682dd2","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":380,"y":240,"wires":[["b133ad8685e5a265"]]},{"id":"b133ad8685e5a265","type":"api-call-service","z":"6c4d4ceb2f682dd2","name":"","server":"b9e4497071b772c2","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["switch.sonnen_tou_power"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":560,"y":240,"wires":[[]]},{"id":"9c248a8040ab9dd8","type":"function","z":"6c4d4ceb2f682dd2","name":"TOU Power","func":"msg.payload = { \"EM_ToU_Schedule\": \"[{\\\"start\\\":\\\"00:30\\\",\\\"stop\\\":\\\"04:30\\\",\\\"threshold_p_max\\\":\" + msg.charge_rate + \"}]\" }\nmsg.headers = {}\nmsg.headers['Auth-Token'] = 'YOUR_TOKEN'\nmsg.headers[\"Content-Type\"] = \"application/x-www-form-urlencoded\"\nmsg.url = \"http://YOUR_IP':80/api/v2/configurations\"\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":670,"y":180,"wires":[["d3a7fa5adc2498b9"]]},{"id":"d3a7fa5adc2498b9","type":"http request","z":"6c4d4ceb2f682dd2","name":"Set State","method":"PUT","ret":"obj","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"bearer","senderr":false,"headers":[],"x":820,"y":180,"wires":[["69a6265de8e6775d"]]},{"id":"69a6265de8e6775d","type":"debug","z":"6c4d4ceb2f682dd2","name":"debug 7","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":960,"y":180,"wires":[]},{"id":"10c30ee8.cda2b1","type":"server","name":"Home Assistant","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30,"areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m","enableGlobalContextStore":true},{"id":"b9e4497071b772c2","type":"server","name":"Home Assistant","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30,"areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m","enableGlobalContextStore":true}]

Hi,
I succeeded to control the charging/discharging manually via curl sending
curl -d “” -X POST --header ‘Auth-Token: TOKEN’ http://IP_ADRESS:80/api/v2/setpoint/charge/1000
or alternatively
curl -d -H -X POST --header ‘Auth-Token: TOKEN’ http://IP_ADRESS:80/api/v2/setpoint/charge/1000
Oddly, even setting the charge when the operating mode is Self-Consumption, the setpoint charge will be enforced for a few seconds. Self-Consumption behaviour is however resumed automatically.

The PAC_total split is actually what I was just looking for and feared I have to do it myself. I’ll have a look and check if I can make this work! Thanks!

1 Like

I’m now starting the investigation on ToU mode to plan charging at night if I foresee the next day I won’t produce power enough. So to stay on the safest side I was thinking to control the battery parameters to mimic what I would do through the interface, which means rely on the PUT configurations call and change EM_OperatingMode from 2 (self-consumption) to 10 (ToU) and maybe update the EM_ToU_Schedule (or, if too difficult to set through command because of the syntax, set it once through the interface and rely on that, as I see it is kept in memory). And then just control EM_OperatingMode parameter.
What are your experiences on that?

But I also see that it would be possible to revert back to self-consumption after sending a charge command:

This could be a good alternative to simplify the management. The fact is that the documentation is quite essential and I would like to understand how I can do that first.

@donoghdb @chrism751 how are you reverting the system to self-consumption, after you send a charge command? Which parameters get modified following this command and have to be controlled to revert? Do you maybe set EM_OperatingMode to 1 (along with the API command) and then back to 2?
Is anybody else doing this?

Thank you all for your comments and/or sharing your experiences

I did some testing by changing the settings from the interface. When you set ToU EM_ToU_Schedule is changed from 2 (self-consumption) to 10. Then you can set the schedules for the battery to be charged. What you found on the German forum is correct. From what I see you can set as many non-overlapping time windows as you want (within 24h limit of course) for the battery to be charged with a defined maximum power absorption. It seems the “schedule” is retained in memory when you revert to self-consumption.

EM_ToU_Schedule: [{"start":"09:00","stop":"12:00","threshold_p_max":2000},{"start":"12:00","stop":"14:00","threshold_p_max":2000}]

What is not clear to me is how can the interface allow me to set the max absorption to values that are higher than the inverter max power. Of course I would not exceed this (and default is 2000 W).

Just got my car charger installed and it comes with a Solar Charging mode where it will only start charging when power is being exported to the grid. What I want to do but cant see any way yet, is tell the Sonnen to stop charging from the PV at a certain battery percentage. Currently, the Sonnen has to hit 100%, then the car will start charging from then on. Turning it to manual mode then setting a 0 charge only effects charging from the grid, not PV. Any ideas?

Thats how I do it. Set it to manual and a charge rate of 3600, then set it back to Automatic once the time window I get for free power is over. I re-inject the node every 10 minutes to keep the charge rate up or it slowly backs off and I dont get the most of the free power.

1 Like

I’ve found that when I’m charging my car and want to charge the battery at the same time, I have to set the max power absorption to include the amount that the car charger is drawing. So it seems like the max power is the max grid power including anything else going on in addition to the Sonnen charging.

This time of year I wouldn’t need to charge the battery though, as solar has been quite plentiful, so I’ve not used ToU in a while. (Also my inverter is broken and it took a month to get a new one and that was possibly DoA, so I actually can’t use my Sonnen system at all right now…)

Wouldn’t this correspond to disabling the Solar charging mode on your car charger when the battery hits your desired percentage?

But at that point isn’t it the same as starting charging only when the battery hits the desired percentage (and you have grid export)? The charger should be seen by Sonnen like any other load you have in your house and battery charge managed accordingly.

Basically do not use the Solar charging mode at all?
Sorry if I missed something.

Hopefully, this is a better explanation of my system and plan:

  • I get free power from the power company from 9pm-12am every day.

  • I put the Sonnen into manual mode and make it fully charge over this time

  • Car charger also charges the car at this time to about 1/2 full from empty

  • The car charger has a Solar mode where it monitors grid export, and when there is any power exported, it starts feeding that into the car as long as its plugged. It wont charge from the grid except for the time I specified above.

  • As all excess solar is used first to charge the Sonnen, the battery has to get to 100% before it shows up as exporting to the grid for the car charging system.

So I was thinking if I could bypass the Sonnen from charging from solar at around 60-70% and have the solar charge the car, the Sonnen would have enough power to run the house until 9pm, then get fully charged from the grid. I’ve looked through the API’s and nothing to me stands out has being able to stop the Sonnen from charging from PV. (But I dont really know what most of the APIs actually mean)

Is anybody using the sonnen API with the Amber integration data to take advantage of high feed-in tariffs by discharging the battery when the feed-in price descriptor spikes and inversly blocking feed in when it the price goes negative?

Does anyone know if there’s a way to ‘clear’ the ToU schedule via the API?

Currently the cheap electricity times from my supplier are always 00:30-4:30, but in August I will switch to a new tariff where the car will be charged at different times on different days, controlled by the electricity supplier, so in order to stop the battery filling the car I will need to tell it not to discharge at different

I think you should be able to use EM_ToU_Schedule

e.g. to set

"EM_ToU_Schedule=[{"start":"09:00","stop":"12:00","threshold_p_max":2000}] 

you should be able to use the following node-red flow (if your a node-red users):

[{"id":"402679171d35e0d2","type":"http request","z":"65840aa926d9c567","name":"Set State","method":"PUT","ret":"obj","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"bearer","senderr":false,"headers":[],"x":1360,"y":340,"wires":[["5bd08bcd972153bc"]]},{"id":"9efde64dbc00c864","type":"function","z":"65840aa926d9c567","name":"Manual Mode","func":"msg.payload = \"EM_ToU_Schedule=[{"start":"09:00","stop":"12:00","threshold_p_max":2000}]\"\nmsg.headers = {}\nmsg.headers['Auth-Token'] = 'YOUR-AUTH-TOKEN'\nmsg.headers [\"Content-Type\"] = \"application/x-www-form-urlencoded\"\nmsg.url = \"http://SYSTEM-IP:80/api/v2/configurations\" \nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1180,"y":340,"wires":[["402679171d35e0d2"]]}]

or:

curl -X PUT -d EM_ToU_Schedule=[{"start":"09:00","stop":"12:00","threshold_p_max":2000}] -d NVM_PfcIsFixedCosPhiActive=0 --header 'Auth-Token: TOKEN' http://SYSTEM-IP/api/v2/configurations`

Don’t forget to incert your Auth Token and change the SYSTEM-IP address to your battery’s address. I’ve not tested this.

1 Like

Robert
you appear to be in a similar situation with me. Amber customer and Sonnen battery. I am currently in a 4 way discussion with Amber, SAE (solar installers), SMA (my 3 inverters) and Sonnen.
I would have thought with a 15Kw solar array and a 10Kw battery I should not have to pay for power. I just have lots of wasted power in the day with no way of really controlling when my battery connects to the grid or not.
Pat

Hi Patrick
I’ve managed to creat a configuration in HA that allows me to control the battery. I have 5 main control buttons.

  1. Automatic mode:
    This is the self consumption mode where the battery will charge when there is solar energy and discharge when the house needs energy.
  2. Charge:
    This button will force the battery to charge from solar or grid or both at 3.3 kW (fastest rate) until 100% charged and not discharge.
  3. Discharge:
    This will force the battery to discharges at 3.3 kW (fastest rate) and power the house or feed into the grid or both until flat.
  4. Manual:
    Sit idle and not charge or discharge even when there is solar energy available.
  5. I don’t really use but its the Time of Use mode.

This is all done using http request nodes in Node-Red.

Then I have three automations that:

  1. Charge the battery at 3 am for an hour if the battery is below 20% charge and the amber general rate is “Very Low” (very low is a sensor state from the amber integration for Home Assistant).
    After the hour charging the battery sits in “Manual” or idle mode for two hours until 6 am then switches to ‘Automatic Mode’ when everybody starts to get up to go to work (make coffee and turn on the heaters etc.). This runs Monday to Friday not Saterday or Sunday. This takes advantage of the typical below 20c/kWh rate at 3 AM and discharges between 6:30 until the sun comes up.
  2. Charge the battery at 3:30 pm for an hour if the battery is below 80% charge (cloudy day) then switch to ‘Automatic Mode’ to try to avoid the high tariff in the evening.
  3. Monitor the feed-in price and when it goes above $1 per kWh start discharging the battery at full rate to sell as much eneregy while the price is spiking. this continues until the battery is flat or the price drops below 50c per kWh. This is to make some money as the spikes can go aboe $10 per kWh when the grid is unstable.

I’ve implemented these automations and buttons and curl commands using Node-Red.

The Node-Red flow:

[{"id":"f8c8624c7c9dca94","type":"http request","z":"65840aa926d9c567","name":"Set Charge","method":"POST","ret":"obj","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"bearer","senderr":false,"headers":[],"x":1410,"y":400,"wires":[["0e3f0373d7e81e09"]]},{"id":"858d53f8ca9abe53","type":"function","z":"65840aa926d9c567","name":"Charge Setup","func":"msg.headers = {}\nmsg.headers['Auth-Token'] = 'YOUR SONNEN BATTERY AUTH TOKEN'\nmsg.headers [\"Content-Type\"] = \"application/x-www-form-urlencoded\"\nmsg.url = \"http://192.168.99.168:80/api/v2/setpoint/charge/3300\"\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1240,"y":400,"wires":[["f8c8624c7c9dca94"]]},{"id":"0e3f0373d7e81e09","type":"debug","z":"65840aa926d9c567","name":"debug Charge","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1580,"y":400,"wires":[]},{"id":"05d69d4319a0f5d6","type":"http request","z":"65840aa926d9c567","name":"Set Discharge","method":"POST","ret":"obj","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"bearer","senderr":false,"headers":[],"x":1420,"y":280,"wires":[["0e4ea3476743d2c3"]]},{"id":"6151ac699f7381c1","type":"function","z":"65840aa926d9c567","name":"Discharge Setup","func":"msg.headers = {}\nmsg.headers['Auth-Token'] = 'YOUR SONNEN BATTERY AUTH TOKEN'\nmsg.headers [\"Content-Type\"] = \"application/x-www-form-urlencoded\"\nmsg.url = \"http://192.168.99.168:80/api/v2/setpoint/discharge/3300\"\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1240,"y":280,"wires":[["05d69d4319a0f5d6"]]},{"id":"0e4ea3476743d2c3","type":"debug","z":"65840aa926d9c567","name":"debug discharge","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1600,"y":280,"wires":[]},{"id":"402679171d35e0d2","type":"http request","z":"65840aa926d9c567","name":"Set State","method":"PUT","ret":"obj","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"bearer","senderr":false,"headers":[],"x":1360,"y":340,"wires":[["5bd08bcd972153bc"]]},{"id":"9efde64dbc00c864","type":"function","z":"65840aa926d9c567","name":"Manual Mode","func":"msg.payload = \"EM_OperatingMode=1\"\nmsg.headers = {}\nmsg.headers['Auth-Token'] = 'YOUR SONNEN BATTERY AUTH TOKEN'\nmsg.headers [\"Content-Type\"] = \"application/x-www-form-urlencoded\"\nmsg.url = \"http://192.168.99.168:80/api/v2/configurations\" \nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1180,"y":340,"wires":[["402679171d35e0d2"]]},{"id":"5bd08bcd972153bc","type":"debug","z":"65840aa926d9c567","name":"debug Manual Mode","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1560,"y":340,"wires":[]},{"id":"10920422f5fa573e","type":"api-call-service","z":"65840aa926d9c567","name":"Switch turn-off Charge","server":"afc27684.cf6ed8","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["switch.sonnen_charge_2"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1340,"y":680,"wires":[[]]},{"id":"b66c43b2d71ebcfc","type":"http request","z":"65840aa926d9c567","name":"Set State","method":"PUT","ret":"obj","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"bearer","senderr":false,"headers":[],"x":1340,"y":460,"wires":[["1736681453a9e3de"]]},{"id":"49c07dcad21bb88c","type":"function","z":"65840aa926d9c567","name":"Automatic Mode","func":"msg.payload = \"EM_OperatingMode=2\"\nmsg.headers = {}\nmsg.headers['Auth-Token'] = 'YOUR SONNEN BATTERY AUTH TOKEN'\nmsg.headers [\"Content-Type\"] = \"application/x-www-form-urlencoded\"\nmsg.url = \"http://192.168.99.168:80/api/v2/configurations\" \nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1160,"y":460,"wires":[["b66c43b2d71ebcfc"]]},{"id":"1736681453a9e3de","type":"debug","z":"65840aa926d9c567","name":"debug Automation Mode","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1550,"y":460,"wires":[]},{"id":"d6e30b460a9ee319","type":"api-call-service","z":"65840aa926d9c567","name":"Switch turn-off Automatic Mode","server":"afc27684.cf6ed8","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["switch.sonnen_automatic_mode"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1370,"y":560,"wires":[[]]},{"id":"163bc3abe14e285d","type":"ha-switch","z":"65840aa926d9c567","name":"Sonnen Charge","version":0,"inputs":1,"outputs":2,"entityConfig":"2d18a92a5ddd4fd8","enableInput":true,"outputOnStateChange":true,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"str"}],"x":360,"y":520,"wires":[["8f6da85cea51a6c2"],[]]},{"id":"3896b33d87e81de7","type":"ha-switch","z":"65840aa926d9c567","name":"Sonnen Discharge","version":0,"inputs":1,"outputs":2,"entityConfig":"ee18bd169efda9d5","enableInput":true,"outputOnStateChange":true,"outputProperties":[{"property":"payload","propertyType":"msg","value":"true","valueType":"bool"}],"x":370,"y":460,"wires":[["c4a70f29ecac9603"],[]]},{"id":"99ea255a2bb6c9fa","type":"ha-switch","z":"65840aa926d9c567","name":"Sonnen Manual Mode","version":0,"inputs":1,"outputs":2,"entityConfig":"15891e5320025a4a","enableInput":true,"outputOnStateChange":true,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"str"}],"x":380,"y":400,"wires":[["767baa7b0d82b4ca"],[]]},{"id":"594e3b2e22d599e5","type":"ha-switch","z":"65840aa926d9c567","name":"Sonnen Automatic Mode","version":0,"inputs":1,"outputs":2,"entityConfig":"d173cac1c20527d9","enableInput":true,"outputOnStateChange":true,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"str"}],"x":390,"y":580,"wires":[["53cefbe739be3a2f"],[]]},{"id":"4b6455180cf0d210","type":"delay","z":"65840aa926d9c567","name":"5 sec","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":1090,"y":400,"wires":[["858d53f8ca9abe53"]]},{"id":"a0bb98148eb3c453","type":"inject","z":"65840aa926d9c567","name":"03:00 charge","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"00 03 * * 1,2,3,4,5","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":160,"y":220,"wires":[["72a5a832ce09938f"]]},{"id":"8327524c3f777f5d","type":"api-current-state","z":"65840aa926d9c567","name":"Battery under 20%","server":"afc27684.cf6ed8","version":3,"outputs":2,"halt_if":"20","halt_if_type":"num","halt_if_compare":"lt","entity_id":"sensor.sonnenbatterie_84324_state_charge_user","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":530,"y":220,"wires":[["6f6e5b3310e4f1d9","63ba9e6850f7361b"],[]]},{"id":"6f6e5b3310e4f1d9","type":"delay","z":"65840aa926d9c567","name":"","pauseType":"delay","timeout":"60","timeoutUnits":"minutes","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":750,"y":200,"wires":[["b42b8c412b6200e7","31bb16b9d29df719"]]},{"id":"e7b5ec834da03f9f","type":"inject","z":"65840aa926d9c567","name":"15:30 charge","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"30 15 * * *","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":160,"y":80,"wires":[["3622b2c21f2bb0f2"]]},{"id":"87fbdd7138e9d380","type":"api-current-state","z":"65840aa926d9c567","name":"Battery under 80%","server":"afc27684.cf6ed8","version":3,"outputs":2,"halt_if":"80","halt_if_type":"num","halt_if_compare":"lt","entity_id":"sensor.sonnenbatterie_84324_state_charge_user","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":550,"y":80,"wires":[["5993a1a3bf1ef9de","95976ebe7f6655d3"],[]]},{"id":"5993a1a3bf1ef9de","type":"delay","z":"65840aa926d9c567","name":"Charge for 1 hr","pauseType":"delay","timeout":"60","timeoutUnits":"minutes","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":740,"y":60,"wires":[["8254f5986525b3a1"]]},{"id":"3622b2c21f2bb0f2","type":"api-current-state","z":"65840aa926d9c567","name":"Very low","server":"afc27684.cf6ed8","version":3,"outputs":2,"halt_if":"very_low","halt_if_type":"str","halt_if_compare":"is","entity_id":"sensor.cecil_st_general_price_descriptor","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":340,"y":80,"wires":[["87fbdd7138e9d380"],[]]},{"id":"72a5a832ce09938f","type":"api-current-state","z":"65840aa926d9c567","name":"Very low","server":"afc27684.cf6ed8","version":3,"outputs":2,"halt_if":"very_low","halt_if_type":"str","halt_if_compare":"is","entity_id":"sensor.cecil_st_general_price_descriptor","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":340,"y":220,"wires":[["8327524c3f777f5d"],[]]},{"id":"4e83ea6e880ed707","type":"delay","z":"65840aa926d9c567","name":"","pauseType":"delay","timeout":"2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":1100,"y":560,"wires":[["d6e30b460a9ee319"]]},{"id":"889022fc881fbb93","type":"delay","z":"65840aa926d9c567","name":"","pauseType":"delay","timeout":"2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":1100,"y":680,"wires":[["10920422f5fa573e"]]},{"id":"e5c940b48b9cc661","type":"server-state-changed","z":"65840aa926d9c567","name":"Feed-in price","server":"afc27684.cf6ed8","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.cecil_st_feed_in_price","entityidfiltertype":"exact","outputinitially":false,"state_type":"num","haltifstate":"","halt_if_type":"num","halt_if_compare":"gt","outputs":1,"output_only_on_state_change":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"}],"x":130,"y":740,"wires":[["b2f1e3b7259ee6e5"]]},{"id":"b04c5a889c7811e1","type":"api-call-service","z":"65840aa926d9c567","name":"Switch turn-off Manual Mode","server":"afc27684.cf6ed8","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["switch.sonnen_manual_mode_2"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1360,"y":620,"wires":[[]]},{"id":"1504b8a31a27f3c0","type":"delay","z":"65840aa926d9c567","name":"","pauseType":"delay","timeout":"2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":1100,"y":620,"wires":[["b04c5a889c7811e1"]]},{"id":"235f18f61ad60ba6","type":"api-call-service","z":"65840aa926d9c567","name":"Switch turn-off Discharge","server":"afc27684.cf6ed8","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["switch.sonnen_discharge_2"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1350,"y":740,"wires":[[]]},{"id":"05cf76adb5e1fce4","type":"delay","z":"65840aa926d9c567","name":"","pauseType":"delay","timeout":"2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":1100,"y":740,"wires":[["235f18f61ad60ba6"]]},{"id":"79ac18806ae7b257","type":"comment","z":"65840aa926d9c567","name":"FiT Discharge Spike (at $1.00 and nospike at $0.50","info":"","x":310,"y":700,"wires":[]},{"id":"0a3543a03660772a","type":"comment","z":"65840aa926d9c567","name":"Afternoon charge if battery below 80%","info":"","x":402,"y":43,"wires":[]},{"id":"8a366e8d4d842810","type":"comment","z":"65840aa926d9c567","name":"Early Morning charge if battery flat","info":"","x":380,"y":180,"wires":[]},{"id":"75db62f34895127b","type":"time-range-switch","z":"65840aa926d9c567","name":"Early morning 1 to 5:30","lat":"-33.79718416485773","lon":"151.09860994621346","startTime":"01:00","endTime":"05:30","startOffset":0,"endOffset":0,"x":350,"y":300,"wires":[[],[]]},{"id":"089a587a93351529","type":"poll-state","z":"65840aa926d9c567","name":"General price","server":"afc27684.cf6ed8","version":2,"exposeToHomeAssistant":true,"haConfig":[{"property":"name","value":"Norning Charge"},{"property":"icon","value":"mdiTransmissionTower"}],"updateinterval":"60","updateIntervalType":"num","updateIntervalUnits":"seconds","outputinitially":false,"outputonchanged":false,"entity_id":"sensor.cecil_st_general_price","state_type":"str","halt_if":"25","halt_if_type":"num","halt_if_compare":"lt","outputs":2,"x":130,"y":300,"wires":[["75db62f34895127b"],["75db62f34895127b"]]},{"id":"d7480326262afc7a","type":"link out","z":"65840aa926d9c567","name":"link out FiT low","mode":"link","links":["738d28e88d4351bd","f276c6683121c547","fb229ac0227a16b7","d577eb36f0d74d39"],"x":555,"y":780,"wires":[]},{"id":"738d28e88d4351bd","type":"link in","z":"65840aa926d9c567","name":"link in Automatic Mode","links":["d7480326262afc7a","53cefbe739be3a2f","8254f5986525b3a1","87b07b541bba63f6"],"x":995,"y":460,"wires":[["49c07dcad21bb88c"]]},{"id":"214eb49945a0f314","type":"link in","z":"65840aa926d9c567","name":"link in Turn off Automatic Moode Switch","links":["767baa7b0d82b4ca","d9ba6153cfb88bbb","c4a70f29ecac9603","8f6da85cea51a6c2"],"x":995,"y":560,"wires":[["4e83ea6e880ed707"]]},{"id":"f276c6683121c547","type":"link in","z":"65840aa926d9c567","name":"link in Turn off Manual Switch","links":["d7480326262afc7a","53cefbe739be3a2f","c4a70f29ecac9603","8f6da85cea51a6c2"],"x":995,"y":620,"wires":[["1504b8a31a27f3c0"]]},{"id":"fb229ac0227a16b7","type":"link in","z":"65840aa926d9c567","name":"link in Turn off Charge Switch","links":["d7480326262afc7a","53cefbe739be3a2f","d9ba6153cfb88bbb","c4a70f29ecac9603","767baa7b0d82b4ca"],"x":995,"y":680,"wires":[["889022fc881fbb93"]]},{"id":"d577eb36f0d74d39","type":"link in","z":"65840aa926d9c567","name":"link in Turn off Discharge switch","links":["d7480326262afc7a","53cefbe739be3a2f","8f6da85cea51a6c2","767baa7b0d82b4ca"],"x":995,"y":740,"wires":[["05cf76adb5e1fce4"]]},{"id":"53cefbe739be3a2f","type":"link out","z":"65840aa926d9c567","name":"link out Automatic Mode Switch","mode":"link","links":["738d28e88d4351bd","d577eb36f0d74d39","f276c6683121c547","fb229ac0227a16b7"],"x":535,"y":580,"wires":[]},{"id":"93beed478696134e","type":"link in","z":"65840aa926d9c567","name":"link in Charge Setup","links":["8f6da85cea51a6c2","63ba9e6850f7361b","95976ebe7f6655d3"],"x":995,"y":400,"wires":[["4b6455180cf0d210"]]},{"id":"2608790487e879c8","type":"link in","z":"65840aa926d9c567","name":"link in Manual Mode Setup","links":["8f6da85cea51a6c2","c4a70f29ecac9603","767baa7b0d82b4ca","d9ba6153cfb88bbb","63ba9e6850f7361b","95976ebe7f6655d3"],"x":995,"y":340,"wires":[["9efde64dbc00c864"]]},{"id":"5ee73c1f9154912a","type":"link in","z":"65840aa926d9c567","name":"link in Discharge Setup","links":["c4a70f29ecac9603","d9ba6153cfb88bbb"],"x":995,"y":280,"wires":[["174d6cc39f3cf6db"]]},{"id":"8f6da85cea51a6c2","type":"link out","z":"65840aa926d9c567","name":"link out Charge Mode Switch","mode":"link","links":["2608790487e879c8","93beed478696134e","28f35002be45f983","214eb49945a0f314","f276c6683121c547","d577eb36f0d74d39"],"x":535,"y":520,"wires":[]},{"id":"c4a70f29ecac9603","type":"link out","z":"65840aa926d9c567","name":"link out Discharge Mode Switch","mode":"link","links":["5ee73c1f9154912a","2608790487e879c8","214eb49945a0f314","f276c6683121c547","fb229ac0227a16b7"],"x":535,"y":460,"wires":[]},{"id":"174d6cc39f3cf6db","type":"delay","z":"65840aa926d9c567","name":"5 sec","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":1090,"y":280,"wires":[["6151ac699f7381c1"]]},{"id":"767baa7b0d82b4ca","type":"link out","z":"65840aa926d9c567","name":"link out Manual Mode Switch","mode":"link","links":["2608790487e879c8","214eb49945a0f314","0fdea619274a2742","fb229ac0227a16b7","d577eb36f0d74d39"],"x":535,"y":400,"wires":[]},{"id":"d9ba6153cfb88bbb","type":"link out","z":"65840aa926d9c567","name":"link out FiT High","mode":"link","links":["5ee73c1f9154912a","2608790487e879c8","214eb49945a0f314","fb229ac0227a16b7"],"x":555,"y":700,"wires":[]},{"id":"63ba9e6850f7361b","type":"link out","z":"65840aa926d9c567","name":"link out Morning Charge On","mode":"link","links":["2608790487e879c8","93beed478696134e","28f35002be45f983"],"x":685,"y":320,"wires":[]},{"id":"b42b8c412b6200e7","type":"link out","z":"65840aa926d9c567","name":"link out Morning Charge Off","mode":"link","links":["0fdea619274a2742"],"x":905,"y":200,"wires":[]},{"id":"95976ebe7f6655d3","type":"link out","z":"65840aa926d9c567","name":"link out Evening charge On","mode":"link","links":["2608790487e879c8","93beed478696134e","28f35002be45f983"],"x":725,"y":120,"wires":[]},{"id":"8254f5986525b3a1","type":"link out","z":"65840aa926d9c567","name":"link out Evening Charge Off","mode":"link","links":["738d28e88d4351bd"],"x":875,"y":120,"wires":[]},{"id":"b2f1e3b7259ee6e5","type":"dsm","z":"65840aa926d9c567","name":"hysteresis","sm_config":"{\n    \"currentState\": \"undefined\",\n    \"states\": {\n        \"undefined\": {\n            \"cross_high\": \"high\",\n            \"cross_low\": \"low\",\n            \"inter\": \"deadband\"\n        },\n        \"high\": {\n            \"cross_low\": \"low\",\n            \"inter\": \"deadband\"\n        },\n        \"low\": {\n            \"cross_high\": \"high\",\n            \"inter\": \"deadband\"\n        },\n        \"deadband\": {\n            \"cross_high\": \"high\",\n            \"cross_low\": \"low\"\n        }\n    },\n    \"data\": {\n        \"setpoint_high\": 1.0,\n        \"setpoint_low\": 0.5,\n        \"greater_high\": \"on\",\n        \"less_low\":  \"off\"\n    },\n    \"methods\": {\n        \"setpoint_high\": {\n            \"name\": \"setData\"\n        },\n        \"setpoint_low\": {\n            \"name\": \"setData\"\n        },\n        \"onBeforeTransition\": [\n            \"if (!msg.topic) msg.topic = 'evaluade';\"\n        ],\n        \"evaluade\": [\n            \"if(msg.payload > sm.data.setpoint_high)\",\n            \"   resume('cross_high', msg);\",\n            \"else if (msg.payload < sm.data.setpoint_low)\",\n            \"   resume('cross_low', msg);\",\n            \"else {\",\n            \"   resume('inter', msg);\",\n            \"}\",\n            \"output = false;\"\n        ],\n        \"cross_high\": [\n            \"msg.payload = sm.data.greater_high;\",\n            \"sm.fill = 'yellow';\"\n        ],\n        \"cross_low\": [\n            \"msg.payload = sm.data.less_low;\",\n            \"sm.fill = 'green';\"\n        ],\n        \"inter\": [\n            \"sm.fill = 'grey';\",\n            \"output = false;\"\n        ],\n        \"status\": {\n            \"fill\": {\n                \"get\": \"sm.fill;\"\n            },\n            \"shape\": \"dot\",\n            \"text\": {\n                \"get\": \"sm.currentState;\"\n            }\n        }\n    }\n}","x":290,"y":740,"wires":[["7618c2e9822bf2fc"]]},{"id":"7618c2e9822bf2fc","type":"switch","z":"65840aa926d9c567","name":"on/off","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":450,"y":740,"wires":[["d9ba6153cfb88bbb","be2066935f32d614"],["d7480326262afc7a"]]},{"id":"be2066935f32d614","type":"api-call-service","z":"65840aa926d9c567","name":"Notify Robet's iPhones","server":"afc27684.cf6ed8","version":5,"debugenabled":false,"domain":"notify","service":"mobile_app_robsiphone","areaId":[],"deviceId":[],"entityId":[],"data":"{\"title\":\"FiT Spike\",\"message\":\"FiT price had breached $1\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":669.2578125,"y":739.26171875,"wires":[[]]},{"id":"71b6831a8862dc59","type":"http request","z":"65840aa926d9c567","name":"Set Charge","method":"POST","ret":"obj","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"bearer","senderr":false,"headers":[],"x":1450,"y":220,"wires":[["0463b2679edf6145"]]},{"id":"0a139a31c1ecd269","type":"function","z":"65840aa926d9c567","name":"100W Charge Setup","func":"msg.headers = {}\nmsg.headers['Auth-Token'] = 'YOUR SONNEN BATTERY AUTH TOKEN'\nmsg.headers [\"Content-Type\"] = \"application/x-www-form-urlencoded\"\nmsg.url = \"http://192.168.99.168:80/api/v2/setpoint/charge/100\"\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1260,"y":220,"wires":[["71b6831a8862dc59"]]},{"id":"0463b2679edf6145","type":"debug","z":"65840aa926d9c567","name":"debug 100W Charge","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1640,"y":220,"wires":[]},{"id":"3838e81fb4788165","type":"inject","z":"65840aa926d9c567","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":1060,"y":180,"wires":[["0a139a31c1ecd269"]]},{"id":"0e54ad505c3c0b16","type":"delay","z":"65840aa926d9c567","name":"5 sec","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":1090,"y":220,"wires":[["0a139a31c1ecd269"]]},{"id":"0fdea619274a2742","type":"link in","z":"65840aa926d9c567","name":"link in 0 charge","links":["767baa7b0d82b4ca","b42b8c412b6200e7"],"x":995,"y":220,"wires":[["0e54ad505c3c0b16"]]},{"id":"31bb16b9d29df719","type":"delay","z":"65840aa926d9c567","name":"","pauseType":"delay","timeout":"2","timeoutUnits":"hours","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":760,"y":260,"wires":[["87b07b541bba63f6"]]},{"id":"87b07b541bba63f6","type":"link out","z":"65840aa926d9c567","name":"link out first coffee","mode":"link","links":["738d28e88d4351bd"],"x":905,"y":260,"wires":[]},{"id":"afc27684.cf6ed8","type":"server","name":"Home Assistant","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30,"areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m","enableGlobalContextStore":true},{"id":"2d18a92a5ddd4fd8","type":"ha-entity-config","server":"afc27684.cf6ed8","deviceConfig":"","name":"switch config for Sonnen Charge","version":"6","entityType":"switch","haConfig":[{"property":"name","value":"Sonnen Charge"},{"property":"icon","value":"mdi:battery-plus-outline"},{"property":"entity_category","value":""},{"property":"entity_picture","value":""},{"property":"device_class","value":""}],"resend":true,"debugEnabled":false},{"id":"ee18bd169efda9d5","type":"ha-entity-config","server":"afc27684.cf6ed8","deviceConfig":"","name":"switch config for Sonnen Discharge","version":"6","entityType":"switch","haConfig":[{"property":"name","value":"Sonnen Discharge"},{"property":"icon","value":"mdi:battery-minus-outline"},{"property":"entity_category","value":""},{"property":"entity_picture","value":""},{"property":"device_class","value":""}],"resend":true,"debugEnabled":false},{"id":"15891e5320025a4a","type":"ha-entity-config","server":"afc27684.cf6ed8","deviceConfig":"","name":"switch config for Sonnen Manual Mode","version":"6","entityType":"switch","haConfig":[{"property":"name","value":"Sonnen Manual Mode"},{"property":"icon","value":"mdi:car-shift-pattern"},{"property":"entity_category","value":""},{"property":"entity_picture","value":""},{"property":"device_class","value":""}],"resend":true,"debugEnabled":false},{"id":"d173cac1c20527d9","type":"ha-entity-config","server":"afc27684.cf6ed8","deviceConfig":"","name":"switch config for Sonnen Automatic Mode test","version":"6","entityType":"switch","haConfig":[{"property":"name","value":"Sonnen Automatic Mode"},{"property":"icon","value":"mdi:refresh-auto"},{"property":"entity_category","value":""},{"property":"entity_picture","value":""},{"property":"device_class","value":""}],"resend":true,"debugEnabled":false}]

So these three automations are very simple and are the rules base controls that one would implemet to start with. But the more difficult control system to implement is one that uses the forecasts that amber give you and solar forecasts that you can get from solcast and the like.

@davidusb has developes a system that does this. You can read about it here. I’m trying to implement that now.

2 Likes