FORUM CTRLX AUTOMATION
ctrlX World Partner Apps for ctrlX AUTOMATION
Dear Community User! We will start the migration process in one hour.
The community will be then in READ ONLY mode.
Read more: Important
information on the platform change.
04-13-2021 09:07 PM
Hi,
I will build a custom snap. It is the telegraf agent with an developed plugin for the datalayer SSE.
in the snapcraft.yml there will be something like this
grade: stable confinement: strict apps: ctrlx-telegraf: command: telegraf --config <PATH-TO-CONFIG>/config.conf daemon: simple restart-condition: always plugs: [network-bind]
The file config.conf is in toml syntax eg.:
[[outputs.influxdb_v2]]
urls = ["https://ingest.example.de"]
token = "xxxxx"
organization = "ctrlx-vlab"
bucket = "ctrlx"
[[inputs.ctrlxcore]]
url = "https://192.168.1.1"
username = "boschrexroth"
password = "boschrexroth"
node = "scheduler/tasks/ctrlXAutomation/info/counter"
publishintervalms = "100"
insecure_skip_verify = true
Solved! Go to Solution.
05-04-2021 02:39 PM
Sorry for the delay.
To store data into the configurations manageable via the ctrlX CORE web interface you simple connect to the solution manager with a plug in your snapcraft.yaml:
plugs:
active-solution:
interface: content
content: solutions
target: $SNAP_COMMON/solutions
An them simply store your file in the active configuration:
/var/snap/rexroth-solutions/common/solutions/activeConfiguration/MyUserApp
07-05-2021 08:23 AM
Could you post a small code example how to store e.g. json file to this directory?
Or is there a more detailed documentation how to save and load custom snap data?
Thanks!
07-06-2021 09:26 AM - edited 07-06-2021 12:03 PM
@ asti: I will answer you in your new topic:
https://developer.community.boschrexroth.com/t5/SDK/Cannot-store-data-in-configuration/m-p/26139