Skip to content
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

Shelly Pro 3EM support for dbus-modbus-client 1.58+ #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rkapsi
Copy link

@rkapsi rkapsi commented Sep 1, 2024

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.

Screenshot from 2024-09-01 11-30-00
Screenshot from 2024-09-01 11-28-48
Screenshot from 2024-09-01 11-29-08
Screenshot from 2024-09-01 11-29-23

@Dennis-LB
Copy link

@rkapsi Guide how to connect the Shelly Pro 3EM ?

@rkapsi
Copy link
Author

rkapsi commented Sep 12, 2024

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.

@Dennis-LB
Copy link

Dennis-LB commented Sep 12, 2024

@rkapsi Can't get it to work... have now tried 3.42 (latest release) and ran this --> #4 (comment)
But still nothing... might need to downgrade to 3.40 or .41 ... if possible

image

image

image

@rkapsi
Copy link
Author

rkapsi commented Sep 12, 2024

I'm sorry if this stuff is confusing but this PR only works with 3.50 and later (current beta).

@Dennis-LB
Copy link

Dennis-LB commented Sep 30, 2024

@rkapsi

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

@Jalle19
Copy link

Jalle19 commented Sep 30, 2024

If Victron would show some interest in merging this then maybe we wouldn't have to provide user support for years on end.

@rkapsi
Copy link
Author

rkapsi commented Sep 30, 2024

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

@rkapsi rkapsi force-pushed the rkapsi/shelly-pro-3em branch 2 times, most recently from 6a6c5cd to d348c85 Compare October 14, 2024 07:06
@rkapsi rkapsi changed the title Shelly Pro 3EM support for Venus OS 3.50+ Shelly Pro 3EM support for dbus-modbus-client 1.58+ Oct 14, 2024
@onceuponatime78
Copy link

I just recognized that with the latest 3.5034 (before that I had 3.5030 running) the rootfs became read-only and therefore its unfortunatly not straight forward again to patch this - this is especially a bit sad as the available way in venus via websocket is not working reliably. Did you guys figure out on how to patch this in anyhow?

@rkapsi
Copy link
Author

rkapsi commented Oct 20, 2024

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.

@onceuponatime78
Copy link

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

@rkapsi rkapsi force-pushed the rkapsi/shelly-pro-3em branch from d348c85 to a3d3f7d Compare October 31, 2024 04:25
@Jalle19
Copy link

Jalle19 commented Dec 25, 2024

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

@rkapsi rkapsi force-pushed the rkapsi/shelly-pro-3em branch from a3d3f7d to 43a3ed5 Compare December 26, 2024 22:45
@rkapsi rkapsi force-pushed the rkapsi/shelly-pro-3em branch from 43a3ed5 to 28eb26f Compare December 27, 2024 05:59
@rkapsi
Copy link
Author

rkapsi commented Dec 27, 2024

To whom it may concern I also added support for Shelly's Monophase profile.

@patrick-dmxc
Copy link

patrick-dmxc commented Jan 6, 2025

@rkapsi @Jalle19
Hi im whatching this since you opend the PR because i also did an Implementation of some Meters esp. of Janitza., which would allow it to Build ESS with mouch larger scale as all other supported Meters
And it seems like there is no interested in contribute of the Community for Implementing and/or keep 3rd-Party Meters in there Code.

@Jalle19
Copy link

Jalle19 commented Jan 6, 2025

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.

@rkapsi
Copy link
Author

rkapsi commented Jan 7, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants