Not intending to hijack, this is supplied in case it is useful to compare what might be a similar crash. Although the config file below is quite complete, in reality for this emonhub I only have node 33 configured, and the only items it should be communicating with are the emoncms server and MQTT (the other nodes are currently dealt with a different emonhub)
As an interest, I re-enabled my system and received a crash almost immediately. I am on HEAD apparently.
I did make some changes whilst trying to debug things, looks like I didn’t quite back all of them out:
diff --git a/src/interfacers/EmonHubMqttInterfacer.py b/src/interfacers/EmonHubMqttInterfacer.py
index d25958c..325fb5d 100644
--- a/src/interfacers/EmonHubMqttInterfacer.py
+++ b/src/interfacers/EmonHubMqttInterfacer.py
@@ -9,6 +9,14 @@ import Cargo
class EmonHubMqttInterfacer(EmonHubInterfacer):
+# The callback for when the client receives a CONNACK response from the server.
+ def aon_connect(self, client,usedata, rc):
+ print("Connected with result code "+str(rc))
+
+ # Subscribing in on_connect() means that if we lose the connection and
+ # reconnect then subscriptions will be renewed.
+ client.subscribe("$SYS/#")
+
def __init__(self, name, mqtt_user=" ", mqtt_passwd=" ", mqtt_host="127.0.0.1", mqtt_port=1883):
# Initialization
super(EmonHubMqttInterfacer, self).__init__(name)
@@ -33,8 +41,9 @@ class EmonHubMqttInterfacer(EmonHubInterfacer):
'nodevar_format_enable': 0,
'nodevar_format_basetopic': "nodes/"
};
-
self._mqttc = mqtt.Client()
+ self._log.debug("After client")
+
self._mqttc.on_connect = self.on_connect
self._mqttc.on_disconnect = self.on_disconnect
self._mqttc.on_message = self.on_message
@@ -45,14 +54,17 @@ class EmonHubMqttInterfacer(EmonHubInterfacer):
if not self._connected:
self._log.info("Connecting to MQTT Server")
try:
- self._mqttc.username_pw_set(self._user, self._passwd)
- self._mqttc.connect(self._host, self._port, 60)
+ self._mqttc.username_pw_set(self._user, self._passwd)
+ self._log.debug("Details:"+self._host+" :"+self._port)
+ self._mqttc.connect(host=self._host, port=self._port, keepalive=6, bind_address="10.1.0.53")
+ self._mqttc.tls_insecure_set(true)
except:
self._log.info("Could not connect...")
time.sleep(1.0)
self._mqttc.loop(0)
def on_connect(self, client, userdata, flags, rc):
+ self._log.debug("Connection made")
connack_string = {0:'Connection successful',
1:'Connection refused - incorrect protocol version',
@@ -72,6 +84,7 @@ class EmonHubMqttInterfacer(EmonHubInterfacer):
self._log.debug("CONACK => Return code: "+str(rc))
def on_disconnect(self, client, userdata, rc):
+ self._log.debug("Connection disconnected!!!")
if rc != 0:
self._log.info("Unexpected disconnection")
self._connected = False
@@ -80,6 +93,7 @@ class EmonHubMqttInterfacer(EmonHubInterfacer):
self._log.info("on_subscribe")
def on_message(self, client, userdata, msg):
+ self._log.info("message")
topic_parts = msg.topic.split("/")
if topic_parts[0] == self._settings["node_format_basetopic"][:-1]:
diff --git a/src/interfacers/emonhub_interfacer.py b/src/interfacers/emonhub_interfacer.py
index 2c9a1e1..e68c40a 100644
--- a/src/interfacers/emonhub_interfacer.py
+++ b/src/interfacers/emonhub_interfacer.py
@@ -168,7 +168,8 @@ class EmonHubInterfacer(threading.Thread):
# Discard the frame & return 'False' if it doesn't match the summed datasizes
if len(rxc.realdata) != sum(datasizes):
self._log.warning(str(rxc.uri) + " RX data length: " + str(len(rxc.realdata)) +
- " is not valid for datacodes " + str(datacodes))
+ " is not valid for datacodes " + str(datacodes) + "datasize:" +str(len((datasizes)))+":"+str(rxc.realdata))
+ self._log.warning(str(rxc.uri) + " RX data length: " + str(len(rxc.realdata)) +":"+ str(sum(datasizes)))
return False
else:
# Determine the expected number of values to be decoded
Anyways, the error occurred quite quickly this time (the first couple of 406 errors are semi-expected, there was no data to send, perhaps this is why it hits some people and not others?). Times between packets reduced to 1s:
2016-05-28 13:15:39,420 INFO MainThread EmonHub emonHub 'emon-pi' variant v1.1
2016-05-28 13:15:39,420 INFO MainThread Opening hub...
2016-05-28 13:15:39,420 INFO MainThread Logging level set to DEBUG
2016-05-28 13:15:39,420 INFO MainThread Creating EmonHubSocketInterfacer 'socketb'
2016-05-28 13:15:39,420 DEBUG MainThread Opening socket on port 51014
2016-05-28 13:15:39,421 INFO MainThread Creating EmonHubMqttInterfacer 'MQTT'
2016-05-28 13:15:39,421 INFO MainThread MQTT Init mqtt_host=10.1.0.53 mqtt_port=1883 mqtt_user=
2016-05-28 13:15:39,423 DEBUG MainThread After client
2016-05-28 13:15:39,423 DEBUG MainThread MQTT Subscribed to channel' : ToEmonCMS
2016-05-28 13:15:39,423 DEBUG MainThread MQTT Subscribed to channel' : espmon01
2016-05-28 13:15:39,423 DEBUG MainThread MQTT Subscribed to channel' : ch1
2016-05-28 13:15:39,423 INFO MainThread Creating EmonHubEmoncmsHTTPInterfacer 'emoncms'
2016-05-28 13:15:39,424 DEBUG MainThread emoncms Subscribed to channel' : ToEmonCMS
2016-05-28 13:15:39,424 DEBUG MainThread emoncms Subscribed to channel' : ch1
2016-05-28 13:15:39,424 DEBUG MainThread emoncms Subscribed to channel' : espmon01
2016-05-28 13:15:39,524 INFO MQTT Connecting to MQTT Server
2016-05-28 13:15:39,524 DEBUG MQTT Details:10.1.0.53 :1883
2016-05-28 13:15:39,525 INFO MQTT Could not connect...
2016-05-28 13:15:40,527 DEBUG MQTT Connection made
2016-05-28 13:15:40,528 INFO MQTT connection status: Connection successful
2016-05-28 13:15:40,528 DEBUG MQTT CONACK => Return code: 0
2016-05-28 13:15:40,629 INFO MQTT on_subscribe
2016-05-28 13:16:09,443 INFO emoncms sending: http://10.1.0.53/emoncms/input/bulk.json?apikey=E-M-O-N-C-M-S-A-P-I-K-E-Y&data=[]&sentat=1464437769
2016-05-28 13:16:09,484 WARNING emoncms send failure: wanted 'ok' but got 'Error: Format error, json string supplied is not valid
'
2016-05-28 13:16:09,484 INFO emoncms sending: http://10.1.0.53/emoncms/myip/set.json?apikey=E-M-O-N-C-M-S-A-P-I-K-E-Y
2016-05-28 13:16:09,498 WARNING emoncms emoncms couldn't send to server, HTTPError: 406
2016-05-28 13:16:39,513 INFO emoncms sending: http://10.1.0.53/emoncms/input/bulk.json?apikey=E-M-O-N-C-M-S-A-P-I-K-E-Y&data=[]&sentat=1464437799
2016-05-28 13:16:39,548 WARNING emoncms send failure: wanted 'ok' but got 'Error: Format error, json string supplied is not valid
'
2016-05-28 13:16:39,548 INFO emoncms sending: http://10.1.0.53/emoncms/myip/set.json?apikey=E-M-O-N-C-M-S-A-P-I-K-E-Y
2016-05-28 13:16:39,562 WARNING emoncms emoncms couldn't send to server, HTTPError: 406
2016-05-28 13:17:09,564 INFO emoncms sending: http://10.1.0.53/emoncms/input/bulk.json?apikey=E-M-O-N-C-M-S-A-P-I-K-E-Y&data=[]&sentat=1464437829
2016-05-28 13:17:09,606 WARNING emoncms send failure: wanted 'ok' but got 'Error: Format error, json string supplied is not valid
'
2016-05-28 13:17:09,606 INFO emoncms sending: http://10.1.0.53/emoncms/myip/set.json?apikey=E-M-O-N-C-M-S-A-P-I-K-E-Y
2016-05-28 13:17:09,621 WARNING emoncms emoncms couldn't send to server, HTTPError: 406
2016-05-28 13:17:39,642 INFO emoncms sending: http://10.1.0.53/emoncms/input/bulk.json?apikey=E-M-O-N-C-M-S-A-P-I-K-E-Y&data=[]&sentat=1464437859
2016-05-28 13:17:39,682 WARNING emoncms send failure: wanted 'ok' but got 'Error: Format error, json string supplied is not valid
'
2016-05-28 13:17:39,682 INFO emoncms sending: http://10.1.0.53/emoncms/myip/set.json?apikey=E-M-O-N-C-M-S-A-P-I-K-E-Y
2016-05-28 13:17:39,697 WARNING emoncms emoncms couldn't send to server, HTTPError: 406
2016-05-28 13:18:09,718 INFO emoncms sending: http://10.1.0.53/emoncms/input/bulk.json?apikey=E-M-O-N-C-M-S-A-P-I-K-E-Y&data=[]&sentat=1464437889
2016-05-28 13:18:09,759 WARNING emoncms send failure: wanted 'ok' but got 'Error: Format error, json string supplied is not valid
'
2016-05-28 13:18:09,760 INFO emoncms sending: http://10.1.0.53/emoncms/myip/set.json?apikey=E-M-O-N-C-M-S-A-P-I-K-E-Y
2016-05-28 13:18:09,774 WARNING emoncms emoncms couldn't send to server, HTTPError: 406
2016-05-28 13:18:39,733 INFO emoncms sending: http://10.1.0.53/emoncms/input/bulk.json?apikey=E-M-O-N-C-M-S-A-P-I-K-E-Y&data=[]&sentat=1464437919
2016-05-28 13:18:39,772 WARNING emoncms send failure: wanted 'ok' but got 'Error: Format error, json string supplied is not valid
'
2016-05-28 13:18:39,772 INFO emoncms sending: http://10.1.0.53/emoncms/myip/set.json?apikey=E-M-O-N-C-M-S-A-P-I-K-E-Y
2016-05-28 13:18:39,787 WARNING emoncms emoncms couldn't send to server, HTTPError: 406
2016-05-28 13:18:57,504 DEBUG socketb 1 NEW FRAME : 33 50 101 40 63 109 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 24000 0 33 477 896 466 543 1997 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 24000 10 531 2
2016-05-28 13:18:57,505 DEBUG socketb 1 Timestamp : 1464437937.5
2016-05-28 13:18:57,505 DEBUG socketb 1 From Node : 33
2016-05-28 13:18:57,505 DEBUG socketb 1 Values : [50, 101, 40, 63, 109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 240, 0, 33, 477, 896, 466, 543, 1997, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24000, 10, 531, 2]
2016-05-28 13:18:57,506 INFO socketb Publishing: emon/espmon01/ct01 50
2016-05-28 13:18:57,507 INFO socketb Publishing: emon/espmon01/ct02 101
2016-05-28 13:18:57,507 INFO socketb Publishing: emon/espmon01/ct03 40
2016-05-28 13:18:57,508 INFO socketb Publishing: emon/espmon01/ct04 63
2016-05-28 13:18:57,509 INFO socketb Publishing: emon/espmon01/ct05 109
2016-05-28 13:18:57,510 INFO socketb Publishing: emon/espmon01/ct06 0
2016-05-28 13:18:57,510 INFO socketb Publishing: emon/espmon01/ct07 0
2016-05-28 13:18:57,511 INFO socketb Publishing: emon/espmon01/ct08 0
2016-05-28 13:18:57,512 INFO socketb Publishing: emon/espmon01/ct09 0
2016-05-28 13:18:57,513 INFO socketb Publishing: emon/espmon01/ct10 0
2016-05-28 13:18:57,513 INFO socketb Publishing: emon/espmon01/ct11 0
2016-05-28 13:18:57,514 INFO socketb Publishing: emon/espmon01/ct12 0
2016-05-28 13:18:57,515 INFO socketb Publishing: emon/espmon01/ct13 0
2016-05-28 13:18:57,515 INFO socketb Publishing: emon/espmon01/ct14 0
2016-05-28 13:18:57,516 INFO socketb Publishing: emon/espmon01/ct15 0
2016-05-28 13:18:57,516 INFO socketb Publishing: emon/espmon01/ct16 0
2016-05-28 13:18:57,517 INFO socketb Publishing: emon/espmon01/vrms 240
2016-05-28 13:18:57,517 INFO socketb Publishing: emon/espmon01/time1 0
2016-05-28 13:18:57,518 INFO socketb Publishing: emon/espmon01/time2 33
2016-05-28 13:18:57,518 INFO socketb Publishing: emon/espmon01/counter 477
2016-05-28 13:18:57,519 INFO socketb Publishing: emon/espmon01/21 896
2016-05-28 13:18:57,519 INFO socketb Publishing: emon/espmon01/22 466
2016-05-28 13:18:57,520 INFO socketb Publishing: emon/espmon01/23 543
2016-05-28 13:18:57,520 INFO socketb Publishing: emon/espmon01/24 1997
2016-05-28 13:18:57,520 INFO socketb Publishing: emon/espmon01/25 0
2016-05-28 13:18:57,520 INFO socketb Publishing: emon/espmon01/26 0
2016-05-28 13:18:57,521 INFO socketb Publishing: emon/espmon01/27 0
2016-05-28 13:18:57,521 INFO socketb Publishing: emon/espmon01/28 0
2016-05-28 13:18:57,521 INFO socketb Publishing: emon/espmon01/29 0
2016-05-28 13:18:57,522 INFO socketb Publishing: emon/espmon01/30 0
2016-05-28 13:18:57,522 INFO socketb Publishing: emon/espmon01/31 0
2016-05-28 13:18:57,524 INFO socketb Publishing: emon/espmon01/32 0
2016-05-28 13:18:57,525 INFO socketb Publishing: emon/espmon01/33 0
2016-05-28 13:18:57,525 INFO socketb Publishing: emon/espmon01/34 0
2016-05-28 13:18:57,525 INFO socketb Publishing: emon/espmon01/35 0
2016-05-28 13:18:57,526 INFO socketb Publishing: emon/espmon01/36 24000
2016-05-28 13:18:57,526 INFO socketb Publishing: emon/espmon01/37 10
2016-05-28 13:18:57,527 INFO socketb Publishing: emon/espmon01/38 531
2016-05-28 13:18:57,533 INFO socketb Publishing: emon/espmon01/39 2
2016-05-28 13:18:57,533 INFO socketb Publishing: emon/espmon01/rssi 0
2016-05-28 13:18:57,534 INFO socketb Publishing: emonhub/rx/33/values 50,101,40,63,109,0,0,0,0,0,0,0,0,0,0,0,240,0,33,477,896,466,543,1997,0,0,0,0,0,0,0,0,0,0,0,24000,10,531,2
2016-05-28 13:18:57,534 INFO socketb Publishing: emonhub/rx/33/rssi 0
2016-05-28 13:18:57,534 DEBUG socketb 1 adding frame to buffer => [1464437937, 33, 50, 101, 40, 63, 109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 240, 0, 33, 477, 896, 466, 543, 1997, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24000, 10, 531, 2]
2016-05-28 13:18:57,534 DEBUG socketb 1 Sent to channel' : ch1
2016-05-28 13:18:58,649 DEBUG socketb 2 NEW FRAME : 33 128 237 120 157 408 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 24000 5 609 333 248 439 240 293 861 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 24000 4 539 4
2016-05-28 13:18:58,650 DEBUG socketb 2 Timestamp : 1464437938.65
2016-05-28 13:18:58,650 DEBUG socketb 2 From Node : 33
2016-05-28 13:18:58,650 DEBUG socketb 2 Values : [128, 237, 120, 157, 408, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 240, 5, 609, 333, 248, 439, 240, 293, 861, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24000, 4, 539, 4]
2016-05-28 13:18:58,650 INFO socketb Publishing: emon/espmon01/ct01 128
2016-05-28 13:18:58,651 INFO socketb Publishing: emon/espmon01/ct02 237
2016-05-28 13:18:58,651 INFO socketb Publishing: emon/espmon01/ct03 120
2016-05-28 13:18:58,651 INFO socketb Publishing: emon/espmon01/ct04 157
2016-05-28 13:18:58,651 INFO socketb Publishing: emon/espmon01/ct05 408
2016-05-28 13:18:58,652 INFO socketb Publishing: emon/espmon01/ct06 0
2016-05-28 13:18:58,652 INFO socketb Publishing: emon/espmon01/ct07 0
2016-05-28 13:18:58,652 INFO socketb Publishing: emon/espmon01/ct08 0
2016-05-28 13:18:58,653 INFO socketb Publishing: emon/espmon01/ct09 0
2016-05-28 13:18:58,653 INFO socketb Publishing: emon/espmon01/ct10 0
2016-05-28 13:18:58,653 INFO socketb Publishing: emon/espmon01/ct11 0
2016-05-28 13:18:58,653 INFO socketb Publishing: emon/espmon01/ct12 0
2016-05-28 13:18:58,653 INFO socketb Publishing: emon/espmon01/ct13 0
2016-05-28 13:18:58,653 INFO socketb Publishing: emon/espmon01/ct14 0
2016-05-28 13:18:58,654 INFO socketb Publishing: emon/espmon01/ct15 0
2016-05-28 13:18:58,654 INFO socketb Publishing: emon/espmon01/ct16 0
2016-05-28 13:18:58,654 INFO socketb Publishing: emon/espmon01/vrms 240
2016-05-28 13:18:58,655 INFO socketb Publishing: emon/espmon01/time1 5
2016-05-28 13:18:58,655 INFO socketb Publishing: emon/espmon01/time2 609
2016-05-28 13:18:58,655 INFO socketb Publishing: emon/espmon01/counter 333
2016-05-28 13:18:58,655 INFO socketb Publishing: emon/espmon01/21 248
2016-05-28 13:18:58,655 INFO socketb Publishing: emon/espmon01/22 439
2016-05-28 13:18:58,656 INFO socketb Publishing: emon/espmon01/23 240
2016-05-28 13:18:58,656 INFO socketb Publishing: emon/espmon01/24 293
2016-05-28 13:18:58,656 INFO socketb Publishing: emon/espmon01/25 861
2016-05-28 13:18:58,656 INFO socketb Publishing: emon/espmon01/26 0
2016-05-28 13:18:58,656 INFO socketb Publishing: emon/espmon01/27 0
2016-05-28 13:18:58,656 INFO socketb Publishing: emon/espmon01/28 0
2016-05-28 13:18:58,657 INFO socketb Publishing: emon/espmon01/29 0
2016-05-28 13:18:58,657 INFO socketb Publishing: emon/espmon01/30 0
2016-05-28 13:18:58,657 INFO socketb Publishing: emon/espmon01/31 0
2016-05-28 13:18:58,657 INFO socketb Publishing: emon/espmon01/32 0
2016-05-28 13:18:58,657 INFO socketb Publishing: emon/espmon01/33 0
2016-05-28 13:18:58,657 INFO socketb Publishing: emon/espmon01/34 0
2016-05-28 13:18:58,657 INFO socketb Publishing: emon/espmon01/35 0
2016-05-28 13:18:58,657 INFO socketb Publishing: emon/espmon01/36 0
2016-05-28 13:18:58,657 INFO socketb Publishing: emon/espmon01/37 24000
2016-05-28 13:18:58,657 INFO socketb Publishing: emon/espmon01/38 4
2016-05-28 13:18:58,657 INFO socketb Publishing: emon/espmon01/39 539
2016-05-28 13:18:58,658 INFO socketb Publishing: emon/espmon01/40 4
2016-05-28 13:18:58,658 INFO socketb Publishing: emon/espmon01/rssi 0
2016-05-28 13:18:58,658 INFO socketb Publishing: emonhub/rx/33/values 128,237,120,157,408,0,0,0,0,0,0,0,0,0,0,0,240,5,609,333,248,439,240,293,861,0,0,0,0,0,0,0,0,0,0,0,24000,4,539,4
2016-05-28 13:18:58,658 INFO socketb Publishing: emonhub/rx/33/rssi 0
2016-05-28 13:18:58,658 DEBUG socketb 2 adding frame to buffer => [1464437938, 33, 128, 237, 120, 157, 408, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 240, 5, 609, 333, 248, 439, 240, 293, 861, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24000, 4, 539, 4]
2016-05-28 13:18:58,658 DEBUG socketb 2 Sent to channel' : ch1
2016-05-28 13:18:59,765 DEBUG socketb 3 NEW FRAME : 33 0 0 0 033 509 887 501 578 1855 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 24000 0 512 6
2016-05-28 13:18:59,766 DEBUG socketb 3 Timestamp : 1464437939.77
2016-05-28 13:18:59,766 DEBUG socketb 3 From Node : 33
2016-05-28 13:18:59,766 DEBUG socketb 3 Values : [0, 0, 0, 33, 509, 887, 501, 578, 1855, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24000, 0, 512, 6]
2016-05-28 13:18:59,767 INFO socketb Publishing: emon/espmon01/ct01 0
2016-05-28 13:18:59,768 INFO socketb Publishing: emon/espmon01/ct02 0
2016-05-28 13:18:59,768 INFO socketb Publishing: emon/espmon01/ct03 0
2016-05-28 13:18:59,769 INFO socketb Publishing: emon/espmon01/ct04 33
2016-05-28 13:18:59,770 INFO socketb Publishing: emon/espmon01/ct05 509
2016-05-28 13:18:59,770 INFO socketb Publishing: emon/espmon01/ct06 887
2016-05-28 13:18:59,770 INFO socketb Publishing: emon/espmon01/ct07 501
2016-05-28 13:18:59,771 INFO socketb Publishing: emon/espmon01/ct08 578
2016-05-28 13:18:59,772 INFO socketb Publishing: emon/espmon01/ct09 1855
2016-05-28 13:18:59,772 INFO socketb Publishing: emon/espmon01/ct10 0
2016-05-28 13:18:59,772 INFO socketb Publishing: emon/espmon01/ct11 0
2016-05-28 13:18:59,773 INFO socketb Publishing: emon/espmon01/ct12 0
2016-05-28 13:18:59,774 INFO socketb Publishing: emon/espmon01/ct13 0
2016-05-28 13:18:59,774 INFO socketb Publishing: emon/espmon01/ct14 0
2016-05-28 13:18:59,774 INFO socketb Publishing: emon/espmon01/ct15 0
2016-05-28 13:18:59,775 INFO socketb Publishing: emon/espmon01/ct16 0
2016-05-28 13:18:59,776 INFO socketb Publishing: emon/espmon01/vrms 0
2016-05-28 13:18:59,776 INFO socketb Publishing: emon/espmon01/time1 0
2016-05-28 13:18:59,776 INFO socketb Publishing: emon/espmon01/time2 0
2016-05-28 13:18:59,777 INFO socketb Publishing: emon/espmon01/counter 0
2016-05-28 13:18:59,778 INFO socketb Publishing: emon/espmon01/21 24000
2016-05-28 13:18:59,778 INFO socketb Publishing: emon/espmon01/22 0
2016-05-28 13:18:59,778 INFO socketb Publishing: emon/espmon01/23 512
2016-05-28 13:18:59,778 INFO socketb Publishing: emon/espmon01/24 6
2016-05-28 13:18:59,778 INFO socketb Publishing: emon/espmon01/rssi 0
2016-05-28 13:18:59,779 INFO socketb Publishing: emonhub/rx/33/values 0,0,0,33,509,887,501,578,1855,0,0,0,0,0,0,0,0,0,0,0,24000,0,512,6
2016-05-28 13:18:59,779 INFO socketb Publishing: emonhub/rx/33/rssi 0
2016-05-28 13:18:59,780 DEBUG socketb 3 adding frame to buffer => [1464437939, 33, 0, 0, 0, 33, 509, 887, 501, 578, 1855, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24000, 0, 512, 6]
2016-05-28 13:18:59,780 DEBUG socketb 3 Sent to channel' : ch1
2016-05-28 13:19:00,980 DEBUG socketb 4 NEW FRAME : 33 128 237 120 15733 440 746 432 503 1549 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 24000 4 517 8
2016-05-28 13:19:00,980 DEBUG socketb 4 Timestamp : 1464437940.98
2016-05-28 13:19:00,980 DEBUG socketb 4 From Node : 33
2016-05-28 13:19:00,980 DEBUG socketb 4 Values : [128, 237, 120, 15733, 440, 746, 432, 503, 1549, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24000, 4, 517, 8]
2016-05-28 13:19:00,980 INFO socketb Publishing: emon/espmon01/ct01 128
2016-05-28 13:19:00,980 INFO socketb Publishing: emon/espmon01/ct02 237
2016-05-28 13:19:00,981 INFO socketb Publishing: emon/espmon01/ct03 120
2016-05-28 13:19:00,981 INFO socketb Publishing: emon/espmon01/ct04 15733
2016-05-28 13:19:00,981 INFO socketb Publishing: emon/espmon01/ct05 440
2016-05-28 13:19:00,981 INFO socketb Publishing: emon/espmon01/ct06 746
2016-05-28 13:19:00,981 INFO socketb Publishing: emon/espmon01/ct07 432
2016-05-28 13:19:00,981 INFO socketb Publishing: emon/espmon01/ct08 503
2016-05-28 13:19:01,036 INFO socketb Publishing: emon/espmon01/ct09 1549
2016-05-28 13:19:01,036 INFO socketb Publishing: emon/espmon01/ct10 0
2016-05-28 13:19:01,036 INFO socketb Publishing: emon/espmon01/ct11 0
2016-05-28 13:19:01,036 INFO socketb Publishing: emon/espmon01/ct12 0
2016-05-28 13:19:01,036 INFO socketb Publishing: emon/espmon01/ct13 0
2016-05-28 13:19:01,036 INFO socketb Publishing: emon/espmon01/ct14 0
2016-05-28 13:19:01,036 INFO socketb Publishing: emon/espmon01/ct15 0
2016-05-28 13:19:01,037 INFO socketb Publishing: emon/espmon01/ct16 0
2016-05-28 13:19:01,037 INFO socketb Publishing: emon/espmon01/vrms 0
2016-05-28 13:19:01,037 INFO socketb Publishing: emon/espmon01/time1 0
2016-05-28 13:19:01,037 INFO socketb Publishing: emon/espmon01/time2 0
2016-05-28 13:19:01,037 INFO socketb Publishing: emon/espmon01/counter 0
2016-05-28 13:19:01,037 INFO socketb Publishing: emon/espmon01/21 24000
2016-05-28 13:19:01,037 INFO socketb Publishing: emon/espmon01/22 4
2016-05-28 13:19:01,037 INFO socketb Publishing: emon/espmon01/23 517
2016-05-28 13:19:01,037 INFO socketb Publishing: emon/espmon01/24 8
2016-05-28 13:19:01,037 INFO socketb Publishing: emon/espmon01/rssi 0
2016-05-28 13:19:01,037 INFO socketb Publishing: emonhub/rx/33/values 128,237,120,15733,440,746,432,503,1549,0,0,0,0,0,0,0,0,0,0,0,24000,4,517,8
2016-05-28 13:19:01,079 INFO socketb Publishing: emonhub/rx/33/rssi 0
2016-05-28 13:19:01,079 DEBUG socketb 4 adding frame to buffer => [1464437940, 33, 128, 237, 120, 15733, 440, 746, 432, 503, 1549, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24000, 4, 517, 8]
2016-05-28 13:19:01,079 DEBUG socketb 4 Sent to channel' : ch1
2016-05-28 13:19:01,385 WARNING MainThread socketb thread is dead
...
2016-05-28 13:19:09,678 WARNING MainThread socketb thread is dead
2016-05-28 13:19:09,780 INFO emoncms sending: http://10.1.0.53/emoncms/input/bulk.json?apikey=E-M-O-N-C-M-S-A-P-I-K-E-Y&data=[[1464437937,33,50,101,40,63,109,0,0,0,0,0,0,0,0,0,0,0,240,0,33,477,896,466,543,1997,0,0,0,0,0,0,0,0,0,0,0,24000,10,531,2],[1464437938,33,128,237,120,157,408,0,0,0,0,0,0,0,0,0,0,0,240,5,609,333,248,439,240,293,861,0,0,0,0,0,0,0,0,0,0,0,24000,4,539,4],[1464437939,33,0,0,0,33,509,887,501,578,1855,0,0,0,0,0,0,0,0,0,0,0,24000,0,512,6],[1464437940,33,128,237,120,15733,440,746,432,503,1549,0,0,0,0,0,0,0,0,0,0,0,24000,4,517,8]]&sentat=1464437949
2016-05-28 13:19:09,901 WARNING MainThread socketb thread is dead
2016-05-28 13:19:09,902 DEBUG emoncms acknowledged receipt with 'ok' from http://10.1.0.53/emoncms
2016-05-28 13:19:09,902 INFO emoncms sending: http://10.1.0.53/emoncms/myip/set.json?apikey=E-M-O-N-C-M-S-A-P-I-K-E-Y
2016-05-28 13:19:09,910 WARNING emoncms emoncms couldn't send to server, HTTPError: 406
2016-05-28 13:19:10,108 WARNING MainThread socketb thread is dead
... the above line repeats frequently
2016-05-28 13:19:23,006 DEBUG MainThread SIGINT received.
2016-05-28 13:19:23,007 INFO MainThread Exiting hub...
2016-05-28 13:19:23,157 INFO MainThread Exit completed
#######################################################################
####################### emonhub.conf #########################
#######################################################################
## **LEGACY CONFIG: For use with 17thJune2015 emonPi/emonBase image and older **
## (check image version by looking for file in /boot)
## Uses old CSV MQTT topic structure compatible with Emoncms Nodes
## Does not use MQTT server authentication
### emonHub configuration file, for info see documentation:
### http://github.com/openenergymonitor/emonhub/blob/master/configuration.md
#######################################################################
####################### emonHub settings #######################
#######################################################################
[hub]
### loglevel must be one of DEBUG, INFO, WARNING, ERROR, and CRITICAL
loglevel = DEBUG #(default:WARNING)
### Uncomment this to also send to syslog
# use_syslog = yes
#######################################################################
####################### Interfacers #######################
#######################################################################
[interfacers]
### This interfacer manages the RFM12Pi/RFM69Pi/emonPi module
#[[RFM2Pi]]
# Type = EmonHubJeeInterfacer
# [[[init_settings]]]
# com_port = /dev/ttyAMA0
# com_baud = 38400 # 9600 for old RFM12Pi modules
# [[[runtimesettings]]]
# pubchannels = ToEmonCMS,
# subchannels = ToRFM12,
#
# group = 210
# frequency = 433
# baseid = 5 # emonPi / emonBase nodeID
# quiet = true # Report incomplete RF packets (no implemented on emonPi)
# calibration = 230V # (UK/EU: 230V, US: 110V)
# # interval = 0 # Interval to transmit time to emonGLCD (seconds)
[[socketb]]
Type = EmonHubSocketInterfacer
[[[init_settings]]]
port_nb = 51014
[[[runtimesettings]]]
# timestamped = false
[[MQTT]]
Type = EmonHubMqttInterfacer
[[[init_settings]]]
mqtt_host = 10.1.0.53
mqtt_port = 1883
mqtt_user = ''
mqtt_passwd = ''
[[[runtimesettings]]]
pubchannels = ToRFM12,ch1,espmon01
subchannels = ToEmonCMS,espmon01,ch1
# emonhub/rx/10/values format
# Use with emoncms Nodes module
node_format_enable = 1
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/
[[emoncms]]
Type = EmonHubEmoncmsHTTPInterfacer
[[[init_settings]]]
[[[runtimesettings]]]
pubchannels = ToRFM12,ch1,espmon01
subchannels = ToEmonCMS,ch1,espmon01
url = http://10.1.0.53/emoncms
apikey =
senddata = 1 # Enable sending data to Emoncms.org
sendstatus = 1 # Enable sending WAN IP to Emoncms.org MyIP > https://emoncms.org/myip/list
sendinterval= 30 # Bulk send interval to Emoncms.org in seconds
#######################################################################
####################### Nodes #######################
#######################################################################
[nodes]
## See config user guide: http://github.com/openenergymonitor/emonhub/blob/master/configuration.md
[[5]]
nodename = emonpi
[[[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
[[6]]
nodename = emontxshield
[[[rx]]]
names = power1, power2, power3, power4, vrms
datacode = h
scales = 1,1,1,1,0.01
units =W,W,W,W,V
[[7]]
nodename = emontx4
[[[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
[[8]]
nodename = emontx3
[[[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
[[9]]
nodename = emontx2
[[[rx]]]
names = power1, power2, power3, power4, vrms, temp1, temp2, temp3, temp4, temp5, temp6, pulse
datacode = h
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
[[10]]
nodename = emontx1
[[[rx]]]
names = power1, power2, power3, power4, vrms, temp1, temp2, temp3, temp4, temp5, temp6, pulse
datacode = h
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
[[19]]
nodename = emonth1
[[[rx]]]
names = temperature, external temperature, humidity, battery
datacode = h
scales = 0.1,0.1,0.1,0.1
units = C,C,%,V
[[20]]
nodename = emonth2
[[[rx]]]
names = temperature, external temperature, humidity, battery
datacode = h
scales = 0.1,0.1,0.1,0.1
units = C,C,%,V
[[21]]
nodename = emonth3
[[[rx]]]
names = temperature, external temperature, humidity, battery
datacode = h
scales = 0.1,0.1,0.1,0.1
units = C,C,%,V
[[22]]
nodename = emonth4
[[[rx]]]
names = temperature, external temperature, humidity, battery
datacode = h
scales = 0.1,0.1,0.1,0.1
units = C,C,%,V
[[23]]
nodename = emonth5
[[[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
[[24]]
nodename = emonth6
[[[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
[[25]]
nodename = emonth7
[[[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
[[26]]
nodename = emonth8
[[[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
[[33]]
nodename = espmon01
[[[rx]]]
names = ct01,ct02,ct03,ct04,ct05,ct06,ct07,ct08,ct09,ct10,ct11,ct12,ct13,ct14,ct15,ct16,vrms,time1,time2,counter
scales = 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0.01,1,1,1
units = W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,V,ms,ms,p