You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Frederik Walk edited this page Feb 23, 2016
·
8 revisions
Welcome to the msg-prototype-2 wiki!
Setup
Database
Import db/initdb.sql into a PostgreSQL 9.5+ database
Database maintenance
Copy msgdbd.toml.example to msgdbd.toml and configure your database parameters and job intervals.
Run ./msgdbd -config=msgdbd.toml
Server
Copy config.toml.example to config.toml and configure your database parameters, make sure benchmark is set to false.
Run ./msgpd -config=config.toml
Client simulator
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.