question

elvistherv avatar image
elvistherv asked

Ansible to apply tweaks to CCGX after update.

So I'm seeing a need to apply certain tweaks to the CCGX which won't survive an update, has anyone used Ansible to apply these tweaks with a CRON job on another box? Are there any gotchas that I might be missing?

CCGX Color Control
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

2 Answers
mvader (Victron Energy) avatar image
mvader (Victron Energy) answered ·

Hey @ElvisTheRV the solution are the rc.local and rcS scripts; you can put them on the data partition and they’ll be called on every boot.


see the root access document for details

1 comment
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Kevin Windrem avatar image Kevin Windrem commented ·

I've been doing this for some time. One thing you should do is have your script check to see if it needs to apply the tweaks. Applying the tweaks with every boot is generally not harmful, it just takes time away from booting.

If you install additional files as part of your tweak, have the script test for the file's existence and skip the install if so. If you are replacing or modifying an existing file, then simply add a flag file and test for that.

Remember /data is preserved through a Venus update so put any flag file in another part of the system. I preserve any existing files I replace or modify and keep a copy of the original with .orig appended to the file name. I use this as the flag, but it also gives you a way to uninstall the tweaks.

I include a setup script with my tweak packages and have /data/ rc.local call the setup script for reinstallation. If you'd like to see an example go to:


https://github.com/kwindrem/TankRepeater

or

https://github.com/kwindrem/GeneratorConnector

Both packages use a similar setup script. The latter's setup script checks the Venus version and installs different files based on that. They both use "SetupHelper" which includes a mechanism to reinstall the mods after a Venus update

Feel free to reuse what you find useful.

0 Likes 0 ·
Jaco Reinecke avatar image
Jaco Reinecke answered ·

Hi,

See here: https://community.victronenergy.com/questions/21309/help-with-cronjob-on-venusgx.html

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.