3: Device provisioning - bruno-beloff/scs_mfr GitHub Wiki

docs > software repositories > scs_mfr


The following is a subset of the device configuration commands. This list is relevant where a new device is being provisioned and its hardware configuration is identical to the master from which it is cloned.

Services should not be running while provisioning is taking place.

Part 3: Calibration

Specify the initial calibration of the relevant components. Baselines should be set to zero initially, then set to correct values after soak test:

3.2 ./timezone.py -s ZONE
3.3 ./afe_calib.py { -a SERIAL_NUMBER | -s SERIAL_NUMBER YYYY-MM-DD }
3.8 ./fuel_gauge_calib.py -z D

Part 4: Communication

Generate a shared secret and the device identity on the network, together with device authentication (for AWS or OpenSensors). Finally, specify the sampling schedule:

4.3 ./shared_secret.py -g
4.4 ./system_id.py -va
4.5 ./aws_project.py -vs ORG GROUP LOCATION

Part 5: AWS Greengrass

Configure the device identity within AWS Greengrass, and configure the contents of the Greengrass deployment:

Required if upgrading from pre-model configurations:

5.1 ./gas_model_conf.py
5.2 ./pmx_model_conf.py

To be run as root. The greengrass service should not be running at this time:

5.3 aws_identity -sv
5.4 aws_group_setup -vsmfi4

Part 6: Enabling

Enable services and synchronise with the AWS Greengrass cloud:

To be run as root:

rm /usr/local/etc/scs_machine_uncommissioned

systemctl start scs_greengrass.service

To be run as scs. The greengrass service should must be running:

5.5 ./aws_deployment.py -vwi4

To be run as root:

systemctl enable scs_*

shutdown now