# Getting started npm install Create a database user and database called 'diller' with the password 'diller' and run: ./node_modules/.bin/db-migrate up Run Diller: gulp diller-mqtt This assumes that you have `gulp` installed globally. If you don't you can run `./node_modules/.bin/gulp`. ## Installing services under Systemd Generate service configuration: grunt gen-systemd Install services sudo ln -s `pwd`/systemd/diller-mqtt.service /etc/systemd/system sudo ln -s `pwd`/systemd/diller-web.service /etc/systemd/system sudo systemctl --system daemon-reload Start daemons sudo systemctl start diller-mqtt sudo systemctl start diller-web sudo systemctl status diller-mqtt sudo systemctl status diller-web # MQTT topics /diller / /property / /value /name /description ## Sending a new property value mosquitto_pub -h trygvis.io -t /diller/aa:bb:cc:dd:ee:ff/property/temp-0/value -m 12.3 mosquitto_pub -h trygvis.io -t /diller/aa:bb:cc:dd:ee:ff/property/temp-0/name -m Bathroom mosquitto_pub -h trygvis.io -t /diller/aa:bb:cc:dd:ee:ff/property/temp-0/description -m "Second Floor" # TODO ## Web * Device * Update device name * Property * DONE: Update property name and description * DONE: Push to device ## MQTT * Update a property's last value and last timestamp * Update aggregates in the background * Worker process with process.spawn() * DONE: Listen to /$SYS, register when the clients send a PING message * -Keep the data in memory.- * DONE: Store in database.