Skip to content
View in the app

A better way to browse. Learn more.

Power Forum - Renewable Energy Discussion

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

SunSynk Logger Integration into Home Assistant

Featured Replies

On 2023/06/13 at 4:03 PM, Motty09 said:

Hi Gary

Thank you so much for getting this up and running, I am however having an issue with node red not pulling any data from my Sunsynk account. I have tried on 2 different systems and get the same error both times. I saw another user had issues with the way the installer had setup the system and i wonder if mine is a similair issue.

I struggled to insert the screenshot, so the link below should show the details.

https://drive.google.com/file/d/1k-Dl2MCngzsngYxtxl69JqVkfRdXTBBJ/view?usp=drive_link

Many thanks

Neil

Hi Gary

I see you have been busy with work recently, but just wanted to see if you had any thoughts on the error i have with Node-Red. It seems the issue is with the Setup Global Vars function, but i cannot seem to get any further.

Just wondering if you or anyone else has seen a similar error?

Many thanks

Neil

 

image.thumb.jpeg.91a073bab8589466d5054b271e8a6161.jpeg

  • Replies 948
  • Views 131.6k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • randomfool
    randomfool

    I am making good progress on converting slip06x excellent dashboard to work with Gary's brilliant work on gathering the data from the latest Sunsynk inverters remotely. Will publish the dashboard

  • @Gary Waterworth   Did a quick YouTube video on how to install your software and to get the data into HASS, no cards or anything so very basic.  Please let me know what you guys think of my first

  • randomfool
    randomfool

    Ok here goes; caveats to begin with - I am no HA expert, in fact I only discovered HA a few weeks ago through Gary's post and his subsequent links to slip06x dashboard, so my ability to provide "suppo

Posted Images

  • Author

On the aux topic. There is no extra logic needed. If the website replies with any data then it will be populated under one of the 6 main sensors as an attribute. I am not picking and choosing then discarding the rest.

 

On the global vars I will look through the code later to see what the conditions are to return that error. Just make sure you have included all of the sensor templates in the configuration.yaml

Also show me the debug output. Should be relevant info in there

  • Author
On 2023/06/06 at 4:37 PM, slipx said:

My installer changed mine to 60 seconds but told me that Sunsynk does not allow them to change that setting anymore. Can anyone else confirm if this is the case for new installs. (Maybe related to the migration to the new Region).

The integration also limits 1 request every 60 seconds.

It is a permission that needs to be requested from sunsynk

  • Author
16 hours ago, Motty09 said:

Hi Gary

I see you have been busy with work recently, but just wanted to see if you had any thoughts on the error i have with Node-Red. It seems the issue is with the Setup Global Vars function, but i cannot seem to get any further.

Just wondering if you or anyone else has seen a similar error?

Many thanks

Neil

 

image.thumb.jpeg.91a073bab8589466d5054b271e8a6161.jpeg

This is because the flows are unable to query this entity

##### Number of Items to return in queries. Default 10
  - sensor:
      - name: "Sunsynk Return Items"
        state: 10
        unique_id: "sensor.sunsynk_return_items"

This should be in your sensor templates

Which region gather and templates did you use ?

6 hours ago, Gary Waterworth said:

This is because the flows are unable to query this entity

##### Number of Items to return in queries. Default 10
  - sensor:
      - name: "Sunsynk Return Items"
        state: 10
        unique_id: "sensor.sunsynk_return_items"

This should be in your sensor templates

Which region gather and templates did you use ?

Hi Gary

Thanks for the reply....I used the Region 1 gather and templates as I am in South Africa and my Sunsynk app still logs on to Region 1. Would it be worth trying with the region 2 files ?

@Motty09 Maybe just check your config file that there isn't a copy & paste error but if you are logging in on Region 1 you need to use the Region 1 flows and templates as far as I'm aware.

 

image.png.fea5aa5c9189486bb0078998e726470d.png

23 hours ago, -cK- said:

@Motty09 Maybe just check your config file that there isn't a copy & paste error but if you are logging in on Region 1 you need to use the Region 1 flows and templates as far as I'm aware.

 

image.png.fea5aa5c9189486bb0078998e726470d.png

Thanks CK...yep I checked this and mine is exactly the same as the one you posted. I also checked the error logs for Node-Red and the only error i get is this one in the image below.

I should mention that I am running my Home assistant setup on Docker via a Synology NAS, everything else is working fine and HomeAssistant and Node-Red are connecting to each other...so its really confusing why this doesnt seem to work.

I also did a test setup using a VM on a spare PC I have, but I still get the same error, so its really confusing 😞

Screenshot 2023-06.png

Hey @Motty09 I get this error also, but I'm trying to use the region 2 code. I think it might be something to do with the node-red companion rather than the proper node-red integration in HA OS.

I've tried hard coding the login variables in node-red but it doesn't move any further past it.

On 2023/06/29 at 5:16 AM, Gary Waterworth said:

On the aux topic. There is no extra logic needed. If the website replies with any data then it will be populated under one of the 6 main sensors as an attribute. I am not picking and choosing then discarding the rest.

 @Gary Waterworth, been away for a bit. I had a look at the node red configuration and the only data I see with my limited node red skills is the following code from the Sunsynk inverter output sensor.

Quote

 

if (origpayload.msg == "Success") {
    msg.payload.attributes = {};
    scroll_all_items(msg.payload.data, "");
    msg.payload.attributes = returnvalue;
    msg.payload.state = "Success";
    msg.payload.attributes.poweressentials = parseFloat(msg.payload.data.pac);
    msg.payload.attributes.totalpower = parseFloat(msg.payload.data.pInv) + parseFloat(msg.payload.data.pac);
    msg.payload.attributes.poweraux = parseFloat(msg.payload.data.pInv);
    let currdate = new Date(); node.status(origpayload.msg + " - " + currdate.toLocaleString());
    if (global.get("SunSynkDebug") === 1) { node.error(msg); }
    return msg ;
}

 

What do you recommend I do to see what other attributes are part of the payload so that I can try to set additional attributes for this sensor?

  • Author
11 hours ago, Muchachos said:

 @Gary Waterworth, been away for a bit. I had a look at the node red configuration and the only data I see with my limited node red skills is the following code from the Sunsynk inverter output sensor.

What do you recommend I do to see what other attributes are part of the payload so that I can try to set additional attributes for this sensor?

Look at all of the sensor.sunsynk_ sensors and their attributes

There are 6 or 7 main ones where all the data returned from teh website are populated into 

 

image.thumb.png.9846f5f3119d2a2e3eb4e669eea139f3.png

  • Author
On 2023/07/06 at 11:19 AM, seany1212 said:

Hey @Motty09 I get this error also, but I'm trying to use the region 2 code. I think it might be something to do with the node-red companion rather than the proper node-red integration in HA OS.

I've tried hard coding the login variables in node-red but it doesn't move any further past it.

That error has nothing to do with the logins etc. 

The region 2 code is very "experimental" as my system has not been migrated yet , so I dont have a plant in Region 2 

1st make sure that all the sensors configured are showing in HA under development tools. As posted above this error is teh result of not finding the one sensor in HA

Also you cannot mix and match region 1 and region 2 nodered flows as region 2 requires additional login parameters and endpoints. I am not even sure region 2 login method will work on region 1.

Speaking from memory region 1 templates should work on region 2, but not vice versa.

I just wish Sunsynk would hurry up with their stoopid migration. Irritating a lot of people. I work in IT and this must be the longest migration project I have heard of. 

Edited by Gary Waterworth

2 hours ago, Gary Waterworth said:

Look at all of the sensor.sunsynk_ sensors and their attributes

@Gary Waterworth, I checked all the sensors and the ones that look relevant are these ones.

 

IMG_2410.thumb.jpeg.f84e59a203656319e023baaf3beb606b.jpeg

This one seems to me the output of the Sunsynk inverter output function. The value for poweraux is set to pInv which is the total solar produced by the inverter and results in the totalpower being set pInv +pac. This is when the pac is actually being supplied by the solar so it part of the pInv and not additional to.

The flow and load sensors have data but not the poweraux data.

IMG_2408.thumb.jpeg.f9e954116c5c33323c725196380ea2fd.jpeg

IMG_2409.thumb.jpeg.a10421b1b6dbb53299da3f5609eb7ec5.jpeg

 

My assumption is that since the parameter section of the custom data has no smartload data like the sunsynk 12k three phase has there is no way of getting this data except for asking sunsynk to add this data.

 

2 hours ago, Gary Waterworth said:

That error has nothing to do with the logins etc. 

The region 2 code is very "experimental" as my system has not been migrated yet , so I dont have a plant in Region 2 

1st make sure that all the sensors configured are showing in HA under development tools. As posted above this error is teh result of not finding the one sensor in HA

Also you cannot mix and match region 1 and region 2 nodered flows as region 2 requires additional login parameters and endpoints. I am not even sure region 2 login method will work on region 1.

Speaking from memory region 1 templates should work on region 2, but not vice versa.

I just wish Sunsynk would hurry up with their stoopid migration. Irritating a lot of people. I work in IT and this must be the longest migration project I have heard of. 

@Gary Waterworth...thanks again for looking at this, I bet you are begining to regret it 🙂

I looked at my sensors under development tools and they all seem to be there, but most are showing as unavailable or just blank except my login details and the sensor for the url which is in the true state. 

As I am using docker I decided to do a fresh test install of HA and Node-Red and then see what errors show up. This is what I get after it reboots.

So it looks like the "last update" sensor is the problem ....just not sure how to fix it ?

image.thumb.png.9a187a3ad8d5d1af963dda97e3135c60.png

Hi,

Thanks for this codebase! I have successfully setup based on Region 1 and built out a nice dashboard with the raw inverter data, the power card, and the solar production forecast.

My question is: Based on my solar production forecast for the following days, can I set the battery state of charge so I can charge through the night at my lower electricity rate, whereas I am currently manually doing this. Apart from reading the data through this solution can I also write and update attributes via the WiFi logger?

I don't see why I cannot as this can be done through the native app for the inverter, but I just cannot work it out via HA.

Any response will be super helpful in getting this setup fully!

Many thanks

Nikhil

15 hours ago, Nikhilk12 said:

Hi,

Thanks for this codebase! I have successfully setup based on Region 1 and built out a nice dashboard with the raw inverter data, the power card, and the solar production forecast.

My question is: Based on my solar production forecast for the following days, can I set the battery state of charge so I can charge through the night at my lower electricity rate, whereas I am currently manually doing this. Apart from reading the data through this solution can I also write and update attributes via the WiFi logger?

I don't see why I cannot as this can be done through the native app for the inverter, but I just cannot work it out via HA.

Any response will be super helpful in getting this setup fully!

Many thanks

Nikhil

Update to the above. I have found this example here which does what I need: https://kellerza.github.io/sunsynk/examples/a-mode

The problem I have is all the Sunsynk 'sensor' device entities show correctly, but missing the 'select', 'number', 'switch' & 'binary_sensor' device attributes to complete this setup.

Any idea what steps I need to take to get these additional entities to show from my current setup?

Essentially I require the current sensors at a bare minimum, but are not showing in my HA:

- prog1_capacity 
- prog1_charge 
- prog1_time

Many thanks

Nikhil

  • Author
On 2023/07/08 at 12:10 PM, Muchachos said:

@Gary Waterworth, I checked all the sensors and the ones that look relevant are these ones.

 

IMG_2410.thumb.jpeg.f84e59a203656319e023baaf3beb606b.jpeg

This one seems to me the output of the Sunsynk inverter output function. The value for poweraux is set to pInv which is the total solar produced by the inverter and results in the totalpower being set pInv +pac. This is when the pac is actually being supplied by the solar so it part of the pInv and not additional to.

The flow and load sensors have data but not the poweraux data.

IMG_2408.thumb.jpeg.f9e954116c5c33323c725196380ea2fd.jpeg

IMG_2409.thumb.jpeg.a10421b1b6dbb53299da3f5609eb7ec5.jpeg

 

My assumption is that since the parameter section of the custom data has no smartload data like the sunsynk 12k three phase has there is no way of getting this data except for asking sunsynk to add this data.

 

Does it show in the app ? 

If so then there is a way of getting it. I cannot say how as I dont have a system with it configured. 

 

  • Author
On 2023/07/08 at 11:05 PM, Nikhilk12 said:

Hi,

Thanks for this codebase! I have successfully setup based on Region 1 and built out a nice dashboard with the raw inverter data, the power card, and the solar production forecast.

My question is: Based on my solar production forecast for the following days, can I set the battery state of charge so I can charge through the night at my lower electricity rate, whereas I am currently manually doing this. Apart from reading the data through this solution can I also write and update attributes via the WiFi logger?

I don't see why I cannot as this can be done through the native app for the inverter, but I just cannot work it out via HA.

Any response will be super helpful in getting this setup fully!

Many thanks

Nikhil

Yes there are ways of doing this via HA and node red. But it is not for people who are not very familiar with node red as you have to send specific http calls to teh website api. There are examples of this in my automation flows. 

  • Author
17 hours ago, Nikhilk12 said:

Update to the above. I have found this example here which does what I need: https://kellerza.github.io/sunsynk/examples/a-mode

The problem I have is all the Sunsynk 'sensor' device entities show correctly, but missing the 'select', 'number', 'switch' & 'binary_sensor' device attributes to complete this setup.

Any idea what steps I need to take to get these additional entities to show from my current setup?

Essentially I require the current sensors at a bare minimum, but are not showing in my HA:

- prog1_capacity 
- prog1_charge 
- prog1_time

Many thanks

Nikhil

This is not part of teh solution I provided 

  • Author
On 2023/07/08 at 12:38 PM, Motty09 said:

@Gary Waterworth...thanks again for looking at this, I bet you are begining to regret it 🙂

I looked at my sensors under development tools and they all seem to be there, but most are showing as unavailable or just blank except my login details and the sensor for the url which is in the true state. 

As I am using docker I decided to do a fresh test install of HA and Node-Red and then see what errors show up. This is what I get after it reboots.

So it looks like the "last update" sensor is the problem ....just not sure how to fix it ?

image.thumb.png.9a187a3ad8d5d1af963dda97e3135c60.png

What does teh sensor sensor.sunsynk_return_items show ? 

 

7 hours ago, Gary Waterworth said:

Does it show on the main screen where it shows power flow ?

This is the flow on the website

image.thumb.png.3c424280e60a196d4cbb06e3ffa8e6b0.png

 

This is the flow on the inverter display.

image.thumb.jpeg.91ad17c3d4614ed5531c828a01cff7bb.jpeg

  • Author
15 hours ago, Muchachos said:

This is the flow on the website

image.thumb.png.3c424280e60a196d4cbb06e3ffa8e6b0.png

 

This is the flow on the inverter display.

image.thumb.jpeg.91ad17c3d4614ed5531c828a01cff7bb.jpeg

Looks like teh website is not showing individual like teh unit. You will need to look at the various main sensors and try figure out if they are populating it in one of teh main sensor attributes

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.