User Tools

Site Tools


open_source:ccgx:d-bus

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Last revisionBoth sides next revision
open_source:ccgx:d-bus [2019-05-25 11:41] – [Basics] mvaderopen_source:ccgx:d-bus [2019-06-21 15:45] mvader
Line 150: Line 150:
  
 __ /Devices/… __ __ /Devices/… __
-The Devices object path is only used for products that operate in parallel mode. This object-path is used to access the underlying real products. Examples of products operating in parallel mode are VE.Bus products (Inverters, Multi’s, Quattro’s), Skylla-i’s and MPPT 150/70’s. The first device will report under /Devices/0/… , the second device under /Devices/1/…. Etcetera. When relevant this numbering is kept equal to bus numbering. For example MK2-addressing.+ 
 +Initially, the  Devices object path was intented for products that operate in parallel or group mode; and because of that had only one service on the D-Bus. The /Devices path could then be used to address them individually. Examples of products operating in parallel mode are VE.Bus products (Inverters, Multi’s, Quattro’s), Skylla-i’s and MPPT 150/70’s. The first device will report under /Devices/0/… , the second device under /Devices/1/…. Etcetera. When relevant this numbering is kept equal to bus numbering. For example MK2-addressing. 
 + 
 +Per 2019, this has changed: for solar chargers we are no longer grouping the data on one D-Bus service, instead each solar charger will go on the D-Bus with its own service. Still we use the /Devices path, but then to have a generic API to find all devices. This is used by the VregLink API: the mqtt-rpc vreg-device-list method scans each d-bus service for its entries on the /Devices sub-tree and returns the assembled data. 
 + 
 +Some examples:  
 + 
 +<code> 
 +vedirect_interface will publish only one entry per service.  
 + 
 +com.victronenergy.battery.ttyO2: 
 +/Devices/0/CustomName        my-bmv 
 +/Devices/0/DeviceInstance    258 
 +/Devices/0/FirmwareVersion   v2.06 
 +/Devices/0/ProductId         0x0201 
 +/Devices/0/ProductName       BMV-700 
 +/Devices/0/ServiceName       com.victronenergy.battery.ttyO2 
 +/Devices/0/VregLink          (API) 
 + 
 +vecan-dbus example, first item is a 1st generation solar charger (which has a grouped entry on D-Bus). and the second one a 2nd generation solar charger; which are all uniquely on D-Bus: 
 + 
 +com.victronenergy.vecan.can0: 
 +/Devices/2CC03E5D/CustomName        east-facing-array 
 +/Devices/2CC03E5D/DeviceInstance    0 
 +/Devices/2CC03E5D/FirmwareVersion   v1.02 
 +/Devices/2CC03E5D/Manufacturer      358                               <- from the nmea2000 standard. 
 +/Devices/2CC03E5D/Nad               123                               <- canbus network address. 
 +/Devices/2CC03E5D/ProductId         0x0301 
 +/Devices/2CC03E5D/ProductName       MPPT 150/60 Smart something. 
 +/Devices/2CC03E5D/Serial            0015965 HQ1905944QQ               <- we could consider splitting this up. 
 +/Devices/2CC03E5D/ServiceName       com.victronenergy.solarcharger.something 
 +/Devices/2CC03E5D/VregLink          (API) 
 +/Devices/3DD03E5D/CustomName        east-facing-array 
 +/Devices/3DD03E5D/DeviceInstance    0 
 +/Devices/3DD03E5D/FirmwareVersion   v2.04 
 +/Devices/3DD03E5D/Manufacturer      358 
 +/Devices/3DD03E5D/Nad               123 
 +/Devices/3DD03E5D/ProductId         0x0101 
 +/Devices/3DD03E5D/ProductName       MPPT 150/70 Smart something 
 +/Devices/3DD03E5D/Serial            0021124 HQ1250944QQ 
 +/Devices/3DD03E5D/VregLink          (API) 
 + 
 +Note that for the second entry, there is no ServiceName entered, since because of the grouping there is not necessarily a group item. 
 +</code> 
 + 
  
 __ /Interfaces/... __ __ /Interfaces/... __
open_source/ccgx/d-bus.txt · Last modified: 2019-07-04 11:17 by jhofstee

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki