Gary Waterworth Posted February 2, 2023 Share Posted February 2, 2023 (edited) This post was recognized by Energy-Jason! Gary Waterworth was awarded the badge 'Superstar' and 25 points. Hi All... This is something I have been working on for a while based on my own work with some information gathered from others on this forum and probing what is available. I have spent the last few days cleaning things up so that they can be easily imported into new environments There is a node red flow and a set of templates provided. Most plant/inverter information is available as a few main sensors with a lot of attributes on each Files etc are available on: https://github.com/gdwaterworth/Home-Assistant---E-Linter-Logger---Sunsynk I have a seperate set of flows for updating the Sunsynk Settings, but these are NOT NOOB friendly. Also going through a lot of change atm I have mainly been using those to ensure I always have battery soc available etc with the huge load shedding we have. The current SunSynk Dongle is currently rebranded from e-linter.com. http://e-linter.com/smart-energy/magpie According to their about us, there are a few companies of invertors that are customers of theirs. Apparently compatible with the following invertors The quickest way to check would be to try login to https://pv.inteless.com/ and see if you can login to there. It may be you are actually using a rebranded dongle. If so then this set of flows should get your invertor stats. Edited February 16, 2023 by Gary Waterworth New Repo francoisj1, Rod Barnard, RSO and 3 others 6 Quote Link to comment Share on other sites More sharing options...
Gary Waterworth Posted February 2, 2023 Author Share Posted February 2, 2023 Blank post for future use Quote Link to comment Share on other sites More sharing options...
Gary Waterworth Posted February 2, 2023 Author Share Posted February 2, 2023 Blank post for future use Quote Link to comment Share on other sites More sharing options...
Gary Waterworth Posted February 2, 2023 Author Share Posted February 2, 2023 Blank post for future use Quote Link to comment Share on other sites More sharing options...
Gary Waterworth Posted February 2, 2023 Author Share Posted February 2, 2023 Blank post for future use Quote Link to comment Share on other sites More sharing options...
Gary Waterworth Posted February 2, 2023 Author Share Posted February 2, 2023 Blank post for future use Quote Link to comment Share on other sites More sharing options...
Gary Waterworth Posted February 2, 2023 Author Share Posted February 2, 2023 Blank post for future use Quote Link to comment Share on other sites More sharing options...
Gary Waterworth Posted February 2, 2023 Author Share Posted February 2, 2023 Blank post for future use Quote Link to comment Share on other sites More sharing options...
Gary Waterworth Posted February 2, 2023 Author Share Posted February 2, 2023 Blank post for future use Quote Link to comment Share on other sites More sharing options...
thedotlair Posted February 12, 2023 Share Posted February 12, 2023 (edited) @Gary Waterworth Thank you so much for this - really appreciate your efforts! I have a couple of questions, more because I'm a NodeRed n00b - you've mentioned to add the templates.txt to the configuration.yaml file; however, I'm unsure which YAML file you're referring to. Is this under /config/? Once that is complete, do these show up as entities or somewhere else in the HA UI? Any ideas? Edited February 12, 2023 by thedotlair Quote Link to comment Share on other sites More sharing options...
Gary Waterworth Posted February 12, 2023 Author Share Posted February 12, 2023 (edited) 7 hours ago, thedotlair said: @Gary Waterworth Thank you so much for this - really appreciate your efforts! I have a couple of questions, more because I'm a NodeRed n00b - you've mentioned to add the templates.txt to the configuration.yaml file; however, I'm unsure which YAML file you're referring to. Is this under /config/? Once that is complete, do these show up as entities or somewhere else in the HA UI? Any ideas? Once everything is done there will be a number of new entities. There are about 7 core entities that will have a number of attributes for each of the load/input/output/grid/battery components of data from the logger I have recreated the git repo to correctly reflect and will be adding better instructions with time Unfortunately this one is not that noob friendly as it is not a integration you just go and add. There are 2 components : Gather - This just goes and gathers information from the logger website and makes it available for use. This is fairly straight forward to implement. Automation - These are flows and code I have developed to manage soc and timer use for load balancing. This is not that straight forward as it has hard dependencies on other integrations . Weather being one of them Edited February 12, 2023 by Gary Waterworth Quote Link to comment Share on other sites More sharing options...
Sc00bs Posted February 13, 2023 Share Posted February 13, 2023 Thank for all the work @Gary Waterworth Looks like a great option to connect Homer Assistant to your Sunsynk inverter. I have a few questions on the configuration as I am no code monkey Can you tell me what data has to be added/changed in the templates.txt file before it is added into the configuration.yaml file. I am assuming your sunsynk.net username and password and your inverter serial number do I have to add any other values? Quote Link to comment Share on other sites More sharing options...
Sc00bs Posted February 13, 2023 Share Posted February 13, 2023 Seem to be missing the plant ID and plant list data for some reason Everything else is successful Quote Link to comment Share on other sites More sharing options...
Gary Waterworth Posted February 13, 2023 Author Share Posted February 13, 2023 5 hours ago, Sc00bs said: Thank for all the work @Gary Waterworth Looks like a great option to connect Homer Assistant to your Sunsynk inverter. I have a few questions on the configuration as I am no code monkey Can you tell me what data has to be added/changed in the templates.txt file before it is added into the configuration.yaml file. I am assuming your sunsynk.net username and password and your inverter serial number do I have to add any other values? Leave Inverter Serial Blank - It will populate from the 1st in the list and the plant id Only ones you should need are the login and password Sc00bs 1 Quote Link to comment Share on other sites More sharing options...
Gary Waterworth Posted February 13, 2023 Author Share Posted February 13, 2023 (edited) 3 hours ago, Sc00bs said: Seem to be missing the plant ID and plant list data for some reason Everything else is successful Put a debug node on the output of the "get plant list" and also link the output of the create request for getting plant info to the debug node as well Just direct message me the output from the debug console . The Error is because the web call is not successful It will stop anything else down the chain not executing I suspect the node before is not being updated correctly : sensor.sunsynk_serial_number as that is used for that call Did you install and configure the additional palette : node-red-contrib-hass with a long life token Documentation for that addon is here : https://flows.nodered.org/node/node-red-contrib-hass Information of getting a long lived token is here : https://community.home-assistant.io/t/how-to-get-long-lived-access-token/162159 Edited February 13, 2023 by Gary Waterworth Sc00bs 1 Quote Link to comment Share on other sites More sharing options...
Rod Barnard Posted February 22, 2023 Share Posted February 22, 2023 Thank you so much for your hard work on this Gary, it has been very helpful! Quote Link to comment Share on other sites More sharing options...
cp2023 Posted February 22, 2023 Share Posted February 22, 2023 Hey @Gary Waterworth, do you grab the daily totals from the API? i can't find any sensors for them. Also, what about export data, can't find that either. (Mostly working great tho, thanks for you efforts!) Chris Quote Link to comment Share on other sites More sharing options...
Gary Waterworth Posted February 23, 2023 Author Share Posted February 23, 2023 (edited) If you are looking for these for the energy dashboard, rather use the "forever" totals. It is a lot more stable from a reset pov Also dont use the sunsynk_flow sensor value as much as possible. I find those are the most unstable I will have a look at the events I dont currently pull them but I can. Export data is a lot more tricky, will have a look at it, but will need to see how to parse it into a sensor. Daily totals are in the attributes for each main sensor, you can just create additional sensors in the templates : sunsynk_grid sunsynk_input sunsynk_output sunsynk_load sunsynk_battery Edited February 23, 2023 by Gary Waterworth Quote Link to comment Share on other sites More sharing options...
Gary Waterworth Posted February 23, 2023 Author Share Posted February 23, 2023 Done updates on the gather flows for events Also added 3 new sensors for the 3 types of events Sample card code added in a file for events Quote Link to comment Share on other sites More sharing options...
cp2023 Posted February 23, 2023 Share Posted February 23, 2023 Ah, i hadn't looked at the template file properly so i only just realised you are creating new sensors using the attributes of other sensors, makes sense now! In which case i think we already have the export date under "sensor.sunsynk_grid", it's the etodayTo and etotalTo attributes, isn't it? Quote Link to comment Share on other sites More sharing options...
cp2023 Posted February 23, 2023 Share Posted February 23, 2023 I'm also going to change "Sunsynk Grid Total" to use etotalFrom instead of just total, as this going to 1dp rather than just integer values. Unless there's a reason not to? Quote Link to comment Share on other sites More sharing options...
Gary Waterworth Posted February 24, 2023 Author Share Posted February 24, 2023 (edited) 10 hours ago, cp2023 said: I'm also going to change "Sunsynk Grid Total" to use etotalFrom instead of just total, as this going to 1dp rather than just integer values. Unless there's a reason not to? - sensor: - name: "Sunsynk Grid Total" state_class: total_increasing device_class: energy unit_of_measurement: kWh state: > {{state_attr('sensor.sunsynk_grid', 'total')|int}} You can remove the |int and change it to float ( if I remember correctly ) The main things needed for the energy dashboard is the state_class: total_increasing device_class: energy unit_of_measurement: kWh The main thing is you have to change it from a string to a value. Many ways to skin that cat. total actually comes from etotalFrom in the gather code. This is a legacy thing caused by me and part of my converting from what I had before to these flows and not wanting to lose the historical data I had. These flows have gone through more than a few rewrites and I havent fully removed all of my old legacy stuff. The nice thing with the way I populate the attributes is that you can manipulate them any which way you want/need with templates. Also adding a 2nd invertor is not hard. It is basically copy and pasting a portion of the flows and creating a few more template entities. msg.payload.attributes.total = parseInt(msg.payload.data.etotalFrom); msg.payload.attributes.volt = msg.payload.data.vip[0].volt; msg.payload.attributes.current = msg.payload.data.vip[0].current; Edited February 24, 2023 by Gary Waterworth Quote Link to comment Share on other sites More sharing options...
Gary Waterworth Posted February 25, 2023 Author Share Posted February 25, 2023 (edited) On 2023/02/22 at 9:02 PM, cp2023 said: Also, what about export data, can't find that either. so been doing some https decoding and the export (operation) data can be available. Also the data for all the daily/month/yearly graphs is can be available. Will have a look at more indepth requirements for apex graphs to decide how to bring this data into sensors Just depends on what the use case is. It is going to be a bit of a pita getting it into a usable form in HA Edited February 25, 2023 by Gary Waterworth Quote Link to comment Share on other sites More sharing options...
cp2023 Posted February 25, 2023 Share Posted February 25, 2023 I think I found the export data already. I'm using "sensor.sunsynk_grid" etodayTo and etotalTo attributes. That seems to match what I'm setting in the sunsynk app for export. Quote Link to comment Share on other sites More sharing options...
Gary Waterworth Posted February 27, 2023 Author Share Posted February 27, 2023 (edited) Ahh ok cool , you mean that export Busy working on the graph data instead of the HA history data for graphs. Also look at the api document. I have tried to keep the main sensor names the same/similar to how they do it They describe what each field is Edited February 27, 2023 by Gary Waterworth Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.