May 19, 20233 yr On 2023/05/18 at 10:41 AM, HardeHout said: Hi Gary, I have very limited HA experience and I'm using the sensors for my Sunsynk in HA pulled from the e-linter dongle using your integration method. I use the export to essential load feature, but I cannot find the right sensor or attribute that will help me calculate the inverter_load_grid_169 entity for slipx06's power flow card. I have tried looking at all the available data to manually calculate this, but it seems like there is 1 piece of data missing to actually do the calc. Is this not possible with the wifi data logger, or is there some way to get that info from the inverter via the logger? @HardeHout I finally got to play with the node red flows today and started creating/mapping all the sensors based on the required attributes. I have most of them as you can see below. The sensor you want is an attribute for the grid sensor. You can create a template sensor and add to your configuration.yaml 169 - power attribute 172 - limiterTotalPower - sensor: - name: "Sunsynk Grid Power" state: > {{state_attr('sensor.sunsynk_grid', 'power')|float|round(0)}} - sensor: - name: "Sunsynk Grid Power 172" state: > {{state_attr('sensor.sunsynk_grid', 'limiterTotalPower')|float|round(0)}} - sensor: - name: "Sunsynk Load Power" state: > {{state_attr('sensor.sunsynk_load', 'totalpower')|float|round(0)}} Edit: OK so I dont have the inverter status yet. The rest looks OK Edited May 19, 20233 yr by slipx
May 19, 20233 yr 11 hours ago, Gary Waterworth said: I know there is a lot more work to cater for scenarios of essential/non , 2 invertor plants and 2 plants with invertors. It is a pity that the api docs are pretty bad and out of date. May need to do a teams session with people with those builds so they can put a passwd in on my test env so I can see what the app shows at the exact same time as data requested by the app. The problem is the way I look at the raw data means I cannot ask people to send me in captured https traffic. And I need to see exactly what the app is showing and the data it requested. Hi Gary happy to help - running 2 plan, 2 inverter setup. One is grid tied, the other is connected to aux. so scenarios can be measured very accurately on the MCU and inverter software. lemme know if interested in DM
May 19, 20233 yr 12 hours ago, Gary Waterworth said: I know there is a lot more work to cater for scenarios of essential/non , 2 invertor plants and 2 plants with invertors. It is a pity that the api docs are pretty bad and out of date. May need to do a teams session with people with those builds so they can put a passwd in on my test env so I can see what the app shows at the exact same time as data requested by the app. The problem is the way I look at the raw data means I cannot ask people to send me in captured https traffic. And I need to see exactly what the app is showing and the data it requested. Hi Gary Even though I'm new to this Sunsynk and Home Assistant community, I'm excited to get involved and help out in any way I can. I have two Sunsynk plants, one with PV and battery, and the other is just a battery. I'm looking into granting secondary user access via the sunsynk.net website, would this help in the development? I think this would be a good way to manage both of my plants in the future, and it would also improve security for setting up a second Home Assistant instance just for the second plant (which is a second rental property). I'm also looking to install my spare generator to my primary plant to act as a backup for my PV, batteries, and grid. I think this would be a great way to improve my home's resilience during power outages, winter is coming. I'm happy to help in any way I can.
May 19, 20233 yr I've completed the mapping of the template sensors to work in the Sunsynk Power Flow Card and updated the WIKI with details. @Gary Waterworth I've also created a pull request to include updated templates and sample card configuration files in your repo. Attaching here as well EDIT: Sorry I see I attached the wrong file. Fixed now Sample Card for Power flow based on work by slipx on powerforum.co.za NEW.txt Templates Slipx PowerFlow Card - NEW.txt Edited May 22, 20233 yr by slipx
May 20, 20233 yr Author 2 hours ago, slipx said: I've completed the mapping of the template sensors to work in the Sunsynk Power Flow Card and updated the WIKI with details. @Gary Waterworth I've also created a pull request to include updated templates and sample card configuration files in your repo. Attaching here as well Sample Card for Power flow based on work by slipx on powerforum.co.za NEW.txt 1.85 kB · 0 downloads Templates Slipx PowerFlow Card - NEW.txt 6.2 kB · 0 downloads I saw thanks. I will have a look at them in github over the weekend.
May 20, 20233 yr Author I have had a look at the secondary access which will definately work. I actually use a 2nd user for my HA to access my plant currently. At least that way I can control/remove it when needed. If anyone is willing they can give me secondary access on : [email protected] If needed dm me for private contact details.
May 20, 20233 yr How do I configure this with multiple accounts? I have two accounts. One account for region 1 with 4 plants (each have 1 inverter) and the second account in region 2. I assume I'd need to duplicate the flows for the two different accounts but how will the core sensors handle the duplicates? Is there a way to tag sensors to be unique per account ?
May 20, 20233 yr Author 11 hours ago, slipx said: How do I configure this with multiple accounts? I have two accounts. One account for region 1 with 4 plants (each have 1 inverter) and the second account in region 2. I assume I'd need to duplicate the flows for the two different accounts but how will the core sensors handle the duplicates? Is there a way to tag sensors to be unique per account ? Not yet and that is a major coding change I have been looking at how to enumerate ALL invertors and plants in an account, but again that is a major change and a large rewrite edit : 2 accounts is a problem because of how the entities are currently setup. This region crap with Sunsynk is very annoying. Edited May 20, 20233 yr by Gary Waterworth
May 21, 20233 yr I notice the sunsynk app for myself at least, offers no easy access to control inverters. I understand if home assistant automation is done correctly you actually should never have to go onto it but let's say on one particular day there's just miscellaneous usage that's not the norm, and you know on that day with solar and load shedding it won't get to where you want by a certain time, and you want to override certain things manually like a single one time trigger and afterwards it just reverts back to normal cycles eg. Easily accessible dash shortcut button to: Button press> override settings>turn on grid >charge from grid to 80% immediately. Then revert back once at 80% Is this possible with this integration?
May 21, 20233 yr Author It is possible. But you would need to create node red flows. But if the app doesn't give you access to setting then it probably won't work. This is to do with permissions. What the node red flows do is the same as what the app does Edited May 21, 20233 yr by Gary Waterworth
May 21, 20233 yr I have not fiddles with node red at all besides just importing your integration @Gary Waterworth and was wondering the same thing as @SteveRCT for a while now. With the size of my setup I still need to sometimes intervene with the setup to tweak it for really bad days where I do see a gap can be created to dodge eskom usage or where I just want to quickly prioritize the battery instead of load on crappy days just mitigate it a bit more vs the set and forget settings I have that work 90% of the time. Perhaps something worth looking at as a side project/automation would be an automation addon to just edit time slot settings and the energy patterns. Don't know how easy this will be but was thinking one could setup a number input helpers in HA for each time slot SOC and toggles for the grid charge settings etc then have node red use that to send the command to set that time slot to that value if it differs from what the number input is and same for the energy pattern (load/battery priority) or grid charge settings. Would be nice to be able to just use HA to set this as well instead of having to jump to the sunsynk app each time I want to intervene. One could even set the times itself in a similar way I guess but I usually just try and lower my SOC's if I know the weather will clear up and I will make my targets later than usual. Again I do not have a proper understanding of node red to go try this myself so just throwing it out there as an idea for consideration or someone with more knowledge than myself.
May 22, 20233 yr code removed as post was in error - refer to @slipx comment on the template for card below. Edited May 23, 20233 yr by francoisj1 missed earlier post whilst compiling response
May 22, 20233 yr @francoisj1 I provided working template sensors and card configuration in my post above. Its 98% there. Gary is busy checking a few things. You can simply copy and add to your configuration.yaml as it creates a complete new set of template sensors with mapping to the card attributes. The card config is also there as an attachment. I have template sensors for those xxx sensors that work. You should also set a default value i.e. float(0) when creating your sensors. EDIT. Sorry I see I attached the wrong template file above. Fixed now. Note the filename Templates Slipx PowerFlow Cards - NEW Edited May 22, 20233 yr by slipx
May 26, 20233 yr @slipx Checking out your new card, just a few things I've noticed so far that I had to amend to get it working correctly: - sensor: - name: "Sunsynk PV2 Current 112" state: > {{state_attr('sensor.sunsynk_input', 'pvIV_2_ipv')|float(0)|round(1)}} should be: - sensor: - name: "Sunsynk PV2 Current 112" state: > {{state_attr('sensor.sunsynk_input', 'pvIV_1_ipv')|float(0)|round(1)}} also I had to flip the on/off around to reflect correctly - sensor: - name: "Current Use Timer 248" state: > {% if state_attr('sensor.sunsynk_settings', 'peakAndVallery') == 1 %} on {% else %} off {% endif %} - sensor: - name: "Energy Mode 243" state: > {% if state_attr('sensor.sunsynk_settings', 'energyMode:') == 1 %} on {% else %} off {% endif %} This gives me the correct read out on the card - sensor: - name: "Current Use Timer 248" state: > {% if state_attr('sensor.sunsynk_settings', 'peakAndVallery') == 1 %} off {% else %} on {% endif %} - sensor: - name: "Energy Mode 243" state: > {% if state_attr('sensor.sunsynk_settings', 'energyMode:') == 1 %} off {% else %} on {% endif %} Will try and figure out sensor 175 a bit later it is currently giving me 0W but think it should be at least equal to my essential load when running off grid (well in the previous card it would give me that reading so thinking it is just trying to pull from the wrong sensor) Edited May 26, 20233 yr by -cK- typo
May 26, 20233 yr 9 minutes ago, -cK- said: {{state_attr('sensor.sunsynk_input', 'pvIV_1_ipv')|float(0)|round(1)}} Thanks that was a typo You should not have to flip the logic for Current Use Timer 248 and Energy Mode 243. I'm using them as is and it reports correctly. I'm testing on a 5KW Sunsynk. Maybe it is different for your inverter And these are the sensor values and the card logic expects peakAndValley to be "on" for Use Timer Active energyMode to be "on" for Priority Load, "off" for Priority Batt
May 26, 20233 yr 27 minutes ago, -cK- said: Will try and figure out sensor 175 a bit later it is currently giving me 0W but think it should be at least equal to my essential load when running off grid (well in the previous card it would give me that reading so thinking it is just trying to pull from the wrong sensor) can you have a look at the attributes reported by this sensor
May 26, 20233 yr My EnergyMode is the opisite of yours but the peakandvallery isn't but if I flip it, it reflects correctly though 🤷♂️ I have fewer attributes listed it seems... So it would seem my essential load reading would then just be 169 which would be grid power as 166 and 175 is reading sensors I don't have Am I correct that in the previous card it pointed to the load sensor Edited May 26, 20233 yr by -cK- Additional info provided
May 26, 20233 yr 22 minutes ago, -cK- said: My EnergyMode is the opisite of yours but the peakandvallery isn't but if I flip it, it reflects correctly though It looks the same. My priority is set to Batt so its shows as 0. Yours is set as Load and it correctly shows a 1. Check your sensors. Yours should be "on" using the original logic in the template and your timer is enabled like mine so it should also be on What inverter do you have? I wonder if its firmware related? Or maybe the integration is not reading all the data correctly Edited May 26, 20233 yr by slipx
May 26, 20233 yr 5kw Sunsynk Could this be related to the issue I had in the beginning that I do not have admin control on my inverter and it is setup in the plant list instead of the inverter list
May 26, 20233 yr I've also amended 175 and 164 to the following as it would seem how Gary had is configured on the old card to test and see if it works correctly: - sensor: - name: "Sunsynk Output Total Power 175" state: > {{state_attr('sensor.sunsynk_load', 'totalpower')|float(0)|round(0)}} - sensor: - name: "Sunsynk Output current 164" state: > {{state_attr('sensor.sunsynk_load', 'calc_current')|float(0)|round(1)}}
May 26, 20233 yr Okay looks like the orginal code isn't working on my end, the below is derived from my previous sensor and it would seem that rewriting the code to '1' instead off == 1 would fix it for me
May 26, 20233 yr Please test this for me {% if (state_attr('sensor.sunsynk_settings', 'peakAndVallery') | float) == 1 %} on {% else %} off {% endif %}
May 26, 20233 yr Okay this would seem to be the fix for me 😉 - sensor: - name: "Current Use Timer 248" state: > {% if is_state_attr('sensor.sunsynk_settings', 'peakAndVallery', '1' ) %} on {% else %} off {% endif %} - sensor: - name: "Energy Mode 243" state: > {% if is_state_attr('sensor.sunsynk_settings', 'energyMode:', '1' ) %} on {% else %} off {% endif %} Oh and I've amended 175 and 164 to the following as a test seeing as this is what Gary had it set to on the old card: Seems to be working to give me a correct value but should probably note I do not have any non essentials hooked up anymore so don't know if this is the correct fix for people using non essentials
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.