open_source:ccgx:commandline
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
open_source:ccgx:commandline [2016-12-22 10:04] – [8. Enabling VRM two-way communication (Remote VEConfigure aka vrmpubnub)] mvader | open_source:ccgx:commandline [2021-03-06 14:38] – [8. Enabling VRM two-way communication (Remote VEConfigure aka vrmpubnub)] mvader | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Venus command-line | + | ====== Venus OS operational commandline |
===== 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: |
- | For more software | + | This document is part of the Venus OS developer |
- | ==== 1.1 Use a normal tool instead of the command line ==== | + | For more software developer oriented command line tips & tricks, see [[https:// |
+ | ==== 1.1 No support warning | ||
- | Note that it is not at all necessary to use below command line instructions. We have far easier to use normal computer applications available: | + | 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:// | ||
+ | |||
+ | Our support staff on all official channels, Disqus and elsewhere, does not know how these tools can be used. | ||
+ | ==== 1.2 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: | ||
=== VE.Bus products (Inverters, Multis, Quattros) === | === VE.Bus products (Inverters, Multis, Quattros) === | ||
Line 15: | 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 31: | Line 39: | ||
Both firmware updating as well as changing settings is normally done with [[victronconnect: | Both firmware updating as well as changing settings is normally done with [[victronconnect: | ||
- | It is not possible to remotely change settings. Neither | + | [[https:// |
- | Updating firmware | + | Updating firmware |
- | ==== 1.2 Connecting to the command line and file transfer ==== | + | ==== 1.3 Connecting to the command line and file transfer ==== |
See the [[ccgx: | See the [[ccgx: | ||
Line 43: | Line 51: | ||
===== 2. Venus software updates ===== | ===== 2. Venus software updates ===== | ||
- | ==== 2.1 Checking current | + | Check firmware |
< | < | ||
- | root@CCGX: | + | root@CCGX: |
- | v1.74 | + | v2.06 |
Color Control GX | Color Control GX | ||
201612090913 | 201612090913 | ||
</ | </ | ||
- | ==== 2.2 Updating Venus version | + | Then to update, this depends on which version |
- | To trigger an update check, run | + | See [[ccgx: |
+ | |||
+ | ==== 2.2 Venus v2.00 and later ==== | ||
+ | |||
+ | Checking for updates and triggering a new update is all done with / | ||
+ | |||
+ | For an introduction, | ||
+ | |||
+ | |||
+ | ==== 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:// | ||
+ | |||
+ | === Updating Venus version === | ||
+ | To trigger an update check, run: | ||
< | < | ||
Line 59: | Line 84: | ||
</ | </ | ||
- | If there are new updates found, and if the GUI is running and automatic updates are enabled, the GUI will automatically initiate an update followed by a reboot. Otherwise, trigger the installation yourself with | + | If there are new updates found, and if the GUI is running and automatic updates are enabled, the GUI will automatically initiate an update followed by a reboot. Otherwise, trigger the installation yourself with: |
< | < | ||
Line 67: | Line 92: | ||
To change the Update-to setting, use set-feed.sh. | To change the Update-to setting, use set-feed.sh. | ||
- | ==== 2.3 Automatic | + | === Automatic |
To check if the device is configured to automatically update, query / | To check if the device is configured to automatically update, query / | ||
< | < | ||
Line 108: | Line 133: | ||
On that computer, open the file by double clicking it, make the modifications, | On that computer, open the file by double clicking it, make the modifications, | ||
- | Then transfer the new file back onto the Venus device. | + | Then transfer the new file back onto the [[venus-os: |
=== Step 3. Writing the new settings to the system === | === Step 3. Writing the new settings to the system === | ||
Line 119: | 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, | ||
Requires Venus v2.00 or later. | Requires Venus v2.00 or later. | ||
Line 129: | 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), | + | Updating a MultiGrid and also a MultiPlus-II is not (yet) possible with vbdup. |
+ | |||
+ | Make sure that the [[venus-os: | ||
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 241: | Line 270: | ||
< | < | ||
- | vreg -n 0x10 -s 4 | + | vreg -n 0x24 -s 4 |
+ | </ | ||
+ | |||
+ | ==== 4.3 Restarting a VE.Can device ==== | ||
+ | |||
+ | A bit of a trick: below code first sets them to bootloader mode, and then back out of it: | ||
+ | |||
+ | < | ||
+ | root@ccgx: | ||
+ | Querying devices | ||
+ | Found device, enabling UDF. | ||
+ | UDF is ready to accept update. | ||
+ | Udf enabled, update can begin. | ||
+ | |||
+ | root@ccgx: | ||
+ | Querying devices | ||
+ | Update end send | ||
+ | </ | ||
+ | |||
+ | ==== 4.4 vreg: changing settings from the command line ==== | ||
+ | |||
+ | < | ||
+ | # vreg --help | ||
+ | vreg - Victron registers | ||
+ | |||
+ | -b,--bin | ||
+ | | ||
+ | |||
+ | -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 | ||
+ | | ||
+ | | ||
+ | -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 < | ||
+ | When set to non zero < | ||
+ | not enabled themselves, are nevertheless shown before an | ||
+ | log which is enabled. For example an error message will be | ||
+ | | ||
+ | | ||
+ | be preceeded by info messages | ||
+ | |||
+ | --log-after < | ||
+ | Like -log-before, | ||
+ | after a warning or error occured. | ||
+ | |||
+ | --silent | ||
+ | Only listen, no messages or acks are sent | ||
+ | |||
+ | -v --verbose | ||
+ | | ||
+ | |||
+ | Victron Energy B.V. | ||
+ | </ | ||
+ | |||
+ | Switching all devices on VE.Can off (careful, when having NMEA2000-out enabled, or having an Inverter RS, also AC will be switched off!): | ||
+ | < | ||
+ | vreg -c socketcan: | ||
+ | </ | ||
+ | |||
+ | switching a specific device off: | ||
+ | < | ||
+ | vreg -c socketcan: | ||
+ | </ | ||
+ | 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: | ||
+ | < | ||
+ | vreg -c socketcan: | ||
+ | </ | ||
+ | |||
+ | Seeing which devices are off and which are on goes like this. Press ctrl-C to stop the command. | ||
+ | < | ||
+ | vreg -c socketcan: | ||
</ | </ | ||
===== 5. VE.Direct products ===== | ===== 5. VE.Direct products ===== | ||
- | First make sure to stop the serial starter: | + | ==== 5.1 See connected devices ==== |
- | | + | < |
- | + | # svstat /service/* | grep vedirect | |
- | List all services running: | + | /service/vedirect-interface.ttyO2: |
+ | / | ||
+ | </ | ||
- | svstat /service/* | + | ==== 5.2 Firmware update ==== |
- | + | ||
- | Look for the product you and to update, and stop that service as well: | + | First stop the driver: |
- | | + | /opt/victronenergy/ |
| | ||
Then update the product: | Then update the product: | ||
Line 281: | Line 404: | ||
</ | </ | ||
- | and when done, start the service and the serial-starter | + | and when done, release |
- | | + | /opt/victronenergy/ |
- | svc -u /service/ | + | |
+ | ==== 5.3 Changing settings & other remote commands ==== | ||
+ | |||
+ | See here: https:// | ||
+ | |||
+ | 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 302: | Line 431: | ||
- If you want to set a password, go to Settings -> Remote Console -> Enable password check | - If you want to set a password, go to Settings -> Remote Console -> Enable password check | ||
- | ===== 8. Enabling VRM two-way communication (Remote VEConfigure aka vrmpubnub) ===== | ||
- | If you have a CCGX already installed, but VRM two-way communication is not enabled, follow these steps to enable it remotely: | ||
- | - SSH into CCGX (make a root password by following instructions [[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