This application takes the USB stats service from Cambronix USB SmartHub (through a WebSocket API) and publishes the data to our MQTT Server. We use this within CE to get device and battery data on the CE Device Wall for various applications.
npm install
npm start
Copy the Template.env
file, edit the variables needed and then rename the file to .env
This is currently not running as a service but can be run by forever
forever start smarthub_to_mqtt.js
Below is work in progress
sudo chown root /Library/LaunchDaemons/uk.ac.ucl.casa.ce.usb-device-wall.plist
sudo chmod 0644 /Library/LaunchDaemons/uk.ac.ucl.casa.ce.usb-device-wall.plist
Run the Service
sudo launchctl load /Library/LaunchDaemons/uk.ac.ucl.casa.ce.usb-device-wall.plist