-
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.sqlinto a PostgreSQL 9.5+ database
- Copy
msgdbd.toml.exampletomsgdbd.tomland configure your database parameters and job intervals. - Run
./msgdbd -config=msgdbd.toml
- Copy
config.toml.exampletoconfig.tomland 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.conffor a new random device or./msgpc newSDM630 save sdm630device.conffor a new SDM630 device. - Run
./msgpc load randomdevice.conf heartbeat print save randomdevice.confor./msgpc load sdm630device.conf heartbeat print save sdm630device.confrespectively. - 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.confor./msgpc load sdm630device.conf heartbeat print save sdm630device.confrespectively. - 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 -1to send random values in an 1 second interval or run./msgpc load sdm630device.conf sendSDM630Updates 10s -1 /dev/ttyUSB0to send values read from a SDM630 device attached to /dev/ttyUSB0 in an 10s interval.