November 16, 20214 yr 1 hour ago, finch6 said: Firstly... Congrats and thank you to @Bloubul7, @Sc00bs & @jacauc...! The work you have all put in is incredible...! You all deserve breweries, not just beers!!! I've been following this thread and am about to get myself a inverter/battery set to carry me through the on going load shedding - and hopefully upgrade to PV once the pocket allows 🤦🏼♂️ I've already got a Pi Zero running Node Red and added the flows from @jacauc's GitHub page... Thank you!! I'm now looking at the connection from inverter to pi... Seems I was at the back of the queue as all the RS485 Pi Hats are sold out... 🤦🏼♂️ Anyone have a spare one lying around up for grabs or know of where I can get one?? Wave RS485 HAT For Pi Thanks again everyone for all your contributions and comments, almost makes this setup basically plug and play!! RS485 CAN HAT for Raspberry Pi | Lost Distance Comm’s (diyelectronics.co.za) Only 17 remaining...
November 16, 20214 yr These work well for R80 🙂 https://www.communica.co.za/products/hkd-usb-rs485-ttl-converter-ftdi
November 16, 20214 yr 6 hours ago, valienté said: RS485 CAN HAT for Raspberry Pi | Lost Distance Comm’s (diyelectronics.co.za) Only 17 remaining... Why when I use the Googles does it not show me this stuff!! 🤨 Thanks @valienté!!!
November 17, 20214 yr Finally signed up to this PF! So technically first post. Hopefully getting my gear all installed this week, and going to probably be spending my weekend reading this thread 100x and bashing my head against the wall. Looks interesting! Bought a few goodies recommended in this thread too.
November 18, 20214 yr This is a gold mine of information. Thank you all for the posts and sharing knowledge. I'll add my integration for loadsh*tting and managing my devices during these times. First a grid check sensor in Home Assistant. Add to sensor.yaml or similar under sensors. #==================== # -- Eskom Status -- #==================== - platform: template sensors: gridstatus: friendly_name: "EskomStatus" value_template: > {% if states('sensor.sunsynk_grid_ct') == "0" %} DOWN/LOADSHEDDING {% else %} UP {% endif %} Then in Node-Red the automation. [{"id":"8e57e33b932a226e","type":"function","z":"c7b4c3f030b80b8d","name":"Compile","func":"var state = msg.payload;\nvar _RptData = {}\nif (state === \"on\"){\n _RptData\t= {\n \"content\":\"ESKOM - Power ONLINE\",\n \"chatId\":980022075,\n \"type\":\"message\",\n \"caption\":\"Eskom online\"\n };\n}\nelse\n{\n _RptData\t= {\n \"content\":\"ESKOM - Power OFFLINE\",\n \"chatId\":980022075,\n \"type\":\"message\",\n \"caption\":\"Eskom Offline\"\n };\n}\nOutput = {\n \"payload\": _RptData,\n \"topic\": \"ESKOM - Power\"\n }\nnode.status({fill:\"green\",shape:\"ring\",text:state});\nreturn Output;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":780,"y":320,"wires":[["bcabaee8281f0fac"]]},{"id":"bcabaee8281f0fac","type":"telegram sender","z":"c7b4c3f030b80b8d","name":"","bot":"9d61a0a3801cd7b5","haserroroutput":false,"outputs":1,"x":970,"y":320,"wires":[[]]},{"id":"b3db5bc617bc9d44","type":"api-call-service","z":"c7b4c3f030b80b8d","name":"PoolPump","server":"9161ae20.ff364","version":3,"debugenabled":false,"service_domain":"homeassistant","service":"turn_{{payload}}","entityId":"switch.pool_pump","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"data"}],"queue":"none","x":950,"y":120,"wires":[[]]},{"id":"f59c6247f8810dc7","type":"api-call-service","z":"c7b4c3f030b80b8d","name":"Kitchen Geyser","server":"9161ae20.ff364","version":3,"debugenabled":false,"service_domain":"homeassistant","service":"turn_{{payload}}","entityId":"switch.kitchen_geyser","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"data"}],"queue":"none","x":960,"y":160,"wires":[[]]},{"id":"1f88266a271ef945","type":"api-call-service","z":"c7b4c3f030b80b8d","name":"HeatPump","server":"9161ae20.ff364","version":3,"debugenabled":false,"service_domain":"homeassistant","service":"turn_{{payload}}","entityId":"switch.heatpump","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"data"}],"queue":"none","x":950,"y":80,"wires":[[]]},{"id":"17238079d500fc07","type":"poll-state","z":"c7b4c3f030b80b8d","name":"gridstatus","server":"9161ae20.ff364","version":2,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"updateinterval":"15","updateIntervalType":"num","updateIntervalUnits":"seconds","outputinitially":true,"outputonchanged":true,"entity_id":"sensor.gridstatus","state_type":"str","halt_if":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"x":100,"y":100,"wires":[["07f5d2d279c264d4"]]},{"id":"f6322352dd6a69be","type":"switch","z":"c7b4c3f030b80b8d","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"DOWN/LOADSHEDDING","vt":"str"},{"t":"eq","v":"UP","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":350,"y":100,"wires":[["04985572560e6290"],["bd125a560ef49f64"]]},{"id":"04985572560e6290","type":"change","z":"c7b4c3f030b80b8d","name":"Off","rules":[{"t":"set","p":"payload","pt":"msg","to":"off","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":490,"y":80,"wires":[["4f7aaa375be1f2e7","0fc936b714cbaa25","1f88266a271ef945","b3db5bc617bc9d44","f59c6247f8810dc7","25f52b55917be548"]]},{"id":"bd125a560ef49f64","type":"change","z":"c7b4c3f030b80b8d","name":"On","rules":[{"t":"set","p":"payload","pt":"msg","to":"on","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":490,"y":260,"wires":[["4f7aaa375be1f2e7"]]},{"id":"37d759091daec1ed","type":"comment","z":"c7b4c3f030b80b8d","name":"Check if ESKOM Power OFF","info":"","x":160,"y":60,"wires":[]},{"id":"4f7aaa375be1f2e7","type":"rbe","z":"c7b4c3f030b80b8d","name":"","func":"rbe","gap":"","start":"","inout":"out","septopics":true,"property":"payload","topi":"topic","x":630,"y":260,"wires":[["8e57e33b932a226e","1f88266a271ef945","25f52b55917be548","99e0e5f5f65f11ae"]]},{"id":"90424dc37d4c62fc","type":"debug","z":"c7b4c3f030b80b8d","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":930,"y":360,"wires":[]},{"id":"07f5d2d279c264d4","type":"delay","z":"c7b4c3f030b80b8d","name":"Limit","pauseType":"rate","timeout":"1","timeoutUnits":"minutes","rate":"1","nbRateUnits":"1","rateUnits":"minute","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"allowrate":false,"outputs":1,"x":230,"y":100,"wires":[["f6322352dd6a69be"]]},{"id":"0fc936b714cbaa25","type":"api-current-state","z":"c7b4c3f030b80b8d","name":"Load","server":"9161ae20.ff364","version":2,"outputs":2,"halt_if":"1000","halt_if_type":"num","halt_if_compare":"gt","entity_id":"sensor.sunsynk_load_grid_inverter","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":630,"y":360,"wires":[["d89f5bae6d0108c5"],[]]},{"id":"d89f5bae6d0108c5","type":"function","z":"c7b4c3f030b80b8d","name":"Compile","func":"var state = parseInt(msg.payload);\nvar _RptData = {}\nif (state > 1000){\n _RptData\t= {\n \"content\":\"Eskom Offline: Power High Usage: \" + state + \"W\",\n \"chatId\":980022075,\n \"type\":\"message\",\n \"caption\":\"Eskom offline\"\n };\n}\nOutput = {\n \"payload\": _RptData,\n \"topic\": \"ESKOM - Power\"\n }\nnode.status({fill:\"green\",shape:\"ring\",text:state});\nreturn Output;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":780,"y":360,"wires":[["90424dc37d4c62fc","bcabaee8281f0fac"]]},{"id":"44b7efe418ecfabe","type":"comment","z":"c7b4c3f030b80b8d","name":"Alert if High Power while Eskom Down","info":"","x":390,"y":360,"wires":[]},{"id":"44d0b6a6efa17dbb","type":"comment","z":"c7b4c3f030b80b8d","name":"Stop high Power devices while Eskom Offline","info":"","x":1050,"y":40,"wires":[]},{"id":"25f52b55917be548","type":"api-call-service","z":"c7b4c3f030b80b8d","name":"Washing Machine","server":"9161ae20.ff364","version":3,"debugenabled":false,"service_domain":"homeassistant","service":"turn_{{payload}}","entityId":"switch.shelly_shsw_pm_washing","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"data"}],"queue":"none","x":970,"y":200,"wires":[[]]},{"id":"35aa676f28988b4a","type":"api-call-service","z":"c7b4c3f030b80b8d","name":"Notify Kemp","server":"9161ae20.ff364","version":3,"debugenabled":false,"service_domain":"notify","service":"mobile_app_lm_g900","entityId":"","data":"{\t \"message\":payload,\t \"title\":\"Eskom Power\"\t}","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":950,"y":400,"wires":[[]]},{"id":"99e0e5f5f65f11ae","type":"function","z":"c7b4c3f030b80b8d","name":"Compile","func":"var state = msg.payload;\nvar _RptData = {}\nif (state === \"on\"){\n msg.payload = \"ESKOM - Power ONLINE\";\n}\nelse\n{\n msg.payload = \"ESKOM - Power OFFLINE\";\n}\nnode.status({fill:\"green\",shape:\"ring\",text:state});\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":780,"y":400,"wires":[["35aa676f28988b4a","b83120e61b9c2d7b","b054b7f73a57f7e2","73e13f64cd5ef2cb"]]},{"id":"9d61a0a3801cd7b5","type":"telegram bot","botname":"Snipe30Bot","usernames":"@KempMQTT","chatids":"980022075","baseapiurl":"","updatemode":"polling","pollinterval":"300","usesocks":false,"sockshost":"","socksport":"6667","socksusername":"anonymous","sockspassword":"","bothost":"","botpath":"","localbotport":"8443","publicbotport":"8443","privatekey":"","certificate":"","useselfsignedcertificate":false,"sslterminated":false,"verboselogging":false},{"id":"9161ae20.ff364","type":"server","name":"Home Assistant","version":2,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30}] The nodered flows check if gridstatus sensor is UP or DOWN, and then disables high power devices while load shedding is active. It will also send a notification to the household phones via Telegram and Home assistant app when load shedding starts and ends. It also checks the inverter load during load shedding for high usage if another device is using too much power and notify me. Lastly, the kitchen LED lights is changed to RED even during the day, to remind said household that load shedding is active. 😜 Done via 2 automations in Home Assistant. alias: Eskom Power DOWN description: Turn LED Strip red when Eskom Power Down trigger: - platform: state entity_id: sensor.gridstatus from: UP to: DOWN/LOADSHEDDING condition: [] action: - service: light.turn_on target: device_id: 9b743a2e692959b003677103dcad0e71 data: brightness_pct: 100 rgb_color: - 255 - 0 - 0 mode: single alias: Eskom Power UP description: Turn LED Strip blue when Eskom Power Up trigger: - platform: state entity_id: sensor.gridstatus from: DOWN/LOADSHEDDING to: UP condition: [] action: - service: light.turn_on target: device_id: 9b743a2e692959b003677103dcad0e71 data: brightness_pct: 100 rgb_color: - 0 - 135 - 255 mode: single
November 25, 20214 yr On 2021/08/05 at 8:34 AM, faizanowais said: Hi, First of all Thanks to everyone for their contributions i have my inverter monitoring setup successfully on a Wemos D1. However i have a problem writing to register 243 (Energy Management Priority -> Batt / Load). From the documentation i have noticed that R/W is not mentioned for this register. Is there any other way / register to change the setting for Batt First / Load First? Any help will be appreciated. Hi, I have the same issue. Have you managed to sort this out ?
November 26, 20214 yr On 2021/08/05 at 8:34 AM, faizanowais said: Hi, First of all Thanks to everyone for their contributions i have my inverter monitoring setup successfully on a Wemos D1. However i have a problem writing to register 243 (Energy Management Priority -> Batt / Load). From the documentation i have noticed that R/W is not mentioned for this register. Is there any other way / register to change the setting for Batt First / Load First? Any help will be appreciated. Hi, I am having the same issue with register 243. I am able to read, but won't reflect any write changes. I am reading 0 for Battery First and 1 for Load First. Have you managed to resolve?
November 26, 20214 yr Author 7 hours ago, mberry said: Hi, I am having the same issue with register 243. I am able to read, but won't reflect any write changes. I am reading 0 for Battery First and 1 for Load First. Have you managed to resolve? Working on my side
November 26, 20214 yr 1 hour ago, Bloubul7 said: Working on my side Thanks for detailed code. I have the same code in place, yet still no luck. It is only an issue for this particular register. I believe it might be something related to communication board version or firmware revision.
November 26, 20214 yr Author 5 minutes ago, mberry said: Thanks for detailed code. I have the same code in place, yet still no luck. It is only an issue for this particular register. I believe it might be something related to communication board version or firmware revision. That is weird, but I'm still on the old firmware. Haven't upgraded as yet. What I have noticed though is that when I can the value of register 243 via Node Red is that the tick on the Inverter screen doesn't go on, but through the inverter monitoring I can see that the inverter's behaviour has changed.
November 26, 20214 yr 11 minutes ago, Bloubul7 said: That is weird, but I'm still on the old firmware. Haven't upgraded as yet. What I have noticed though is that when I can the value of register 243 via Node Red is that the tick on the Inverter screen doesn't go on, but through the inverter monitoring I can see that the inverter's behaviour has changed. YES, it is very odd. I am presuming it is a bug with my inverter firmware. I have emailed DeyeInverter concerning the issue. I will update once I have their feedback. BTW, I want to thank you for SunSynk-NodeRed-master code you posted. I started off with and it allowed me to understand bordered and have it as the base to the current code I am now running. great job you have done.
November 29, 20214 yr So hooked up Solar Assistant on Friday and did a quick config to into HA, it needs a fair amount of tinkering to get it looking right in terms of daily, weekly/monthly averages. I cant seem to get it displayed into the default energy integration. I had the same issue in the past with efergy (before the official integration) and recall it was something about the kw vs kwh. Anyone suggestions to get these entities changed to to work with the the energy integration or can i just add it the platform in config.yaml and change the class to energy from power?
November 29, 20214 yr 1 hour ago, ASH_JHB said: I cant seem to get it displayed into the default energy integration. I had the same issue in the past with efergy (before the official integration) and recall it was something about the kw vs kwh The Home Assistant Energy dashboard uses kWh, not kW. Unfortunately when I tried Solar Assistant I saw exactly the same, they only publish kW over MQTT today and not kWh. After using HA's Energy dashboard for a while I must say it gives an excellent overview of your solar system. You can use NodeRed or try the HASS Addon to grab the energy data from a Sunsynk/Deye inverter, using the same hardware you have today - https://github.com/kellerza/sunsynk#home-assistant-sunsynk-add-on
November 29, 20214 yr I also tried Solar-Assistant MQTT to Home-Assistant. Home-Assistant picks up Solar-Assistant via discovery.... BUT 1) Couldn't get Home-Assistant "Energy" to use Solar-Assistant feed. 2) Home-Assistant Solar-Assistant sends mqtt messages too frequently with ~2450 messages per minute Try $ mosquitto_sub -d -t 'solar_assistant/#' -v | grep "^solar_assistant/" for a minute Approx 102 updates per minute for each of 24 counters. I'm currently filtering the messages with a python script to update once every 10s EDIT: As pointed out "Solar-Assistant sends" Edited November 29, 20214 yr by system32
November 29, 20214 yr 1 hour ago, system32 said: 2) Home-Assistant sends mqtt messages too frequently with ~2450 messages per minute You probably meant Solar-Assistant sends MQTT messages too frequently Indeed I also experienced this and in the mentioned plugin there are different filters to update either every minute OR on a significant change. Different type of sensors uses different filters.
November 29, 20214 yr 1 hour ago, kellerza said: You probably meant Solar-Assistant sends MQTT messages too frequently Indeed I also experienced this and in the mentioned plugin there are different filters to update either every minute OR on a significant change. Different type of sensors uses different filters. Thanks for the correction. I'm just doing basic integration from Solar-Assistant to my dashboards in Grafana. Sunsynk -> Solar-Assistant -> MQTT -> MY_MQTT -> Python paho.mqtt -> PostgreSQL -> Grafana I first had some tasmota & tuya electricity sensors feeding MY_MQTT/PostgreSQL and recently added the Sunsynk.
November 30, 20214 yr 13 hours ago, system32 said: I also tried Solar-Assistant MQTT to Home-Assistant. Home-Assistant picks up Solar-Assistant via discovery.... BUT 1) Couldn't get Home-Assistant "Energy" to use Solar-Assistant feed. 2) Home-Assistant Solar-Assistant sends mqtt messages too frequently with ~2450 messages per minute Try $ mosquitto_sub -d -t 'solar_assistant/#' -v | grep "^solar_assistant/" for a minute Approx 102 updates per minute for each of 24 counters. I'm currently filtering the messages with a python script to update once every 10s EDIT: As pointed out "Solar-Assistant sends" What's the concerns around the frequency of messages? data build up, system slowing down? I have noticed its almost immediate and real time if i compare against the inverter
December 1, 20214 yr On 2021/11/29 at 10:17 AM, ASH_JHB said: So hooked up Solar Assistant on Friday and did a quick config to into HA, it needs a fair amount of tinkering to get it looking right in terms of daily, weekly/monthly averages. I cant seem to get it displayed into the default energy integration. I had the same issue in the past with efergy (before the official integration) and recall it was something about the kw vs kwh. Anyone suggestions to get these entities changed to to work with the the energy integration or can i just add it the platform in config.yaml and change the class to energy from power? On 2021/11/29 at 8:27 PM, system32 said: 1) Couldn't get Home-Assistant "Energy" to use Solar-Assistant feed. On 2021/11/29 at 12:13 PM, kellerza said: The Home Assistant Energy dashboard uses kWh, not kW. Unfortunately when I tried Solar Assistant I saw exactly the same, they only publish kW over MQTT today and not kWh. Hi Guys This is resolved in the latest beta version: https://solar-assistant.io/help/updates/beta It includes energy sensors with all the properties required by the HomeAssistant energy module:
December 2, 20214 yr On 2021/11/30 at 9:54 AM, ASH_JHB said: What's the concerns around the frequency of messages? data build up, system slowing down? I have noticed its almost immediate and real time if i compare against the inverter A combination of slowing down data buildup etc But in the end you only really need data when things are changing. If you read kWh every 1second or 5min and end up aggregating that in 1hr bins you will see no difference. Same with power. If you update every minute when things are not changing it should be ok. But if I switch on the kettle or hairdryer HASS can react in 1s.
December 2, 20214 yr On 2021/11/30 at 9:54 AM, ASH_JHB said: What's the concerns around the frequency of messages? data build up, system slowing down? I have noticed its almost immediate and real time if i compare against the inverter I'm running the solar assistant beta now. I see the kWh energy metrics are submitted every 1 minute, while the rest come in more or less every 1s. I don't store the 1s metrics in home assistant by ignoring them in the recorder. It's just there for showing live dashboards. https://www.home-assistant.io/integrations/recorder/ From what I can see in the database the home assistant energy module stores the data every hour even though they come in every minute.
December 2, 20214 yr 10 hours ago, SolarAssistant said: Hi Guys This is resolved in the latest beta version: https://solar-assistant.io/help/updates/beta It includes energy sensors with all the properties required by the HomeAssistant energy module: Great work thanks, Will give it a try.
December 2, 20214 yr 13 hours ago, SolarAssistant said: Hi Guys This is resolved in the latest beta version: https://solar-assistant.io/help/updates/beta It includes energy sensors with all the properties required by the HomeAssistant energy module: Do you need to do a manual reboot or does it automatically update once you select beta?
December 3, 20214 yr 21 hours ago, ASH_JHB said: Do you need to do a manual reboot or does it automatically update once you select beta? The update button takes a day or so to appear once you subscribe to beta 😞 I subscribed on Sun, the upgrade was available on Mon lunch time.
December 3, 20214 yr On 2021/12/01 at 11:35 PM, SolarAssistant said: Hi Guys This is resolved in the latest beta version: https://solar-assistant.io/help/updates/beta It includes energy sensors with all the properties required by the HomeAssistant energy module: Thanks, Subscribed to the beta program and got the Home-Assistance Energy integration working well: The battery charge/discharge % per hour on Solar-Assistant is a nice touch: The additional details [Battery in/out, Grid in/out] on the Totals tab is useful data: Also making use of the additional MQTT kWh topics instead of calculating them myself from elapsed * kw. solar_assistant/inverter_1/ac_output_voltage/state solar_assistant/inverter_1/battery_current/state solar_assistant/inverter_1/battery_voltage/state solar_assistant/inverter_1/grid_frequency/state solar_assistant/inverter_1/grid_power/state solar_assistant/inverter_1/grid_voltage/state solar_assistant/inverter_1/load_power/state solar_assistant/inverter_1/load_power_auxiliary/state solar_assistant/inverter_1/load_power_essential/state solar_assistant/inverter_1/load_power_non-essential/state solar_assistant/inverter_1/pv_current_1/state solar_assistant/inverter_1/pv_current_2/state solar_assistant/inverter_1/pv_current_3/state solar_assistant/inverter_1/pv_power/state solar_assistant/inverter_1/pv_power_1/state solar_assistant/inverter_1/pv_power_2/state solar_assistant/inverter_1/pv_power_3/state solar_assistant/inverter_1/pv_voltage_1/state solar_assistant/inverter_1/pv_voltage_2/state solar_assistant/inverter_1/pv_voltage_3/state solar_assistant/inverter_1/temperature/state solar_assistant/total/battery_power/state solar_assistant/total/battery_state_of_charge/state solar_assistant/total/battery_temperature/state solar_assistant/total/battery_energy_in/state solar_assistant/total/battery_energy_out/state solar_assistant/total/grid_energy_in/state solar_assistant/total/grid_energy_out/state solar_assistant/total/load_energy/state solar_assistant/total/pv_energy/state Thanks, keep up the good work. Edited December 3, 20214 yr by system32
December 3, 20214 yr 5 hours ago, system32 said: Thanks, Subscribed to the beta program and got the Home-Assistance Energy integration working well: How did you configure this screen to come up?
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.