Freeboard and Dweet with RPICT
This is the easiest and quickest way to get started with a dashboard for monitoring RPICT data.
It uses two online tools called Freeboard and Dweet. Dweet is used to send the data in json format in a broker service. Freeboard reads from Dweet and display the data on a dashboard with charts text display and gauges.
Please note:
- This is only for real time monitoring. There is no data recording in place and historical data can not be queried.
- Data are public and can be read by anyone on Dweet.
- No subcriptions required.
Prerequisites
We assume here the Raspberrypi has been fully setup using the guide below.
Howto setup Raspbian for serial read
Download and run the Dweet forwarding tool
Download the forwarding tool with
wget lechacal.com/RPICT/tools/lcl-dweet-forward.py.zip
Unzip it
unzip lcl-dweet-forward.py.zip
Run it using
python3 lcl-dweet-forward.py
Without any additional arguments this creates a key called a 'thing' in Dweet which can be considered as the channel on which your data will be sent. The output will look like this
Save this thing name ('LCL29H6I3Q2KI' in the example) in your notes as we will need it again later on.
Setup Freeboard
Download a template dashboard from the list below. You might have to do right-click + Save link as. These templates assumes you are using the factory configuration for the RPICT card.
- RPICT3V1 Gauges and Charts. RPICT3V1.json
- RPICT3V1 Digital numbers only. RPICT3V1_all_digital.json
- RPICT4V3 Gauges and Charts. RPICT4V3.json
- RPICT7V1 Gauges and Charts. RPICT7V1.json
- RPICT8 Gauges and Charts. RPICT8.json
(contact us if the template for your board is missing).
Now go to the Freeboard website.
In Freeboard use 'Load Freeboard' link to upload the template you just downloaded.
In the Datasources section click on 'RPICT'.
The form will appear as shown below. Only modify the thing name.
- Type: Select Dweet.io
- Name: Enter 'RPICT' here. (must be RPICT exactly to work with our templates)
- Thing Name: Modify this and enter your own thing name given by the command line above.
Once the form saved the dashboard display data from the RPICT card.
lcl-dweet-forward.py
Let's get back to the Dweet forwarding tool.
You can stop it using Control C. Next time you launch it again you should this time give your thing name as argument to make sure your dashboard is updated.
In our above example this would be
python3 lcl-dweet-forward.py LCL29H6I3Q2KI
Modifying Dashboards
We will not make a documentation for building dashboards here. This is normally fairly intuitive and straight forward. Just some guidance on the data being sent.
RPICT data are sent with field names as CH_01 CH_02 CH-03 and so on. Please refer to the specific RPICT model page to decode what each of these are.
For example for the RPICT3V1 this would be
CH_01 Active Power 1
CH_02 Apparent Power 1
CH_03 Irms
CH_04 Vrms
etc...