Jump to content

SunSynk - Inverter Monitoring


Bloubul7
 Share

Recommended Posts

Hi @JeremyJvR

You need to download two additional nodes that are not pre-installed with NR. 

Click the hamburger icon on the top right corner > click Manage Palette > Click Install tab. Search and install the following two nodes,

  • node-red-contrib-cycle
  • node-red-contrib-moment

That should resolve the issue.

Link to comment
Share on other sites

On 2021/09/06 at 10:26 AM, Sc00bs said:

LOL, nope tried that already, still there. 

@Bloubul7 is it the energy node in the Node Red flow that is causing this error? 

Wondering if I maybe updated the Node Incorrectly, though I can't see much room for error

image.png.0d3727bd41309d264ec97c81da0c29e0.png

@Sc00bs did you come right with this?
I notice you have state_class, with an underscore, mine does not have the underscore, but that is because on the Inverter_Monitor_Publish flow in the "Assemble Config" node there is the following line to set the state_class payload for MQTT - it references "stateclass", with no underscore, in msg
"state_class": msg.stateclass,
so check your "Assemble Config" node to see if your's is like that and if so remove the underscore in your Energy change node(s).

image.png.51747265ec373a9d533d52870ef9df97.png

Edited by RhysMcW
Link to comment
Share on other sites

6 minutes ago, RhysMcW said:

@Sc00bs did you come right with this?
I notice you have state_class, with an underscore, mine does not have the underscore, but that is because on the Inverter_Monitor_Publish flow in the "Assemble Config" node there is the following line to set the state_class payload for MQTT - it references "stateclass", with no underscore, in msg
"state_class": msg.stateclass,
so check your "Assemble Config" node to see if your's is like that and if so remove the underscore in your Energy change node(s).

image.png.51747265ec373a9d533d52870ef9df97.png

Yes, all sorted and working now, I had made changes in my yaml file previously and forgot about them. As a result there was an argument in my HA as to what the stateclass should be! 

Link to comment
Share on other sites

45 minutes ago, Sc00bs said:

Yes, all sorted and working now, I had made changes in my yaml file previously and forgot about them. As a result there was an argument in my HA as to what the stateclass should be! 

@Sc00bs would you mind sharing what your yaml file entries look like?

I currently have this in my configuration.yaml file,

homeassistant:
  customize:
    sensor.sunsynk_grid_gridbuy_day:
      device_class: energy
      state_class: measurement
    sensor.sunsynk_solar_pv_day:
      device_class: energy
      state_class: measurement

however I still cant see/select the sensors in the Energy settings. 

Thanks. 

 

Link to comment
Share on other sites

1 minute ago, dawolf said:

@Sc00bs would you mind sharing what your yaml file entries look like?

I currently have this in my configuration.yaml file,

homeassistant:
  customize:
    sensor.sunsynk_grid_gridbuy_day:
      device_class: energy
      state_class: measurement
    sensor.sunsynk_solar_pv_day:
      device_class: energy
      state_class: measurement

however I still cant see/select the sensors in the Energy settings. 

Thanks. 

 

I don't think it's necessary to have anything in configuration.yaml as long as the state_class is configured in the nodes such as shown above.

For me it works without any changes in yaml. I suggest removing that entire section and checking then.

Link to comment
Share on other sites

1 minute ago, jacauc said:

I don't think it's necessary to have anything in configuration.yaml as long as the state_class is configured in the nodes such as shown above.

For me it works without any changes in yaml. I suggest removing that entire section and checking then.

Yup, removed it totally, was a legacy of another problem I had a few months ago 

Link to comment
Share on other sites

Thanks.

I've removed it completely and also added the state_class rule to the energy nodes (7 in total),

state_class_energy.png.0072031d5e62641c39c98c1a06797b79.png

I also double checked my Assemble Config node and the settings correspond with using an underscore,

assemble_config.png.10ed290340e590efcbe16cf7421ece3d.png

I've restarted everything however still don't see the sensors in the energy drop downs. 

Link to comment
Share on other sites

1 minute ago, dawolf said:

Thanks.

I've removed it completely and also added the state_class rule to the energy nodes (7 in total),

state_class_energy.png.0072031d5e62641c39c98c1a06797b79.png

I also double checked my Assemble Config node and the settings correspond with using an underscore,

assemble_config.png.10ed290340e590efcbe16cf7421ece3d.png

I've restarted everything however still don't see the sensors in the energy drop downs. 

Could it be due to mqtt discovery being turned off in HA?

Try adding this to configuration.yaml and check?

 

mqtt:
  discovery: true

 

Link to comment
Share on other sites

Warning... Appreciation post

Thanks to @Bloubul7 for doing all the leg work to get this going and maintaining it. Many others too have contributed, appreciate all the collaboration and efforts.

Thanks to @Sc00bs for making time on a Sunday night to debug this with me. Glad I was not the only one stumped (lol). The follow up WhatsApp messages also made me feel like the support in this community is great.

Thanks to @RhysMcW for adding the missing piece of the puzzle.

So in summary, what got me across the line that maybe not in black and white here (Deployment on a NUC)

Hardware

  1. I bought 2 RS485 converters (WaveShare and this). I got it working with the latter. Have not tested the Waveshare yet.
  2. When wiring, follow @Sc00bs instructions. What you need to do in addition, is wire up the ground. That would be the green and green/white.
  3. With the 5kw Inverter, use the BMS485 port, NOT the RS485.

Software

  1. Deploying HomeAssistantOS onto my NUC SSD was most easily achieved by running a live (Boot from USB) version of Ubuntu. Instructions here
  2. From Supervisor menu, install Add-ons
    1. Node-Red
    2. InfluxDB (database engine)
      1. Create the db
      2. Create a user (db_user)
    3. Mosquitto Broker
    4. Graphana (for Dashboards)
      1. Setup datasource
        1. To the db that you created in [2] above
        2. Use the IP address of the machine, not localhost in the http url
        3. Authorize with the user that you created in [2.2] above
  3. From Configuration menu, install Integrations
    1. Mosquito Broker.
       

I've just got my HA integration with solar solution working, thanks to you guys. I pledge to help out where I can. I am pretty new to all the software and hardware mentioned here, so still learning. Will be trying to modify the Grafana dashboards for my use case. Also want to build in some automation around turning SonOff devices off when the grid is down (I've seen mention of this on this thread). 

Baby steps...

Link to comment
Share on other sites

Anybody else experiencing a bad request and reference error? I just downloaded the latest flows from @jacauc github page, and got the attached error.

It should be ok to move v1value  and v2value  declarations to the top of the script, right?

total_load_calc error.JPG

Edited by Saliegh
Added question about moving declarations to the top
Link to comment
Share on other sites

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...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...