-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/openenergymonitor/emonhub
- Loading branch information
Showing
47 changed files
with
1,742 additions
and
184 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
[available] | ||
|
||
[[emonpi]] | ||
nodename = emonpi | ||
nodeids = 5, | ||
[[[rx]]] | ||
names = power1,power2,power1pluspower2,vrms,t1,t2,t3,t4,t5,t6,pulsecount | ||
datacodes = h, h, h, h, h, h, h, h, h, h, L | ||
scales = 1,1,1,0.01,0.1,0.1,0.1,0.1,0.1,0.1,1 | ||
units = W,W,W,V,C,C,C,C,C,C,p | ||
|
||
[[emontxshield]] | ||
nodename = emontxshield | ||
nodeids = 6, | ||
[[[rx]]] | ||
names = power1, power2, power3, power4, vrms | ||
datacodes = h,h,h,h,h | ||
scales = 1,1,1,1,0.01 | ||
units = W,W,W,W,V | ||
|
||
[[emontx3_discreet]] | ||
nodename = emontx3 | ||
nodeids = 7,8,9,10 | ||
[[[rx]]] | ||
names = power1, power2, power3, power4, vrms, temp1, temp2, temp3, temp4, temp5, temp6, pulse | ||
datacodes = h,h,h,h,h,h,h,h,h,h,h,L | ||
scales = 1,1,1,1,0.01,0.1,0.1, 0.1,0.1,0.1,0.1,1 | ||
units = W,W,W,W,V,C,C,C,C,C,C,p | ||
|
||
[[emontx3_3phase]] | ||
nodename = 3phase | ||
nodeids = 11,12,13,14 | ||
[[[rx]]] | ||
names = powerL1, powerL2, powerL3, power4, Vrms, temp1, temp2, temp3, temp4, temp5, temp6, pulse | ||
datacodes = h,h,h,h,h,h,h,h,h,h,h,L | ||
scales = 1,1,1,1,0.01,0.01,0.01,0.01,0.01,0.01,0.01,1 | ||
units = W,W,W,W,V,C,C,C,C,C,C,p | ||
|
||
[[emontx3_cm]] | ||
nodename = emontx3cm | ||
nodeids = 15,16 | ||
[[[rx]]] | ||
names = MSG, Vrms, P1, P2, P3, P4, E1, E2, E3, E4, T1, T2, T3, pulse | ||
datacodes = L,h,h,h,h,h,l,l,l,l,h,h,h,L | ||
scales = 1,0.01,1,1,1,1,1,1,1,1,0.01,0.01,0.01,1 | ||
units = n,V,W,W,W,W,Wh,Wh,Wh,Wh,C,C,C,p | ||
whitening = 1 | ||
|
||
[[emontx3_cm_rf69n]] | ||
nodename = emontx3cm | ||
nodeids = 15,16 | ||
[[[rx]]] | ||
names = MSG2, Vrms, P1, P2, P3, P4, E1, E2, E3, E4, T1, T2, T3, pulse | ||
datacodes = L,h,h,h,h,h,l,l,l,l,h,h,h,L | ||
scales = 1,0.01,1,1,1,1,1,1,1,1,0.01,0.01,0.01,1 | ||
units = n,V,W,W,W,W,Wh,Wh,Wh,Wh,C,C,C,p | ||
whitening = 0 | ||
|
||
[[emonth1]] | ||
nodename = emonth | ||
nodeids = 19,20,21,22 | ||
[[[rx]]] | ||
names = temperature, external temperature, humidity, battery | ||
datacodes = h,h,h,h | ||
scales = 0.1,0.1,0.1,0.1 | ||
units = C,C,%,V | ||
|
||
[[emonth2]] | ||
nodename = emonth | ||
nodeids = 23,24,25,26 | ||
[[[rx]]] | ||
names = temperature, external temperature, humidity, battery, pulsecount | ||
datacodes = h,h,h,h,L | ||
scales = 0.1,0.1,0.1,0.1,1 | ||
units = C,C,%,V,p | ||
|
||
[[emonTx4]] | ||
nodename = emonTx4 | ||
nodeids = 17,18 | ||
[[[rx]]] | ||
names = MSG, Vrms, P1, P2, P3, P4, P5, P6, E1, E2, E3, E4, E5, E6, T1, T2, T3, pulse | ||
datacodes = L,h,h,h,h,h,h,h,l,l,l,l,l,l,h,h,h,L | ||
scales = 1,0.01,1,1,1,1,1,1,1,1,1,1,1,1,0.01,0.01,0.01,1 | ||
units = n,V,W,W,W,W,W,W,Wh,Wh,Wh,Wh,Wh,Wh,C,C,C,p |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
####################################################################### | ||
####################### emonhub.conf ######################### | ||
####################################################################### | ||
### emonHub configuration file, for info see documentation: | ||
### https://github.com/openenergymonitor/emonhub/blob/emon-pi/configuration.md | ||
####################################################################### | ||
####################### emonHub settings ####################### | ||
####################################################################### | ||
|
||
[hub] | ||
### loglevel must be one of DEBUG, INFO, WARNING, ERROR, and CRITICAL | ||
loglevel = DEBUG | ||
autoconf = 1 | ||
### Uncomment this to also send to syslog | ||
# use_syslog = yes | ||
####################################################################### | ||
####################### Interfacers ####################### | ||
####################################################################### | ||
|
||
[interfacers] | ||
### This interfacer manages the RFM12Pi/RFM69Pi/emonPi module | ||
[[EmonPi2]] | ||
Type = EmonHubOEMInterfacer | ||
[[[init_settings]]] | ||
com_port = /dev/ttyAMA0 | ||
com_baud = 38400 | ||
[[[runtimesettings]]] | ||
pubchannels = ToEmonCMS, | ||
subchannels = ToRFM12, | ||
|
||
[[USB0]] | ||
Type = EmonHubOEMInterfacer | ||
[[[init_settings]]] | ||
com_port = /dev/ttyUSB0 | ||
com_baud = 115200 | ||
[[[runtimesettings]]] | ||
pubchannels = ToEmonCMS, | ||
subchannels = ToRFM12, | ||
nodename = emonTx4 | ||
|
||
[[SPI]] | ||
Type = EmonHubRFM69LPLInterfacer | ||
[[[init_settings]]] | ||
nodeid = 5 | ||
networkID = 210 | ||
[[[runtimesettings]]] | ||
pubchannels = ToEmonCMS, | ||
|
||
|
||
[[MQTT]] | ||
Type = EmonHubMqttInterfacer | ||
[[[init_settings]]] | ||
mqtt_host = 127.0.0.1 | ||
mqtt_port = 1883 | ||
mqtt_user = emonpi | ||
mqtt_passwd = emonpimqtt2016 | ||
|
||
[[[runtimesettings]]] | ||
pubchannels = ToRFM12, | ||
subchannels = ToEmonCMS, | ||
|
||
# emonhub/rx/10/values format | ||
# Use with emoncms Nodes module | ||
node_format_enable = 0 | ||
node_format_basetopic = emonhub/ | ||
|
||
# emon/emontx/power1 format - use with Emoncms MQTT input | ||
# http://github.com/emoncms/emoncms/blob/master/docs/RaspberryPi/MQTT.md | ||
nodevar_format_enable = 1 | ||
nodevar_format_basetopic = emon/ | ||
|
||
# Single JSON payload published - use with Emoncms MQTT | ||
node_JSON_enable = 0 | ||
node_JSON_basetopic = emon/ | ||
|
||
[[emoncmsorg]] | ||
Type = EmonHubEmoncmsHTTPInterfacer | ||
[[[init_settings]]] | ||
[[[runtimesettings]]] | ||
pubchannels = ToRFM12, | ||
subchannels = ToEmonCMS, | ||
url = https://emoncms.org | ||
apikey = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | ||
senddata = 1 # Enable sending data to Emoncms.org | ||
sendnames = 1 # Send full input names (compression will be automatically enabled) | ||
interval = 30 # Bulk send interval to Emoncms.org in seconds | ||
|
||
####################################################################### | ||
####################### Nodes ####################### | ||
####################################################################### | ||
|
||
## See config user guide: https://github.com/openenergymonitor/emonhub | ||
## If autoconf is enabled above, node configuration will automatically | ||
## populate based on templates listed in available.conf | ||
|
||
[nodes] |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
####################################################################### | ||
####################### emonhub.conf ######################### | ||
####################################################################### | ||
|
||
[interfacers] | ||
|
||
### Retrieves data from the Jaguar Land Rover API for electric car monitoring | ||
[[JaguarLandRover]] | ||
Type = EmonHubJaguarLandRoverInterfacer | ||
[[[init_settings]]] | ||
timeinverval = 600 | ||
duringchargetimeinterval = 60 | ||
nodeid = 28 | ||
jlrusername = USERNAMEGOESHERE | ||
jlrpassword = PASSWORDGOESHERE | ||
[[[runtimesettings]]] | ||
pubchannels = ToEmonCMS, |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Jaguar Land Rover Interfacer # | ||
|
||
This interfacer collects data from Jagular Land Rover's InControl API. Data collected on vehicle state of charge is suitable for use with OpenEVSE via MQTT. | ||
|
||
Tested with Range Rover Velar PHEV. | ||
|
||
## Readings ## | ||
|
||
The following values (in order) are determined from the Jaguar Land Rover API. | ||
|
||
* ODOMETER_MILES | ||
* EV_STATE_OF_CHARGE | ||
* EV_RANGE_ON_BATTERY_MILES | ||
* EV_RANGE_ON_BATTERY_KM | ||
* EV_CHARGING_RATE_SOC_PER_HOUR | ||
* EV_SECONDS_TO_FULLY_CHARGED | ||
* EV_CHARGING_STATUS (1 or 0) | ||
|
||
## Sample config for emonhub.conf ## | ||
|
||
Sample configuration, add these settings under the [interfacers] tag. Changing username and password to match those for your account on https://incontrol.landrover.com/ | ||
|
||
``` | ||
[[JaguarLandRover]] | ||
Type = EmonHubJaguarLandRoverInterfacer | ||
[[[init_settings]]] | ||
timeinverval = 600 | ||
duringchargetimeinterval = 60 | ||
nodeid = 28 | ||
jlrusername = USERNAMEGOESHERE | ||
jlrpassword = PASSWORDGOESHERE | ||
[[[runtimesettings]]] | ||
pubchannels = ToEmonCMS, | ||
``` | ||
|
||
## Settings ## | ||
|
||
### timeinverval ### | ||
Interval between taking readings from API. Normally 10 minutes (600 seconds) | ||
|
||
### duringchargetimeinterval ### | ||
When charging the API updates more frequently, so update every 1 minute when charging is detected (60 seconds) | ||
|
||
### nodeid ### | ||
The emonHub/emonCMS nodeId to use | ||
|
||
### jlrusername ### | ||
Username as used in the https://incontrol.landrover.com/ site | ||
|
||
### jlrpassword ### | ||
Password as used in the https://incontrol.landrover.com/ site |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[[OEM]] | ||
Type = EmonHubOEMInterfacer | ||
[[[init_settings]]] | ||
com_port = /dev/ttyAMA0 | ||
com_baud = 115200 | ||
[[[runtimesettings]]] | ||
pubchannels = ToEmonCMS, |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
### OEM Interfacer | ||
|
||
Replaces EmonHubJeeInterfacer with a more flexible implementation that can accept a range of different formats from connected devices, including OpenEnergyMonitor devices. Here are a number of supported data formats: | ||
|
||
- Decimal space seperate representation of RFM binary data e.g OK 5 0 0 0 0 (-0) | ||
- KEY:VALUE format e.g power1:100,power2:200 | ||
- JSON format e.g {"power1":100,"power2":200} | ||
|
||
Example configuration: | ||
|
||
```text | ||
[[OEM]] | ||
Type = EmonHubOEMInterfacer | ||
[[[init_settings]]] | ||
com_port = /dev/ttyAMA0 | ||
com_baud = 115200 | ||
[[[runtimesettings]]] | ||
pubchannels = ToEmonCMS, | ||
``` | ||
|
||
``` | ||
[[usbdata]] | ||
Type = EmonHubOEMInterfacer | ||
[[[init_settings]]] | ||
com_port = /dev/ttyUSB0 | ||
com_baud = 115200 | ||
[[[runtimesettings]]] | ||
pubchannels = ToEmonCMS, | ||
subchannels = ToRFM12, | ||
``` |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[[SPI]] | ||
Type = EmonHubRF69Interfacer | ||
[[[init_settings]]] | ||
nodeid = 5 | ||
group = 210 | ||
[[[runtimesettings]]] | ||
pubchannels = ToEmonCMS, |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
### RF69 Interfacer | ||
|
||
Read data directly from a RFM69cw module on a RaspberryPi: | ||
|
||
```text | ||
[[SPI]] | ||
Type = EmonHubRF69Interfacer | ||
[[[init_settings]]] | ||
nodeid = 5 | ||
group = 210 | ||
[[[runtimesettings]]] | ||
pubchannels = ToEmonCMS, | ||
``` | ||
|
||
Steps to get working: | ||
|
||
1. Enable SPI in raspi-config: | ||
2. sudo adduser emonhub spi | ||
3. sudo apt-get install python3-spidev (may just upgrade an existing package) |
Oops, something went wrong.