question

mucwendel avatar image
mucwendel asked

Cerbo GX with 6 Shelly 1PM Plus stops working and create error

Hi from Germany,

just addet 6x Shelly 1PM PLus to the Cerbo using the halmand config.

https://github.com/Halmand/dbus-shelly-1pm-and-pm1-Plus-pvinverter-multi-instance


Also I have a mqtt connection to homeassistant running ok,


It was running good showing all inverter.

But after a time and now all 5 minutes the cerbo GX goes offline and sometimes reboot.


Victron Portal says " Online connection disabled because of overload gx device"

At that time also the mqtt connection is lost a.s.o


Maybe the values of the 1PM+ device change so quick that it will overload the communication.


How to solve?

Ini File is 6x the same just other name and other ip adress.


[DEFAULT]

AccessType = OnPremise

SignOfLifeLog = 5

Deviceinstance = 221

CustomName = PV01

Phase = L1

PlusPmSupport = True

LogLevel = CRITICAL


[ONPREMISE]

Host = 192.168.178.221

Username =

Password =







gx device
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

4 Answers
mucwendel avatar image
mucwendel answered ·

Here are some screenshots to show the situation.


1709039367958.png


1709039389108.png


1709039421311.png




1709039367958.png (145.6 KiB)
1709039389108.png (35.4 KiB)
1709039421311.png (21.3 KiB)
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

matt1309 avatar image
matt1309 answered ·

Hi @mucwendel

I'm just guessing here but maybe take a look at top command of the gx device. See if it's just too much for the gx device to handle that much.


If that's the case you could maybe try editing the python script to reduce the frequency in which it queries the shelly devices. Not sure if that'll help if it's the fact they're all running at once that causes the issue.

I'm also not sure how much that will impact the reliance on your data. Looks like the mainloop is set to 250ms which is pretty fast.


Let me know how you get on, interested in hearing about how you solve this.


The other option might be rather than having separate custom drivers for each shelly pm. ie atm you have several python scripts all reading one config file each.

Maybe instead you have edit the code so you have one custom driver that loads in multiple config files. This way you would query each shelly one at a time rather than querying all at the same time. This would allow you to balance the computer power as only querying one at a time. Agian you'll have to be careful to check how this impacts data update frequency. This sounds more efficient way of doing it to me though. Assuming it's not too slow.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

mucwendel avatar image
mucwendel answered ·

Where did you see or were could i find and edit the main loop of 250ms?


2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

mucwendel avatar image
mucwendel answered ·

Maybe I found something. After changing one value from 250 to 1000 it looks like more sable as you can see in the Homeassistant log of battery soc.


I added the 6 shelly scripts yesterday night around 23:30.

Since that time th e soc value was Freeze or jumping up and down until 14:20 today.

After change it looks normal agin.



1709043581093.png


I've changed the line 66 from 250ms to 1000ms and now it's looking good.

1709043752851.png


1709043581093.png (23.6 KiB)
1709043752851.png (51.3 KiB)
1 comment
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

matt1309 avatar image matt1309 commented ·
Hi @mucwendel

Glad it's worked. If i were you I'd consider creating a loop rather than having the 6 scripts. With each script having it's own config file.

You edit the one script so that it loops through each of the config file, doing the exact sample this just with a new config file.

You might have to play around with timeout timer.

As 250ms * number of config files. Might not be accurate enough. but should solve the load issues as far less tasks are being run in parallel.


Atm your solution could in theory all sleep at the same time. so you have all 6 scripts run at once (or at least try to) then sleep at the exact same time. So you'll have CPU load spikes, as everything tries running at once.

If instead you write it so the script loops through each config file you'll in theory have less down time and more constant CPU usage. And in theory it wouldnt be much slower you'd be querying each shelly at 250*6 interval

0 Likes 0 ·