btmon for python 3?

Post any 3rd party software here.
ben
Site Admin
Posts: 4262
Joined: Fri Jun 04, 2010 9:39 am

Re: btmon for python 3?

Post by ben » Thu Feb 18, 2021 3:32 pm

vespaman wrote:
Wed Feb 17, 2021 7:16 am
So here's one from yesterday;

Code: Select all

oxygen /etc/btmon # /usr/bin/python /etc/btmon/btmon3.py --debug -c /etc/btmon/gem.cfg
2021/02/16 18:48:58 btmon: 3.3.1
2021/02/16 18:48:58 python: 3.8.7 (default, Feb 14 2021, 12:14:26) 
[GCC 10.2.0]
2021/02/16 18:48:58 platform: linux
2021/02/16 18:48:58 polarity is reversed
2021/02/16 18:48:58 device type: gem
2021/02/16 18:48:58 device list: ['']
2021/02/16 18:48:58 packet format: gem48ptbin
2021/02/16 18:48:58 schema: counters
2021/02/16 18:48:58 buffer size: 120
2021/02/16 18:48:58 SOCKET: timeout: 60
2021/02/16 18:48:58 SOCKET: server host: 10.1.200.7
2021/02/16 18:48:58 SOCKET: server port: 8000
2021/02/16 18:48:58 SOCKET: poll interval: 12
2021/02/16 18:48:58 MQTT: mqtt:localhost:1883?clientid=btmon-gem1
2021/02/16 18:48:58 MQTT: user: <not-specified>
2021/02/16 18:48:58 MQTT: tls: <not-specified>
2021/02/16 18:48:58 MQTT: topic: /house/energy
2021/02/16 18:48:58 MQTT: qos: 0
2021/02/16 18:48:58 MQTT: retain: False
2021/02/16 18:48:58 MQTT: will: <not-specified>
2021/02/16 18:48:58 MQTT: upload period: 12
2021/02/16 18:48:58 MQTT: map: 
2021/02/16 18:48:58 packet format is GEM48PTBinaryPacket
2021/02/16 18:48:58 using collector PollingSocketClientCollector
2021/02/16 18:48:58 using 1 processors:
2021/02/16 18:48:58   MQTTProcessor
2021/02/16 18:48:58 setup PollingSocketClientCollector
2021/02/16 18:48:58 setup MQTTProcessor
2021/02/16 18:48:58 SOCKET: waiting for 12 seconds
2021/02/16 18:49:10 opening socket connection to 10.1.200.7:8000
2021/02/16 18:49:10 sending request 1 to device 
2021/02/16 18:49:10 SOCKET: sending ^^^APISPK
2021/02/16 18:49:10 waiting for data from device 
2021/02/16 18:49:10 reading 1 of 1 packets
2021/02/16 18:49:11 adding buffer for 01000590
2021/02/16 18:49:11 buffering packet ts:1613497751 sn:01000590
2021/02/16 18:49:11 closing socket connection
2021/02/16 18:49:11 buffer info:
2021/02/16 18:49:11   01000590:   1 of 120 (1613497751)
2021/02/16 18:49:11 processing with MQTTProcessor
2021/02/16 18:49:11 not enough data for 01000590
2021/02/16 18:49:11 SOCKET: waiting for 12 seconds
2021/02/16 18:49:23 opening socket connection to 10.1.200.7:8000
2021/02/16 18:49:23 sending request 1 to device 
2021/02/16 18:49:23 SOCKET: sending ^^^APISPK
2021/02/16 18:49:23 waiting for data from device 
2021/02/16 18:49:23 reading 1 of 1 packets
2021/02/16 18:49:24 buffering packet ts:1613497764 sn:01000590
2021/02/16 18:49:24 closing socket connection
2021/02/16 18:49:24 buffer info:
2021/02/16 18:49:24   01000590:   2 of 120 (1613497764)
2021/02/16 18:49:24 processing with MQTTProcessor
2021/02/16 18:49:24 2 buffered packets sn:01000590
2021/02/16 18:49:24 1 calculated packets sn:01000590
2021/02/16 18:49:24 MQTT: len=71, msgs=[{"topic": "/house/energy/01000590_volts", "payload": 229.7, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch1_w", "payload": 1158.231, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch2_w", "payload": 1795.154, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch3_w", "payload": 1014.0, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch7_w", "payload": 36.846, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch11_w", "payload": 334.769, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch12_w", "payload": 140.462, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch14_w", "payload": 47.846, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch16_w", "payload": 677.0, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch17_w", "payload": 9.846, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch18_w", "payload": 964.692, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch23_w", "payload": 3.0, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch24_w", "payload": 103.231, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch25_w", "payload": 18.385, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch28_w", "payload": 5.231, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch30_w", "payload": 653.0, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch31_w", "payload": 856.385, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch1_wh", "payload": 38983126.423, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch2_wh", "payload": 31072067.837, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch3_wh", "payload": 21508010.634, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch4_wh", "payload": 1925791.604, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch5_wh", "payload": 226521.929, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch6_wh", "payload": 291194.419, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch7_wh", "payload": 2473731.378, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch8_wh", "payload": 662055.362, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch9_wh", "payload": -553841.193, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch10_wh", "payload": 49790.834, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch11_wh", "payload": 11514842.331, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch12_wh", "payload": 5352073.974, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch13_wh", "payload": 30558.8, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch14_wh", "payload": 686052.571, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch15_wh", "payload": 254221.222, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch16_wh", "payload": 12855166.452, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch17_wh", "payload": 3272632.427, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch18_wh", "payload": 8470985.594, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch19_wh", "payload": 1927639.411, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch20_wh", "payload": 1101227.07, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch21_wh", "payload": -20762611.861, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch22_wh", "payload": -11737495.056, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch23_wh", "payload": 1429365.192, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch24_wh", "payload": 2288746.424, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch25_wh", "payload": 865967.183, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch26_wh", "payload": 70474.791, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch27_wh", "payload": 440734.911, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch28_wh", "payload": 252866.122, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch29_wh", "payload": 477896.755, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch30_wh", "payload": 14014785.535, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch31_wh", "payload": 21144033.253, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch32_wh", "payload": 642502.049, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_p4", "payload": 29, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_t1", "payload": 26.0, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_t2", "payload": 22.5, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_t3", "payload": -2.0, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_t4", "payload": 21.0, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch1_dwh", "payload": 4.182, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch2_dwh", "payload": 6.482, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch3_dwh", "payload": 3.662, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch7_dwh", "payload": 0.133, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch11_dwh", "payload": 1.209, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch12_dwh", "payload": 0.507, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch14_dwh", "payload": 0.173, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch16_dwh", "payload": 2.445, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch17_dwh", "payload": 0.036, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch18_dwh", "payload": 3.484, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch22_dwh", "payload": 0.0, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch23_dwh", "payload": 0.011, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch24_dwh", "payload": 0.373, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch25_dwh", "payload": 0.066, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch28_dwh", "payload": 0.019, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch30_dwh", "payload": 2.358, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch31_dwh", "payload": 3.093, "qos": 0, "retain": false}]
2021/02/16 18:49:24 SOCKET: waiting for 12 seconds
2021/02/16 18:49:36 opening socket connection to 10.1.200.7:8000
2021/02/16 18:49:36 sending request 1 to device 
2021/02/16 18:49:36 SOCKET: sending ^^^APISPK
2021/02/16 18:49:36 waiting for data from device 
2021/02/16 18:49:36 reading 1 of 1 packets
2021/02/16 18:49:37 buffering packet ts:1613497777 sn:01000590
2021/02/16 18:49:37 closing socket connection
2021/02/16 18:49:37 buffer info:
2021/02/16 18:49:37   01000590:   3 of 120 (1613497777)
2021/02/16 18:49:37 processing with MQTTProcessor
2021/02/16 18:49:37 2 buffered packets sn:01000590
2021/02/16 18:49:37 1 calculated packets sn:01000590
2021/02/16 18:49:37 MQTT: len=71, msgs=[{"topic": "/house/energy/01000590_volts", "payload": 230.0, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch1_w", "payload": 1160.308, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch2_w", "payload": 1793.692, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch3_w", "payload": 1014.231, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch7_w", "payload": 36.769, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch11_w", "payload": 334.769, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch12_w", "payload": 140.846, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch14_w", "payload": 48.538, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch16_w", "payload": 679.462, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch17_w", "payload": 9.923, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch18_w", "payload": 961.231, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch23_w", "payload": 3.0, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch24_w", "payload": 102.769, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch25_w", "payload": 18.077, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch28_w", "payload": 5.154, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch30_w", "payload": 654.308, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch31_w", "payload": 855.615, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch1_wh", "payload": 38983130.613, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch2_wh", "payload": 31072074.314, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch3_wh", "payload": 21508014.297, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch4_wh", "payload": 1925791.604, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch5_wh", "payload": 226521.929, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch6_wh", "payload": 291194.419, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch7_wh", "payload": 2473731.511, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch8_wh", "payload": 662055.362, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch9_wh", "payload": -553841.193, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch10_wh", "payload": 49790.834, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch11_wh", "payload": 11514843.54, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch12_wh", "payload": 5352074.482, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch13_wh", "payload": 30558.8, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch14_wh", "payload": 686052.746, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch15_wh", "payload": 254221.222, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch16_wh", "payload": 12855168.906, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch17_wh", "payload": 3272632.462, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch18_wh", "payload": 8470989.065, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch19_wh", "payload": 1927639.411, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch20_wh", "payload": 1101227.07, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch21_wh", "payload": -20762611.861, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch22_wh", "payload": -11737495.056, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch23_wh", "payload": 1429365.203, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch24_wh", "payload": 2288746.796, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch25_wh", "payload": 865967.249, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch26_wh", "payload": 70474.791, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch27_wh", "payload": 440734.911, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch28_wh", "payload": 252866.14, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch29_wh", "payload": 477896.755, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch30_wh", "payload": 14014787.898, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch31_wh", "payload": 21144036.343, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch32_wh", "payload": 642502.049, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_p4", "payload": 29, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_t1", "payload": 26.0, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_t2", "payload": 22.5, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_t3", "payload": -2.0, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_t4", "payload": 21.0, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch1_dwh", "payload": 4.19, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch2_dwh", "payload": 6.477, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch3_dwh", "payload": 3.663, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch7_dwh", "payload": 0.133, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch11_dwh", "payload": 1.209, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch12_dwh", "payload": 0.509, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch14_dwh", "payload": 0.175, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch16_dwh", "payload": 2.454, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch17_dwh", "payload": 0.036, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch18_dwh", "payload": 3.471, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch22_dwh", "payload": 0.0, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch23_dwh", "payload": 0.011, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch24_dwh", "payload": 0.371, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch25_dwh", "payload": 0.065, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch28_dwh", "payload": 0.019, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch30_dwh", "payload": 2.363, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch31_dwh", "payload": 3.09, "qos": 0, "retain": false}]
2021/02/16 18:49:37 SOCKET: waiting for 12 seconds
2021/02/16 18:49:50 opening socket connection to 10.1.200.7:8000
2021/02/16 18:49:50 sending request 1 to device 
2021/02/16 18:49:50 SOCKET: sending ^^^APISPK
2021/02/16 18:49:50 waiting for data from device 
2021/02/16 18:49:50 reading 1 of 1 packets
2021/02/16 18:49:50 buffering packet ts:1613497790 sn:01000590
2021/02/16 18:49:50 closing socket connection
2021/02/16 18:49:50 buffer info:
2021/02/16 18:49:50   01000590:   4 of 120 (1613497790)
2021/02/16 18:49:50 processing with MQTTProcessor
2021/02/16 18:49:50 2 buffered packets sn:01000590
2021/02/16 18:49:50 1 calculated packets sn:01000590
Thanks,
- Micael
Add the --print option too to see if the 0s show up there. Trying to figure out whether it's the MQTT processor or the parsing.
Ben
Brultech Research Inc.
E: ben(at)brultech.com
vespaman
Posts: 68
Joined: Sat Oct 08, 2011 2:48 am
Location: Sweden

Re: btmon for python 3?

Post by vespaman » Fri Feb 19, 2021 6:04 am

OK, so that was a bit more informative!

Code: Select all

oxygen /home/micke # /usr/bin/python /etc/btmon/btmon3.py --debug --print -c /etc/btmon/gem.cfg 
2021/02/19 12:00:39 btmon: 3.3.1
2021/02/19 12:00:39 python: 3.8.7 (default, Feb 14 2021, 12:14:26) 
[GCC 10.2.0]
2021/02/19 12:00:39 platform: linux
2021/02/19 12:00:39 polarity is reversed
2021/02/19 12:00:39 device type: gem
2021/02/19 12:00:39 device list: ['']
2021/02/19 12:00:39 packet format: gem48ptbin
2021/02/19 12:00:39 schema: counters
2021/02/19 12:00:39 buffer size: 120
2021/02/19 12:00:39 SOCKET: timeout: 60
2021/02/19 12:00:39 SOCKET: server host: 10.1.200.7
2021/02/19 12:00:39 SOCKET: server port: 8000
2021/02/19 12:00:39 SOCKET: poll interval: 12
2021/02/19 12:00:39 MQTT: mqtt:localhost:1883?clientid=btmon-gem1
2021/02/19 12:00:39 MQTT: user: <not-specified>
2021/02/19 12:00:39 MQTT: tls: <not-specified>
2021/02/19 12:00:39 MQTT: topic: /house/energy
2021/02/19 12:00:39 MQTT: qos: 0
2021/02/19 12:00:39 MQTT: retain: False
2021/02/19 12:00:39 MQTT: will: <not-specified>
2021/02/19 12:00:39 MQTT: upload period: 12
2021/02/19 12:00:39 MQTT: map: 
2021/02/19 12:00:39 packet format is GEM48PTBinaryPacket
2021/02/19 12:00:39 using collector PollingSocketClientCollector
2021/02/19 12:00:39 using 2 processors:
2021/02/19 12:00:39   PrintProcessor
2021/02/19 12:00:39   MQTTProcessor
2021/02/19 12:00:39 setup PollingSocketClientCollector
2021/02/19 12:00:39 setup PrintProcessor
2021/02/19 12:00:39 setup MQTTProcessor
2021/02/19 12:00:39 SOCKET: waiting for 12 seconds
2021/02/19 12:00:51 opening socket connection to 10.1.200.7:8000
2021/02/19 12:00:51 sending request 1 to device 
2021/02/19 12:00:51 SOCKET: sending ^^^APISPK
2021/02/19 12:00:51 waiting for data from device 
2021/02/19 12:00:51 reading 1 of 1 packets
2021/02/19 12:00:53 adding buffer for 01000590
2021/02/19 12:00:53 buffering packet ts:1613732453 sn:01000590
2021/02/19 12:00:53 closing socket connection
2021/02/19 12:00:53 buffer info:
2021/02/19 12:00:53   01000590:   1 of 120 (1613732453)
2021/02/19 12:00:53 processing with PrintProcessor
2021/02/19 12:00:53 not enough data for 01000590
2021/02/19 12:00:53 processing with MQTTProcessor
2021/02/19 12:00:53 not enough data for 01000590
2021/02/19 12:00:53 SOCKET: waiting for 12 seconds
2021/02/19 12:01:05 opening socket connection to 10.1.200.7:8000
2021/02/19 12:01:05 sending request 1 to device 
2021/02/19 12:01:05 SOCKET: sending ^^^APISPK
2021/02/19 12:01:05 waiting for data from device 
2021/02/19 12:01:05 reading 1 of 1 packets
2021/02/19 12:01:06 buffering packet ts:1613732466 sn:01000590
2021/02/19 12:01:06 closing socket connection
2021/02/19 12:01:06 buffer info:
2021/02/19 12:01:06   01000590:   2 of 120 (1613732466)
2021/02/19 12:01:06 processing with PrintProcessor
2021/02/19 12:01:06 2 buffered packets sn:01000590
2021/02/19 12:01:06 1 calculated packets sn:01000590

2021/02/19 12:01:06: Serial: 01000590
2021/02/19 12:01:06: Voltage:  231.10V
2021/02/19 12:01:06: Ch01:  39053.621514KWh (  524W)
2021/02/19 12:01:06: Ch02:  31143.183576KWh (  291W)
2021/02/19 12:01:06: Ch03:  21567.798170KWh (  609W)
2021/02/19 12:01:06: Ch04:   1925.905572KWh (    0W)
2021/02/19 12:01:06: Ch05:    227.836178KWh (    0W)
2021/02/19 12:01:06: Ch06:    291.194419KWh (    0W)
2021/02/19 12:01:06: Ch07:   2476.425927KWh (   63W)
2021/02/19 12:01:06: Ch08:    662.055362KWh (    0W)
2021/02/19 12:01:06: Ch09:   -553.841193KWh (    0W)
2021/02/19 12:01:06: Ch10:     49.790834KWh (    0W)
2021/02/19 12:01:06: Ch11:  11527.713224KWh (   99W)
2021/02/19 12:01:06: Ch12:   5356.171292KWh (   72W)
2021/02/19 12:01:06: Ch13:     30.558800KWh (    0W)
2021/02/19 12:01:06: Ch14:    687.840532KWh (   36W)
2021/02/19 12:01:06: Ch15:    254.221222KWh (    0W)
2021/02/19 12:01:06: Ch16:  12896.054842KWh (  218W)
2021/02/19 12:01:06: Ch17:   3273.457762KWh (   10W)
2021/02/19 12:01:06: Ch18:   8487.097628KWh (    4W)
2021/02/19 12:01:06: Ch19:   1927.741461KWh (    0W)
2021/02/19 12:01:06: Ch20:   1101.227070KWh (    0W)
2021/02/19 12:01:06: Ch21: -20762.611861KWh (    0W)
2021/02/19 12:01:06: Ch22: -11737.166300KWh (   45W)
2021/02/19 12:01:06: Ch23:   1431.117910KWh (    3W)
2021/02/19 12:01:06: Ch24:   2291.283080KWh (    0W)
2021/02/19 12:01:06: Ch25:    867.101324KWh (   11W)
2021/02/19 12:01:06: Ch26:     70.474791KWh (    0W)
2021/02/19 12:01:06: Ch27:    440.858266KWh (   21W)
2021/02/19 12:01:06: Ch28:    254.134179KWh (    5W)
2021/02/19 12:01:06: Ch29:    477.896755KWh (    0W)
2021/02/19 12:01:06: Ch30:  14054.701274KWh (  191W)
2021/02/19 12:01:06: Ch31:  21198.368745KWh (  454W)
2021/02/19 12:01:06: Ch32:    642.502049KWh (    0W)
2021/02/19 12:01:06: p1:               0
2021/02/19 12:01:06: p2:               0
2021/02/19 12:01:06: p3:               0
2021/02/19 12:01:06: p4:              29
2021/02/19 12:01:06: t1:       25.500000
2021/02/19 12:01:06: t2:       17.000000
2021/02/19 12:01:06: t3:        2.000000
2021/02/19 12:01:06: t4:       21.000000
2021/02/19 12:01:06: t5:        0.000000
2021/02/19 12:01:06: t6:        0.000000
2021/02/19 12:01:06: t7:        0.000000
2021/02/19 12:01:06: t8:        0.000000
2021/02/19 12:01:06 processing with MQTTProcessor
2021/02/19 12:01:06 2 buffered packets sn:01000590
2021/02/19 12:01:06 1 calculated packets sn:01000590
2021/02/19 12:01:06 MQTT: len=72, msgs=[{"topic": "/house/energy/01000590_volts", "payload": 231.1, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch1_w", "payload": 524.308, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch2_w", "payload": 291.538, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch3_w", "payload": 609.077, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch7_w", "payload": 63.231, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch11_w", "payload": 99.923, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch12_w", "payload": 72.308, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch14_w", "payload": 36.769, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch16_w", "payload": 218.462, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch17_w", "payload": 10.0, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch18_w", "payload": 4.769, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch22_w", "payload": 45.0, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch23_w", "payload": 3.0, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch25_w", "payload": 11.0, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch27_w", "payload": 21.538, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch28_w", "payload": 5.538, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch30_w", "payload": 191.077, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch31_w", "payload": 454.0, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch1_wh", "payload": 39053621.514, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch2_wh", "payload": 31143183.576, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch3_wh", "payload": 21567798.17, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch4_wh", "payload": 1925905.572, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch5_wh", "payload": 227836.178, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch6_wh", "payload": 291194.419, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch7_wh", "payload": 2476425.927, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch8_wh", "payload": 662055.362, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch9_wh", "payload": -553841.193, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch10_wh", "payload": 49790.834, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch11_wh", "payload": 11527713.224, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch12_wh", "payload": 5356171.292, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch13_wh", "payload": 30558.8, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch14_wh", "payload": 687840.532, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch15_wh", "payload": 254221.222, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch16_wh", "payload": 12896054.842, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch17_wh", "payload": 3273457.762, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch18_wh", "payload": 8487097.628, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch19_wh", "payload": 1927741.461, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch20_wh", "payload": 1101227.07, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch21_wh", "payload": -20762611.861, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch22_wh", "payload": -11737166.3, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch23_wh", "payload": 1431117.91, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch24_wh", "payload": 2291283.08, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch25_wh", "payload": 867101.324, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch26_wh", "payload": 70474.791, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch27_wh", "payload": 440858.266, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch28_wh", "payload": 254134.179, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch29_wh", "payload": 477896.755, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch30_wh", "payload": 14054701.274, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch31_wh", "payload": 21198368.745, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch32_wh", "payload": 642502.049, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_p4", "payload": 29, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_t1", "payload": 25.5, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_t2", "payload": 17.0, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_t3", "payload": 2.0, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_t4", "payload": 21.0, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch1_dwh", "payload": 1.893, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch2_dwh", "payload": 1.053, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch3_dwh", "payload": 2.199, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch7_dwh", "payload": 0.228, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch11_dwh", "payload": 0.361, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch12_dwh", "payload": 0.261, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch14_dwh", "payload": 0.133, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch16_dwh", "payload": 0.789, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch17_dwh", "payload": 0.036, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch18_dwh", "payload": 0.017, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch22_dwh", "payload": 0.162, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch23_dwh", "payload": 0.011, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch25_dwh", "payload": 0.04, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch27_dwh", "payload": 0.078, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch28_dwh", "payload": 0.02, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch30_dwh", "payload": 0.69, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch31_dwh", "payload": 1.639, "qos": 0, "retain": false}]
2021/02/19 12:01:06 SOCKET: waiting for 12 seconds
2021/02/19 12:01:18 opening socket connection to 10.1.200.7:8000
2021/02/19 12:01:18 sending request 1 to device 
2021/02/19 12:01:18 SOCKET: sending ^^^APISPK
2021/02/19 12:01:18 waiting for data from device 
2021/02/19 12:01:18 reading 1 of 1 packets
2021/02/19 12:01:19 buffering packet ts:1613732479 sn:01000590
2021/02/19 12:01:19 closing socket connection
2021/02/19 12:01:19 buffer info:
2021/02/19 12:01:19   01000590:   3 of 120 (1613732479)
2021/02/19 12:01:19 processing with PrintProcessor
2021/02/19 12:01:19 2 buffered packets sn:01000590
2021/02/19 12:01:19 1 calculated packets sn:01000590

2021/02/19 12:01:19: Serial: 01000590
2021/02/19 12:01:19: Voltage:  230.80V
2021/02/19 12:01:19: Ch01:  39053.623364KWh (  512W)
2021/02/19 12:01:19: Ch02:  31143.184574KWh (  276W)
2021/02/19 12:01:19: Ch03:  21567.800325KWh (  596W)
2021/02/19 12:01:19: Ch04:   1925.905572KWh (    0W)
2021/02/19 12:01:19: Ch05:    227.836178KWh (    0W)
2021/02/19 12:01:19: Ch06:    291.194419KWh (    0W)
2021/02/19 12:01:19: Ch07:   2476.426155KWh (   63W)
2021/02/19 12:01:19: Ch08:    662.055362KWh (    0W)
2021/02/19 12:01:19: Ch09:   -553.841193KWh (    0W)
2021/02/19 12:01:19: Ch10:     49.790834KWh (    0W)
2021/02/19 12:01:19: Ch11:  11527.713588KWh (  100W)
2021/02/19 12:01:19: Ch12:   5356.171552KWh (   72W)
2021/02/19 12:01:19: Ch13:     30.558800KWh (    0W)
2021/02/19 12:01:19: Ch14:    687.840666KWh (   37W)
2021/02/19 12:01:19: Ch15:    254.221222KWh (    0W)
2021/02/19 12:01:19: Ch16:  12896.055576KWh (  203W)
2021/02/19 12:01:19: Ch17:   3273.457798KWh (   10W)
2021/02/19 12:01:19: Ch18:   8487.097646KWh (    5W)
2021/02/19 12:01:19: Ch19:   1927.741461KWh (    0W)
2021/02/19 12:01:19: Ch20:   1101.227070KWh (    0W)
2021/02/19 12:01:19: Ch21: -20762.611861KWh (    0W)
2021/02/19 12:01:19: Ch22: -11737.166137KWh (   45W)
2021/02/19 12:01:19: Ch23:   1431.117921KWh (    3W)
2021/02/19 12:01:19: Ch24:   2291.283080KWh (    0W)
2021/02/19 12:01:19: Ch25:    867.101364KWh (   11W)
2021/02/19 12:01:19: Ch26:     70.474791KWh (    0W)
2021/02/19 12:01:19: Ch27:    440.858345KWh (   21W)
2021/02/19 12:01:19: Ch28:    254.134199KWh (    5W)
2021/02/19 12:01:19: Ch29:    477.896755KWh (    0W)
2021/02/19 12:01:19: Ch30:  14054.701912KWh (  176W)
2021/02/19 12:01:19: Ch31:  21198.370340KWh (  441W)
2021/02/19 12:01:19: Ch32:    642.502049KWh (    0W)
2021/02/19 12:01:19: p1:               0
2021/02/19 12:01:19: p2:               0
2021/02/19 12:01:19: p3:               0
2021/02/19 12:01:19: p4:              29
2021/02/19 12:01:19: t1:       25.500000
2021/02/19 12:01:19: t2:       17.000000
2021/02/19 12:01:19: t3:        2.000000
2021/02/19 12:01:19: t4:       21.000000
2021/02/19 12:01:19: t5:        0.000000
2021/02/19 12:01:19: t6:        0.000000
2021/02/19 12:01:19: t7:        0.000000
2021/02/19 12:01:19: t8:        0.000000
2021/02/19 12:01:19 processing with MQTTProcessor
2021/02/19 12:01:19 2 buffered packets sn:01000590
2021/02/19 12:01:19 1 calculated packets sn:01000590
2021/02/19 12:01:19 MQTT: len=72, msgs=[{"topic": "/house/energy/01000590_volts", "payload": 230.8, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch1_w", "payload": 512.231, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch2_w", "payload": 276.308, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch3_w", "payload": 596.923, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch7_w", "payload": 63.077, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch11_w", "payload": 100.615, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch12_w", "payload": 72.231, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch14_w", "payload": 37.0, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch16_w", "payload": 203.0, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch17_w", "payload": 10.0, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch18_w", "payload": 5.077, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch22_w", "payload": 45.0, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch23_w", "payload": 3.0, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch25_w", "payload": 11.0, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch27_w", "payload": 21.692, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch28_w", "payload": 5.538, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch30_w", "payload": 176.462, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch31_w", "payload": 441.769, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch1_wh", "payload": 39053623.364, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch2_wh", "payload": 31143184.574, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch3_wh", "payload": 21567800.325, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch4_wh", "payload": 1925905.572, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch5_wh", "payload": 227836.178, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch6_wh", "payload": 291194.419, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch7_wh", "payload": 2476426.155, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch8_wh", "payload": 662055.362, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch9_wh", "payload": -553841.193, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch10_wh", "payload": 49790.834, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch11_wh", "payload": 11527713.588, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch12_wh", "payload": 5356171.553, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch13_wh", "payload": 30558.8, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch14_wh", "payload": 687840.666, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch15_wh", "payload": 254221.222, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch16_wh", "payload": 12896055.576, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch17_wh", "payload": 3273457.798, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch18_wh", "payload": 8487097.646, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch19_wh", "payload": 1927741.461, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch20_wh", "payload": 1101227.07, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch21_wh", "payload": -20762611.861, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch22_wh", "payload": -11737166.137, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch23_wh", "payload": 1431117.921, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch24_wh", "payload": 2291283.08, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch25_wh", "payload": 867101.364, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch26_wh", "payload": 70474.791, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch27_wh", "payload": 440858.345, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch28_wh", "payload": 254134.199, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch29_wh", "payload": 477896.755, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch30_wh", "payload": 14054701.912, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch31_wh", "payload": 21198370.34, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch32_wh", "payload": 642502.049, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_p4", "payload": 29, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_t1", "payload": 25.5, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_t2", "payload": 17.0, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_t3", "payload": 2.0, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_t4", "payload": 21.0, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch1_dwh", "payload": 1.85, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch2_dwh", "payload": 0.998, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch3_dwh", "payload": 2.156, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch7_dwh", "payload": 0.228, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch11_dwh", "payload": 0.363, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch12_dwh", "payload": 0.261, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch14_dwh", "payload": 0.134, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch16_dwh", "payload": 0.733, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch17_dwh", "payload": 0.036, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch18_dwh", "payload": 0.018, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch22_dwh", "payload": 0.163, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch23_dwh", "payload": 0.011, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch25_dwh", "payload": 0.04, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch27_dwh", "payload": 0.078, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch28_dwh", "payload": 0.02, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch30_dwh", "payload": 0.637, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch31_dwh", "payload": 1.595, "qos": 0, "retain": false}]
2021/02/19 12:01:19 SOCKET: waiting for 12 seconds
2021/02/19 12:01:31 opening socket connection to 10.1.200.7:8000
2021/02/19 12:01:31 sending request 1 to device 
2021/02/19 12:01:31 SOCKET: sending ^^^APISPK
2021/02/19 12:01:31 waiting for data from device 
2021/02/19 12:01:31 reading 1 of 1 packets
2021/02/19 12:01:32 buffering packet ts:1613732492 sn:01000590
2021/02/19 12:01:32 closing socket connection
2021/02/19 12:01:32 buffer info:
2021/02/19 12:01:32   01000590:   4 of 120 (1613732492)
2021/02/19 12:01:32 processing with PrintProcessor
2021/02/19 12:01:32 2 buffered packets sn:01000590
2021/02/19 12:01:32 1 calculated packets sn:01000590

2021/02/19 12:01:32: Serial: 01000590
2021/02/19 12:01:32: Voltage:  230.90V
2021/02/19 12:01:32: Ch01:  39053.625196KWh (  507W)
2021/02/19 12:01:32: Ch02:  31143.185554KWh (  271W)
2021/02/19 12:01:32: Ch03:  21567.802470KWh (  593W)
2021/02/19 12:01:32: Ch04:   1925.905572KWh (    0W)
2021/02/19 12:01:32: Ch05:    227.836178KWh (    0W)
2021/02/19 12:01:32: Ch06:    291.194419KWh (    0W)
2021/02/19 12:01:32: Ch07:   2476.426384KWh (   63W)
2021/02/19 12:01:32: Ch08:    662.055362KWh (    0W)
2021/02/19 12:01:32: Ch09:   -553.841193KWh (    0W)
2021/02/19 12:01:32: Ch10:     49.790834KWh (    0W)
2021/02/19 12:01:32: Ch11:  11527.713951KWh (  100W)
2021/02/19 12:01:32: Ch12:   5356.171815KWh (   72W)
2021/02/19 12:01:32: Ch13:     30.558800KWh (    0W)
2021/02/19 12:01:32: Ch14:    687.840800KWh (   37W)
2021/02/19 12:01:32: Ch15:    254.221222KWh (    0W)
2021/02/19 12:01:32: Ch16:  12896.056291KWh (  198W)
2021/02/19 12:01:32: Ch17:   3273.457834KWh (   10W)
2021/02/19 12:01:32: Ch18:   8487.097665KWh (    5W)
2021/02/19 12:01:32: Ch19:   1927.741461KWh (    0W)
2021/02/19 12:01:32: Ch20:   1101.227070KWh (    0W)
2021/02/19 12:01:32: Ch21: -20762.611861KWh (    0W)
2021/02/19 12:01:32: Ch22: -11737.165975KWh (   45W)
2021/02/19 12:01:32: Ch23:   1431.117931KWh (    3W)
2021/02/19 12:01:32: Ch24:   2291.283080KWh (    0W)
2021/02/19 12:01:32: Ch25:    867.101404KWh (   11W)
2021/02/19 12:01:32: Ch26:     70.474791KWh (    0W)
2021/02/19 12:01:32: Ch27:    440.858421KWh (   21W)
2021/02/19 12:01:32: Ch28:    254.134218KWh (    5W)
2021/02/19 12:01:32: Ch29:    477.896755KWh (    0W)
2021/02/19 12:01:32: Ch30:  14054.702520KWh (  168W)
2021/02/19 12:01:32: Ch31:  21198.371929KWh (  440W)
2021/02/19 12:01:32: Ch32:    642.502049KWh (    0W)
2021/02/19 12:01:32: p1:               0
2021/02/19 12:01:32: p2:               0
2021/02/19 12:01:32: p3:               0
2021/02/19 12:01:32: p4:              29
2021/02/19 12:01:32: t1:       25.500000
2021/02/19 12:01:32: t2:       17.000000
2021/02/19 12:01:32: t3:        2.000000
2021/02/19 12:01:32: t4:       21.000000
2021/02/19 12:01:32: t5:        0.000000
2021/02/19 12:01:32: t6:        0.000000
2021/02/19 12:01:32: t7:        0.000000
2021/02/19 12:01:32: t8:        0.000000
2021/02/19 12:01:32 processing with MQTTProcessor
2021/02/19 12:01:32 2 buffered packets sn:01000590
2021/02/19 12:01:32 1 calculated packets sn:01000590
2021/02/19 12:01:32 MQTT: len=72, msgs=[{"topic": "/house/energy/01000590_volts", "payload": 230.9, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch1_w", "payload": 507.462, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch2_w", "payload": 271.538, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch3_w", "payload": 593.846, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch7_w", "payload": 63.462, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch11_w", "payload": 100.538, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch12_w", "payload": 72.769, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch14_w", "payload": 37.077, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch16_w", "payload": 198.077, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch17_w", "payload": 10.0, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch18_w", "payload": 5.231, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch22_w", "payload": 45.0, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch23_w", "payload": 3.0, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch25_w", "payload": 11.0, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch27_w", "payload": 21.154, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch28_w", "payload": 5.231, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch30_w", "payload": 168.462, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch31_w", "payload": 440.077, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch1_wh", "payload": 39053625.196, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch2_wh", "payload": 31143185.554, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch3_wh", "payload": 21567802.47, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch4_wh", "payload": 1925905.572, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch5_wh", "payload": 227836.178, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch6_wh", "payload": 291194.419, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch7_wh", "payload": 2476426.384, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch8_wh", "payload": 662055.362, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch9_wh", "payload": -553841.193, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch10_wh", "payload": 49790.834, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch11_wh", "payload": 11527713.951, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch12_wh", "payload": 5356171.815, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch13_wh", "payload": 30558.8, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch14_wh", "payload": 687840.8, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch15_wh", "payload": 254221.222, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch16_wh", "payload": 12896056.291, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch17_wh", "payload": 3273457.834, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch18_wh", "payload": 8487097.665, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch19_wh", "payload": 1927741.461, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch20_wh", "payload": 1101227.07, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch21_wh", "payload": -20762611.861, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch22_wh", "payload": -11737165.975, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch23_wh", "payload": 1431117.931, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch24_wh", "payload": 2291283.08, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch25_wh", "payload": 867101.404, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch26_wh", "payload": 70474.791, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch27_wh", "payload": 440858.421, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch28_wh", "payload": 254134.217, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch29_wh", "payload": 477896.755, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch30_wh", "payload": 14054702.52, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch31_wh", "payload": 21198371.929, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch32_wh", "payload": 642502.049, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_p4", "payload": 29, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_t1", "payload": 25.5, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_t2", "payload": 17.0, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_t3", "payload": 2.0, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_t4", "payload": 21.0, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch1_dwh", "payload": 1.833, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch2_dwh", "payload": 0.981, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch3_dwh", "payload": 2.144, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch7_dwh", "payload": 0.229, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch11_dwh", "payload": 0.363, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch12_dwh", "payload": 0.263, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch14_dwh", "payload": 0.134, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch16_dwh", "payload": 0.715, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch17_dwh", "payload": 0.036, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch18_dwh", "payload": 0.019, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch22_dwh", "payload": 0.162, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch23_dwh", "payload": 0.011, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch25_dwh", "payload": 0.04, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch27_dwh", "payload": 0.076, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch28_dwh", "payload": 0.019, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch30_dwh", "payload": 0.608, "qos": 0, "retain": false}, {"topic": "/house/energy/01000590_ch31_dwh", "payload": 1.589, "qos": 0, "retain": false}]
2021/02/19 12:01:32 SOCKET: waiting for 12 seconds
^C2021/02/19 12:01:33 cleanup PrintProcessor
2021/02/19 12:01:33 cleanup MQTTProcessor
2021/02/19 12:01:33 cleanup PollingSocketClientCollector
oxygen /home/micke # ^C
vespaman
Posts: 68
Joined: Sat Oct 08, 2011 2:48 am
Location: Sweden

Re: btmon for python 3?

Post by vespaman » Fri Feb 19, 2021 6:10 am

Also, it looks suspicious with the negative KWh values here and there. but maybe this is only a debug print issue?
ben
Site Admin
Posts: 4262
Joined: Fri Jun 04, 2010 9:39 am

Re: btmon for python 3?

Post by ben » Mon Feb 22, 2021 11:31 am

vespaman wrote:
Fri Feb 19, 2021 6:10 am
Also, it looks suspicious with the negative KWh values here and there. but maybe this is only a debug print issue?
Polarity issue, you can check the GEM settings to see if you have any polarity toggles under Channel Option.

Line 4196:

Code: Select all

       if not payload:
Try:

Code: Select all

       if payload is not None:
Ben
Brultech Research Inc.
E: ben(at)brultech.com
vespaman
Posts: 68
Joined: Sat Oct 08, 2011 2:48 am
Location: Sweden

Re: btmon for python 3?

Post by vespaman » Sat Feb 27, 2021 1:25 pm

So I tried your suggestion a couple of days ago, not giving it much thought. Then after a couple of days, I realized that a few rules in my openhab setup did not run properly. Turns out that the last change made both my GEMs muted. No data arrived at all.

I changed in the following section (was 2 rows off from your last version vs your suggestion)

Code: Select all

    def _add_msg(self, packet, channel, payload):
       if payload is not None:
           return
       key = mklabel(packet['serial'], channel)
Should it perhaps be "if payload is None" instead?
ben
Site Admin
Posts: 4262
Joined: Fri Jun 04, 2010 9:39 am

Re: btmon for python 3?

Post by ben » Mon Mar 01, 2021 10:27 am

vespaman wrote:
Sat Feb 27, 2021 1:25 pm
So I tried your suggestion a couple of days ago, not giving it much thought. Then after a couple of days, I realized that a few rules in my openhab setup did not run properly. Turns out that the last change made both my GEMs muted. No data arrived at all.

I changed in the following section (was 2 rows off from your last version vs your suggestion)

Code: Select all

    def _add_msg(self, packet, channel, payload):
       if payload is not None:
           return
       key = mklabel(packet['serial'], channel)
Should it perhaps be "if payload is None" instead?
Yeah, sorry. It should be "if payload == None:". "If not" was inclusive of 0.
Ben
Brultech Research Inc.
E: ben(at)brultech.com
vespaman
Posts: 68
Joined: Sat Oct 08, 2011 2:48 am
Location: Sweden

Re: btmon for python 3?

Post by vespaman » Sat Mar 20, 2021 12:26 pm

So, just to close;

I have now been running with the last changes for about 20 days without any issues at all.
Thanks Ben for fixing it!

- Micael
thesalcedo
Posts: 17
Joined: Wed Dec 12, 2018 9:02 pm

Re: btmon for python 3?

Post by thesalcedo » Wed Mar 24, 2021 7:23 am

Is this the fork that works with python3?
https://github.com/BenK22/mtools/

Can it be updated to reflect that? It still says it does not work with Python3. Great job!

Cheers!
ben
Site Admin
Posts: 4262
Joined: Fri Jun 04, 2010 9:39 am

Re: btmon for python 3?

Post by ben » Wed Mar 24, 2021 9:42 am

thesalcedo wrote:
Wed Mar 24, 2021 7:23 am
Is this the fork that works with python3?
https://github.com/BenK22/mtools/

Can it be updated to reflect that? It still says it does not work with Python3. Great job!

Cheers!
It's in the InfluxDB branch here as that's the copy I've been working off of: https://github.com/BenK22/mtools/tree/influxdb/bin
Ben
Brultech Research Inc.
E: ben(at)brultech.com
ian351c
Posts: 15
Joined: Wed Sep 09, 2015 2:26 pm

Re: btmon for python 3?

Post by ian351c » Thu May 13, 2021 11:13 am

I've got the btmon script for python3 up and running, with one issue: all of my Watts measurements are 0. The Watt Hours measurements seem to come in fine. What information would be useful for troubleshooting?

EDIT:

So, I've done some more sleuthing and it really looks like btmon is not sending the Watts measurements to InfluxDB.
I see the measurements coming from btmon fine:
2021/05/13 13:40:51: Voltage: 119.20V
2021/05/13 13:40:51: Ch01: 81972.869791KWh ( 1070W)
Note that Channel 1 is my entire panel, so there is always some load there.

But Watts are not getting sent to InfluxDB (this is from a packet capture):
energy,gemlocation=main_panel,host=gem.home XXX338_volts=119.4 1620926627000000000
energy,gemlocation=main_panel,host=gem.home XXX338_ch1_aws=295101134484.0 1620926627000000000
energy,gemlocation=main_panel,host=gem.home XXX338_ch1_pws=0.0 1620926627000000000

END EDIT:

My Config:
Old Monitoring Setup (works fine)
btmon 3.1.1
2021/05/13 12:04:49 python: 2.7.18 (default, Feb 25 2021, 01:19:10)
[GCC FreeBSD Clang 10.0.1 (git@github.com:llvm/llvm-project.git llvmorg-10.0.1-
2021/05/13 12:04:49 platform: freebsd12
2021/05/13 12:04:49 polarity is reversed
2021/05/13 12:04:49 device type: gem
2021/05/13 12:04:49 device list: ['']
2021/05/13 12:04:49 packet format: gem48ptbin
2021/05/13 12:04:49 schema: counters
2021/05/13 12:04:49 SOCKET: timeout: 15
2021/05/13 12:04:49 SOCKET: server host: 172.16.100.137
2021/05/13 12:04:49 SOCKET: server port: 8000
2021/05/13 12:04:49 OEM: upload period: 1
2021/05/13 12:04:49 OEM: timeout: 15
2021/05/13 12:04:49 OEM: url: http://localhost/emoncms/input/post.json
2021/05/13 12:04:49 OEM: token: xxxx
2021/05/13 12:04:49 OEM: node: 20

New Monitoring Setup (works, but all Watts measurements are 0):
2021/05/13 12:03:35 btmon: 4.0.0
2021/05/13 12:03:35 python: 3.8.5 (default, Jan 27 2021, 15:41:15)
[GCC 9.3.0]
2021/05/13 12:03:35 platform: linux
2021/05/13 12:03:35 polarity is reversed
2021/05/13 12:03:35 device type: gem
2021/05/13 12:03:35 device list: ['']
2021/05/13 12:03:35 packet format: gem48ptbin
2021/05/13 12:03:35 schema: counters
2021/05/13 12:03:35 SOCKET: timeout: 60
2021/05/13 12:03:35 SOCKET: server host: 172.16.100.137
2021/05/13 12:03:35 SOCKET: server port: 8000
2021/05/13 12:03:35 InfluxDB: upload period: 10
2021/05/13 12:03:35 InfluxDB: host: localhost
2021/05/13 12:03:35 InfluxDB: port: 8086
2021/05/13 12:03:35 InfluxDB: username: btmon
2021/05/13 12:03:35 InfluxDB: map:
2021/05/13 12:03:35 InfluxDB: schema: counters

Config for new setup:
[source]
device_type = gem
ip_read = true
ip_host = 172.16.100.137
ip_port = 8000
ip_mode = client
reverse_polarity = 1
[influxdb]
influxdb_out = true
influxdb_host = localhost
influxdb_port = 8086
influxdb_upload_period = 10
influxdb_username = xxxxx
influxdb_password = xxxxx
influxdb_database = btmon_greeneye
influxdb_measurement = energy
influxdb_mode = row
influxdb_tags = host,gem.home,gemlocation,main_panel
influxdb_db_schema = counters
Post Reply