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

  • Author
28 minutes ago, randomfool said:

Thanks Gary. Have to say I wouldn't of known where to begin but working on this setup for HA has opened a whole new world for me to explore with home automation. Its genuinely really impressive. 

Now I need to work out how to automatically enable grid export mode based on a timer, in the UK its profitable to take from the grid overnight when its cheap then export the battery in the morning, profiting the difference. I'd probably tie this into the weather so would only do this if it was a sunny/partly sunny day when I knew PV would subsequently recharge the battery and provide my home requirements as it would otherwise be a false economy.

 

Yup . HA is a very powerful tool. esp once you start including things like node red.

I am not sure on the grid export as I dont have it here and cant experiment. If you can figure out on the app which options to enable, I can try help you figuring out the config options to send sunsynk

Bascially I  look at a normal save, change those options then debug the next change and look for the differences.

If the app can do it I can replicate it in the flows

Node red makes some things really easy. This is the flows that change my camera between day and night mode. I have some cheap china specials that are not behaving nicely with time. So I just force it via home automation 

 

image.thumb.png.3c1a64f2494fbc882cc24a1a6a0f3db4.png

 

Edited by Gary Waterworth

  • Replies 949
  • Views 138.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

Hey @Gary Waterworth - Hoping you can help me!

I seem to be having the exact same problem as @-cK- in that after inserting the Templates ( Region 1 ) - E-Linter .txt under /config/configuration.yaml file, and altering the username and password fields to reflect my account, I still end up with all the New Sunsynk entities and sensors showing up as "unavailable" (I have tried to log into region 2 on the phone app, which did not work. Region 1 does work,  so confirms I'm using the correct region)

I also have the situation where if I log into https://pv.inteless.com/  Our inverters (Parallel system)  are listed under the "plant" inverters rather than the the equipment page on the  home screen

I am very new to HA, and have only been poking around for a few days - I have managed to download/install node red, but I have no idea how to get the debugging info as the others have posted.

If at all possible, could you maybe explain what I'm doing wrong. Explain-it-like-i'm-5 :)

I just updated to the latest itteration and can confirm everything is working.

Lets just check that you did everything you should haved (I'm no expert just gonna list what I do to get things working)

1) you've imported the template.txt. to the configuration.yaml with your login details.

2) you've restarted home assitant

3) you've have installed node-red-contrib-hass under manage palette

4) you've imported the garther file SunSynk Gather Flow.json

5) you have added the long life token to the  image

https://github.com/gdwaterworth/Home-Assistant---E-Linter-Logger---Sunsynk/wiki/Installation

6) you've deployed the node image.png.021f52d62d82173632052d573b8a72d3.png (if it isn't deployed it will be red, if deployed it is grey like this)

This should get things up and running.

 

Edited by -cK-

@Gary Waterworth thank you for such an awesome integration!

I’ve managed to get it working  and seeing sensors and values.

My issue is that I have a few sites with inverters, but only HA at one site. How can I force the integration to that specific inverter. Currently it’s pulling the inverter information from one of the others.

  • Author
1 hour ago, Byraff said:

@Gary Waterworth thank you for such an awesome integration!

I’ve managed to get it working  and seeing sensors and values.

My issue is that I have a few sites with inverters, but only HA at one site. How can I force the integration to that specific inverter. Currently it’s pulling the inverter information from one of the others.

Hi all. Sorry, not been online much this weekend 

@PJGardener I will add another configure option to choose between the 2 ways of getting the invertor list.

Let me look at this early next week. This is all to do with what permissions your installed gave you on your profile 😕 . If I understand you correctly the way the flows are at the moment they should work for you. So it may be something else. The error checking on each step in the flows is designed to stop going further on an error. 

To get debugging info : 

image.png.9d9a9d94703de6e762762413fc5d1147.png

Also just send me a screenshot of the flows. I put a lot of error information on the node status's as well 

 

@Byraff 

At the moment there is a hard limit to get the 1st 10 Inverters/plants. How many do you have ?

If need be I can up the cap fairly easily. 

There are 3 sensors used to control the index value :

The plant index is to select the correct plant 

The Invertor 1 & 2 index is to select the correct invertors 

Invertor 2 is still under serious testing atm as I cannot test it
 

##### Put in your Plant Index for your Plant. 0 should work 
  - sensor: 
      - name: "Sunsynk plant index"
        state: "0"  <===============================================
        unique_id: "sensor.sunsynk_plant_index"
##### Put in your Invertor Index for your 1st Invertor. 0 should work 
  - sensor: 
      - name: "Sunsynk Invertor 1 index"
        state: "0"   <==============================================
        unique_id: "sensor.sunsynk_invertor_1_index"
##### Put in your Invertor Index for your 2nd Invertor. Only Change if you have 2 Invertors
  - sensor: 
      - name: "Sunsynk Invertor 2 index"
        state: "DONOTEDIT" <========================================
        unique_id: "sensor.sunsynk_invertor_2_index"

To get the correct indexes look at the following sensors with development tools when everything is running.

Look at the number circled in green. That is the index value. Find the correct one in the list.

In the sensor templates above just edit in the index numbers you want.

image.thumb.png.ea44512be2efdc64a6db4fd648ead4ae.png

And the invertor list 

image.png.082dcb6fab5064e92432876666125d41.png 

 

 

 

Edited by Gary Waterworth

10 hours ago, -cK- said:

I just updated to the latest itteration and can confirm everything is working.

Lets just check that you did everything you should haved (I'm no expert just gonna list what I do to get things working)

1) you've imported the template.txt. to the configuration.yaml with your login details.

2) you've restarted home assitant

3) you've have installed node-red-contrib-hass under manage palette

4) you've imported the garther file SunSynk Gather Flow.json

5) you have added the long life token to the  image

https://github.com/gdwaterworth/Home-Assistant---E-Linter-Logger---Sunsynk/wiki/Installation

6) you've deployed the node image.png.021f52d62d82173632052d573b8a72d3.png (if it isn't deployed it will be red, if deployed it is grey like this)

This should get things up and running.

 

You are a legend! I have managed to get the stats to pull through.

@Gary Waterworth I think that would help a lot of people who are in the same boat.. Thanks for the amazing work, very useful tool this

53 minutes ago, Gary Waterworth said:

Hi all. Sorry, not been online much this weekend 

@PJGardener I will add another configure option to choose between the 2 ways of getting the invertor list.

Let me look at this early next week. This is all to do with what permissions your installed gave you on your profile 😕 . If I understand you correctly the way the flows are at the moment they should work for you. So it may be something else. The error checking on each step in the flows is designed to stop going further on an error. 

To get debugging info : 

image.png.9d9a9d94703de6e762762413fc5d1147.png

Also just send me a screenshot of the flows. I put a lot of error information on the node status's as well 

 

@Byraff 

At the moment there is a hard limit to get the 1st 10 Inverters/plants. How many do you have ?

If need be I can up the cap fairly easily. 

There are 3 sensors used to control the index value :

The plant index is to select the correct plant 

The Invertor 1 & 2 index is to select the correct invertors 

Invertor 2 is still under serious testing atm as I cannot test it
 

##### Put in your Plant Index for your Plant. 0 should work 
  - sensor: 
      - name: "Sunsynk plant index"
        state: "0"  <===============================================
        unique_id: "sensor.sunsynk_plant_index"
##### Put in your Invertor Index for your 1st Invertor. 0 should work 
  - sensor: 
      - name: "Sunsynk Invertor 1 index"
        state: "0"   <==============================================
        unique_id: "sensor.sunsynk_invertor_1_index"
##### Put in your Invertor Index for your 2nd Invertor. Only Change if you have 2 Invertors
  - sensor: 
      - name: "Sunsynk Invertor 2 index"
        state: "DONOTEDIT" <========================================
        unique_id: "sensor.sunsynk_invertor_2_index"

To get the correct indexes look at the following sensors with development tools when everything is running.

Look at the number circled in green. That is the index value. Find the correct one in the list.

In the sensor templates above just edit in the index numbers you want.

image.thumb.png.ea44512be2efdc64a6db4fd648ead4ae.png

And the invertor list 

image.png.082dcb6fab5064e92432876666125d41.png 

@Gary Waterworth

 

@Gary Waterworth you a legend!

Got the right one now.

Not yet at 10, still a way to go 😀

Can you look at adding an entity that displays the Plant name

 

 

Edited by Byraff
incomplete

  • Author
22 hours ago, Byraff said:

 

@Gary Waterworth you a legend!

Got the right one now.

Not yet at 10, still a way to go 😀

Can you look at adding an entity that displays the Plant name

 

 

Just add a sensor in your templates

Just replace the 0 with your correct index no

Sensor will be sensor.sunsynk_plant_name

  - sensor:
      - name: "Sunsynk Plant Name"
        state: >
            {{state_attr('sensor.sunsynk_plant_list, 'infos_0_name')}}

 

Edited by Gary Waterworth

Hi Guys, bit stuck again...

I'm trying to get the Sample Card for Power flow to work. I have got the card on my dahboard, but the reported information seems incorrect. The below screen shots were taken at the same time, you can see the discrepancy's - I am not sure which one is correct... I can report that the phone app does tend to take a few min to update (say you turn the pool pump off, it'll take 2 or 3 min for the wattage to drop)  I am by absolutely no means an expert, but it seems like this is only reporting the stats of 1 of the 2 inverters? Any Advice? 

*we don't have Solar panels at the moment, so its expected for that value to be zero. but they are a possible future upgrade, so left it as is. 

image.png.6fa74fb29c23433253e67d02b7a69173.pngimage.thumb.png.7c7ef97520138076b546ef8327d9c745.png

 

 

Edited by PJGardener

If you look at the bindings in the card you will see it is only bonded to the first inverter sensors if I'm reading those correct.

image.png.aa06b5ff266c50ba63f25d87cb9818f4.png

I believe if you are running two inverters the second inverter data will be on the second sensors e.g. sensor.sunsynk_grid_2

image.png.17cf94e7dfae3c863aa300d0b5266ecf.png

I'm not sure how you will need to amend this but I believe you will need to bind the second inverter sensors as well to get that info into the card.  Not sure if that can be added in the card to then add the two sensor values together to give you a single value into the card or if you will need to create separate sensors to first add these together and then pull in that sensor data instead 🤔

Garry or slipx06 should hopefully be able to shed some better light on this for you as to what you'll need to do to remedy this.

  • Author

Correct. 

The 2nd Invertor Func is still a work in progress 

What I intend doing is creating a seperate set of sensors so that slipx06 cards can be directly dropped in without having to play with card configs. 

Was in the back of my mind, just need some time to do it.

Much easier then to make changes needed for 1 or 2 invertor setup

Edited by Gary Waterworth

8 hours ago, -cK- said:

If you look at the bindings in the card you will see it is only bonded to the first inverter sensors if I'm reading those correct.

image.png.aa06b5ff266c50ba63f25d87cb9818f4.png

I believe if you are running two inverters the second inverter data will be on the second sensors e.g. sensor.sunsynk_grid_2

image.png.17cf94e7dfae3c863aa300d0b5266ecf.png

I'm not sure how you will need to amend this but I believe you will need to bind the second inverter sensors as well to get that info into the card.  Not sure if that can be added in the card to then add the two sensor values together to give you a single value into the card or if you will need to create separate sensors to first add these together and then pull in that sensor data instead 🤔

Garry or slipx06 should hopefully be able to shed some better light on this for you as to what you'll need to do to remedy this.

If you want to add two sensors values you can modify the bindings in the card like so

- bind: >-
      return parseInt(hass.states["sensor.grid_external_power_1"].state) +
      parseInt(hass.states["sensor.grid_external_power_2"].state) + ' W'
      selector: '#grid_external_power_172'

You will need to do this for each selector. Its probably easier to do this outside of the card. You can create template sensors in HA or additional Node Red Flows and functions to do this.

  • Author
43 minutes ago, slipx said:

If you want to add two sensors values you can modify the bindings in the card like so

- bind: >-
      return parseInt(hass.states["sensor.grid_external_power_1"].state) +
      parseInt(hass.states["sensor.grid_external_power_2"].state) + ' W'
      selector: '#grid_external_power_172'

You will need to do this for each selector. Its probably easier to do this outside of the card. You can create template sensors in HA or additional Node Red Flows and functions to do this.

Yup :)

I am busy creating a set of templates so that they can just drop that into the configuration.yaml and then your cards will be plug and play 

 

Largely working, just trying to see where to get values for some of teh aux/non essential stuff

Ignore my little addition on the left :)

image.png.0ebb971ca22938b697c7731a74834c79.png

Edited by Gary Waterworth

Hi Gary,

Beyond great stuff you have achieved here.

I'm not very Home Automation & Node Red savvy, so I am rebuilding in Python with a custom UI.

I've managed almost everything, but having some trouble following how you determine the value of the 'sunsynk_grid_online' sensor. Mind pointing me in the right direction?

J

  • Author
24 minutes ago, jandre said:

Hi Gary,

Beyond great stuff you have achieved here.

I'm not very Home Automation & Node Red savvy, so I am rebuilding in Python with a custom UI.

I've managed almost everything, but having some trouble following how you determine the value of the 'sunsynk_grid_online' sensor. Mind pointing me in the right direction?

J

Good luck :)

Just keep in mind there may be server changes soon when sunsynk swops everyone to region 2

 

grid online is easy :)

Grid voltage must be over 200v

 

 if (parseFloat(msg.payload.data.vip[0].volt) < 200) { var gridonline = false } else { var gridonline = true }

 

Edited by Gary Waterworth

Ah I understand, for the most part!

Thanks everyone, much appreciated. 

One last thing, (that's probably a lie :) the Sunsynk Events card appears to take a very very long time to update with events. As in events which happen yesterday, only appear today in the list. But I notice that the push notifications from the phone app are also very iffy, sometimes they work and sometimes they don't.. not sure if its related.

  • Author
5 minutes ago, PJGardener said:

Ah I understand, for the most part!

Thanks everyone, much appreciated. 

One last thing, (that's probably a lie :) the Sunsynk Events card appears to take a very very long time to update with events. As in events which happen yesterday, only appear today in the list. But I notice that the push notifications from the phone app are also very iffy, sometimes they work and sometimes they don't.. not sure if its related.

 If it is on the remote server it will update 

Events : Every 1 Minute

Notifications : Every 5 minutes

Just check on the node red flow that it shows success

image.png.9e4f10e770d0b3ec29a5d0bd461b302d.png

image.png.92b854acba0b46d97c8def4ea244d5e7.png

Edited by Gary Waterworth

Hi all, 

I am a complete noob with HA. Can someone pls point me in the right direction how to get the integration done please. 

I have only ever installed apps with HACS. 

How do I get this app into HA?

Thanks, and sorry for the super noob question.

  • Author
5 minutes ago, ArnoJ said:

Hi all, 

I am a complete noob with HA. Can someone pls point me in the right direction how to get the integration done please. 

I have only ever installed apps with HACS. 

How do I get this app into HA?

Thanks, and sorry for the super noob question.

Start here : https://github.com/gdwaterworth/Home-Assistant---E-Linter-Logger---Sunsynk

Also look on teh wiki pages there 

You will also need to get nodered installed 

Home Assistant Community Add-on: Node-RED - Installation / Home Assistant OS - Home Assistant Community (home-assistant.io)

Edited by Gary Waterworth

@ArnoJ just remember the below need to be installed within Node-Red after you've installed Node-Red (don't think it is installed by default).  It is under the manage palette option in Node-Red

c. Configure the node-red-contrib-hass addon

On 2023/03/23 at 2:10 PM, Gary Waterworth said:

I am not sure on the grid export as I dont have it here and cant experiment. If you can figure out on the app which options to enable, I can try help you figuring out the config options to send sunsynk

Apologies for the delay Gary, see below. I believe the attribute is Time[segment]On e.g. Time1On, Time2On etc. 1 being enabled, 2 disabled.

I assume in node-red it would go something like this:-

var timeon= global.get(global.get("HA") + '.states[\'sensor.sunsynk_settings\'].attributes.Time1On');

I would need to figure out a way of getting the currrent time segment and writing it back to the correct attribute or a simpler way might be to just have a boolean toggle for each time segment in the UseTimer card that links back to each variable, but I've not done this before so would appreciate your thoughts.

 

image.thumb.png.833b73a7a3e5847c7e10adde5b1146c7.png

 

 

Hi Gary, i have gone through the entire process.

1. Added Configuration.yaml sensors, added credentials etc.

2. Imported nodered flows

3. Created longlife token and added key

The debug shows an error when trying to update the sensors, message as follows:

"hass-post error: Error [ERR_TLS_CERT_ALTNAME_INVALID]: Hostname/IP does not match certificate's altnames: Host: localhost. is not in the cert's altnames: DNS:mydomainname.duckdns.org"

It does appear to a Cert error, any advice on how to fix. 

Also, it does show that Nodered is connected to HA.

 

homeAssistant: object

states: object
services: object
isConnected: true
isRunning: true
 
I'm a bit stuck on this last part now.
  • Author
14 hours ago, randomfool said:

Apologies for the delay Gary, see below. I believe the attribute is Time[segment]On e.g. Time1On, Time2On etc. 1 being enabled, 2 disabled.

I assume in node-red it would go something like this:-

var timeon= global.get(global.get("HA") + '.states[\'sensor.sunsynk_settings\'].attributes.Time1On');

I would need to figure out a way of getting the currrent time segment and writing it back to the correct attribute or a simpler way might be to just have a boolean toggle for each time segment in the UseTimer card that links back to each variable, but I've not done this before so would appreciate your thoughts.

 

image.thumb.png.833b73a7a3e5847c7e10adde5b1146c7.png

 

 

SO the current settings are available in the sensor.sunsynk_settings sensor

To change them you need to craft a HTTP put with a specific payload. I will try post more on it later.

The user interface would be something else. The way I have done the timer card will not cater for that, so that will also have to be redone.

I have not done too much on changing settings so a lot of it is "try and test and pray" and there is zero documentation to reference from elinter/sunsynk on that part of the settings.

Bascially I look at what the app is doing and then debug the https requests it sends out. But that is a far more complicated topic

Edited by Gary Waterworth

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.