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
| """Forwards Emporia Vue Watts value to OpenEVSE for the Solar Divert feature. | |
| This connects an Emporia Vue's net usage reading to the OpenEVSE eco charging | |
| mode. | |
| The Vue needs vuegraf (https://github.com/jertel/vuegraf) to publish its data | |
| to MQTT. (The Emporia API provides fresh values every 60s at most often.) | |
| The OpenEVSE needs the "Solar Divert" service turned on and configured to read | |
| from this plugin's "publish_net_watts_topic" MQTT topic. Then switch to |
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
| from pyprofiling import Profiled | |
| import logging | |
| import random | |
| import threading | |
| A_HASH_INDEX = 1 | |
| class A(object): |
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
| from pyprofiling import Profiled | |
| import logging | |
| import random | |
| import threading | |
| class ResizingList(list): | |
| """A list of values that automatically grows when items are set, and returns None if an index | |
| greater than the list length is provided.""" |
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
| """Draw a live bar graph of frequency data (from Arduino FHT).""" | |
| import collections | |
| import curses | |
| import math | |
| import serial # http://pyserial.sourceforge.net/ | |
| import time | |
| _SERIAL_DEVICE = '/dev/tty.usbmodemfa141' | |
| _GRAPH_MAX_Y = 100 |