andrewfraley / arris_cable_modem_stats

Retrieves stats from Arris cable modems and sends to InfluxDB
53 stars 34 forks source link

Strip first row #6

Closed lludlow closed 4 years ago

lludlow commented 4 years ago

First row contains text, this skips the first row

andrewfraley commented 4 years ago

@madbuda thanks for this, I'll test it out tomorrow. What version is your SB8200 on and who is your ISP? Comcast has mine on AB01.01.009.32.01_122319_183.0A.NSH

lludlow commented 4 years ago

D31CM-PEREGRINE-1.1.1.0-GA-11-NOSH

WOW not Comcast

Could be provider/firmware specific

Here is a snip of the downstream results, as you can see there is a header row which was causing the failure

downstream stats: [ {'channel_id': 'Channel ID', 'frequency': 'Frequency', 'power': 'Power', 'snr': 'SNR/MER','corrected': 'Corrected', 'uncorrectables': 'Uncorrectables'}, {'channel_id': '28', 'frequency': '747000000', 'power': '0.4', 'snr': '41.2', 'corrected': '2516', 'uncorrectables': '1439'}, {'channel_id': '1', 'frequency': '609000000', 'power': '0.9', 'snr': '41.9', 'corrected': '510','uncorrectables': '0'}, {'channel_id': '2', 'frequency': '615000000', 'power': '0.0', 'snr': '41.9', 'corrected': '542', 'uncorrectables': '0'},

On Aug 23, 2020, at 5:39 PM, Andy Fraley notifications@github.com wrote:

 @madbuda thanks for this, I'll test it out tomorrow. What version is your SB8200 on and who is your ISP? Comcast has mine on AB01.01.009.32.01_122319_183.0A.NSH

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

andrewfraley commented 4 years ago

@madbuda could you try the "afraley/fix_7" branch? https://github.com/andrewfraley/arris_cable_modem_stats/tree/afraley/fix_7

I wanted to fix this in the parse_html_sb8200() function instead of the send_to_influx() function. Thanks!

andrewfraley commented 4 years ago

Merging PR #8 to master. @madbuda let me know if it ends up not working for you.

lludlow commented 4 years ago

Still the same problem 2020-09-05 23:58:56,169 INFO Sending stats to InfluxDB (influxdb:8086) Traceback (most recent call last): File "arris_stats.py", line 272, in main() File "arris_stats.py", line 57, in main send_to_influx(stats, config) File "arris_stats.py", line 219, in send_to_influx 'frequency': int(stats_up['frequency']), ValueError: invalid literal for int() with base 10: 'Frequency'