-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Frederik Walk edited this page Feb 23, 2016
·
8 revisions
Welcome to the msg-prototype-2 wiki!
- Import
db/initdb.sql
into a PostgreSQL 9.5+ database
- Copy
msgdbd.toml.example
tomsgdbd.toml
and configure your database parameters and job intervals. - Run
./msgdbd -config=msgdbd.toml
- Copy
config.toml.example
toconfig.toml
and configure your database parameters, make sure benchmark is set tofalse
. - Run
./msgpd -config=config.toml
- Server needs to be running.
- Run
./msgpc newRandom save randomdevice.conf
for a new random device or./msgpc newSDM630 save sdm630device.conf
for a new SDM630 device. - Run
./msgpc load randomdevice.conf heartbeat print save randomdevice.conf
or./msgpc load sdm630device.conf heartbeat print save sdm630device.conf
respectively. - Visit
http://[::1]:8080
, create a user, login and add a new device using the Id from the previous command on the Devices page. - Again, run
./msgpc load randomdevice.conf heartbeat print save randomdevice.conf
or./msgpc load sdm630device.conf heartbeat print save sdm630device.conf
respectively. - For random devices, run
./msgpc load randomdevice.conf genSensors 3 registerSensors save randomdevice.conf
(Replace the 3 if more sensors are desired) - For SDM630 devices, run
./msgpc load sdm630device.conf registerSensors save sdm630device.conf
- Run
./msgpc load randomdevice.conf sendRandomUpdates 1s -1
to send random values in an 1 second interval or run./msgpc load sdm630device.conf sendSDM630Updates 10s -1 /dev/ttyUSB0
to send values read from a SDM630 device attached to /dev/ttyUSB0 in an 10s interval.