Marv2190 / Victron_DummyMeter_NodeRed

With this DummyMeter you can use every Datasource NodeRed support to publish Data to Victron Dbus (Gridmeter)
GNU General Public License v3.0
0 stars 0 forks source link

missing instrucktions #1

Closed SimRaSon closed 2 months ago

SimRaSon commented 2 months ago

I could not get this to the end, since some commands are unlcear:

Add a symlink to the file /data/rc.local:

Is that (still) working with current VenusOS 3.34 (on Cerbo GX) ?

It was possible to see the device in devicelist of the CerboGx, but not in the system overview. While the script was running manually, it was also possible to send data from NodeRed to DummyMeter..

Could you also specify the following ?

Am besten dann in crontab den Befehl ln -s /data/DummyGridMeter/service /service/DummyGridMeter nach reboot ausführen lassen! @reboot ln -s "/data/DummyGridMeter/service" "/service/DummyGridMeter"

Marv2190 commented 2 months ago

Hi, yes this works with no Problems on the newest OS. What are you trying? PV Inverter? Or Grid?

The last bit is to add the symlink into Cron because after reboot the simlink will be deletet (because of a later mount up). So it needs to be renewed.

SimRaSon commented 2 months ago

image image2

I have tried the PV-Inverter settings. I have also tried to add a VRM instance number (just copy out of another project) without success...

The symlink is doing what exactly ? unfortunately knowledge is not that deep.

How do I identify what went wrong at my installation ?

Thanks and BR / Simon

Marv2190 commented 2 months ago

Without the Symlink the Script doenst run (istn registered as a Service). But you can for now run it manually.

Iam not at home right now, but it feels weird to see a positiv Ampere and a negative Wattage. But anyway, it should be displayed.

You did edit the DummyGridMeter.py, right? self._dbusservice.add_path('/Role', "grid") self._dbusservice.add_path('/ProductId', 45069) ?

As iam not at home, can you try servicename='com.victronenergy.grid.cgwacs_ttyUSB99_mb1', to change to servicename='com.victronenergy.pvinverter.cgwacs_ttyUSB99_mb1

SimRaSon commented 2 months ago

I have some new informations: I did everything again with basic settings (as grid meter), and it worked. Probably I would not have noticed it at the first time, since I have already a grid meter in use. But all values in the overview of the remote console went to 0. so for replacement of the EM24 it would work.

then I changed the role=pvinverter ProductID=0xA144 and also servicename='com.victronenergy.pvinverter.cgwacs_ttyUSB99_mb1

it is visible in the device list but not in the overview.

I guess the AC-Position is missing to show up correctly ?

SimRaSon commented 2 months ago

yes indeed, I have added this line below self._dbusservice.add_path('/Position',0) # Available Postions: 0 = AC, 1 = AC-Out 1, AC-Out 2

Now just need to add VRM instance.. because currently it is "0"

SimRaSon commented 2 months ago

image image

out of my config file:

    # Create the mandatory objects
    self._dbusservice.add_path('/DeviceInstance', 34)
    self._dbusservice.add_path('/ProductId',0xA144) # value used in ac_sensor_b                                                        >
    self._dbusservice.add_path('/ProductName', productname)
    self._dbusservice.add_path('/CustomName', productname)
    self._dbusservice.add_path('/Latency', None)
    self._dbusservice.add_path('/FirmwareVersion', 0.1)
    self._dbusservice.add_path('/DeviceType', 345)
    self._dbusservice.add_path('/Role', "pvinverter") # grid , pvinverter , gen                                                        >
    self._dbusservice.add_path('/HardwareVersion', 0)
    self._dbusservice.add_path('/Position',0)
    self._dbusservice.add_path('/Connected', 1)
    self._dbusservice.add_path('/Serial', 123456789)

    for path, settings in self._paths.items():
      self._dbusservice.add_path(
        path, settings['initial'], writeable=True, onchangecallback=self._handl                                                        >

  def _handlechangedvalue(self, path, value):
    logging.debug("someone else updated %s to %s" % (path, value))
    return True # accept the change

def main():
  logging.basicConfig(level=logging.DEBUG) # use .INFO for less logging
  thread.daemon = True # allow the program to quit

  from dbus.mainloop.glib import DBusGMainLoop
  # Have a mainloop, so we can send/receive asynchronous calls to and from dbus
  DBusGMainLoop(set_as_default=True)

  pvac_output = DbusDummyService(
    servicename='com.victronenergy.pvinverter.cgwacs_ttyUSB99_mb1',

Thank you very much for your help!

Marv2190 commented 2 months ago

Thank you for debuggin! I need to place the variable better. Will look into it soon. Thank you!