bb-Ricardo/fritzinfluxdb

Wrong metric type (issue #57 appearing again)

Closed this issue · 14 comments

Dear Ricardo,
I am also getting this error (#57)
I tried the next-release as you suggested, but also latest.
My setup Fritzbox7490, FW 7.28, see output below.
I do have a VPN open, seems that VPNs caused this for other users when I read through the issue logs.

I can also supply you with the full debug log (running with -v) if you tell me how to send it to you.
Grafana/influxdb v1.8 dashboard is empty, not showing any metrics.
Thx for your efforts! Patric

INFO: Starting fritzinfluxdb v1.1.0-beta.2 (2022-11-XX)
INFO: Done reading config files
INFO: Successfully parsed config
INFO: Connection to InfluxDB 1.8.10 established and database present
INFO: Successfully established FritzBox TR-069 session
INFO: Successfully established FritzBox Lua session
INFO: Successfully connected to FritzBox '192.168.0.1' (fritz.box) Model: FRITZ!Box 7490 (DSL) - FW: 7.29
INFO: Starting main loop
ERROR: FritzBox metric type '<class 'list'>' does not match data: <class 'dict'>
ERROR: FritzBox metric type '<class 'list'>' does not match data: <class 'dict'>
ERROR: FritzBox metric type '<class 'list'>' does not match data: <class 'dict'>
ERROR: FritzBox metric type '<class 'list'>' does not match data: <class 'dict'>
ERROR: FritzBox metric type '<class 'list'>' does not match data: <class 'dict'>

Version 1.1.0 has been released already. You might need to do a git pull again.

Can you run it with the option -v so we can see where and what the issue is.

Thank you.

You are correct. I most likely didn't update the next-release socker tag with the final version.

Will do that.

Hi Ricardo, here is my log for reference: https://pastebin.com/K27nt503

Hey,

next-release is now published with the correct version. Can you do a docker-compose pull and a docker-compose up -d again?

I tried to access the log output but it probably expired.

Hi Ricard,
I pulled to new image (next-release), however, error still persists:

INFO: Starting fritzinfluxdb v1.1.0 (2022-11-02)
INFO: Done reading config files
INFO: Successfully parsed config
INFO: Connection to InfluxDB 2 established
INFO: Successfully established FritzBox TR-069 session
INFO: Successfully established FritzBox Lua session
INFO: Successfully connected to FritzBox '192.168.0.1' (fritz.box) Model: FRITZ!Box 7490 (DSL) - FW: 7.29
INFO: Starting main loop
ERROR: FritzBox metric type '<class 'list'>' does not match data: <class 'dict'>
ERROR: FritzBox metric type '<class 'list'>' does not match data: <class 'dict'>
ERROR: FritzBox metric type '<class 'list'>' does not match data: <class 'dict'>
ERROR: FritzBox metric type '<class 'list'>' does not match data: <class 'dict'>
ERROR: FritzBox metric type '<class 'list'>' does not match data: <class 'dict'>
ERROR: FritzBox metric type '<class 'list'>' does not match data: <class 'dict'>

Hi,

I just pushed a new next-release container with better error message output. Can you please try it out?

Thank you.

Hi @bb-Ricardo,

I had the same issue and just tried out your new next-release container.
Here's my log (please feel free to ask for some more, if needed):

_fritzinfluxdb_logs.txt

I'm also using FW 7.29 on a FB 7590.
Should I try out the lab version from AVM?

Hi,

no need to update to Labor FW. This log should contain all I need to fix the issue.

hi @istefy92,

Just wondering: How many home automation devices do you have?

I would be interested in the output of the home automation data. Should be something like this:

curl http://192.168.178.1/webservices/homeautoswitch.lua?switchcmd=getdevicelistinfos&sid=<SID>

you have to substitute <SID> with a current valid session id. You can retrieve this when logging into the FritzBox user interface and opening the networks details. Then open your browsers dev tools and look for network request. There you should be able to see a request to network.lua. This request contains your sid. Use this SID in your curl command.

Hope this was not too confusing. The data would be quite helpful.

Thank you

Hi @bb-Ricardo,

i only have one home automation device as shown correctly in the output of curl:
homeautoswitch.lua.xml.txt

The switch is not shown on the home automation dashboard in grafana either.

Hope that's helping you a bit.

Morning @istefy92, @littlezaphod,

I just pushed a commit to next-release branch which should fix your issue.

Can you please test it? thank you.

Just wondering if you had some time to test the change.

Hi @bb-Ricardo,

I did the following steps and the error output changed:

  • deleted bucket
  • re-deployed with your next-relese container and a full-access token for influxdb

seems to work so far, here's the output of the logs:

DEBUG: Request FritzBox Lua service 'Home Automation' returned successfully
DEBUG: 2022-12-02 19:51:45+00:00: ha_fw_version=04.25 ({'box': 'fritz.box', 'name': 'FRITZ!DECT 200 #1'})
DEBUG: 2022-12-02 19:51:45+00:00: ha_product_name=FRITZ!DECT 200 ({'box': 'fritz.box', 'name': 'FRITZ!DECT 200 #1'})
DEBUG: 2022-12-02 19:51:45+00:00: ha_manufacturer=AVM ({'box': 'fritz.box', 'name': 'FRITZ!DECT 200 #1'})
DEBUG: 2022-12-02 19:51:45+00:00: ha_device_present=1 ({'box': 'fritz.box', 'name': 'FRITZ!DECT 200 #1'})
DEBUG: 2022-12-02 19:51:45+00:00: ha_temperature=18.5 ({'box': 'fritz.box', 'name': 'FRITZ!DECT 200 #1'})
DEBUG: 2022-12-02 19:51:45+00:00: ha_temperature_celsius=19.5 ({'box': 'fritz.box', 'name': 'FRITZ!DECT 200 #1'})
DEBUG: 2022-12-02 19:51:45+00:00: ha_temperature_offset=-1.0 ({'box': 'fritz.box', 'name': 'FRITZ!DECT 200 #1'})
DEBUG: 2022-12-02 19:51:45+00:00: ha_powermeter_power=2.21 ({'box': 'fritz.box', 'name': 'FRITZ!DECT 200 #1'})
DEBUG: 2022-12-02 19:51:45+00:00: ha_powermeter_energy=329220.0 ({'box': 'fritz.box', 'name': 'FRITZ!DECT 200 #1'})
DEBUG: 2022-12-02 19:51:45+00:00: ha_powermeter_voltage=233.661 ({'box': 'fritz.box', 'name': 'FRITZ!DECT 200 #1'})
DEBUG: 2022-12-02 19:51:45+00:00: ha_switch_state=1 ({'box': 'fritz.box', 'name': 'FRITZ!DECT 200 #1'})
DEBUG: 2022-12-02 19:51:45+00:00: ha_switch_mode=manuell ({'box': 'fritz.box', 'name': 'FRITZ!DECT 200 #1'})
DEBUG: 2022-12-02 19:51:45+00:00: ha_switch_lock=0 ({'box': 'fritz.box', 'name': 'FRITZ!DECT 200 #1'})
DEBUG: 2022-12-02 19:51:45+00:00: ha_switch_devicelock=1 ({'box': 'fritz.box', 'name': 'FRITZ!DECT 200 #1'})
DEBUG: 2022-12-02 19:51:45+00:00: ha_simpleonoff_state=1 ({'box': 'fritz.box', 'name': 'FRITZ!DECT 200 #1'})
DEBUG: Trying to write a maximum of '1000' measurements to InfluxDB
DEBUG: Successfully wrote 15 measurements to InfluxDB

Hi,

This looks exactly how it should look like.

Now you should see the values in the home automation dashboard.

Thank you for testing it.