thomasnorris / BoilerControl

Automatic gas source switching, monitoring, and logging

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Notes

  • This project is a RPi3 replacement for the basement PLC gas-switching system with added features.
  • Uses Blynk for monitoring and control and JavaScript (via Node.js) as the language of choice.
  • This project is configured to run on a Blynk server hosted on the same Pi. Instructions for this are here. All of the default ports are used. This must be set up first using this server .jar and Java 8.
    • The admin portal is at https://IP_OF_PI:9443/admin
    • The port to use in the Blynk app is 9443
    • An admin user will be created the first time the server is run
    • An auth token will be generated when connecting to the server from the app
  • As of 8/31/19, Raspbian Stretch must be used as newer distributions have compatibility issues.

Installation

  • The Pi's timezone must be manually set for task scheduling to work as expected. Follow these instructions up to step 6 for getting it set up.
    • Edit /etc/rc.local to include this to make sure that the time zone is applied on every startup (set for Eastern time)
      • cp /usr/share/zoneinfo/US/Eastern /etc/localtime && /etc/init.d/ntp restart
  • Configure the Node-Logger submodule following the instructions here
  • Clone this repo and change directory into the bin folder
  • Run this command
    • sudo chmod +x install.sh && ./install.sh
  • Start the program with PM2
    • pm2 start program.js --name BoilerControl
  • Optionally, add the following lines to /etc/rc.local for auto startup
    • sudo java -jar "/PATH/TO/SERVER/FOLDER/server-VERSION.jar" -dataFolder "/PATH/TO/SERVER/FOLDER/" &
    • sudo pm2 start /PATH/TO/BoilerControl/bin/program.js --name BoilerControl

JavaScript References

About

Automatic gas source switching, monitoring, and logging


Languages

Language:JavaScript 96.6%Language:Shell 3.4%