User Tools

Site Tools


venus-os:large

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
venus-os:large [2021-01-18 15:04] – [5.4 First use & configuring] stefanievenus-os:large [2024-03-03 12:38] (current) – [8.1 Disk space issues / data partition full] mvader
Line 1: Line 1:
 ====== Venus OS Large image: Signal K and Node-RED ====== ====== Venus OS Large image: Signal K and Node-RED ======
 +===== 1. Introduction =====
  
-(DRAFT - THIS DOCUMENT IS ABOUT NOT YET COMPLETELY FINISHED FUNCTIONALITY) 
  
-===== 1Introduction =====+This manual documents Venus OS Large. Venus OS is the the software running on our [[https://www.victronenergy.com/panel-systems-remote-monitoring/cerbo-gx|Cerbo GX monitoring device]] as well as other GX devices. Venus OS Large is an extended version of the common software, adding [[https://nodered.org/|Node-RED]] and [[https://www.npmjs.com/package/signalk-server|Signal K server]].
  
-==== 1.1 Venus OS Large, Node-RED and Signal K server? ==== +**Node-RED** offers PLC like programming for connecting hardware devices, APIs and online services. It provides a browser-based editor that makes it easy to wire together flows. With it, one can for example program a functionality such as activating a relay based on a temperature measurement combined with time. Or make far more complex algorithms, tying relays, measurements, or other data available from Venus OS or elsewhere together. All without having to write real source codeNode-RED is also called Low-code programming for event-driven applications.
-This manual documents Venus OS Large, an extended build of Venus OS, that adds [[https://nodered.org/|Node-RED]] and [[https://www.npmjs.com/package/signalk-server|Signal K server]]. +
- +
-**Node-RED** is a tool for connecting hardware devices, APIs and online services in new and interesting ways. It provides a browser-based editor that makes it easy to wire together flows. With it, one can for example program a functionality such as activating a relay based on a temperature measurement. Or make far more complex algorithms, tying relays, measurements, or other data available from Venus OS or elsewhere together. All without having to write real source code, as Node-RED calls Low-code programming for event-driven applications.+
  
 Also Node-RED features a [[https://flows.nodered.org/node/node-red-dashboard|fully customisable dashboard]], viewable in a webbrowser - both locally but also remotely, via the VRM Servers. Also Node-RED features a [[https://flows.nodered.org/node/node-red-dashboard|fully customisable dashboard]], viewable in a webbrowser - both locally but also remotely, via the VRM Servers.
  
 +To get a good idea of its possibilities, see our [[https://github.com/victronenergy/node-red-contrib-victron/wiki/Example-Flows|example flows]].
  
-**Signal K server** is aimed for yachts, and multiplexes data from NMEA0183, NMEA 2000, Signal K and other sensor inputs. It makes all that data available for Apps, such as [[https://www.wilhelmsk.com/|WilhelmSK]], highly customizable boat instrument displayThe [[https://www.victronenergy.com/blog/2019/06/13/sailing-with-signal-k/|Sailing with Signal K blogpost on our website]] is a great read for more information and ideas.+**Signal K server** Signal K Server is a server application that runs on a central hub in a boat; in this case a Victron GX deviceA few of its most used features are:
  
-==== 1.2 Status and where this development is going ====+  - WiFi navigation and AIS data server to charting apps such as iSailor, Navionics, iNavX, Aqua Map. 
 +  - The perfect Anchor alarm, for features and details see [[https://demo.signalk.org/documentation/features/anchoralarm/anchoralarm.html|Signal K docs -> Anchor alarm]]. 
 +  - Automatic log book 
 +  - Serve full featured marine instrumentation package such as the iOS [[https://www.wilhelmsk.com/|WilhelmSK App]] or [[https://github.com/mxtommy/Kip#readme|KIP]].
  
-Currently, these images are available as beta versionsThey work well, several users are using this without any issues; and are super happy with the provided functionality.+The [[https://demo.signalk.org/documentation/|the official Signal K documentation]] provides more information about Signal K itself. Note that many of the information about how to install Signal K does not apply: it comes pre-installed on the Victron GX devices when installing Venus OS Large.
  
-The remaining work are mostly small improvementsclean ups and testing.+For more information on Signal K on Venus OSsee below chapter.
  
-There will be two flavours of Venus OS to install: 
  
-  - the normal one as we've been building for years now. With all normal & supported functionality. 
-  - the large flavour. All the same as the normal one, but with addition of Signal K & Node-RED. 
  
-Switching between them will be easy: a simple switch in the gui. Updating will be easy as well, the online updates will work, just like they do now for the normal images.+===== 2Where to find support =====
  
-For now not that easy yet: installing and updating is done using the offline install method: with usb stick or sd-card.+There is and will be no official support on the functionalities of Venus OS large.
  
-Why not keep it all in one like it has been until now? To save download and install time for the (vast majority) of users that will not use these features. These new features increase the download (& installed) size enormouslyand also they are really cool; but do not fall within normal Victron support. Which is why we want to keep them separate. +For supportturn to the [[https://community.victronenergy.com/spaces/31/index.html|Modifications Space on Victron Community]] and/or the [[https://community.victronenergy.com/smart-spaces/71/node-red.html|Node-RED Space on Victron Community]].
- +
-More details of the development status here: +
- +
-  * https://github.com/victronenergy/venus/issues/378 +
-  * https://github.com/SignalK/signalk-server-node/issues/517 +
- +
-===== 2Where to find support =====+
  
-There is and will be **no official support** on the functionalities included in this imageFor supportturn to the [[https://community.victronenergy.com/spaces/31/index.html|Modifications Space on Victron Community]].+There, first search if someone else had a similar question alreadyAnd if you can’t find suchthen create a new question. Make sure you add Node-RED to the topic.
  
 +For support on SignalK, there is a #victron channel in [[http://slack-invite.signalk.org/|the SignalK Slack]] workspace.
 ===== 3. Requirements ===== ===== 3. Requirements =====
  
 ==== 3.1 GX Device compatibility ==== ==== 3.1 GX Device compatibility ====
  
-compatible GX device:+The compatible GX devices are:
  
 +  * Ekrano GX
   * Cerbo GX   * Cerbo GX
-  * Venus GX (serial number HQ1842 or later, or upgraded to the large partition layout - more information in Appendix A)+  * Cerbo-S GX 
 +  * Venus GX
   * Octo GX   * Octo GX
   * MultiPlus-II GX   * MultiPlus-II GX
   * EasySolar-II GX   * EasySolar-II GX
-The CCGX and CanVU GX are unfortunately not able to run Venus OS Large.+ 
 + 
 +The Color Control GX (CCGX) as well as the CanVU GX are unfortunately not able to run Venus OS Large.
  
 Venus OS large is also available for certain RaspberryPi models. Installation files below, and installation & other raspberrypi specific instructions [[https://github.com/victronenergy/venus/wiki/raspberrypi-install-venus-image|here]]. Venus OS large is also available for certain RaspberryPi models. Installation files below, and installation & other raspberrypi specific instructions [[https://github.com/victronenergy/venus/wiki/raspberrypi-install-venus-image|here]].
Line 58: Line 54:
 ==== 3.2 CPU & Memory resources ==== ==== 3.2 CPU & Memory resources ====
  
-Both SignalK as well as Node-red are rather resource intensive software applications to run on the GX Device. From a CPU usage point of view as well as RAM memory.+Both SignalK as well as Node-RED are rather resource intensive software applications to run on the GX Device. From a CPU usage point of view as well as RAM memory.
  
 Ofcourse, how intensive depends on what kind of flows (node-red) or how many messages & handling of them (SignalK) happens in the system. Ofcourse, how intensive depends on what kind of flows (node-red) or how many messages & handling of them (SignalK) happens in the system.
  
-From a GX device point of view, from the support models the Venus GX is the one with the least resources. Running both SignalK and Node-RED at the same time will be "pushing it" to say it simply.+From a GX device point of view, from the support models the Venus GX is the one with the least resources. Running both SignalK and Node-RED at the same time will be "pushing it" to say it simply. The Cerbo GX is already much faster, as it has a dual core CPU as well as much more RAM. More details about CPU & RAM differences are in this document: https://github.com/victronenergy/venus/wiki/machines.
  
-Cerbo GX is already much faster, as it has a dual core CPU as well as much more RAM.+When running out of RAM or CPU, the device will slow down. And eventually also reboot by itself due to the watchdog.
  
-More details about CPU & RAM differences are in this document: https://github.com/victronenergy/venus/wiki/machines.+===== 3How to install and update =====
  
-When running out of RAM or CPU, the device will slow down. And eventually also reboot by itself due to the watchdog.+=== Step 1Preparations ===
  
-===== 3How to install =====+  * __Cerbo GX__ - No preparations required. 
 +  * __Venus GX__ - First install & boot v2.73,or a later version. And only thereafter install Venus OS Large. The reason for this is to make sure the partitioning of the flash is per requirements of Venus OS Large. 
 +  * __MultiPlus-II GX__ - No preparations required. 
 +  * __EasySolar-II GX__ - No preparations required. 
 +  * __RaspberryPi 3__ - No preparations required. 
 +  * __RaspberryPi 4__ - No preparations required.
  
-=== Step by step instructions ===+Note, when installing on a RaspberryPi, do make sure to familiarise with [[https://github.com/victronenergy/venus/wiki/raspberrypi-install-venus-image|the Venus OS for raspberrypi documentation]] as well.
  
-  * **Step 1.** (For Venus GX-es with a serial number below HQ1842 only) - first perform the procedure as explained in Appendix A below. Warning, that procedure can only be carried  out by technical skilled persons. +=== Step 2. Update to the latest firmware version (v2.90 or later) ===
-  * **Step 2.** Disable Auto updates. See Settings -> Firmware -> Online updates in Remote Console. +
-  * **Step 3.** Download the latest Venus-OS Large image from the last comments on [[https://github.com/victronenergy/venus/issues/378|this issue]]. +
-  * **Step 4.** Install that file using the [[ccgx:firmware_updating|GX Offline install method]]. Requires a USB-stick or Micro SD-Card. +
-  * **Step 5.** Verify that the image was successfully installed: go to Settings -> Services, and check that Signal K and Node-RED are now available to enable. +
-  * **Step 6.** Enable either Signal K or Node-RED. Note that though its possible to enable both, doing so on a Venus GX is "pushing it", the system might become slow. Installer access level is required to enable/disable these servers, see Settings -> General. +
-  * **Finished**. The Venus OS Large image has now been installed successfully. Continue in either the Node-RED or the Signal K chapter below.+
  
-Venus OS Large menu: +See Settings -> Firmware -> Online updates. For more information, refer to the user the manual of your GX device.
-{{ :venus-os:venus_os_large_menu.png?nolink&400 |}}+
  
-=== Special note for the RaspberryPi ===+=== Step 3. Set the image type Venus OS Large ===
  
-Unfortunately, simply installing the .swu file on your already installed image won't work, since the partitions are too small. You'll need to, at least once, reflash the image to an sdcard. There after you can use the .swu files for updates again. Both the image to flash to an SD-Card as well as the .swu file are available in above link. +Go to Settings -> Firmware -> Online updates -> Image type:
-===== 4. Node-RED =====+
  
 +{{ :venus-os:image_type_selector.png?nolink&500 |}}
  
-==== 4.1 Introduction ====+Now, change the Image type to Large. Then go one menu up, and Check for a new version and install that. 
 + 
 +=== Step 3. Verify and enable === 
 + 
 +  - Verify that the image was successfully installed: go to the Settings menu, and check that the Venus OS Large menu is available. 
 +  - Enable either Signal K or Node-RED. Note that though its possible to enable both, doing that on a Venus GX is "pushing it", the system might become slow. This is less of a problem on a Cerbo GX, as it has more resources (faster CPU). Installer access level is required to enable/disable these settings. 
 + 
 +Visible once successfully installed, the Venus OS Large menu: 
 +{{ :venus-os:venus_os_large_menu.png?nolink&500 |}} 
 + 
 +=== How to update === 
 + 
 +Both online and offline update methods can be used. The Image type setting, see the How to install chapter, defines what image type is being updated. See the GX manual for more details. 
 +===== 4. Accessing Node-RED and Signal K ====== 
 + 
 +After installing and then enabling either one or both of the features, they need to be configured through a website in your browser. 
 + 
 +To access the Node-RED flow editor, type https://venus.local:1881/. Note that it might be necessary to replace venus.local by an IP address, for example like this: https://192.168.178.224:1881/. It is normal for the browser to show a security warning. Proceed according to browsers instructions. 
 + 
 +See [[https://www.victronenergy.com/media/pg/Cerbo_GX/en/accessing-the-gx-device.html#UUID-a007e0de-85f1-a53f-550b-25f0ed46ac1f|the Remote Console on LAN chapter on our GX manual]] for how to find the IP address. 
 + 
 +To access the Signal K admin panel, type http://venus.local:3000/. Just like Node-RED above, note that it might be necessary to replace venus.local in that URL by an IP address. For example like this: http://192.168.178.224:3000/ 
 + 
 +These two screenshots show what you will see after successfully accessing the pages: 
 + 
 +=== Node-RED flow editor === 
 + 
 +{{ :venus-os:node-red_flow_editor.png?nolink |}} 
 + 
 +=== Signal K admin panel === 
 + 
 +{{ :venus-os:signal_k_admin_panel.png?nolink |}} 
 + 
 +===== 5. Node-RED ===== 
 + 
 +{{ :venus-os:node-red-contrib-victron-nodes.png?nolink |}} 
 +==== 5.1 Introduction ====
  
 Node-RED is a tool for connecting hardware devices, APIs and online services in new and interesting ways. It provides a browser-based editor that makes it easy to wire together flows. With it, one can for example program a functionality such as activating a relay based on a temperature measurement. Or make far more complex algorithms, tying relays, measurements, or other data available from Venus OS or elsewhere together. All without having to write real source code, as Node-RED calls Low-code programming for event-driven applications. Node-RED is a tool for connecting hardware devices, APIs and online services in new and interesting ways. It provides a browser-based editor that makes it easy to wire together flows. With it, one can for example program a functionality such as activating a relay based on a temperature measurement. Or make far more complex algorithms, tying relays, measurements, or other data available from Venus OS or elsewhere together. All without having to write real source code, as Node-RED calls Low-code programming for event-driven applications.
Line 97: Line 127:
 Also Node-RED features a [[https://flows.nodered.org/node/node-red-dashboard|fully customisable dashboard]], viewable in a webbrowser - both locally but also remotely, via the VRM Servers. Also Node-RED features a [[https://flows.nodered.org/node/node-red-dashboard|fully customisable dashboard]], viewable in a webbrowser - both locally but also remotely, via the VRM Servers.
  
-A good tutorial on how to work with Node-RED is here: https://nodered.org/docs/tutorials/first-flow.+A good tutorial on how to work with Node-RED is here: https://nodered.org/docs/tutorials/first-flow. On https://github.com/victronenergy/node-red-contrib-victron/wiki/Example-Flows you can find example flows that use the Victron Energy nodes. Searching for [[https://flows.nodered.org/search?term=victron|Victron]] on [[https://flows.nodered.org/search?term=victron|https://flows.nodered.org/]] will give all community flows that have been tagged "victron".
  
-The Node-RED editor is at http://venus.local:1880/. For some systems, you'll have to replace ''venus.local'' by the ip-address.+There is also a 3 part introductory webinar on Node-RED and Venus available at the Victron Tech YouTube channel:
  
-The username is "admin", the password is the remote console password+[[https://www.youtube.com/watch?v=i_iaciqn_Fg| 1. Getting started]] 
-==== 4.2 Installing extra nodes ====+ {{youtube>i_iaciqn_Fg?medium}} 
 +[[https://www.youtube.com/watch?v=_J2rVNLrDIg| 2. Basic building blocks and the dashboard]] 
 + {{youtube>_J2rVNLrDIg?medium}} 
 +[[https://www.youtube.com/watch?v=8ceMtBo3orM| 3. Complex flows and dashboard example]] 
 + {{youtube>8ceMtBo3orM?medium}} 
 + 
 + 
 + 
 +The Node-RED editor can be accessed from your LAN at https://venus.local:1881/. For some systems, you'll have to replace ''venus.local'' by the ip-address. You can also access the Node-RED editor from VRM, where it is available via the //Venus OS Large// menu.  
 + 
 +__Standard nodes + Victron nodes__ 
 +Node-RED comes with a core set of useful nodesand within the Venus OS large install there is a set of Victron nodes added to that: the Victron Pallet. All of the different nodes are described [[https://github.com/victronenergy/node-red-contrib-victron/wiki/Available-nodes|here]]. 
 + 
 +For developers: source code for the node-red-contrib-victron modules is [[https://github.com/victronenergy/node-red-contrib-victron/|here]], and note that updating is not possible from either the Node-RED editor as the commandline. The recommended way to get to the new node-red-contrib-victron version is to await a new Venus OS large build.  
 + 
 + 
 +==== 5.2 Back-up and restore ==== 
 + 
 +Just as with other software it is important to keep your Node-RED flows save and secure. We advise you to periodically backup your flows using the palette manager "//Export -> all flows//" option to download the ''flows.json'' file to your PC.  
 + 
 +On a fresh installation you can then use the "Import" option to import this file. Note that importing flows that rely on unavailable nodes will complain about that. See below in how to install extra nodes. 
 + 
 +It is always wise to create an extra backup before performing an update of the firmware. 
 + 
 +Do note that the above instruction only makes a backup of your flows, not of the Node-RED configuration. The configuration is stored in ''.config.*.json'' files under ''/data/home/nodered/.node-red/''.  
 + 
 +==== 5.3 Installing extra nodes ====
  
 Node-RED comes with a core set of useful nodes, but there are many more available from both the Node-RED project as well as the wider community. Node-RED comes with a core set of useful nodes, but there are many more available from both the Node-RED project as well as the wider community.
  
-For example nodes that give access to weather data, or with timer functionality, and so forth.+For example nodes that give access to weather data, or with timer functionality, and so forth. You can find several example flows on https://github.com/victronenergy/node-red-contrib-victron/wiki/Example-Flows
  
 You can search for available nodes in the Node-RED library. You can search for available nodes in the Node-RED library.
  
-The Victron Pallette and the Dashboard pallette come pre-installed.+The Victron Palette comes pre-installed.
  
-Read the [[https://nodered.org/docs/user-guide/runtime/adding-nodes |Adding nodes to the Pallette - guide by Node-RED]] to learn how to install and manage node pallettes.+Read the [[https://nodered.org/docs/user-guide/runtime/adding-nodes |Adding nodes to the Palette - guide by Node-RED]] to learn how to install and manage node palettes.
  
-To install new nodes/pallettes requires a working internet access.+To install new nodes/palettes requires a working internet access.
  
 Palettes will be installed on the data partition on the GX Device. Which means that they will remain installed when updating Venus OS to a new version. Palettes will be installed on the data partition on the GX Device. Which means that they will remain installed when updating Venus OS to a new version.
  
-it is possible to remove self-installed palettes.see the remove button in the palette manager.+Refer to the remove button in the palette manager to remove self-installed palettes.
  
-its not possible to remove pre-installed nodes; it is possible to disable them.+When installing a newer version of a palette than what is pre-installed in Venus OS, Node-RED will use that newer version.
  
-When installing a newer version of a palette than what is pre-installed in Venus OS, node-red will use that newer version.+Make sure that there is always 30MB of free space remaining on the data partition. One of the [[https://github.com/victronenergy/node-red-contrib-victron/wiki/Example-Flows#monitor-disk-usage | example flows]] shows how to check the free space using a Node-RED dashboard 
  
-Todo add what happens if user has a palette self installed and Venus OS then comes with a newer version pre-installed. +==== 5.4 Controlling relays ====
- +
-Make sure that there is always 30MB of free space remaining on the data partition. TODO: how can a user see that? Also mem usage / mem free & some cpu stats would be nice to see. Maybe with a dashboard & flow? ;o) +
- +
-==== 4.3 Controlling relays ====+
  
 === GX Device relays === === GX Device relays ===
-Controllable, make sure to configure them to be Manually controlled.+To be able to control the relay(s) on the GX Device, configure them to be Manually controlled:
  
 ;#; ;#;
Line 137: Line 189:
 ;#; ;#;
  
 +=== Battery Monitor Relay ===
 +The relay in a BMV can be controlled. Make sure to set, using VictronConnect, its option in the BMV configuration to REM, which is short for Remote Controlled.
  
-=== MPPT Relay === +The relay in Lynx Shunt VE.Can can be controlled. Make sure to set the relay function to "Manual control" in the user interface of the GX.
-Note that while there is Victron node that offers to control the relay in a solar charger (only large solar chargers have a relay!), its currently not workable since VictronConnect does not offer the required "Manual control" option in the list of selectable Relay modes for the MPPTs. This will be fixed at some point.+
  
-=== BMV Relay === +The Relay in the Lynx Smart BMS is not available for control via Node-RED.
-Currently not possible, the driver in Venus OS doesn't support controlling it. This will be fixed at some point.+
  
-=== Multi & Quattro Relays === +=== SolarCharger MPPT Relay === 
-Includes alarm relays as well as the AC-out 2 relay: its not possible to control those; and there is no plan to make them controllable from within Node-RED.+Currently it is not possible to control the relay in a MPPT Solar Charger, even though there is a Victron node offering such functionality. The reason it doesn't work, is that VictronConnect does not have the required "Manual control" option in the list of selectable Relay modes for the MPPTs. This will be fixed at some point.
  
-===== 5Signal K =====+Note that only the larger model solar chargers feature a relay.
  
-==== 5.1 Introduction ====+=== (VE.Bus connected-) Multi, Quattro and similar product relays === 
 +Its not possible to control the alarm relay nor the AC-out 2 contactor of our inverter/chargers. Also, there are no plans to make them controllable remotely, which includes no plans to make them controllable from within Node-RED either.
  
-=== 5.1.1 Why have Signal K on your GX Device? ===+=== RS series (inverter, multi) relays === 
 +Currently not controllable. Will be controllable in the future.
  
-By adding Signal K, the GX device becomes a data hub for all marine electronics on your yacht. For example audio, boat speed and wind data, and more. The Signal K is the interface between all those devices and protocols on one side, and mobile Apps on phones, tablets and the alikes on the other. Note that SignalK itself is not a visualisation tool, its purpose is purely to gather all the data and make it available for web- phone-, and tablet-apps for the visualisation.+=== Charger relays === 
 +The only charger which has a relay that is controllable is the Smart IP43 Charger. To use that for remote control, set its mode, using the VictronConnect app, to be remote controllable. Note that its use is limited: the relay is only powered (and thus only controllable) when the charger is switched on. It doesn't work when it's turned off with AC connected. This limitation applies to the 230V models as well as the later 120V/240V models. 
 +==== 5.5 Node-RED Dashboard ==== 
 + 
 +Besides the flow and automation functionally, Node-RED also offers a fully customisable dashboard. Including graphs, indicators as well as controls such as switches and sliders. 
 + 
 +It is viewable in a web browser - both locally as well as remote, via the VRM Servers. See chapter 6.2 for how to see it remotely. 
 + 
 +The [[https://flows.nodered.org/node/node-red-dashboard|dashboard]] needs to be installed, just like other extra palettes, using the Manage Palette feature, on the right of the screen in the menus. 
 + 
 +Once that is done, you can find the nodes in the palettes on the left. Once the dashboard has been configured and deployed, an extra tile will appear in the //Venus OS Large// menu on VRM, allowing to connect to the dashboard via VRM. 
 + 
 +Example dashboard: 
 +{{ :venus-os:vrm_node_red_ui_step_3.png?direct&600 |VRM Node-RED UI - Step 3}} 
 + 
 +==== 5.6 Configuration files ==== 
 + 
 +WARNING: the vast majority of systems using Node-RED will not, and should not (!), have to modify any of the files here described. Venus OS itself, including Venus OS large and Node-RED, is made such that its not necessary to dive into the command line. 
 + 
 +The information here provided is for the benefit of the (few) users that do need or want to change them. 
 + 
 +On startup of Node-RED on Venus reads three settings files. 
 +  -  ''/usr/lib/node_modules/node-red/venus-settings.js'' is read first. Never change this file as it will be overwritten by a Venus OS update. 
 +  -  ''/data/home/nodered/.node-red/settings-venus.js'' is used to override and/or extend the first file and will survive Venus OS updates. Do not edit this file as this is for Victron to use. 
 +  -  ''/data/home/nodered/.node-red/settings-user.js'' is used to override and/or extend the second file and will survive Venus OS updates. You are allowed to edit this file if you please, but don't be too surprised if that causes Node-RED to break after an upgrade.  
 +When using these files, make sure that the configuration is enclosed within a ''module.exports = {}'' block. 
 + 
 +There are more configuration files in ''/data/home/nodered/.node-red/''. You might not have all of them on your system or even some more if you installed one or more of our candidate releases. 
 +  * ''flows.json'' - This is the flowFile, which is used to store your flows. You can also export this file from the Node-RED menu. 
 +  * ''flows_cred.json'' - If your flows contain credentials/login information, these get stored in this file. 
 +  * ''.config.*'' - These files are for Node-RED to store its settings. 
 + 
 +For more information on such Node-RED configuration customisations, see https://nodered.org/docs/user-guide/runtime/configuration. 
 + 
 +==== 5.7. Ready-to-use solutions ==== 
 + 
 +Node-RED can also be used for doing more advanced tasks. Some examples of ready-to-use solutions are: 
 +  * [[https://flows.nodered.org/node/victron-dynamic-ess|Dynamic ESS]] - fetch the ideal ESS setpoint from VRM based on dynamic energy prices and predicted solar forecast 
 +  * [[https://flows.nodered.org/node/node-red-contrib-eskomsepush|EskomSePush]] - use Node-RED for charging the batteries before the next load shedding happens (for South African users) 
 + 
 +==== 5.8. Using data from VRM  ==== 
 + 
 +For some flows it can be useful to retrieve data from the VRM Portal Database. For example to retrieve de Solar irradiation or yield forecasts. 
 + 
 +To access data from the VRM API, a VRM access token is needed. This is done by going to the [[https://vrm.victronenergy.com/access-tokens|access token]] part of VRM and add a new token. Once generated, store the access token in your password vault as you won't be able to retrieve it again. 
 + 
 +{{ :venus-os:generate-access-token.png?nolink&600 |}} 
 + 
 +Thereafter, that token can be used to retrieve data from the VRM Portal API. 
 + 
 +Full portal API documentation is here: https://vrm-api-docs.victronenergy.com/#/
 + 
 +To, for example, retrieve Solar Irradiation forecasts, see the [[https://vrm-api-docs.victronenergy.com/#/operations/installations/idSite/stats|stats call]], and then one of these attributes: 
 + 
 +    1221 vrm_pv_inverter_yield_fc 7 PV Inverter - Yield Forecast 
 +    1220 vrm_pv_charger_yield_fc 4 Solar Charger - Yield Forecast 
 +    1173 vrm_solar_irradiance_fc 0 Solar Irradiance Forecast 
 +    1172 vrm_solar_irradiance 0 Solar Irradiance 
 + 
 +Note that there could be more relevant attributes, see VRM documentation for that. 
 + 
 +{{ :venus-os:vrm-api-flow.png?nolink&600 |}} 
 + 
 +The [[https://flows.nodered.org/node/victron-vrm-api|Victron VRM API node]] makes it easy to use the VRM API from a Node-RED flow. Alternatively take a look at above mentioned Dynamic-ESS flow. 
 + 
 +==== 5.9. Node-RED FAQ ==== 
 + 
 +=== Q1: Write/read file gives "Error: EACCESS: permission denied' === 
 + 
 +Since Venus OS 2.90 and on wards, Node-RED no longer runs as user ''root'', but as user ''nodered''. This means that the Node-RED flows are only allowed to access files and directories that are owned by the ''nodered'' user. These files typically start below ''/data/home/nodered/''. So modifying the storage location to something like ''/data/home/nodered/storage.txt'' ought to work. 
 + 
 +=== Q2: How can I update the Victron node pallette === 
 + 
 +As that pallette is part of the total Venus OS large package, it can only be updated by installing a newer Venus OS large version. 
 + 
 +In case you see that there is a newer version Victron pallette available online, and thats not yet shipping in a Venus OS Large version, then the only option is to wait: a new Venus OS Large version is usually made available shortly after updating that pallette. 
 + 
 +=== Q3: How can I password protect Node-RED === 
 + 
 +Password protection of Node-Red is linked to the remote console. If a password is set for the remote console, this password is also used for securing Node-Red. The username is ''admin'', the password is the remote console password. 
 + 
 +=== Q4: How do I restart Node-RED from the Venus GUI? === 
 + 
 +In order to restart Node-RED you need to disable and enable it from the menu. You can find this under //Venus OS Large Features -> Node-RED//
 + 
 +=== Q5: How does safe mode work and what is it? === 
 + 
 +From the Venus GUI you can select Node-RED to be enabled in "safe mode". This means that Node-RED will start without starting the flows. This allows you to open the flows in the editor and make changes without the flows running. When you deploy your changes, the flows are then started. The safe mode can be handy if one of the flows has an error that causes high CPU loads on the Venus device or other issues. 
 + 
 +=== Q6: Can I install the @signalk/node-red-embedded? === 
 + 
 +No, at least not into the node-red instance which comes as part of Venus OS Large. To @signalk/node-red-embedded, we recommend to use the node-red plugin/instance that can optionally be installed into signalk: 
 + 
 +  - enable Node-RED in the SignalK server, using its dashboard. 
 +  - disable the Venus OS Node-RED, in GX Device -> Settings -> Venus OS Large -> Node-RED 
 +  - install the Victron pallette into the Node-RED thats part of SignalK server 
 + 
 +=== Q7: I get the error: Failed to remove, unrecognised module === 
 + 
 +This is seen when trying to remove a module that has been previously uninstalled, but left some files behind. After which Node-RED is incapable of completely removing the module. This is probably a remnant of upgrading an old version of Node-RED to a newer. What we've seen is that the module is still on the disk, but Node-RED no longer is aware of it in its configuration. The way to recover from this is to add the module to the Node-RED configuration again. This can be done by performing the following steps: 
 +  - Determine the name and version of the complaining package. This information can be found in the pallete manager. 
 +  - Stop Node-RED (can be done via the remote console) 
 +  - Create a backup of your ''package.json'' file in ''/data/home/nodered/.nodered/''
 +  - Edit the ''/data/home/nodered/.node-red/package.json'' file 
 +  - Add the complaining module and version to the ''dependencies'' part of the ''package.json'' file. Make sure that the file remains valid JSON. Comma's and quotes are easily overlooked. 
 +  - Start Node-RED 
 + 
 +After following these steps Node-RED should know about the module again and you should be able to remove or upgrade it. 
 + 
 +=== Q8: The browser complains about non private connection === 
 + 
 +Node-RED on Venus now uses SSL for its connection. As the certificate is signed by a "self signed certificate", your browser is unable to trust the connection and throw a warning ("Your connection is not private" or something similar). In order to proceed, you need to press the "Advanced" or "Show Details" button and then click to visit the website. Some browsers will still display 'Not secure' and claim that the Certificate is invalid, but that is inherent to self-signed certificates. The benefit is that usernames and passwords no longer travel in clear text over the network. 
 + 
 +Another implication might be that you need to prepend the connection with ''https'' instead of ''http'' and change the port from ''1880'' to ''1881''. So you should connect to ''https://venus.local:1881/'' for Node-RED. If your browser still wants to connect to the old http way, you may get an ''ERR_EMPTY_RESPONSE''. Adjust the url in your browser to connect to the https site instead. 
 + 
 +Finally, if you want to use the Node-RED command line interface for administration, you will run into the ''Error: self signed certificate'' error. This can be solved by setting the ''NODE_EXTRA_CA_CERTS '' environment variable to ''/data/etc/ssl/venus.local.crt'' like so: 
 + 
 +  export NODE_EXTRA_CA_CERTS=/data/etc/ssl/venus.local.crt 
 +   
 +=== Q9: How often do the Victron input nodes send a msg? === 
 + 
 +The input nodes send out a message on each value change. If the ‘//only changes//’ checkbox is set, this will be the only output of the node. If the '//only changes//' checkbox is not set, the node also sends out the current value each 5 seconds. If you want more fine grained control, consider storing the desired values in a context in combination with triggered intervals. See [[https://github.com/victronenergy/node-red-contrib-victron/wiki/Example-Flows#only-messages-at-regular-intervals|here]] for an example on how to do that. 
 + 
 +=== Q10: How can I get Node-RED to also listen to http port 1880 === 
 + 
 +There are some nodes that are only able to connect to a http site. In that case you probably also want to enable http on port 1880. This can be achieved by creating (or adding to) a user configuration file ''/data/home/nodered/.node-red/settings-user.js'', containing: 
 + 
 +  module.exports = { 
 +     /* Make sure that we also listen on port 1880 on all interfaces */ 
 +     uiHost: "::" 
 +  } 
 + 
 +And restart Node-RED. 
 +===== 6. Signal K ===== 
 + 
 +==== 6.1 Introduction ==== 
 + 
 +=== 6.1.1 Why have Signal K on your GX Device? === 
 + 
 +By adding Signal K, the GX device becomes a data hub for all marine electronics on your yacht. For example AIS, boat speed and wind data, and more. The Signal K is the interface between all those devices and protocols on one side, and mobile Apps on phones, tablets and the alikes on the other. Note that SignalK itself is not a visualisation tool, its purpose is purely to gather all the data and make it available for web- phone-, and tablet-apps for the visualisation.
  
 Also, there are SignalK plugins to forward the data to influxdb & Grafana. Also, there are SignalK plugins to forward the data to influxdb & Grafana.
Line 159: Line 352:
 Popular Apps compatible with Signal K: Popular Apps compatible with Signal K:
  
 +  * Auqua Map
 +  * iNavX
 +  * iSailor
 +  * Navionics
   * [[https://www.wilhelmsk.com/|Wilhelm SK]] - WilhelmSK is a highly customizable boat instrument display available for  iPhone, iPad, Apple Watch and AppleTV.   * [[https://www.wilhelmsk.com/|Wilhelm SK]] - WilhelmSK is a highly customizable boat instrument display available for  iPhone, iPad, Apple Watch and AppleTV.
   * ... (welcome to add more here)   * ... (welcome to add more here)
  
-=== 5.1.2 Instruments compatible with Signal K ===+=== 6.1.2 Instruments compatible with Signal K ===
  
   * All Victron products that can be connected to a GX device   * All Victron products that can be connected to a GX device
Line 172: Line 369:
  
  
-=== 5.1.3 What is Signal K ? ===+=== 6.1.3 What is Signal K ? ===
  
 Signalk-server is a software application that, in the context of this manual, runs on your GX Device and interface to all Victron protocols and more. It uses plugins, and there is a large community of enthusiasts around it, making it one of the most flexible and complete pieces of software that understands the plethora of protocols of all different manufacturers that make marine electronics. Signalk-server is a software application that, in the context of this manual, runs on your GX Device and interface to all Victron protocols and more. It uses plugins, and there is a large community of enthusiasts around it, making it one of the most flexible and complete pieces of software that understands the plethora of protocols of all different manufacturers that make marine electronics.
  
-For more information on Signal K, read [[http://signalk.org/overview.html|the Signal K website]]. And our blog post of a while ago. +For more information on Signal K, read the [[https://github.com/SignalK/signalk-server/blob/master/README.md|the Signal K Server readme]].
- +
-Note that Signal K is not a Victron project. At Victron, we a great fans of sailing, open source as well as community driven projects. And Signal K is a perfect example of such project. And when running on a GX Device its a perfect marriage. +
- +
-=== 5.1.4 Signal K - the data format === +
- +
-Strictly speaking, Signal K is not software but a data format. And Signalk-server is the name of the software. +
- +
-This section explains the rationale behind the data format. +
- +
-Signal K is a modern and open data format for marine use. Its goal is to+
  
-- create shared data model for marine related data +Note that Signal K is not Victron project. At Victronwe are great fans of sailing, open source as well as community driven projects. And Signal K is a perfect example of such project. And when running on a GX Device its a perfect marriage.
-- make marine related data easy to accesshandle and build applications on+
  
-The shared data model allows you to handle the data in a uniform way independent of how the data is producedIn practice this means that you can refer to your battery voltage with `electrical/batteries/1/voltage` and not care where data came from: Victron BMV, NMEA 2000 bus or some other voltage sensor.+=== 6.1.3 Considerations on how to install Signal K ===
  
-Easy access means that you can use modern standards like HTTP, WebSockets and JSON that are in widespread. There is a wealth of knowledge and skilled people are easy to findwith no special marine related knowledge needed to get started.+The type of install described in this document, running Venus OS including SignalK, has these advantages: no need to use a rapsberrypiall ready in one box; no special firmware updates or commandline knowledge needed to maintain or update it. Doing this was born out of a wish to make Signal K Server (also) available to the more mainstream users.
  
-In Venus OS it brings all the data available in the GX system, including NMEA 2000 data, to a single data model and programming interface. +The other common type of Signal K Server install, installed on a RaspberryPi running Raspbian, has the advantages of more flexibility, and ease of installing extra components such as Grafana or Influx. The disadvantage is that you are basically setting up a Linux computer yourself, which you’ll also have to maintain yourself. Whereas the Venus OS type is more of a complete product; no need to bother about keeping individual components up to date and worrying about their compatibility.
- +
-=== 5.1.3 Considerations on how to install Signal K === +
- +
-The type of install described in this document, running Venus OS including SignalK, has these advantages: TODO elaborate. Doing this was born out of a wish to make SignalK more mainstream, less of a rapsberrypi / hobbieists/tinkerers product. +
- +
-The other common type of SignalK install, installed on a RaspberryPi running Raspbian, has the advantages of more flexibility, and ease of installing extra components such as Grafana or Influx. The disadvantage is that you are basically setting up a Linux computer yourself, which you’ll also have to maintain yourself. Whereas the Venus OS type is more of a complete product; no need to bother about keeping individual components up to date and worrying about their compatibility.+
  
 There is no one right way for everyone to do this; the best solution will depend on the requirement. There is no one right way for everyone to do this; the best solution will depend on the requirement.
  
-For raspberrypi owners, note that its very easy to try both methods and change between them: simply have two sdcards.+For raspberrypi owners, note that its very easy to try both methods and switch between them: simply have two sdcards.
  
-==== 5.2 Where to find support====+==== 6.2 Documentation and support for Signal K ====
  
-As above already introduced, use [[https://community.victronenergy.com/search.html?c=&includeChildren=&f=&type=question+OR+idea+OR+kbentry+OR+answer+OR+topic+OR+user&redirect=search%2Fsearch&sort=relevance&q=signal+k|the Modifications space on Victron Community]]. As an extra, for Signal K we recommend the Victron channel in the [[http://slack-invite.signalk.org/|SignalK Slack]].+  * [[https://demo.signalk.org/documentation/|The official Signal K documentation]] 
 +  * [[https://community.victronenergy.com/search.html?c=&includeChildren=&f=&type=question+OR+idea+OR+kbentry+OR+answer+OR+topic+OR+user&redirect=search%2Fsearch&sort=relevance&q=signal+k|Signal K topics on the Victron Community forum]] 
 +  * [[http://slack-invite.signalk.org/|Signal K Slack]] - a real time chat group including a special Victron channel.
  
 Do not contact normal Victron support for any help on SignalK. Its based on community support, not official support. Do not contact normal Victron support for any help on SignalK. Its based on community support, not official support.
  
-==== 5.3 Signal K details ==== 
- 
-TODO: remove these versions, and replace by a link to the change-log. 
- 
-And instead add information on what specifics we do in the Signal K install. 
- 
-  - Signalk-node version is 1.18.0 
-  - Victron Venus Plugin, v1.10.0 
  
-==== 5.First use & configuring ====+==== 6.First use & configuring ====
  
 === Step 1. Opening the dashboard === === Step 1. Opening the dashboard ===
Line 234: Line 408:
 Use this to, for example, configure a USB-connected NMEA0183 connection in SignalK. To do so, go to the dashboard (http://0.0.0.0:3000), and there to Server -> Connections. Use this to, for example, configure a USB-connected NMEA0183 connection in SignalK. To do so, go to the dashboard (http://0.0.0.0:3000), and there to Server -> Connections.
  
-Make sure to not add a connecting using any of the built-in serial ports (/dev/ttyO0, /dev/ttyO2, /dev/ttyO4, /dev/ttyO5). These are the VE.Bus- and VE.Direct ports on the Venus GX, and it is not necessary to configure them in SignalK. Data from any devices there connected is already available in SignalK, by means of the "Victron Venus Plugin"; see Dashboard -> Server -> Plugin Config.+Make sure to not add a connection using any of the built-in serial ports (/dev/ttyO0, /dev/ttyO2, /dev/ttyO4, /dev/ttyO5). These are the VE.Bus- and VE.Direct ports on the Venus GX, and it is not necessary to configure them in SignalK. Data from any devices there connected is already available in SignalK, by means of the "Victron Venus Plugin"; see Dashboard -> Server -> Plugin Config.
  
 Note that once configured in SignalK, for example a USB-serial port, that port is no longer normally available in Venus OS. For example, when plugging in a USB-GPS; and then adding a connection for its corresponding tty in the SignalK, makes for that GPS to be no longer be recognised and available in Venus OS. Note that once configured in SignalK, for example a USB-serial port, that port is no longer normally available in Venus OS. For example, when plugging in a USB-GPS; and then adding a connection for its corresponding tty in the SignalK, makes for that GPS to be no longer be recognised and available in Venus OS.
Line 240: Line 414:
 === Step 3. Configure can-bus connections === === Step 3. Configure can-bus connections ===
  
-For the Venus GX, SignalK comes pre-configured with a NMEA2000 listener for the VE.Can ports, its named "n2k-on-ve.can-socket", and uses the canboatjs.+For the Venus GX, and Cerbo GX, SignalK comes pre-configured with a NMEA2000 listener for the VE.Can ports, its named "n2k-on-ve.can-socket", and uses the canboatjs. Here is how you can see the same in the Signal K Admin UI:
  
 ;#; ;#;
 {{:venus-os:cerbo-gx-signalk-canboatjs.png?400|}} {{:venus-os:cerbo-gx-signalk-canboatjs.png?400|}}
 ;#; ;#;
- 
  
 Note that, to keep that operational, that port must be configured as a 250kbit VE.Can & NMEA2000 port in the Remote Console. Note that, to keep that operational, that port must be configured as a 250kbit VE.Can & NMEA2000 port in the Remote Console.
Line 253: Line 426:
 ;#; ;#;
  
 +For more information on CAN-busses, see chapter 6.4.
  
 === Step 4. Adding Signalk Plugins or Webapps === === Step 4. Adding Signalk Plugins or Webapps ===
Line 258: Line 432:
 TODO: explain & warn about data partition size & space (since thats where plugins are installed by signalk on Venus OS). Filling up the datapartition can corrupt Venus OS. More information about data partition on Venus OS here: https://github.com/victronenergy/venus/wiki/data-partition TODO: explain & warn about data partition size & space (since thats where plugins are installed by signalk on Venus OS). Filling up the datapartition can corrupt Venus OS. More information about data partition on Venus OS here: https://github.com/victronenergy/venus/wiki/data-partition
  
-==== 5.5 Signal K FAQ ====+==== 6.4 CAN-bus ports ==== 
 + 
 +Below lists documents the mapping from physical ports on the device to the interface within Venus OS. This information is needed when you want to deviate from the standard configuration. 
 + 
 +=== Cerbo GX === 
 + 
 +^ Enclosure label ^ Interface ^ Notes ^ 
 +| VE.Can 1 | can0 | Non-isolated and default enabled in SignalK | 
 +| BMS-Can | can1 | Non-isolated, not usable within SignalK for NMEA2000 | 
 + 
 +Within the Victron product range, CAN-bus ports that are labelled BMS-Can are limited in their functionality due to hardware constraints. Their only use is to connect to a managed battery such as BYD and Pylontech, used in landbased ESS & Off-grid systems - not in the marine market. 
 + 
 +=== Cerbo GX MK2 === 
 + 
 +^ Enclosure label ^ Interface ^ Notes ^ 
 +| VE.Can 1 | can0 | Isolated and default enabled in SignalK | 
 +| VE.Can 2 | can1 | Non-isolated | 
 + 
 +=== Ekrano GX === 
 + 
 +^ Enclosure label ^ Interface ^ Notes ^ 
 +| VE.Can 1 | vecan0 | Isolated | 
 +| VE.Can 2 | vecan1 | Non-isolated | 
 + 
 +When using SignalK on Venus OS on an Ekrano, there is currently no port enabled for N2K traffic in the default configuration. Configure it manually instead, see here for more information: https://community.victronenergy.com/questions/263126/ekrano-gx-vs-signal-k-no-n2k-on-vecan-socket.html?childToView=263206#answer-263206.  
 +==== 6.5 Signal K FAQ ====
  
-=== Q1 How to best handle & install a GPS ===+=== Q1 How to best handle & install a GPS ===
  
 You want the data available in SignalK and in Venus OS, so that it gets to VRM. And preferably a quality GPS. You want the data available in SignalK and in Venus OS, so that it gets to VRM. And preferably a quality GPS.
Line 284: Line 483:
 Tbd. Actually a NMEA0183-network is probably something that doesnt exist: you can't have NMEA0183 in a network, its point to point. Tbd. Actually a NMEA0183-network is probably something that doesnt exist: you can't have NMEA0183 in a network, its point to point.
  
-===== 6. Remote access via VRM ===== 
-==== 6.1 Node-RED flow editor and Signal K ==== 
-It it possible to access Node-RED flow editor and Signal K remotely via VRM - the interface and functionality is identical to access via LAN (ie. via **http://venus.local:1880** or **http://venus.local:3000**) . 
  
-=== Step by step instructions === +=== Q2 - What happens when I updated a pre-installed Plugin? ===
-  * **Step 1.** Log into/open the regular VRM 'dashboard' or 'advanced' page for the site +
-{{ :venus-os:vrm_node_red_step_1.png?direct&600 |VRM Node-RED - Step 1}}+
  
-  * **Step 2.** Modify the URL to include **/proxy/** after the site URL ID number (note that the last **/** is required) +A few plugins are installed by default on Venus OS LargeThese include FreeboardSK, signalk-venus-plugin and more. They are part of the (read-onlyimage of Venus OS.
-  As an example: **https://vrm.victronenergy.com/installation/12345/proxy/** where **12345** is the unique site URL ID +
-{{ :venus-os:vrm_node_red_step_2.png?direct&600 |VRM Node-RED - Step 2}}+
  
-  * **Step 3.** Click on the **Node-RED** or **Signal K** button in the Proxy relay screen; depending on location and the speed of internet connection, there may be a short delay while loading +When a newer version of such plugin is available, it is still possible to install the update by pressing the Update button in the Signal K Admin UI -> Appstore -> Installed page.
-{{ :venus-os:vrm_node_red_step_3a.png?direct&600 |VRM Node-RED - Step 3a}} +
-{{ :venus-os:vrm_node_red_step_3b.png?direct&600 |VRM Node-RED - Step 3b}}+
  
-  * **Step 4.** The Node-RED flow editor or Signal K interface screen will appear +The newer version of the plugin gets installed onto the data partition. And Signal K server will use that, as it prioritises the version of the plugins installed there over the one included in the image.
-{{ :venus-os:vrm_node_red_step_4.png?direct&600 |VRM Node-RED - Step 4}} +
-==== 6.2 Node-RED Dashboard/User Interface ==== +
-It it also possible to access the Node-RED dashboard/User Interface remotely via VRM - the interface and functionality is identical to access via LAN (ie. via **http://venus.local:1880/ui**)+
  
-=== Step by step instructions === +WARNING: above also means that once Venus OS ships with a newer version of the plugin than the version installed manually, Signal K Server will keep using that older one. To get out of such situation, remove the plugin by using the Appstore -> Installed page, and then the trash icon.
-  * **Step 1.** Follow steps #1 to 4 in section 6.1 above in order to 'open' the remote connection+
  
-  * **Step 2.** The 'new' proxy URL needs to be modified to include **/ui** after **.....victronenergy.com** +Note that the same icon is also available for the pre-installed pluginsPressing it does nothing since they can't be removed.
-  As an example: **https://12345-nodered.proxyrelay3.victronenergy.com/ui** where **12345** is the unique site URL ID +
-{{ :venus-os:vrm_node_red_ui_step_2.png?direct&600 |VRM Node-RED UI - Step 2}}+
  
-  * **Step 3.** The Node-RED dashboard/user interface screen will appear +=== Q3 Can I update signalk-server===
-{{ :venus-os:vrm_node_red_ui_step_3.png?direct&600 |VRM Node-RED UI - Step 3}}+
  
-===== Appendix A - Repartitioning Venus GX flash memory =====+Signal K Server comes preinstalled with Venus OS. And except by "hacking into it", it cannot be partially updated:
  
-The Venus GX has sufficient flash memory to run the Venus OS Large image. But up until end of 2018 it was produced with partition layout not suitable to run large versions of Venus OS. This appendix explains how to self update the partitions to the new format.+The normal -and recommended- method to get a newer version of Signal K Server is to wait for Victron to release newer version of Venus OS.
  
-Perform this procedure only when connected via Ethernet port.+In case you can’t wait, and don’t mind the extra work as well as risks, here is how to update it yourself.
  
-Do not use the built-in WiFi AP to performing this procedure. The AP will not work half way the procedure. Similarly, any WiFi (client-) configuration will be wiped after running the installer. Therefore, as said, make sure to be able to connect on the LAN port before starting this procedure.+Be warned, this method might or might not remain working  its documented only for convenience.
  
-**WARNING**: this procedure is available and documented here for the benefit of users that are technical enough to perform it. In order to make it possible for them to upgrade their Venus GX to make it compatible with the large version of Venus OS. Victron offers no support or warranty on this. Running the installer is not something Victron normally asks end-users to do, its for in the factory.+Note that all changes made to the rootfs will be overwritten the next time you do a Venus OS update.
  
-It is impossible to brick the device using this procedureIts always possible to run the installer againBut, to make the device operational again, also the files must be restored, if anything then with other contents.+Step 1: Get yourself [[https://www.victronenergy.com/live/ccgx:root_access|root access]] into your GX Device.
  
-Venus GX-es with serial number HQ1842xxxxx and later already have the new partition layout from the factory.+Step 2: Follow this procedure:
  
-=== Requirements ===+<code> 
 +## Change the rootfs from read-only to read/write, as well as increase file system size 
 +## to use the complete partition. 
 +/opt/victronenergy/swupdate-scripts/resize2fs.sh 
  
-  * An SD Card +## Backup a file you'll need to restore later 
-  * Computer skills+# dev-tip: a list of especially installed files on a Victron install is here: 
 +# https://github.com/victronenergy/meta-victronenergy/tree/master/meta-third-party/recipes-extended/signalk-server 
 +# in that folder, open the .bb file and read the do_install function 
 +cp /usr/lib/node_modules/signalk-server/get-mfd-announce-address.sh /data/home
  
-Note that a USB stick will not work. Installer images can only be ran using an SD Card.+## See version as well as install location for signalk-server 
 +npm list -g
  
-=== Step AEnable and obtain root access ===+# output will be something like this: 
 +# /usr/lib 
 +# ├── @victronenergy/node-red-contrib-victron@1.5.2 
 +# ├── corepack@0.17.0 
 +# ├── node-red@3.1.0 
 +# ├── npm@9.5.1 
 +# └── signalk-server@1.46.3
  
-See [[https://www.victronenergy.com/live/ccgx:root_access|these instructions]].+## Stop signalk-server 
 +svc -d /service/signalk-server
  
-=== Step B. Secure factory files ===+## Update to a newer version, here is how to update to last released version: 
 +npm install -g signalk-server
  
-Copy below four files to your computer.+# And to update to a more specific version, do something similar to this: 
 +# npm install -g signalk-server@2.3.0-beta.2
  
-  * /data/venus/serial-number +# Output will be something like this: 
-  * /data/venus/wpa-psk +# added 120 packages, removed 179 packages, and changed 586 packages in 6m 
-  * /data/venus/part-number +# 
-  * /data/conf/vrm_auth_token.txt (don't worry if that does not exist, then skip it).+# 57 packages are looking for funding 
 + run `npm fund` for details
  
-Below commandline instructions show how to do that on linux from the commandline. For Windows try Mobaxterm, or WinSCP. Putty won't work, its not for transferring files. There is Putty SCP (PSCP), as well, but then you need to know how to handle the commandline in Windows. We recommend using the other two.+## Restore that file 
 +mv /data/home/get-mfd-announce-address.sh /usr/lib/node_modules/signalk-server
  
-Procedure on Linux:+## Install the signalk-venus-plugin in same place where it normally is on Venus OS 
 +cd /usr/lib/node_modules/signalk-server 
 +npm install signalk-venus-plugin
  
-<code> +## If you want, see updated version: 
-mkdir my-temp +npm list -g
-cd my-temp +
-mkdir conf +
-mkdir venus +
-scp "root@192.168.178.122:/data/venus/*" ./venus/ +
-scp "root@192.168.178.122:/data/conf/vrm_auth_token.txt" ./conf/ +
-</code>+
  
-=== Background information on the factory files ===+# output will be similar as above, but then with newer version
  
-The first two are needed for the built-in accesspoint to work. Without themthe script that should start it is in an endless loop.+## start signalk-server againand see log output: 
 +svc -u /service/signalk-server && tail -F /data/log/signalk-server/current | tai64nlocal
  
-Third file is not used anywhere (at this moment), but easy enough to recreate by hand as well.+## press CTRL-C to stop seeing the logsignalk-server will keep running in the background. 
 +</code> 
 +===== 7. Remote access via VRM =====
  
-Fourth file: without it the system won't be able to send data to VRM anymore. Either make sure to keep that fileor after having booted the new versiongo to the VRM Portal, Settings -> General. And scroll to the bottom. There will be an option to reset the token. This option is only visible after the portal has received data from the reflashed device.+The three available web interfaces, the Node-RED flow editorNode-RED dashboard and the Signal K admin panel can also be accessed remotely, via VRM.
  
-=== Step CRun the installer image ===+After enabling them, to the VRM, and there click the Venus OS Large menuNote that this might be slow, depending on the quality of the connection.
  
-First, download the [[https://updates.victronenergy.com/feeds/venus/candidate/images/beaglebone/venus-install-sdcard-beaglebone.img.zip |latest official installer image]].+{{ :venus-os:venus_os_large_menu2.png?nolink |}}
  
-Then, write it to an sdcard (tip: use BalenaEtcher, see Google)+===== 8. Troubleshooting =====
  
-Finally, run the installer by inserting the sdcard containing the installer, and then power up while pressing the small recessed button on the right of the long green connector with, for example, a paperclip.+==== 8.1 Disk space issues / data partition full ====
  
-There is a bi-color LED on the other side of the same long green connectorindicating the status:+Using both Signal K Server, as well as Node-RED, it is quite easy to completely fill up the data partition. Which can cause all sorts of issueslike:
  
-  * off, no image found +  - Venus OS itself no longer working correctly, 
-  * red blinkingbusy +  - Signal K Server refuses to start / no longer works
-  * green ondone +  - Node-RED refuses to start
-  * red on, error+  - and similar.
  
-Side infosee here for more details on installing an image.+Note that Venus OS itself does **not** show a notification or warning when the data disk is full. And know that the other disks are read-only unless remounted to read/write as per [[https://www.victronenergy.com/live/ccgx:root_access|these root access instructions]].
  
-Once done, reboot the device.+Depending on what the issue is, there are a few things you can do:
  
-After the boot (30 to 60 seconds) the LED will be slow blinking greenIndicating that the WiFi access point is off (as expected)More information about the LED operation is in the Venus GX manual+  - Do full GX factory reset, as per the instructions in the GX user manualsThis includes downloading a file called venus-data.tgz; see GX manual for details. Disadvantage is that you'll need to reconfigure the GX. 
-Now, re-obtain yourself root access to continueNote that all settings will be wiped by the installer:+  Remove all Signal K Server log files. In case you're using SignalK, then we recommend to try that option firstSee next chapter on how to do that (requires a USB stick or SD Card), and once done make sure to double check you're Signal K log setup; Most importantly, enable the ''Keep only most recent data log files'' option. 
 +  - A more detailed approach is logging in on SSH, and checking for disk space:
  
-  you'll need to go to Remote Console on LAN, then change access level again, enable ssh, change root password, and then login+**Tips and tricks to login a diagnose disk space**
-  As warned above, you’ll need to do this on the LAN port. The built-in WiFi access-point will be disabled, and any previously configured WiFi (client-) configuration will be lost as the installer will have wiped all settings.+
  
-=== Step DRestore the files ===+Require root access: https://www.victronenergy.com/live/ccgx:root_access.
  
-Again, this is how to do it on Linux:+The ''df'' command shows disk space including percentage in user for all mounted storages. Note the 100% full of below data partition. That is a problem. It should show maybe 10, 20 or 30%, but never 100% in use.
  
 <code> <code>
-scp ./conf/vrm_auth_token.txt "root@192.168.178.122:/data/conf/" +root@einstein:/data/conf/signalk# df 
-scp ./venus/* "root@192.168.178.122:/data/venus/"+Filesystem           1K-blocks      Used Available Use% Mounted on 
 +/dev/root               988960    869484     48596  95% / 
 +devtmpfs                465376            465372   0% /dev 
 +tmpfs                   515040       952    514088   0% /run 
 +tmpfs                   515040       276    514764   0% /var/volatile 
 +/dev/mmcblk1p5         1182728   1182728         0 100% /data 
 +tmpfs                   515040       952    514088   0% /service 
 +overlay                 515040       276    514764   0% /var/lib 
 +</code>
  
-reboot +The ''du'' command, used as per below, shows space per folder in the directory tree. In this case up to 3 levels deep. And what you can see here is that almost all space is used by the files are in the /data/conf/signalk/ directory. Which for this example turned out to be log files, disabled by default. 
-ssh 192.168.178.122 reboot+ 
 +<code> 
 +root@Cerbo:/data/conf/signalk du -d 3 /data | sort -nr 
 +1103640 /data 
 +1099352 /data/conf 
 +1099276 /data/conf/signalk 
 +87048 /data/conf/signalk/node_modules 
 +65732 /data/conf/signalk/.npm 
 +7188 /data/conf/signalk/.cache 
 +3920 /data/log 
 +744 /data/log/swupdate 
 +164 /data/var 
 +160 /data/var/lib 
 +116 /data/log/signalk-server 
 +116 /data/conf/signalk/plugin-config-data
 </code> </code>
  
-Once completed, the WiFi access point will be operational again.+This is a view of a more healthy tree: 
 +<code> 
 +root@Cerbo:/data/conf/signalk#  du -d 3 /data | sort -nr 
 +164608 /data 
 +160312 /data/conf 
 +160240 /data/conf/signalk 
 +87048 /data/conf/signalk/node_modules 
 +65732 /data/conf/signalk/.npm 
 +7188 /data/conf/signalk/.cache 
 +3924 /data/log 
 +744 /data/log/swupdate 
 +</code> 
 + 
 +==== 8.2 Backup / Reset to factory defaults  ==== 
 + 
 +There are scenarios where you want to make a backup of your data or when you want to clear logging or even start all over and go back to factory defaults. In order to make this process easy, you can put one (or more) of the following files on an USB stick and reboot your device. The files will be unpacked and the scripts within will execute. Once the script is ready with its tasksa notification of 3 beeps can be heard (on a Multiplus-II GX the notification will be shown in the display). After which the USB stick can be removed.
  
-=== Step EInstall Venus OS Large ===+  * [[https://www.victronenergy.com/upload/software/venus-factory-default/venus-data-00-backup-data-partition.tgz|venus-data-00-backup-data-partition.tgz]] - copies all that is on the ''/data'' partition onto the usb stick 
 +  * [[https://www.victronenergy.com/upload/software/venus-factory-default/venus-data-20-signalk-reset.tgz|venus-data-20-signalk-reset.tgz]] - wipes everything from ''/data/conf/signalk/'' 
 +  * [[https://www.victronenergy.com/upload/software/venus-factory-default/venus-data-30-signalk-delete-data-logs.tgz|venus-data-30-signalk-delete-data-logs.tgz]] - removes all SignalK loging 
 +  * [[https://www.victronenergy.com/upload/software/venus-factory-default/venus-data-20-node-red-reset.tgz|venus-data-20-node-red-reset.tgz]] - wipes all in ''/data/home/nodered/''
  
-Now, the Venus GX has been repartitioned, and has a certain version of the normal Venus OS installedNext step is to install the large imageRefer to the Installation instruction chapter above.+See [[https://www.victronenergy.com/live/ccgx:root_access#hooks_to_install_run_own_code_at_boot|here]] for more information on how this process works.
venus-os/large.1610978685.txt.gz · Last modified: 2021-01-18 15:04 by stefanie

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki