-
Couldn't load subscription status.
- Fork 31
Shelly Pro 3EM support for dbus-modbus-client 1.58+ #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
@rkapsi Guide how to connect the Shelly Pro 3EM ? |
|
On your Cerbo GX go to Settings -> Modbus TCP/UDP devices -> Saved devices and enter your Shelly's IP. It will immediately show up under Settings -> Device list. |
|
@rkapsi Can't get it to work... have now tried 3.42 (latest release) and ran this --> #4 (comment) |
|
I'm sorry if this stuff is confusing but this PR only works with 3.50 and later (current beta). |
Well... got it working on 3.41, but not on 3.50 |
|
If Victron would show some interest in merging this then maybe we wouldn't have to provide user support for years on end. |
|
@Dennis-LB very cool. It appears dbus-modbus-client 1.58 has been backported to Venus OS 3.4. $ cat /opt/victronenergy/version
v3.42
Victron Energy
20240910081535
$ grep VERSION /opt/victronenergy/dbus-modbus-client/dbus-modbus-client.py
VERSION = '1.58'When it happened I don't know but I'll update the PR description to make it clear that it's a dbus-modbus-client 1.58 dependency rather than Venus OS. With that said I'm on v3.50~25 (and all the betas before that) and it's been fine and the only thing I keep track of. It's difficult for me to provide support for something I don't use. |
6a6c5cd to
d348c85
Compare
|
I just recognized that with the latest 3.50 |
|
Until Victron accepts the PR or does their own thing there's no way around it. Every time there's an update you need to set the root password, ssh into it and do the dance. I keep the shelly.py file in my /data directory and symlink it to /opt/victronenergy/... To make life easier and not having to do the import you can choose to override one of the other EMs (say ABB). This dance could be automated if there's interest but it's kind of weird. |
|
doing the dance wasn't the issue for me...problem now is that on my Ekrano I am locked out now of any modifications to items in the rootfs, hence adding the import is not possible any more |
d348c85 to
a3d3f7d
Compare
|
@mpvader I've been waiting almost 1,5 years now for this to be merged. If Victron won't merge this due to conflicts with their own energy meter offering then please say so and close these requests. |
43a3ed5 to
28eb26f
Compare
|
To whom it may concern I also added support for Shelly's Monophase profile. |
|
@rkapsi @Jalle19 |
|
Would be a good conpromise if there would be a plugin system where users can easily add third-party functionality, like support for other meters. AFAICT there's no such thing at the moment though. |
|
For me it's fine if they don't want to include OSS contributions but they should say so. Then I'd move on and write my own install script. |
28eb26f to
1ce4d6e
Compare
|
Looks fairly normal, except for L3. Take a look at https://www.victronenergy.com/media/pg/Energy_Storage_System/en/multiphase-regulation---further-information.html#UUID-72f5b2fc-0d74-563a-b2d6-848f1e8fd046, I doubt it's the Shelly that's measuring or reporting wrong values. |
|
I only have one multiplus and thus a single phase ESS in a 3 phase system but my Multiplus is connected to L2 and not L1 as Victron apparently assumes. There's seems to be no option to change this. I need to change my wiring to get this done. Thanks for point me into this direction, Im fairly new in this and you gave me the info I was looking for. Txs! |
1ce4d6e to
c8db597
Compare
|
Edit: removed outdated instructions |
c8db597 to
e720cbf
Compare
i used this after i updated to 3.55 and i cant get the shelly to show up in devices. it was working before i update to 3.55 |
|
Maybe one of the commands failed, check the output |
|
If Victron would just merge this it would be much easier for everyone |
e720cbf to
f176251
Compare
|
I believe I know what's going on and I don't recommend installing it this way. My pull-request targets HEAD of master in this project. Unless Victron cuts a new release of Venus OS with the latest and greatest of every component it's always aimed at the most recent beta version of theirs. To put it very bluntly, you're on 3.55 (latest release) and have just attempted to run |
f176251 to
28403a1
Compare
|
Hallo. "mount -o remount,rw / den Shelly Pro 3EM sehr gut zum laufen in Venus gebracht..... Wie wäre denn jetzt die Vorgehensweise bei dem Update auf Venus 3.50??? |
|
Download the |
Sorry etwas überfordert damit.... Irgendwie ein "Copy & Paste Befehl" für das ganze verfügbar ;-) |
28403a1 to
58ee0f5
Compare
|
It's not perfect but with my Shelly Pro 3EM (Monophase profile), i add this code : It's a shame that you can't assign a configuration for each phase. (In my case, L1 : Charge CA, L2 : PV, L3 : Grid) |
58ee0f5 to
d1728a7
Compare
|
For anyone coming here, this is the way I've currently used to apply this change after a VenusOS update:
|
|
In my case : |
|
I tried this with two Shelly 3EM Pro devices – one for the grid and one for the PV inverter. I got both Shellys integrated into Victron, and everything looks good in the Device List. However, VRM is not working very well. I can see both meters in VRM, but they both show the same values. What could be wrong, and is there any way to fix it? |
|
@markok12345 what does the device list look like in VRM? Do they have different VRM instance IDs? I only have a single meter and it looks like this, can you make a similar screenshot with both meters expanded? |
|
There is false productmodel for 3EM63. in code SPEM-003CEBEU63. i read productmode from my 3EM63W and get S3EM-003CXCEU63 working great after i chage that code i dont know if there is difference between 3EM63T and 3EM63W |
Not false, it's a different product. If you tell me that 3EM63T and 3EM63W works then I can add it but I have no way of testing it for the foreseeable future. |
3EM63W start working after i change SPEM-003CEBEU63 to S3EM-003CXCEU63 maybe it would be a good idea to add that meter to the code too |
d1728a7 to
937dcab
Compare
|
@jipski123 done. But please note and as already mentioned that I don't have that EM in my collection to verify anything. While adding it I also noticed that Shelly's website doesn't mention anything about Modbus support for this device. Flying blind here. |
937dcab to
71387f0
Compare
|
I've refined the implementation a little bit. It now enumerates the Shelly's EM components instead of essentially hard-coding them and handles the Monophase profile a lot better (cc @fcarlier). Added also the Power Factor. |
|
I updated from v3.54 to v3.64 some days ago and rebooted the cerbo at least 3-4 times since the update. My Shelly Pro3EM is detected and fully operational without any manual modifications from this PR, that I had to do after each upgrade before. |
|
I'm using this to read PV generation with a Shelly PRO EM-50 because this Shelly device was installed already to monitor solar in Home Assistant.
|
71387f0 to
973b689
Compare








Disclaimer: This PR is based on @Jalle19 work and he helped me to make it ultimately work. All glory goes to him!
This PR should add generic support for all Shelly Modbus EMs to dbus-modbus-client 1.58+ using just the dbus-modbus-client's own API. There is no custom code other than just defining the device. It's only a matter of enumerating them.