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

  • Replies 948
  • Views 131.8k
  • 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

2 minutes ago, Gary Waterworth said:

Will mull over this.

I dont actually have a sunsynk system anymore so will need to setup a vm again

WIll need to see if some of teh key functions you use are available or not in node red

I can give you remote access to a system if you would like.

Not sure for everyone, but mine just started working again.

Thank you Gary for carrying on with this even though you don't have a system anymore.

I guess this integration will need someone to take over support and development. I wish I could but I'm just not up to speed on how the whole thing fits together, nor on Node-Red.

BjornCPT: I am new to the forum, so waiting for my login to be approved. I managed to build the relevnat nodes and got the flow up and running again. I can share the extra nodes and code here, but can update the original

in summary:
1. Updated Global Vars with new url
2. Added a function to generate Nonce and Sign
3. HTTP node to pull Public Key from Sunsynk
4. Function to encrypt the password
5. Then link to the existing "Create Request for Login" node with some code changes.

Hi everyone,

Just a quick update: I've managed to update the Node-RED flow to handle the new encrypted password requirement for the Sunsynk API (using RSA encryption with a dynamic public key, based on the PHP example shared earlier). It's working perfectly now, pulling stats without issues.

@Gary Waterworth (GitHub: gdwaterworth ==> https://github.com/gdwaterworth/Home-Assistant---E-Linter-Logger---Sunsynk), thanks for the original repo! Since it's marked as no longer maintained, would you prefer I submit a pull request with these changes, or should I fork it and maintain a separate version? Happy to share the updated flow JSON either way.

Details on changes below. Let me know if anyone wants the full export (sanitised for sensitive info).

Cheers,
Bjorn

Short Summary of Changes

  • Updated token endpoint to /oauth/token/new.

  • Added nodes to generate nonce/sign, fetch dynamic public key, and encrypt password using Node.js crypto module (RSA_PKCS1_PADDING).

  • Revised headers to prefer "deflate" encoding and match latest working User-Agent/Accept values to avoid compression errors.

  • Modified login request to use the base64-encoded encrypted password instead of plain text.

  • Ensured compatibility with existing flow structure; tested on Python-free Node-RED (uses built-in crypto). No other major alterations—stats pulling resumes as before.

1 hour ago, CraftyChops said:

Not sure for everyone, but mine just started working again.

Thank you Gary for carrying on with this even though you don't have a system anymore.

I guess this integration will need someone to take over support and development. I wish I could but I'm just not up to speed on how the whole thing fits together, nor on Node-Red.

Affirmative, mine is also running through without any errors now.

Can confirm, both the new and the old method are working again.

They are probably going to remove the old method, thus the new method should be worked on in the meantime.

  • 3 weeks later...
  • Author
On 2025/09/02 at 3:25 PM, Bjorn-CPT said:

Hi everyone,

Just a quick update: I've managed to update the Node-RED flow to handle the new encrypted password requirement for the Sunsynk API (using RSA encryption with a dynamic public key, based on the PHP example shared earlier). It's working perfectly now, pulling stats without issues.

@Gary Waterworth (GitHub: gdwaterworth ==> https://github.com/gdwaterworth/Home-Assistant---E-Linter-Logger---Sunsynk), thanks for the original repo! Since it's marked as no longer maintained, would you prefer I submit a pull request with these changes, or should I fork it and maintain a separate version? Happy to share the updated flow JSON either way.

Details on changes below. Let me know if anyone wants the full export (sanitised for sensitive info).

Cheers,
Bjorn

Short Summary of Changes

  • Updated token endpoint to /oauth/token/new.

  • Added nodes to generate nonce/sign, fetch dynamic public key, and encrypt password using Node.js crypto module (RSA_PKCS1_PADDING).

  • Revised headers to prefer "deflate" encoding and match latest working User-Agent/Accept values to avoid compression errors.

  • Modified login request to use the base64-encoded encrypted password instead of plain text.

  • Ensured compatibility with existing flow structure; tested on Python-free Node-RED (uses built-in crypto). No other major alterations—stats pulling resumes as before.

I really dont mind if you fork it :)

I just dont have time atm with my other activies to really work on it

  • 5 weeks later...

Argh! I'm getting errors again. Seemed to start around 01:00 or 02:00 last night.

Just loads of these type of errors every time it checks the API


2025/10/18, 13:56:26node: Export Data Export To Entityfunction : (error)

"1. 380458"

2025/10/18, 13:56:26node: Export Data Export To Entityfunction : (error)

{ 2310202384: object }

2025/10/18, 13:56:26node: Export Data Export To Entityfunction : (error)

"2. 380458 2310202384 0"

2025/10/18, 13:56:26node: Calc Last Update Time & General Status Checkfunction : (error)

"Stats Last Update - Error With Data "

2025/10/18, 13:56:26node: Calc Last Update Time & General Status Checkfunction : (error)

"TypeError: Cannot read properties of undefined (reading 'toString')"

On 2025/10/18 at 2:00 PM, CraftyChops said:

Argh! I'm getting errors again. Seemed to start around 01:00 or 02:00 last night.

Just loads of these type of errors every time it checks the API


2025/10/18, 13:56:26node: Export Data Export To Entityfunction : (error)

"1. 380458"

2025/10/18, 13:56:26node: Export Data Export To Entityfunction : (error)

{ 2310202384: object }

2025/10/18, 13:56:26node: Export Data Export To Entityfunction : (error)

"2. 380458 2310202384 0"

2025/10/18, 13:56:26node: Calc Last Update Time & General Status Checkfunction : (error)

"Stats Last Update - Error With Data "

2025/10/18, 13:56:26node: Calc Last Update Time & General Status Checkfunction : (error)

"TypeError: Cannot read properties of undefined (reading 'toString')"

Hmm, it's suddenly working again since 04:40 (SAST) this morning. AWS related?

  • 4 weeks later...
23 hours ago, Jacques Jambo said:

Hi guys my Sunsynk has suddenly stopped working in node red? not sure if it was a home assistant update or what? Any help would be greatly appreciated.

image.png

I am in the same boat. I was on a much older version though. But I am not even able to get version 2.4 working. Not actually a coder, so I am sure I just don't know where to change things.

PS - Is the inverter serial a must in the secrets file, or can I get it from the info collected (once I can get pas the login issue)

On 2025/10/18 at 2:14 PM, CraftyChops said:

@Bjorn-CPT Thanks for taking this on. This is such a useful addition to HA for us Sunsynk users. Not sure if you've forked it yet. Will we need to get new versions and updates from a different source now?

Hi Bjorn, would you mind sharing the JSON please?

Hi, Mine has stopped working too (Version 2.4). Looking at the NodeRED I'm getting a "Status 404 Not Found" on the Bearer Debug. Does this mean that the Sunsynk API is down or has changed its web address endpoints?

Here's a fork of Gary's repo with the new authentication flow included. It's working for me, but let me know if anyone sees any issues.

GitHub

GitHub - cpether/Home-Assistant---E-Linter-Logger---Sunsynk

Contribute to cpether/Home-Assistant---E-Linter-Logger---Sunsynk development by creating an account on GitHub.
1 hour ago, cp2023 said:

Here's a fork of Gary's repo with the new authentication flow included. It's working for me, but let me know if anyone sees any issues.

GitHub

GitHub - cpether/Home-Assistant---E-Linter-Logger---Sunsynk

Contribute to cpether/Home-Assistant---E-Linter-Logger---Sunsynk development by creating an account on GitHub.

Awesome thanks, working for me appreciate it!

Some reason I am not able to update settings though.

When trying to change soc:

16 Nov 16:22:37 - [error] [function:Export Data Export To Entity] Logger In Warning Mode, continuing

16 Nov 16:22:54 - [warn] [http request:Set Invertor Settings] JSON parse error

16 Nov 16:22:54 - [error] [function:Set Status] <!doctype html><html lang="en"><head><title>HTTP Status 500 – Internal Server Error</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 500 – Internal Server Error</h1></body></html>

16 Nov 16:22:54 - [error] [function:Set Status] TypeError: Cannot read properties of undefined (reading 'hasOwnProperty')

Edited by Ronnie1102

2 hours ago, Ronnie1102 said:

Awesome thanks, working for me appreciate it!

Some reason I am not able to update settings though.

When trying to change soc:

16 Nov 16:22:37 - [error] [function:Export Data Export To Entity] Logger In Warning Mode, continuing

16 Nov 16:22:54 - [warn] [http request:Set Invertor Settings] JSON parse error

16 Nov 16:22:54 - [error] [function:Set Status] <!doctype html><html lang="en"><head><title>HTTP Status 500 – Internal Server Error</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 500 – Internal Server Error</h1></body></html>

16 Nov 16:22:54 - [error] [function:Set Status] TypeError: Cannot read properties of undefined (reading 'hasOwnProperty')

Changed method to POST and it works again

{
        "id": "5482ee7bf9a560ca",
        "type": "http request",
        "z": "0529a9f43b7f7bd9",
        "name": "Set Invertor Settings",
        "method": "use", change this to post
        "ret": "obj",
        "paytoqs": "ignore",
        "url": "",
        "tls": "",
        "persist": false,
        "proxy": "",
        "insecureHTTPParser": false,
        "authType": "",
        "senderr": false,
        "x": 1320,
        "y": 1160,
        "wires": [
            [
                "3d5275293bad84d5",
                "539a19bf670fc51c"
            ]
        ]
    },



Edited by Ronnie1102

i was getting warnings when using that field that node-RED had deprecated it, that why i changed it to "use". Just hadn't updated the request correctly to use POST. I've committed a fix now.

Just now, cp2023 said:

i was getting warnings when using that field that node-RED had deprecated it, that why i changed it to "use". Just hadn't updated the request correctly to use POST. I've committed a fix now.

Thanks, will use the updated flow.

Appreciate the changes though, still much better than sunsynk connect pro ai they released.

8 hours ago, cp2023 said:

Here's a fork of Gary's repo with the new authentication flow included. It's working for me, but let me know if anyone sees any issues.

GitHub

GitHub - cpether/Home-Assistant---E-Linter-Logger---Sunsynk

Contribute to cpether/Home-Assistant---E-Linter-Logger---Sunsynk development by creating an account on GitHub.

Thanks so much for the fork — I finally managed to get everything working again today.
For anyone else trying to migrate to this fork, here are a few important notes based on the pain I went through:

1. Delete your old Node-RED flow first

I was still running v2.2, and the structure is very different from v2.4.
Remove the old flow completely and then import the new v2.4 flow.

2. Remove all Sunsynk config entries from configuration.yaml

I wiped all my previous Sunsynk sections to avoid conflicts.

3. Import the new Sunsynk Gather config carefully

This part caused the most headaches because my configuration.yaml is highly structured.
Do NOT paste the whole file at once.
Import it in smaller sections and place each part where it belongs.

I had errors with the sunsynk_config_sensor. Configuaration.yaml expects attribute values that are numbers to be in quotes, otherwise validation expects a string value. So attribute values like region: "2", unit_cost:"2.37" etc.

Some sensors aren’t needed (e.g., light-related ones), and the order in the file isn't intuitive.

4. Update your secrets.yaml

There are new and renamed entries that the flow depends on.
Notably:

sunsynk_user: xxx       # was sunsynk_username
sunsynk_sn_data: xxx
sunsynk_sn_flow: xxx
sunsynk_plantid_ignore_list: "xxxx"

Getting the sunsync_sn_data and sunsynk_sn_flow is very tricky esp for someone like me who is not comfortable with Node-Red. It took me time to get to. See the pictures for guidance

5. Expect a few deprecation warnings

I’m still seeing some, but everything is functioning correctly.

Thanks @cp2023

Screenshot 2025-11-16 at 22.22.16.png

Screenshot 2025-11-16 at 22.21.40.png

Edited by gkj_muk

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.