This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import minimalmodbus | |
import serial | |
powerMeter = minimalmodbus.Instrument('/dev/ttyUSB0', 1) | |
powerMeter.serial.baudrate = 9600 | |
powerMeter.serial.bytesize = 8 | |
powerMeter.serial.parity = serial.PARITY_NONE | |
powerMeter.serial.stopbits = 1 | |
powerMeter.mode = minimalmodbus.MODE_RTU |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var dashboardSecure = { | |
dashboardLog: function(message){ | |
console.log(message); | |
$("#pubNubStatus").html(message); | |
}, | |
runBoot: function(){ | |
dashboard.dashboardLog('Secure Dashboard is booting'); | |
dashboard.dashboardLog('Access Token is required'); | |
// Clear the HTML from the main page and present a non dismissable modal containing an access token |