Occasional Packet loss with btmon.py and GEM

Post any 3rd party software here.
Post Reply
cchristie
Posts: 3
Joined: Wed Aug 07, 2019 10:38 am

Occasional Packet loss with btmon.py and GEM

Post by cchristie » Wed Aug 07, 2019 10:58 am

I have the GEM setup with btmon in polling mode. My config file is below.

I reduced RETRY_WAIT = 5, turned off Keep-Alive Pulse and my Packet Chunk size is set to 2047. My Polling interval is 30s and I have turned off real time mode. I still get the following Error messages in the log file every hour or so.

Code: Select all

2019/08/06 14:49:08 expected START_HEADER0 0xfe, got nothing
2019/08/06 14:49:08 expected START_HEADER0 0xfe, got nothing
2019/08/06 14:49:08 expected START_HEADER0 0xfe, got nothing
2019/08/06 14:49:08 3 requests failed for device 
2019/08/06 16:57:54 expected START_HEADER0 0xfe, got nothing
2019/08/06 16:57:54 expected START_HEADER0 0xfe, got nothing
2019/08/06 16:57:54 expected START_HEADER0 0xfe, got nothing
2019/08/06 16:57:54 3 requests failed for device 
2019/08/06 17:15:34 expected START_HEADER0 0xfe, got nothing
2019/08/06 17:15:34 expected START_HEADER0 0xfe, got nothing
2019/08/06 17:15:34 expected START_HEADER0 0xfe, got nothing
2019/08/06 17:15:34 3 requests failed for device 
This results in gaps in data that can be seen in Grafana. Any suggesstions?

Firmware:

COM firmware ver: 4.36
ENG firmware ver: 1.49

Config File

Code: Select all

# Cams config file for a single GEM in Client Mode
# Note section headers are not used
# Option are defined the same as the commandline version with no leading -- and _ instead of -

[source]
device_type = gem
packet_format = gem48ptbin

# Default is counters 
db_schema = ecmreadext

# Polarity is opposite to GEM if not defined here
reverse_polarity = true
include_current = true

# Keep Full serial number
full_serials = true

# IP Settings
ip_read = true
ip_host = 192.168.42.59
ip_port = 80
ip_mode = client
ip_poll_interval = 30

# Buffer Settings
buffer_size = 120

[influxdb]
influxdb_out = true
influxdb_host = localhost
influxdb_port = 8086
influxdb_upload_period = 30
influxdb_username = xxx
influxdb_password = xxx

# Database and measurement names 
influxdb_database = energy      
influxdb_measurement = power

# "row": 1 series w/ many values; "col": many series w/ 1 value each
influxdb_mode = col                

# remap channels
influxdb_map = 01021402_volts,Voltage,01021402_ch2_a,Sub Current,01021402_ch2_wh,Sub Power,01021402_ch3_a,HVAC Current,01021402_ch3_wh,HVAC Power,01021402_ch5_a,Oven Current,01021402_ch5_wh,Oven Power,01021402_ch6_a,Compressor Current,01021402_ch6_wh,Compressor Power,01021402_ch7_a,Garage North Current,01021402_ch7_wh,Garage North Power,01021402_ch8_a,Garage South Current,01021402_ch8_wh,Garage South Power,01021402_ch9_a,Hot Water Current,01021402_ch9_wh,Hot Water Power,01021402_ch10_a,Living Room Current,01021402_ch10_wh,Living Room Power,01021402_ch11_a,Office Current,01021402_ch11_wh,Office Power,01021402_ch12_a,Network Current,01021402_ch12_wh,Network Power,01021402_ch13_a,Garage Lights Current,01021402_ch13_wh,Garage Lights Power,01021402_ch14_a,DS Bath Current,01021402_ch14_wh,DS Bath Power,01021402_ch15_a,Laundry Room Current,01021402_ch15_wh,Laundry Room Power,01021402_ch16_a,ECar Current,01021402_ch16_wh,ECar Power,01021402_ch17_a,Lathe Current,01021402_ch17_wh,Lathe Power

influxdb_db_schema = ecmreadext
#influxdb_tags = key1,value1,key2,value2
ben
Site Admin
Posts: 4262
Joined: Fri Jun 04, 2010 9:39 am

Re: Occasional Packet loss with btmon.py and GEM

Post by ben » Wed Aug 07, 2019 11:52 am

Are both Flow Controls disabled as well as COM1 Auto Reset?

Have you tried commenting out polling, turning on real-time data, and setting the GEM Send Interval to 30s to see if that experiences the same issues?
Ben
Brultech Research Inc.
E: ben(at)brultech.com
cchristie
Posts: 3
Joined: Wed Aug 07, 2019 10:38 am

Re: Occasional Packet loss with btmon.py and GEM

Post by cchristie » Thu Aug 08, 2019 11:10 am

Are both Flow Controls disabled as well as COM1 Auto Reset?
Yes.
Have you tried commenting out polling, turning on real-time data, and setting the GEM Send Interval to 30s to see if that experiences the same issues?
Originally I had tried to run the GEM in real time mode and that would work OK for a while, but eventually I would get the same error message as below over and over, and it would never recover until I re-started btmon.py.

Code: Select all

2019/08/06 14:49:08 expected START_HEADER0 0xfe, got nothing
2019/08/06 14:49:08 expected START_HEADER0 0xfe, got nothing
2019/08/06 14:49:08 expected START_HEADER0 0xfe, got nothing
2019/08/06 14:49:08 3 requests failed for device 
ben
Site Admin
Posts: 4262
Joined: Fri Jun 04, 2010 9:39 am

Re: Occasional Packet loss with btmon.py and GEM

Post by ben » Thu Aug 08, 2019 12:31 pm

Looked up and see that you have an Ethernet-only unit.

Try the following:
- Open up the GEM Network Utility.
- In the Ethernet-only tab set the following settings:

Server Mode.
Increase Idle Time to 60 seconds.

This will force the Ethernet module into Server Mode instead of dual purpose (Mixed mode uses Idle Time to disconnect in order to enable other connections). Setting Idle Time greater then your polling interval (or send interval in terms of real-time) will make sure the connection never breaks.
Ben
Brultech Research Inc.
E: ben(at)brultech.com
cchristie
Posts: 3
Joined: Wed Aug 07, 2019 10:38 am

Re: Occasional Packet loss with btmon.py and GEM

Post by cchristie » Wed Aug 14, 2019 10:14 am

Try the following:
- Open up the GEM Network Utility.
- In the Ethernet-only tab set the following settings:

Server Mode.
Increase Idle Time to 60 seconds.
Tried these setting and I see a slight improvement, but still get drop outs about 6 times a day.
ben
Site Admin
Posts: 4262
Joined: Fri Jun 04, 2010 9:39 am

Re: Occasional Packet loss with btmon.py and GEM

Post by ben » Wed Aug 14, 2019 12:11 pm

cchristie wrote:
Try the following:
- Open up the GEM Network Utility.
- In the Ethernet-only tab set the following settings:

Server Mode.
Increase Idle Time to 60 seconds.
Tried these setting and I see a slight improvement, but still get drop outs about 6 times a day.
Can you try these settings swapped back to using Client mode on the GEM without polling?
Ben
Brultech Research Inc.
E: ben(at)brultech.com
Post Reply