User Tools

Site Tools


open_source:ccgx:commandline

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
open_source:ccgx:commandline [2018-07-17 14:26] – [5. VE.Direct products] mvaderopen_source:ccgx:commandline [2019-04-15 21:10] – [5. VE.Direct products] mvader
Line 3: Line 3:
 ===== 1. Introduction ===== ===== 1. Introduction =====
  
-This page explains how to change settings and/or update firmware for various Victron products which are connected to a Venus device, for example the Color Control GX, via the command line, ie ssh.+This page explains how to change settings and/or update firmware for various Victron products which are connected to a [[venus-os:start|Venus-device]], for example the Color Control GX, via the command line, ie ssh.
  
 For more software developer oriented command line tips & tricks, see [[https://github.com/victronenergy/venus/wiki/commandline-introduction|here]] on the Venus wiki. For more software developer oriented command line tips & tricks, see [[https://github.com/victronenergy/venus/wiki/commandline-introduction|here]] on the Venus wiki.
Line 132: Line 132:
 On that computer, open the file by double clicking it, make the modifications, and save the file again. On that computer, open the file by double clicking it, make the modifications, and save the file again.
  
-Then transfer the new file back onto the Venus device.+Then transfer the new file back onto the [[venus-os:start|Venus-device]].
  
 === Step 3. Writing the new settings to the system === === Step 3. Writing the new settings to the system ===
Line 155: Line 155:
 Updating a MultiGrid and also a MultiPlus-II is not (yet) possible with vbdup. Updating a MultiGrid and also a MultiPlus-II is not (yet) possible with vbdup.
  
-Make sure that the Venus device (fe. CCGX), as well as routers or any other used communications equipment, are __not__ powered by the VE.Bus devices. If they are, you'll lose power and connection as soon as the update is started, resulting in a dead system.+Make sure that the [[venus-os:start|Venus-device]] (fe. CCGX), as well as routers or any other used communications equipment, are __not__ powered by the VE.Bus devices. If they are, you'll lose power and connection as soon as the update is started, resulting in a dead system.
  
 The product that you want to update needs to have application firmware running: just bootloader is not enough. The update starts with requesting the hardware IDs (VE.Bus discovery) from the running application. Those hardware IDs are then used to address the VE.Bus devices once in bootloader mode. After the discovery, the hardware IDs aare stored in a file. In case, for example because of a power loss, the update fails, vbdup will automatically use the hardware IDs stored in that file. The product that you want to update needs to have application firmware running: just bootloader is not enough. The update starts with requesting the hardware IDs (VE.Bus discovery) from the running application. Those hardware IDs are then used to address the VE.Bus devices once in bootloader mode. After the discovery, the hardware IDs aare stored in a file. In case, for example because of a power loss, the update fails, vbdup will automatically use the hardware IDs stored in that file.
Line 284: Line 284:
 Querying devices Querying devices
 Update end send Update end send
 +</code>
 +
 +==== 4.4 vreg: changing settings from the command line ====
 +
 +<code>
 +# vreg --help
 +vreg - Victron registers
 +
 +  -b,--bin
 +   Output in binary format.
 +
 +  -g,--get
 +   Get a register.
 +
 +  -n,--nad
 +   The NAD of the target device.
 +
 +  -r,--run
 +   Keep running.
 +
 +  -s,--set
 +   Set a register. Data is set with e.g. un16:2800 un16:12
 +
 +COMMON OPTIONS:
 +
 +  -c, --canbus
 +   Specifies the CAN-bus interface to use, formatted as [driver]:[channel].
 +   kvaser:1 will for example select the first Kvaser channel.
 +   -c ? will list the available gateways.
 +
 +  -d, --dump
 +   Dump the contents of the CAN bus frames. Specifying multiple times increases verbosity.
 +
 +  -h, --help
 +   Print this help.
 +
 +  --log-before <count>
 +   When set to non zero <count> number of log lines, which are
 +   not enabled themselves, are nevertheless shown before an
 +   log which is enabled. For example an error message will be
 +   preceeded by <count> warning and info messages which occured
 +   before the error. Combined with -v also warning messages will
 +   be preceeded by info messages
 +
 +  --log-after <count>
 +   Like -log-before, but temporarily enables tracing of disabled messages
 +   after a warning or error occured.
 +
 +  --silent
 +   Only listen, no messages or acks are sent
 +
 +  -v --verbose
 +   Enable log messages. Specifying multiple times increases verbosity.
 +
 +Victron Energy B.V.
 </code> </code>
 ===== 5. VE.Direct products ===== ===== 5. VE.Direct products =====
  
-List all services running:+==== 5.1 See connected devices ====
  
-  svstat /service/*+<code> 
 +svstat /service/| grep vedirect    
 +/service/vedirect-interface.ttyO2: up (pid 2020) 1210220 seconds, normally down 
 +/service/vedirect-interface.ttyO4: up (pid 2105) 1210218 seconds, normally down 
 +</code>
  
-Look for the product that you want to update, and claim the serial port:+==== 5.2 Firmware update ==== 
 + 
 +First stop the driver:
  
   /opt/victronenergy/serial-starter/stop-tty.sh /dev/ttyUSB0   /opt/victronenergy/serial-starter/stop-tty.sh /dev/ttyUSB0
Line 322: Line 383:
   /opt/victronenergy/serial-starter/start-tty.sh /dev/ttyUSB0   /opt/victronenergy/serial-starter/start-tty.sh /dev/ttyUSB0
  
 +==== 5.3 Changing settings & other remote commands ====
 +
 +See here: https://github.com/victronenergy/venus/wiki/dbus-api.
 +
 +That API allows to read and write VREGs. See MPPT, BMV and other HEX Protocol documents on our white paper section on the website for more information. Once you understood it all; its possible to reset a BMV too 100% with a one liner from the command line, ie "dbus -y com.victronenergy.battery.ttyO1 [find the right path] SetVreg [VREG] [DATA].
 +
 +The API will be used for a feature thats in progress: remotely changing settings of MPPTs, BMVs and other products connected to a GX device on the internet.
 ===== 6. Screenshot ===== ===== 6. Screenshot =====
  
open_source/ccgx/commandline.txt · Last modified: 2023-05-07 10:00 by mvader

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki