I am not understanding what my issue is. I can't seem to get BTMON to work reliably. In either client or server mode it will hang on the 2nd packet. This an older unit. The actual channel data is coming for those 2 packets as I see it being ingested (using VictoriaMetrics) but I am trying to debug just the source bits. I have tried a bunch of things with Idle Time, Real Time vs Polling, Packet Send Intervals, etc. Live data seems to work in both the integrated web page and the GEM Network utilities app (running via wine).
If anyone has suggestions I am all ears. Right now this isn't usable. I have had this setup for many years but stopped using it and decided to re-activate it again and ran into these hiccups.
GEM configuration
Code: Select all
COM firmware ver: 5.13
ENG firmware ver: 1.49
RealTime Status: ON
Packet Send Interval: 8
Pri. Packet Format: 4
Sec. Packet Format: 0
Sys Status: OK
Wifi/Ethernet Module: Enabled
GEM Ver: Single or Polyphase
PCB Ver: 2
BootLoader Ver: 1
COM1 Flow: OFF
COM2 Flow: OFF
Current Constant: 222
Sys Info: 00100001 OK
Sys Flags: 00000000 OK
Keep Alive String:""
COM1 Baud: 115200
COM2 Baud: 115200
Phase Setting: Single Phase
Freq: 60Hz
Hardware Configuration: 136
Ethernet with connector board
Code: Select all
$ cat btmon.cfg
[source]
ip_read = true
device_type = gem
ip_port = 7000
ip_mode = server
include_current = true
reverse_polarity = true
db_schema = ecmreadext
packet_format = gem48ptbin
Code: Select all
$ python btmon.py -c btmon.cfg --debug --verbose --skip-upload
2021/11/16 15:40:25 btmon: 3.3.1
2021/11/16 15:40:25 python: 2.7.18 (default, Mar 8 2021, 13:02:45)
[GCC 9.3.0]
2021/11/16 15:40:25 platform: linux2
2021/11/16 15:40:25 polarity is reversed
2021/11/16 15:40:25 device type: gem
2021/11/16 15:40:25 device list: ['']
2021/11/16 15:40:25 packet format: gem48ptbin
2021/11/16 15:40:25 schema: ecmreadext
2021/11/16 15:40:25 buffer size: 120
2021/11/16 15:40:25 SOCKET: bind host:
2021/11/16 15:40:25 SOCKET: bind port: 7000
2021/11/16 15:40:25 InfluxDB: upload period: 10
2021/11/16 15:40:25 InfluxDB: host: 127.0.0.1
2021/11/16 15:40:25 InfluxDB: port: 8089
2021/11/16 15:40:25 InfluxDB: username:
2021/11/16 15:40:25 InfluxDB: map:
2021/11/16 15:40:25 InfluxDB: schema: ecmreadext
2021/11/16 15:40:25 packet format is GEM48PTBinaryPacket
2021/11/16 15:40:25 using collector SocketServerCollector
2021/11/16 15:40:25 using 1 processors:
2021/11/16 15:40:25 InfluxDBProcessor
2021/11/16 15:40:25 setup SocketServerCollector
2021/11/16 15:40:25 SOCKET: binding to :7000
2021/11/16 15:40:25 setup InfluxDBProcessor
2021/11/16 15:40:25 SOCKET: waiting for connection
2021/11/16 15:40:32 waiting for data from device
2021/11/16 15:40:32 reading 1 of 1 packets
2021/11/16 15:40:32 SOCKET: read 1 of 1 bytes from socket: fe
2021/11/16 15:40:32 SOCKET: read 1 of 1 bytes from socket: ff
2021/11/16 15:40:32 SOCKET: read 1 of 1 bytes from socket: 05
2021/11/16 15:40:32 SOCKET: read 14 of 619 bytes from socket: 04 b5 61 c5 99 06 00 11 ab 0c 00 00 00 00
2021/11/16 15:40:32 SOCKET: read 605 of 605 bytes from socket: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 68 00 00 00 00 15 1e 04 00 00 00 00 00 00 00 00 00 00 00 00 05 00 00 00 00 17 00 00 00 00 76 78 00 00 00 e2 23 08 00 00 00 00 00 00 00 db 01 01 00 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 bb 84 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 96 0e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 d9 04 00 00 02 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 10 0f 0e 0d 0c 0b 0a 09 08 07 06 05 04 03 02 01 01 39 00 0a 46 06 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 06 00 00 00 00 00 00 00 04 00 04 00 04 00 0e 02 00 00 00 00 04 00 00 00 00 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 5a 00 80 74 04 00 0b 01 80 d7 00 00 00 61 47 04 1e 00 00 05 00 00 6c b3 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00 00 00 15 0b 0f 16 08 1f
2021/11/16 15:40:32 SOCKET: read 1 of 1 bytes from socket: ff
2021/11/16 15:40:32 SOCKET: read 1 of 1 bytes from socket: fe
2021/11/16 15:40:32 SOCKET: read 1 of 1 bytes from socket: fa
2021/11/16 15:40:32 adding buffer for 01000313
2021/11/16 15:40:32 buffering packet ts:1637077232 sn:01000313
2021/11/16 15:40:32 SOCKET: closing connection
2021/11/16 15:40:32 buffer info:
2021/11/16 15:40:32 01000313: 1 of 120 (1637077232)
2021/11/16 15:40:32 processing with InfluxDBProcessor
2021/11/16 15:40:32 not enough data for 01000313
2021/11/16 15:40:32 SOCKET: waiting for connection
2021/11/16 15:40:40 waiting for data from device
2021/11/16 15:40:40 reading 1 of 1 packets
2021/11/16 15:40:40 SOCKET: read 1 of 1 bytes from socket: fe
2021/11/16 15:40:40 SOCKET: read 1 of 1 bytes from socket: ff
2021/11/16 15:40:40 SOCKET: read 1 of 1 bytes from socket: 05
2021/11/16 15:40:40 SOCKET: read 619 of 619 bytes from socket: 04 bd b7 25 9a 06 00 11 ab 0c 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 68 00 00 00 00 15 1e 04 00 00 00 00 00 00 00 00 00 00 00 00 05 00 00 00 00 17 00 00 00 00 7a 78 00 00 00 46 37 08 00 00 00 00 00 00 00 e5 01 01 00 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 cc 84 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 a4 09 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 10 0f 0e 0d 0c 0b 0a 09 08 07 06 05 04 03 02 01 01 39 00 0a 3b 04 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 06 00 00 00 00 00 00 00 04 00 04 00 04 00 00 00 00 00 00 00 04 00 00 00 00 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 5a 00 80 74 04 00 0b 01 80 d7 00 00 00 20 d4 02 91 01 00 12 00 00 74 b3 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00 00 00 15 0b 0f 16 08 27
2021/11/16 15:40:40 SOCKET: read 1 of 1 bytes from socket: ff
2021/11/16 15:40:40 SOCKET: read 1 of 1 bytes from socket: fe
2021/11/16 15:40:40 SOCKET: read 1 of 1 bytes from socket: 39
2021/11/16 15:40:40 buffering packet ts:1637077240 sn:01000313
2021/11/16 15:40:40 SOCKET: closing connection
2021/11/16 15:40:40 buffer info:
2021/11/16 15:40:40 01000313: 2 of 120 (1637077240)
2021/11/16 15:40:40 processing with InfluxDBProcessor
2021/11/16 15:40:40 2 buffered packets sn:01000313
2021/11/16 15:40:40 1 calculated packets sn:01000313
^C
^C2021/11/16 15:51:10 cleanup InfluxDBProcessor
2021/11/16 15:51:10 cleanup SocketServerCollector
2021/11/16 15:51:10 SOCKET: closing socket
Code: Select all
$ cat btmon.cfg
[source]
ip_read = true
device_type = gem
ip_host = 192.168.2.6
ip_port = 80
ip_mode = client
include_current = true
reverse_polarity = true
db_schema = ecmreadext
packet_format = gem48ptbin
Code: Select all
$ python btmon.py -c btmon.cfg --debug --verbose --skip-upload
2021/11/16 16:04:17 btmon: 3.3.1
2021/11/16 16:04:17 python: 2.7.18 (default, Mar 8 2021, 13:02:45)
[GCC 9.3.0]
2021/11/16 16:04:17 platform: linux2
2021/11/16 16:04:17 polarity is reversed
2021/11/16 16:04:17 device type: gem
2021/11/16 16:04:17 device list: ['']
2021/11/16 16:04:17 packet format: gem48ptbin
2021/11/16 16:04:17 schema: ecmreadext
2021/11/16 16:04:17 buffer size: 120
2021/11/16 16:04:17 SOCKET: timeout: 60
2021/11/16 16:04:17 SOCKET: server host: 192.168.2.6
2021/11/16 16:04:17 SOCKET: server port: 80
2021/11/16 16:04:17 InfluxDB: upload period: 10
2021/11/16 16:04:17 InfluxDB: host: 127.0.0.1
2021/11/16 16:04:17 InfluxDB: port: 8089
2021/11/16 16:04:17 InfluxDB: username:
2021/11/16 16:04:17 InfluxDB: map:
2021/11/16 16:04:17 InfluxDB: schema: ecmreadext
2021/11/16 16:04:17 packet format is GEM48PTBinaryPacket
2021/11/16 16:04:17 using collector BlockingSocketClientCollector
2021/11/16 16:04:17 using 1 processors:
2021/11/16 16:04:17 InfluxDBProcessor
2021/11/16 16:04:17 setup BlockingSocketClientCollector
2021/11/16 16:04:17 setup InfluxDBProcessor
2021/11/16 16:04:17 waiting for data from device
2021/11/16 16:04:17 opening socket connection to 192.168.2.6:80
2021/11/16 16:04:17 reading 1 of 1 packets
2021/11/16 16:04:22 adding buffer for 01000313
2021/11/16 16:04:22 buffering packet ts:1637078662 sn:01000313
2021/11/16 16:04:22 buffer info:
2021/11/16 16:04:22 01000313: 1 of 120 (1637078662)
2021/11/16 16:04:22 processing with InfluxDBProcessor
2021/11/16 16:04:22 not enough data for 01000313
2021/11/16 16:04:22 waiting for data from device
2021/11/16 16:04:22 reading 1 of 1 packets
2021/11/16 16:04:30 buffering packet ts:1637078670 sn:01000313
2021/11/16 16:04:30 buffer info:
2021/11/16 16:04:30 01000313: 2 of 120 (1637078670)
2021/11/16 16:04:30 processing with InfluxDBProcessor
2021/11/16 16:04:30 2 buffered packets sn:01000313
2021/11/16 16:04:30 1 calculated packets sn:01000313
^C^C2021/11/16 16:05:59 cleanup InfluxDBProcessor
2021/11/16 16:05:59 cleanup BlockingSocketClientCollector