V3.60~39 dbus mqtt devices not working - Scarthgap packages unavailable

That seems to do the trick!

@4000000067dae4202d6da574 INFO:device_manager:Received device status message {'clientId': 'EV', 'connected': 1, 'version': 'v2.3', 'services': {'Easee': 'evcharger'}}
@4000000067dae4202d9230ec INFO:device:**** Registering device: EV, services: {'Easee': 'evcharger'} ****
@4000000067dae4202d9af704 INFO:device:Registering Service evcharger for client EV
@4000000067dae4202da41ec4 INFO:device_service_config:About to open config file
@4000000067dae4210f01453c INFO:device_service:Registering service evcharger for client EV at path com.victronenergy.evcharger.mqtt_EV_Easee
@4000000067dae421185c2afc INFO:settingsdevice:Setting /Settings/Devices/mqtt_EV_Easee/ClassAndVrmInstance does not exist yet or must be adjusted
@4000000067dae4211eabb51c WARNING:vedbus:USING OUTDATED REGISTRATION METHOD!
@4000000067dae4211eb7da7c WARNING:vedbus:Please set register=False, then call the register method after adding all mandatory paths. See https://github.com/victronenergy/venus/wiki/dbus-api
@4000000067dae42120f8cdb4 INFO:vedbus:registered ourselves on D-Bus as com.victronenergy.evcharger.mqtt_EV_Easee
@4000000067dae42122a9d914 INFO:device_service:Registered Service com.victronenergy.evcharger.mqtt_EV_Easee under DeviceInstance 1
@4000000067dae42122cedda4 INFO:device_manager:publish {'portalId': '<<redacted>>', 'deviceInstance': {'Easee': 1}, 'topicPath': {'Easee': {'N': 'N/<<redacted>>/evcharger/1', 'R': 'R/<<redacted>>/evcharger/1', 'W': 'W/<<redacted>>/evcharger/1'}}} to device/EV/DBus, status is 0
@4000000067dae42a2d618014 INFO:device_manager:Received device status message {'clientId': 'EV', 'connected': 1, 'version': 'v2.3', 'services': {'Easee': 'evcharger'}}
@4000000067dae42a2d9040d4 INFO:device_manager:publish {'portalId': '<<redacted>>', 'deviceInstance': {'Easee': 1}, 'topicPath': {'Easee': {'N': 'N/<<redacted>>/evcharger/1', 'R': 'R/<<redacted>>/evcharger/1', 'W': 'W/<<redacted>>/evcharger/1'}}} to device/EV/DBus, status is 0
2 Likes

@jeroen, whilst I have your attention, can you point me to any documentation that descibes the “new” registration method? I’d like to get rid of this warning.

WARNING:vedbus:USING OUTDATED REGISTRATION METHOD!
WARNING:vedbus:Please set register=False, then call the register method after adding all mandatory paths. See dbus api · victronenergy/venus Wiki · GitHub

I realise the warning includes a link to a wiki, but I don’t see any mention of register=False on that page.

Hopefully they wont break it again…

I guess the warning says it all, pass register=False to the constructor and call the register method later when all things are setup.

I see this thread only now.
I experienced similar issue with dbus-mqttservices. See here how it was fixed incl the register=False part

4 Likes

Thanks

1 Like

Dear MartinJ,

Is it possible to have the above fix added to your great plugin?

appreciated!

Yes, it’s on my todo list.

2 Likes

You are the best!

Hi all,

I’m marking this thread as solved now. The highlights:

  1. the log in the question asked by @remco shows that opkg was trying to install packages from the release feed instead of the candidate feed. The solution is to, when running a beta version, always first run set-feed and thereafter run opkg:

So first:
/opt/victronenergy/swupdate-scripts/set-feed.sh candidate

And then:
opkg update

  1. For some time we didn’t have all packages available yet in the candidate feed, but that is solved now.

  2. Lastly, there are some changes needed to make dbus-mqtt-devices work properly, but that is not Victron software: hints on how to fix that are in below discussion.

All the best & success & enjoy, Matthijs.

1 Like

I’m looking into making the updates to dbus-mqtt-devices now, however I hit a problem that I can’t get around and I’m wondering if anyone else had this.

I have installed Venus OS Large 3.60-53 on my Raspberry Pi which I use for development. I have done the following steps:

  1. enable read/write on root fs,
  2. /opt/victronenergy/swupdate-scripts/set-feed.sh candidate
  3. opkg update

When I try to install PyYAML through pip or directly with pyyaml setup.sh I get errors about tomllib not being available.

        File "/var/volatile/tmp/pip-build-env-5k9_peut/overlay/lib/python3.12/site-packages/setuptools/config/pyprojecttoml.py", line 37, in load_file
          from ..compat.py310 import tomllib
        File "/var/volatile/tmp/pip-build-env-5k9_peut/overlay/lib/python3.12/site-packages/setuptools/compat/py310.py", line 7, in <module>
          import tomllib
      ModuleNotFoundError: No module named 'tomllib'
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

It looks like it installed enough for dbus-mqtt-devices to work, but getting errors during install is not great. (PyYaml includes a python yaml parser and a native c version, I assume this error was during compilation of the native C parser which isn’t needed for mqtt-dbus-devices)

Having looked into the error it could point to something more serious with the python distro in this version of VenusOS. tomllib has been included in the python standard library since Python 3.11. With VenusOS 3.60-53 we get python 3.12.9 so it should be there. tomllib is used by the the standard Python set up and build system so it’s fairly fundamental. For tomllib to be missing, I wonder what else is missing.

root@raspberrypi4:~# python3
Python 3.12.9 (main, Feb 4 2025, 14:38:38) [GCC 13.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tomllib
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'tomllib'

One of the ideas I was investigating to remove the external dependency of PyYaml was in fact to move to the toml file format for config files. But as it stands that’s not going to work either!

Has anyone else on this thread seen errors about missing tomllib?

In V3.60~39 dbus mqtt devices not working - Scarthgap packages unavailable - #28 by remco I encountered the same error and had to manually add the tomllib.

1 Like

For anyone following this thread, there is a new version of dbus-mqtt-devices that runs on Venus OS 3.60~59 and below. It’s a release candidate at the moment, but I will make a final release when Victron make a final release of Venus OS 3.60.

Please see: New release candidate v0.9.0-rc2 · freakent/dbus-mqtt-devices · Discussion #149 · GitHub

Thanks to everyone in the community who helped with this issue.

3 Likes

Excellent work! Thanks a lot, I’ll check it out later today.

@freakent I just installed the rc2 version and it runs perfect. After installation I did an upgrade from ~57 to ~59 and it’s still working fine. Great work, thanks!

1 Like

Nice!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.