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 [2017-08-01 15:06] – [2.3 Venus v1.74 and before] mvaderopen_source:ccgx:commandline [2021-03-03 11:46] – [4.4 vreg: changing settings from the command line] mvader
Line 1: Line 1:
-====== Venus command-line manual ======+====== Venus OS operational commandline manual ======
  
 ===== 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.+This page explains how to change settings and/or update firmware for various Victron products which are connected to a [[venus-os:start|GX 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.+This document is part of the Venus OS developer documentation. The main document is [[https://github.com/victronenergy/venus/wiki|the Venus OS wiki on github]].
  
-Note regarding supportbelow documentation are made available to be convenient onlyThere is no guaranteed support on this type of using out products.+For more software developer oriented command line tips & tricks, see [[https://github.com/victronenergy/venus/wiki/commandline-introduction|the Venus OS commandline manual for software development]] on the Venus wiki. 
 +==== 1.1 No support warning ====
  
-==== 1.Use a normal tool instead of the command line ====+Note regarding support: this document is made available for convenience only. There is no support on this type of using our products. Using the command line is outside normal use; 
 + 
 +In case of questions, you can use the [[https://groups.google.com/forum/#!forum/victron-dev-venus|Venus developers mailing list]], or the [[https://community.victronenergy.com/spaces/31/index.html|modifications space on Victron Community]]. 
 + 
 +Our support staff on all official channels, Disqus and elsewhere, does not know how these tools can be used. 
 +==== 1.Use a normal tool instead of the command line ====
  
 It is not at all necessary to use below command line instructions. We have far easier to use normal computer applications available: It is not at all necessary to use below command line instructions. We have far easier to use normal computer applications available:
Line 17: Line 23:
 Changing settings with products featuring a VE.Bus comm. port (Inverters, Multis and Quattros) is normally done with VEConfigure. Changing settings with products featuring a VE.Bus comm. port (Inverters, Multis and Quattros) is normally done with VEConfigure.
  
-Firmware updates are normally done with VEFlash, a computer tool that is installed together with VEConfigure.+Firmware updates are normally done with VEFlash, a computer tool that is installed together with VEConfigure, or VictronConnect.
  
-To change settings remotely, use [[ccgx:ccgx_ve_power_setup|Remote VEConfigure]].+To change settings remotely, use  [[vrm_portal:remote-veconfigure|Remote VEConfigure.]]
  
 Remotely updating firmware of a VE.Bus product is only possible from the command line, see below. Remotely updating firmware of a VE.Bus product is only possible from the command line, see below.
Line 33: Line 39:
 Both firmware updating as well as changing settings is normally done with [[victronconnect:start|VictronConnect]]. Both firmware updating as well as changing settings is normally done with [[victronconnect:start|VictronConnect]].
  
-It is not possible to remotely change settings. Neither from the command line.+[[https://www.victronenergy.com/media/pg/VictronConnect_Manual/en/victonconnect-remote--vc-r----configuration-and-monitoring-via-vrm.html|VictronConnect Remote]] allows remote changing of settings. It is not available from the command line.
  
-Updating firmware remote is only possible from the command line, see below.+Updating firmware remotely is available via the [[vrm_portal:remote-firmware-update|Remote Firmware Update feature of VRM]] (in the device list), and via the command line, see below.
  
-==== 1.Connecting to the command line and file transfer ====+==== 1.Connecting to the command line and file transfer ====
  
 See the [[ccgx:root_access|ccgx root access page]] for an explanation on how to connect to the command line. See the [[ccgx:root_access|ccgx root access page]] for an explanation on how to connect to the command line.
Line 47: Line 53:
 Check firmware version: Check firmware version:
 <code> <code>
-root@CCGX:~# cat /opt/color-control/version+root@CCGX:~# cat /opt/victronenergy/version
 v2.06 v2.06
 Color Control GX Color Control GX
Line 59: Line 65:
 ==== 2.2 Venus v2.00 and later ==== ==== 2.2 Venus v2.00 and later ====
  
-Checking for updates and triggering a new update is all done with /opt/victronenergy/swupdate/checkupdate.sh.+Checking for updates and triggering a new update is all done with /opt/victronenergy/swupdate/check-updates.sh.
  
 For an introduction, run ''checkupdate.sh -help''. For more details, read [[https://github.com/victronenergy/meta-victronenergy/blob/master/meta-venus/recipes-support/swupdate-scripts/files/check-updates.sh|its code]]. For an introduction, run ''checkupdate.sh -help''. For more details, read [[https://github.com/victronenergy/meta-victronenergy/blob/master/meta-venus/recipes-support/swupdate-scripts/files/check-updates.sh|its code]].
Line 65: Line 71:
  
 ==== 2.3 Venus v1.74 and before ==== ==== 2.3 Venus v1.74 and before ====
 +
 +=== Updating to v2.00 and later ===
 +This needs to be done with an sdcard. There is no other way. See instructions here:
 +
 +https://www.victronenergy.com/live/ccgx:firmware_upgrade_to_v2
  
 === Updating Venus version === === Updating Venus version ===
Line 122: Line 133:
 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|GX device]].
  
 === Step 3. Writing the new settings to the system === === Step 3. Writing the new settings to the system ===
Line 133: Line 144:
  
 ==== 3.2 Updating VE.Bus firmware === ==== 3.2 Updating VE.Bus firmware ===
 +
 +WARNING: At Victron we don't use this tool. Part of the code is shared with the VE.Bus firmware update functionality in VictronConnect, and therefore proven. But not all. So use at you're own risk.
  
 Requires Venus v2.00 or later. Requires Venus v2.00 or later.
Line 143: Line 156:
 Updating other VE.Bus devices, such as the VE.Bus BMS and Digital Multi Control panels is not possible with vbdup. Updating other VE.Bus devices, such as the VE.Bus BMS and Digital Multi Control panels is not possible with vbdup.
  
-Make sure that the Venus device (fe. CCGX), nor the routers or any other used communications equipment, is 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.+Updating a MultiGrid and also a MultiPlus-II is not (yet) possible with vbdup. 
 + 
 +Make sure that the [[venus-os:start|GX 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 273: Line 288:
 Update end send Update end send
 </code> </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>
 +
 +Switching all devices on VE.Can off (careful, when having NMEA2000-out enabled, or having an Inverter RS, also AC will be switched off!):
 +<code>
 +vreg -c socketcan:can0 -s 0x0200 un32:0x000004
 +</code>
 +
 +switching a specific device off:
 +<code>
 +vreg -c socketcan:can0 -s 0x0200 un32:0x000004 -n 0x24
 +</code>
 +Note that in above example the VREG data field (un32) is padded with zeros; current firmware requires that, future fw won't any more.
 +
 +Switch a specific device on:
 +<code>
 +vreg -c socketcan:can0 -s 0x0200 un32:0x000001 -n 0x24
 +</code>
 +
 +Seeing which devices are off and which are on goes like this. Press ctrl-C to stop the command.
 +<code>
 +vreg -c socketcan:can0 -g 0x200 -r
 +</code>
 +
 ===== 5. VE.Direct products ===== ===== 5. VE.Direct products =====
  
-First make sure to stop the serial starter:+==== 5.1 See connected devices ====
  
-  svc -d /service/serial-starter +<code> 
-   +# svstat /service/* | grep vedirect    
-List all services running:+/service/vedirect-interface.ttyO2: up (pid 2020) 1210220 seconds, normally down 
 +/service/vedirect-interface.ttyO4up (pid 2105) 1210218 seconds, normally down 
 +</code>
  
-  svstat /service/* +==== 5.2 Firmware update ==== 
-   + 
-Look for the product you and to update, and stop that service as well:+First stop the driver:
  
-  svc -d /service/vedirect.ttyO2  (for example)+  /opt/victronenergy/serial-starter/stop-tty.sh /dev/ttyUSB0
      
 Then update the product: Then update the product:
Line 310: Line 404:
 </code> </code>
  
-and when done, start the service and the serial-starter again:+and when done, release the tty back to the serial-starter:
  
-  svc -u /service/vedirect.ttyO2 +  /opt/victronenergy/serial-starter/start-tty.sh /dev/ttyUSB0
-  svc -u /service/serial-starter+
  
 +==== 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 =====
  
Line 337: Line 437:
     - <code>dbus -y com.victronenergy.settings /Settings/Services/Vrmpubnub SetValue 1</code>     - <code>dbus -y com.victronenergy.settings /Settings/Services/Vrmpubnub SetValue 1</code>
   - VE.Configure should now be able to connect to the CCGX   - VE.Configure should now be able to connect to the CCGX
-===== DISQUS ===== +
-~~DISQUS~~+
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