Building pictory configuration from scratch

Topics about the Software of Revolution Pi
Post Reply
RMeissnerCC
Posts: 58
Joined: 03 Dec 2019, 10:29

Building pictory configuration from scratch

Post by RMeissnerCC »

Dear all,
we are planning to upgrade our fleet soon to use a few hundred devices including Revolution Pis. Due to the way our device has to run and handle, e.g., device faults, we want to be able to change the pictory configuration (_config.rsc) to our needs.
Are there any documentations or manuals on how to construct the configuration?

Furthermore, is it possible to change the RevPi clock rate and whether the Modbus Master service is enabled from the cli/python?

Best, Robert
Frank
Posts: 65
Joined: 09 Jan 2017, 10:46

Re: Building pictory configuration from scratch

Post by Frank »

Hello Robert,

please have a look at this table:

https://revolution.kunbus.de/tabellaris ... rsc-datei/

The .rsc files have JSON format and though they may become large if you have a bigger number of device in your configuration, their structure is not excessively complicated.

If plan to create a /var/www/pictory/projects/_config.rsc file without using -PiCtory- it is best to start first with a test configuration IN -Pictory- (add a base device and only one additional device), save it - either als the standard startup configuration (_config.rsc) or use any other name, e.g. -test01- (with the File / Save As menu option of -PiCtory- ... and omit any _ in front of the filename. Underscores are reserved for .rsc files which can't be deleted by the GUI). Then look into the directory /var/www/pictory/projects where you will find your test01.rsc file. You can easily format this file with any JSON online beautifier like https://jsonlint.com/ to further study its content.

Three important things to keep in mind:

1. You absolute MUST assure, that the .rsc files you manually create are a) valid JSON and b) are structurally correct - since this is normally done by -PiCtory- and the RevPi-devices rely on these two aspects. No further validation and checking is done after a .rsc file has been deployed, so you will surely get in trouble when trying to run a faulty .rsc file on your device.

2. Even if 1. is fine (JSON format and content is syntactically and structurally ok) the most crucial part of any .rsc file is the value offsets - these are normally calculated by -PiCtory-, but if you create a .rsc file 'manually' you must handle them correctly according to the respective .RAP files of each device in your configuration (look into /var/www/pictory/resources/data/rap) If you get these calculations wrong (typically creating overlapping memory areas), the outcome when running the configuration will be quite unpredictable!

3. If Modbus-devices are part of your configuration, the content of your .rsc files gets additional data in the Devices..extend (C.16, C.17) parts of the of the JSON structure. There is currently no explanation of this part of the .rsc files online available. Please get in touch again if you need additional information about this.

Regards,
Frank
User avatar
lukas
Expert
Posts: 186
Joined: 13 Feb 2017, 10:29

Re: Building pictory configuration from scratch

Post by lukas »

RMeissnerCC wrote: 26 Jun 2020, 09:33 Furthermore, is it possible to change the RevPi clock rate and whether the Modbus Master service is enabled from the cli/python?
Yes, by invoking e.g. "sudo revpi-config enable downclock-cpu 700" (pegs the CPU to 700 MHz; maximum is 1200 MHz) and "sudo revpi-config enable pimodus-master". See "man revpi-config" for details. The web interface is actually just a frontend for /usr/bin/revpi-config, which in turn is just a simple bash script.
Post Reply