Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to convert FritzBox Lua value #111

Closed
Maxtor62 opened this issue Oct 30, 2023 · 28 comments
Closed

Unable to convert FritzBox Lua value #111

Maxtor62 opened this issue Oct 30, 2023 · 28 comments
Labels
awaiting-answer bug Something isn't working
Milestone

Comments

@Maxtor62
Copy link

Maxtor62 commented Oct 30, 2023

installed on proxmox LXC Container and on Synology Docker.
allways the same error. Where is my problem?

Here my Log.

date | stream | content
ERROR: Failed to write to InfluxDB '192.168.178.139': 422: failure writing points to database: partial write: field type conflict: input field "ha_alert" on measurement "fritzbox" is type string, already exists as type integer dropped=1
2023/10/30 19:33:18 | stdout | ERROR: Unable to convert FritzBox Lua value '0-1800863744' for 'ha_alert' to '<class 'int'>': invalid literal for int() with base 10: '0-1800863744'
2023/10/30 19:33:16 | stdout | INFO: Service 'Cable Info (Fritz!OS 7.29 - latest)' not applicable for this FritzBox Model Link type 'DSL'
2023/10/30 19:33:02 | stdout | INFO: Starting main loop
2023/10/30 19:33:02 | stdout | INFO: Successfully connected to FritzBox '192.168.178.1' (fritz.box) Model: FRITZ!Box 7590 AX (DSL) - FW: 7.57
2023/10/30 19:33:02 | stdout | INFO: Successfully established FritzBox Lua session
2023/10/30 19:33:00 | stdout | INFO: Successfully established FritzBox TR-069 session
2023/10/30 19:32:54 | stdout | INFO: Connection to InfluxDB v2.7.1 established and bucket is present
2023/10/30 19:32:54 | stdout | INFO: Successfully parsed config
2023/10/30 19:32:54 | stdout | INFO: Starting fritzinfluxdb v1.2.1 (2023-01-26)

at the file "model.py" there is no "FritzBox 7590 AX DSL" listed.

In the SmartHome section, i have 3 Shutter called "BoxCTRL D01" with hun_fun and the same protocol as my FRITZ!DECT 200.

Nov 02 08:47:22 pi-hole fritzinfluxdb[5472]: INFO: Successfully create InfluxDB database mapping 'fritzbox'
Nov 02 08:47:22 pi-hole fritzinfluxdb[5472]: INFO: Connection to InfluxDB v2.7.1 established and bucket is present
Nov 02 08:47:27 pi-hole fritzinfluxdb[5472]: INFO: Successfully established FritzBox TR-069 session
Nov 02 08:47:28 pi-hole fritzinfluxdb[5472]: INFO: Successfully established FritzBox Lua session
Nov 02 08:47:28 pi-hole fritzinfluxdb[5472]: INFO: Successfully connected to FritzBox '192.168.178.1' (fritz.box) Model: FRITZ!Box 7590 AX (DSL) - FW: 7.57
Nov 02 08:47:28 pi-hole fritzinfluxdb[5472]: INFO: Starting main loop
Nov 02 08:47:39 pi-hole fritzinfluxdb[5472]: INFO: Service 'Cable Info (Fritz!OS 7.29 - latest)' not applicable for this FritzBox Model Link type 'DSL'
Nov 02 08:47:41 pi-hole fritzinfluxdb[5472]: ERROR: Unable to convert FritzBox Lua value '0-1545273344' for 'ha_alert' to '<class 'int'>': invalid literal for int() with base 10: '0-1545273344'
Nov 02 08:48:07 pi-hole fritzinfluxdb[5472]: ERROR: Failed to write to InfluxDB '192.168.178.139': 500: unexpected error writing points to database: field type conflict
Nov 02 08:48:10 pi-hole fritzinfluxdb[5472]: ERROR: Unable to convert FritzBox Lua value '0-1545273344' for 'ha_alert' to '<class 'int'>': invalid literal for int() with base 10: '0-1545273344'

Is it possible to define an exception in fritzinfluxdb.ini

This is the Log after few ninutes.

Nov 02 09:57:56 pi-hole fritzinfluxdb[5472]: ERROR: Failed to write to InfluxDB '192.168.178.139': 422: failure writing points to database: partial write: field type conflict: input field "ha_alert" on measurement "fritzbox" is type string, already exists as type integer dropped=1
Nov 02 09:58:02 pi-hole fritzinfluxdb[5472]: ERROR: Failed to write to InfluxDB '192.168.178.139': 422: failure writing points to database: partial write: field type conflict: input field "ha_alert" on measurement "fritzbox" is type string, already exists as type integer dropped=1
Nov 02 09:58:08 pi-hole fritzinfluxdb[5472]: ERROR: Failed to write to InfluxDB '192.168.178.139': 422: failure writing points to database: partial write: field type conflict: input field "ha_alert" on measurement "fritzbox" is type string, already exists as type integer dropped=1
Nov 02 09:58:13 pi-hole fritzinfluxdb[5472]: ERROR: Failed to write to InfluxDB '192.168.178.139': 422: failure writing points to database: partial write: field type conflict: input field "ha_alert" on measurement "fritzbox" is type string, already exists as type integer dropped=1
Nov 02 09:58:20 pi-hole fritzinfluxdb[5472]: ERROR: Failed to write to InfluxDB '192.168.178.139': 422: failure writing points to database: partial write: field type conflict: input field "ha_alert" on measurement "fritzbox" is type string, already exists as type integer dropped=1
Nov 02 09:58:25 pi-hole fritzinfluxdb[5472]: ERROR: Failed to write to InfluxDB '192.168.178.139': 422: failure writing points to database: partial write: field type conflict: input field "ha_alert" on measurement "fritzbox" is type string, already exists as type integer dropped=1
Nov 02 09:58:31 pi-hole fritzinfluxdb[5472]: ERROR: Failed to write to InfluxDB '192.168.178.139': 422: failure writing points to database: partial write: field type conflict: input field "ha_alert" on measurement "fritzbox" is type string, already exists as type integer dropped=1
Nov 02 09:58:38 pi-hole fritzinfluxdb[5472]: ERROR: Failed to write to InfluxDB '192.168.178.139': 422: failure writing points to database: partial write: field type conflict: input field "ha_alert" on measurement "fritzbox" is type string, already exists as type integer dropped=1
Nov 02 09:58:43 pi-hole fritzinfluxdb[5472]: ERROR: Failed to write to InfluxDB '192.168.178.139': 422: failure writing points to database: partial write: field type conflict: input field "ha_alert" on measurement "fritzbox" is type string, already exists as type integer dropped=1
@Maxtor62
Copy link
Author

Maxtor62 commented Nov 2, 2023

Incredible, reboot FritzBox and now it works.

@Maxtor62 Maxtor62 closed this as completed Nov 2, 2023
@bb-Ricardo
Copy link
Owner

Hi,

Sorry for not getting back sooner.

It seems like the FritzBox returned some invalid values for ha_alert. Not sure why it is doing it.

Seems like "reboot tut gut"

@Maxtor62 Maxtor62 reopened this Nov 3, 2023
@Maxtor62
Copy link
Author

Maxtor62 commented Nov 3, 2023

not really, after 12 hours the same error. See above.

@bb-Ricardo
Copy link
Owner

Oh no, damn it. Will have a look the next few days.

@Maxtor62
Copy link
Author

Maxtor62 commented Nov 7, 2023

Hi,
I installed influx 1.8.x for a test. the same error.

a_alert\" on measurement \"fritzbox\" is type string, already exists as type integer dropped=1"}
2023-11-07 21:53:22,660 - ERROR: Unable to convert FritzBox Lua value '0-919011328' for 'ha_alert' to '<class 'int'>': invalid literal for int() with base 10: '0-919011328'
2023-11-07 21:53:28,274 - ERROR: Failed to write to InfluxDB 'localhost': 400: {"error":"partial write: field type conflict: input field \"ha_alert\" on measurement \"fritzbox\" is type string, already exists as type integer dropped=1"}
2023-11-07 21:53:35,842 - ERROR: Unable to convert FritzBox Lua value '0-919011328' for 'ha_alert' to '<class 'int'>': invalid literal for int() with base 10: '0-919011328'
2023-11-07 21:53:36,768 - ERROR: Failed to write to InfluxDB 'localhost': 400: {"error":"partial write: field type conflict: input field \"ha_alert\" on measurement \"fritzbox\" is type string, already exists as type integer dropped=1"}
2023-11-07 21:53:47,153 - ERROR: Failed to write to InfluxDB 'localhost': 400: {"error":"partial write: field type conflict: input field \"ha_alert\" on measurement \"fritzbox\" is type string, already exists as type integer dropped=1"}
2023-11-07 21:53:50,214 - ERROR: Unable to convert FritzBox Lua value '0-919011328' for 'ha_alert'

@bb-Ricardo
Copy link
Owner

Hi,

I had a look and found the issue:

def get_ha_alert_state(data):
if in_test_mode():
return int((datetime.now().timestamp() - test_start_ts) / 600) % 2
return "0"+grab(data, "alert.state", fallback="0")

according to this document it should only return 0, 1, or a bitmask. Not sure if -919011328 is considered any of them.

Nevertheless I changed it to always return an integer in next-release branch. Would you be able to test it?

@bb-Ricardo bb-Ricardo added awaiting-answer bug Something isn't working labels Nov 8, 2023
@Maxtor62
Copy link
Author

Maxtor62 commented Nov 8, 2023

Hi bb-Ricardo, Yes, of course. What can i do

@bb-Ricardo
Copy link
Owner

ahh, you are using docker containers? Then I need to get home first and then build and push the new next-release docker container to dockerhub. Will let you know when a new container has been pushed

@Maxtor62
Copy link
Author

Maxtor62 commented Nov 8, 2023

ahh, you are using docker containers? Then I need to get home first and then build and push the new next-release docker container to dockerhub. Will let you know when a new container has been pushed

i use a docker or a Proxmox-LXC Container. Let me know what can i do.

@bb-Ricardo
Copy link
Owner

I pushed a new image with the tag next-release can you try using this?

@Maxtor62
Copy link
Author

Maxtor62 commented Nov 9, 2023

I pushed a new image with the tag next-release can you try using this?

Hi, i installed the new release and it works for the moment. The only Error what i can see is:

ERROR: Unable to perform request to 'http://192.168.178.1/data.lua': HTTPConnectionPool(host='192.168.178.1', port=80): Read timed out. (read timeout=10)

I will let you know if it works in few days.

Thank you for the nice work.
Regards

@bb-Ricardo
Copy link
Owner

Great. Sometimes the Fritzbox has issues in collecting and writing out all the data on time for certain queries, mainly logs. If this happens more often I could recommend to increase the timeout.

@Maxtor62
Copy link
Author

Hi, i have bad news. Look at this please.
ERROR: Failed to write to InfluxDB '192.168.178.139': 422: failure writing points to database: partial write: field type conflict: input field "ha_alert" on measurement "fritzbox" is type string, already exists as type integer dropped=4 ERROR: Failed to write to InfluxDB '192.168.178.139': 422: failure writing points to database: partial write: field type conflict: input field "ha_alert" on measurement "fritzbox" is type string, already exists as type integer dropped=4 ERROR: Unable to convert FritzBox Lua value '0-873398272' for 'ha_alert' to '<class 'int'>': invalid literal for int() with base 10: '0-873398272' ERROR: Failed to write to InfluxDB '192.168.178.139': 422: failure writing points to database: partial write: field type conflict: input field "ha_alert" on measurement "fritzbox" is type string, already exists as type integer dropped=4 ERROR: Failed to write to InfluxDB '192.168.178.139': 422: failure writing points to database: partial write: field type conflict: input field "ha_alert" on measurement "fritzbox" is type string, already exists as type integer dropped=4 ERROR: Unable to convert FritzBox Lua value '0-873398272' for 'ha_alert' to '<class 'int'>': invalid literal for int() with base 10: '0-873398272' ERROR: Failed to write to InfluxDB '192.168.178.139': 422: failure writing points to database: partial write: field type conflict: input field "ha_alert" on measurement "fritzbox" is type string, already exists as type integer dropped=4 ERROR: Failed to write to InfluxDB '192.168.178.139': 422: failure writing points to database: partial write: field type conflict: input field "ha_alert" on measurement "fritzbox" is type string, already exists as type integer dropped=4 ERROR: Unable to convert FritzBox Lua value '0-873398272' for 'ha_alert' to '<class 'int'>': invalid literal for int() with base 10: '0-873398272' ERROR: Failed to write to InfluxDB '192.168.178.139': 422: failure writing points to database: partial write: field type conflict: input field "ha_alert" on measurement "fritzbox" is type string, already exists as type integer dropped=4 ERROR: Failed to write to InfluxDB '192.168.178.139': 422: failure writing points to database: partial write: field type conflict: input field "ha_alert" on measurement "fritzbox" is type string, already exists as type integer dropped=4 ERROR: Unable to convert FritzBox Lua value '0-873398272' for 'ha_alert' to '<class 'int'>': invalid literal for int() with base 10: '0-873398272'
Whats happen?
Regards

@Maxtor62
Copy link
Author

Hi, i have bad news. Look at this please. ERROR: Failed to write to InfluxDB '192.168.178.139': 422: failure writing points to database: partial write: field type conflict: input field "ha_alert" on measurement "fritzbox" is type string, already exists as type integer dropped=4 ERROR: Failed to write to InfluxDB '192.168.178.139': 422: failure writing points to database: partial write: field type conflict: input field "ha_alert" on measurement "fritzbox" is type string, already exists as type integer dropped=4 ERROR: Unable to convert FritzBox Lua value '0-873398272' for 'ha_alert' to '<class 'int'>': invalid literal for int() with base 10: '0-873398272' ERROR: Failed to write to InfluxDB '192.168.178.139': 422: failure writing points to database: partial write: field type conflict: input field "ha_alert" on measurement "fritzbox" is type string, already exists as type integer dropped=4 ERROR: Failed to write to InfluxDB '192.168.178.139': 422: failure writing points to database: partial write: field type conflict: input field "ha_alert" on measurement "fritzbox" is type string, already exists as type integer dropped=4 ERROR: Unable to convert FritzBox Lua value '0-873398272' for 'ha_alert' to '<class 'int'>': invalid literal for int() with base 10: '0-873398272' ERROR: Failed to write to InfluxDB '192.168.178.139': 422: failure writing points to database: partial write: field type conflict: input field "ha_alert" on measurement "fritzbox" is type string, already exists as type integer dropped=4 ERROR: Failed to write to InfluxDB '192.168.178.139': 422: failure writing points to database: partial write: field type conflict: input field "ha_alert" on measurement "fritzbox" is type string, already exists as type integer dropped=4 ERROR: Unable to convert FritzBox Lua value '0-873398272' for 'ha_alert' to '<class 'int'>': invalid literal for int() with base 10: '0-873398272' ERROR: Failed to write to InfluxDB '192.168.178.139': 422: failure writing points to database: partial write: field type conflict: input field "ha_alert" on measurement "fritzbox" is type string, already exists as type integer dropped=4 ERROR: Failed to write to InfluxDB '192.168.178.139': 422: failure writing points to database: partial write: field type conflict: input field "ha_alert" on measurement "fritzbox" is type string, already exists as type integer dropped=4 ERROR: Unable to convert FritzBox Lua value '0-873398272' for 'ha_alert' to '<class 'int'>': invalid literal for int() with base 10: '0-873398272' Whats happen? Regards

After reboot ,

INFO: Received exit signal SIGTERM... INFO: Cancelling 4 outstanding tasks INFO: Closed FritzBox TR-069 connection INFO: Closed FritzBox Lua connection INFO: Closed InfluxDB session INFO: Successfully shutdown fritzinfluxdb INFO: Starting fritzinfluxdb v1.2.1 (2023-01-26) INFO: Successfully parsed config INFO: Connection to InfluxDB v2.7.3 established and bucket is present INFO: Successfully established FritzBox TR-069 session INFO: Successfully established FritzBox Lua session INFO: Successfully connected to FritzBox '192.168.178.1' (fritz.box) Model: FRITZ!Box 7590 AX (DSL) - FW: 7.57 INFO: Starting main loop INFO: Service 'Cable Info (Fritz!OS 7.29 - latest)' not applicable for this FritzBox Model Link type 'DSL' ERROR: Unable to convert FritzBox Lua value '0-873398272' for 'ha_alert' to '<class 'int'>': invalid literal for int() with base 10: '0-873398272' ERROR: Failed to write to InfluxDB '192.168.178.139': 422: failure writing points to database: partial write: field type conflict: input field "ha_alert" on measurement "fritzbox" is type string, already exists as type integer dropped=1 ERROR: Unable to convert FritzBox Lua value '0-873398272' for 'ha_alert' to '<class 'int'>': invalid literal for int() with base 10: '0-873398272' ERROR: Failed to write to InfluxDB '192.168.178.139': 422: failure writing points to database: partial write: field type conflict: input field "ha_alert" on measurement "fritzbox" is type string, already exists as type integer dropped=1

@bb-Ricardo
Copy link
Owner

Mmmhh, and you are sure you are using the next-release tag and pull the current image?

@Maxtor62
Copy link
Author

Mmmhh, and you are sure you are using the next-release tag and pull the current image?

Yes, i built the container 09.11.2013. Look at the biuld-log from my portainer.

{ "AppArmorProfile": "docker-default", "Args": [ "/app/fritzinfluxdb.py", "-d" ], "Config": { "AttachStderr": true, "AttachStdin": false, "AttachStdout": true, "Cmd": [ "python", "/app/fritzinfluxdb.py", "-d" ], "DDSM": false, "Domainname": "", "Entrypoint": null, "Env": [ "PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "LANG=C.UTF-8", "GPG_KEY=E3FF2839C048B25C084DEBE9B26995E310250568", "PYTHON_VERSION=3.9.16", "PYTHON_PIP_VERSION=22.0.4", "PYTHON_SETUPTOOLS_VERSION=58.1.0", "PYTHON_GET_PIP_URL=https://github.com/pypa/get-pip/raw/66030fa03382b4914d4c4d0896961a0bdeeeb274/public/get-pip.py", "PYTHON_GET_PIP_SHA256=1e501cf004eac1b7eb1f97266d28f995ae835d30250bec7f8850562703067dc6", "INFLUXDB_BUCKET=fritzbox", "INFLUXDB_TOKEN=dKjwbIjoTnpcudHFhceu9-An1tERV752927aGezRkib-NsJOxGWB0Z-M7NTGSb6ShGIPtEeltg7pl7HPk0MmQQ==", "FRITZBOX_USERNAME=influxdb", "FRITZBOX_PASSWORD=influxdb-home", "INFLUXDB_VERSION=2", "INFLUXDB_HOSTNAME=192.168.178.139", "INFLUXDB_ORGANISATION=home" ], "Hostname": "bae661bd5a4d", "Image": "bbricardo/fritzinfluxdb:latest", "Labels": { "com.docker.compose.config-hash": "4cc23a25913665f927c6e970a97fb41eaa0e7b311c1aabfec8199e8050dff3e9", "com.docker.compose.container-number": "1", "com.docker.compose.depends_on": "", "com.docker.compose.image": "sha256:3e0c97a18d831770cf6beaab4a4267e27d6ed48f96286770f7422da15accb2d1", "com.docker.compose.oneoff": "False", "com.docker.compose.project": "fritzinfluxdb", "com.docker.compose.project.config_files": "/data/compose/15/docker-compose.yml", "com.docker.compose.project.working_dir": "/data/compose/15", "com.docker.compose.service": "fritzinfluxdb", "com.docker.compose.version": "2.20.2" }, "OnBuild": null, "OpenStdin": false, "StdinOnce": false, "Tty": false, "User": "", "Volumes": null, "WorkingDir": "/app" }, "Created": "2023-11-09T18:26:03.054544409Z", "Driver": "btrfs", "ExecIDs": null, "GraphDriver": { "Data": null, "Name": "btrfs" }, "HostConfig": { "AutoRemove": false, "Binds": null, "BlkioDeviceReadBps": null, "BlkioDeviceReadIOps": null, "BlkioDeviceWriteBps": null, "BlkioDeviceWriteIOps": null, "BlkioWeight": 0, "BlkioWeightDevice": null, "CapAdd": null, "CapDrop": null, "Cgroup": "", "CgroupParent": "", "CgroupnsMode": "host", "ConsoleSize": [ 0, 0 ], "ContainerIDFile": "", "CpuCount": 0, "CpuPercent": 0, "CpuPeriod": 0, "CpuQuota": 0, "CpuRealtimePeriod": 0, "CpuRealtimeRuntime": 0, "CpuShares": 0, "CpusetCpus": "", "CpusetMems": "", "DeviceCgroupRules": null, "DeviceRequests": null, "Devices": null, "Dns": null, "DnsOptions": null, "DnsSearch": null, "Env": [ "PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "LANG=C.UTF-8", "GPG_KEY=E3FF2839C048B25C084DEBE9B26995E310250568", "PYTHON_VERSION=3.9.16", "PYTHON_PIP_VERSION=22.0.4", "PYTHON_SETUPTOOLS_VERSION=58.1.0", "PYTHON_GET_PIP_URL=https://github.com/pypa/get-pip/raw/66030fa03382b4914d4c4d0896961a0bdeeeb274/public/get-pip.py", "PYTHON_GET_PIP_SHA256=1e501cf004eac1b7eb1f97266d28f995ae835d30250bec7f8850562703067dc6", "INFLUXDB_BUCKET=fritzbox", "INFLUXDB_TOKEN=dKjwbIjoTnpcudHFhceu9-An1tERV752927aGezRkib-NsJOxGWB0Z-M7NTGSb6ShGIPtEeltg7pl7HPk0MmQQ==", "FRITZBOX_USERNAME=influxdb", "FRITZBOX_PASSWORD=influxdb-home", "INFLUXDB_VERSION=2", "INFLUXDB_HOSTNAME=192.168.178.139", "INFLUXDB_ORGANISATION=home" ], "ExtraHosts": [], "GroupAdd": null, "IOMaximumBandwidth": 0, "IOMaximumIOps": 0, "IpcMode": "private", "Isolation": "", "KernelMemory": 0, "KernelMemoryTCP": 0, "Links": null, "LogConfig": { "Config": {}, "Type": "db" }, "MaskedPaths": [ "/proc/asound", "/proc/acpi", "/proc/kcore", "/proc/keys", "/proc/latency_stats", "/proc/timer_list", "/proc/timer_stats", "/proc/sched_debug", "/proc/scsi", "/sys/firmware" ], "Memory": 0, "MemoryReservation": 0, "MemorySwap": 0, "MemorySwappiness": null, "NanoCpus": 0, "NetworkMode": "fritzinfluxdb_default", "OomKillDisable": false, "OomScoreAdj": 0, "PidMode": "", "PidsLimit": null, "PortBindings": {}, "Privileged": false, "PublishAllPorts": false, "ReadonlyPaths": [ "/proc/bus", "/proc/fs", "/proc/irq", "/proc/sys", "/proc/sysrq-trigger" ], "ReadonlyRootfs": false, "RestartPolicy": { "MaximumRetryCount": 0, "Name": "unless-stopped" }, "Runtime": "runc", "SecurityOpt": null, "ShmSize": 67108864, "UTSMode": "", "Ulimits": null, "UsernsMode": "", "VolumeDriver": "", "VolumesFrom": null }, "HostnamePath": "/volume1/@docker/containers/bae661bd5a4ddf5133cfc9b772dc4170cd72afd582ee2e9c62c242b0000cd35e/hostname", "HostsPath": "/volume1/@docker/containers/bae661bd5a4ddf5133cfc9b772dc4170cd72afd582ee2e9c62c242b0000cd35e/hosts", "Id": "bae661bd5a4ddf5133cfc9b772dc4170cd72afd582ee2e9c62c242b0000cd35e", "Image": "sha256:3e0c97a18d831770cf6beaab4a4267e27d6ed48f96286770f7422da15accb2d1", "LogPath": "/volume1/@docker/containers/bae661bd5a4ddf5133cfc9b772dc4170cd72afd582ee2e9c62c242b0000cd35e/log.db", "MountLabel": "", "Mounts": [], "Name": "/fritzinfluxdb", "NetworkSettings": { "Bridge": "", "EndpointID": "", "Gateway": "", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "HairpinMode": false, "IPAddress": "", "IPPrefixLen": 0, "IPv6Gateway": "", "LinkLocalIPv6Address": "", "LinkLocalIPv6PrefixLen": 0, "MacAddress": "", "Networks": { "fritzinfluxdb_default": { "Aliases": [ "fritzinfluxdb", "fritzinfluxdb", "bae661bd5a4d" ], "DriverOpts": null, "EndpointID": "51d4e23d59cb49109097f2ad778caac51fbf069cfebff8746c21e3e25df48430", "Gateway": "172.19.0.1", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "IPAMConfig": null, "IPAddress": "172.19.0.2", "IPPrefixLen": 16, "IPv6Gateway": "", "Links": null, "MacAddress": "02:42:ac:13:00:02", "NetworkID": "c86dc8517dad54de9dec2494195018724dc1600e5a90b5aea09104ad416f6fa4" } }, "Ports": {}, "SandboxID": "c1c7b1431cbbb181dee9e0e15b019988ac30cad1e6a0ca79f095aff671efb4be", "SandboxKey": "/var/run/docker/netns/c1c7b1431cbb", "SecondaryIPAddresses": null, "SecondaryIPv6Addresses": null }, "Path": "python", "Platform": "linux", "Portainer": { "ResourceControl": { "Id": 12, "ResourceId": "2_fritzinfluxdb", "SubResourceIds": [], "Type": 6, "UserAccesses": [], "TeamAccesses": [], "Public": false, "AdministratorsOnly": true, "System": false } }, "ProcessLabel": "", "ResolvConfPath": "/volume1/@docker/containers/bae661bd5a4ddf5133cfc9b772dc4170cd72afd582ee2e9c62c242b0000cd35e/resolv.conf", "RestartCount": 0, "State": { "Dead": false, "Error": "", "ExitCode": 0, "FinishedAt": "2023-11-11T17:38:31.024824007Z", "FinishedTs": 1699724311, "OOMKilled": false, "Paused": false, "Pid": 20626, "Restarting": false, "Running": true, "StartedAt": "2023-11-11T17:38:37.10567587Z", "StartedTs": 1699724317, "Status": "running" } }

@Maxtor62
Copy link
Author

Maxtor62 commented Nov 11, 2023

Mmmhh, and you are sure you are using the next-release tag and pull the current image?

Yes, i built the container 09.11.2013. Look at the biuld-log from my portainer.

{ "AppArmorProfile": "docker-default", "Args": [ "/app/fritzinfluxdb.py", "-d" ], "Config": { "AttachStderr": true, "AttachStdin": false, "AttachStdout": true, "Cmd": [ "python", "/app/fritzinfluxdb.py", "-d" ], "DDSM": false, "Domainname": "", "Entrypoint": null, "Env": [ "PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "LANG=C.UTF-8", "GPG_KEY=E3FF2839C048B25C084DEBE9B26995E310250568", "PYTHON_VERSION=3.9.16", "PYTHON_PIP_VERSION=22.0.4", "PYTHON_SETUPTOOLS_VERSION=58.1.0", "PYTHON_GET_PIP_URL=https://github.com/pypa/get-pip/raw/66030fa03382b4914d4c4d0896961a0bdeeeb274/public/get-pip.py", "PYTHON_GET_PIP_SHA256=1e501cf004eac1b7eb1f97266d28f995ae835d30250bec7f8850562703067dc6", "INFLUXDB_BUCKET=fritzbox", "INFLUXDB_TOKEN=dKjwbIjoTnpcudHFhceu9-An1tERV752927aGezRkib-NsJOxGWB0Z-M7NTGSb6ShGIPtEeltg7pl7HPk0MmQQ==", "FRITZBOX_USERNAME=influxdb", "FRITZBOX_PASSWORD=influxdb-home", "INFLUXDB_VERSION=2", "INFLUXDB_HOSTNAME=192.168.178.139", "INFLUXDB_ORGANISATION=home" ], "Hostname": "bae661bd5a4d", "Image": "bbricardo/fritzinfluxdb:latest", "Labels": { "com.docker.compose.config-hash": "4cc23a25913665f927c6e970a97fb41eaa0e7b311c1aabfec8199e8050dff3e9", "com.docker.compose.container-number": "1", "com.docker.compose.depends_on": "", "com.docker.compose.image": "sha256:3e0c97a18d831770cf6beaab4a4267e27d6ed48f96286770f7422da15accb2d1", "com.docker.compose.oneoff": "False", "com.docker.compose.project": "fritzinfluxdb", "com.docker.compose.project.config_files": "/data/compose/15/docker-compose.yml", "com.docker.compose.project.working_dir": "/data/compose/15", "com.docker.compose.service": "fritzinfluxdb", "com.docker.compose.version": "2.20.2" }, "OnBuild": null, "OpenStdin": false, "StdinOnce": false, "Tty": false, "User": "", "Volumes": null, "WorkingDir": "/app" }, "Created": "2023-11-09T18:26:03.054544409Z", "Driver": "btrfs", "ExecIDs": null, "GraphDriver": { "Data": null, "Name": "btrfs" }, "HostConfig": { "AutoRemove": false, "Binds": null, "BlkioDeviceReadBps": null, "BlkioDeviceReadIOps": null, "BlkioDeviceWriteBps": null, "BlkioDeviceWriteIOps": null, "BlkioWeight": 0, "BlkioWeightDevice": null, "CapAdd": null, "CapDrop": null, "Cgroup": "", "CgroupParent": "", "CgroupnsMode": "host", "ConsoleSize": [ 0, 0 ], "ContainerIDFile": "", "CpuCount": 0, "CpuPercent": 0, "CpuPeriod": 0, "CpuQuota": 0, "CpuRealtimePeriod": 0, "CpuRealtimeRuntime": 0, "CpuShares": 0, "CpusetCpus": "", "CpusetMems": "", "DeviceCgroupRules": null, "DeviceRequests": null, "Devices": null, "Dns": null, "DnsOptions": null, "DnsSearch": null, "Env": [ "PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "LANG=C.UTF-8", "GPG_KEY=E3FF2839C048B25C084DEBE9B26995E310250568", "PYTHON_VERSION=3.9.16", "PYTHON_PIP_VERSION=22.0.4", "PYTHON_SETUPTOOLS_VERSION=58.1.0", "PYTHON_GET_PIP_URL=https://github.com/pypa/get-pip/raw/66030fa03382b4914d4c4d0896961a0bdeeeb274/public/get-pip.py", "PYTHON_GET_PIP_SHA256=1e501cf004eac1b7eb1f97266d28f995ae835d30250bec7f8850562703067dc6", "INFLUXDB_BUCKET=fritzbox", "INFLUXDB_TOKEN=dKjwbIjoTnpcudHFhceu9-An1tERV752927aGezRkib-NsJOxGWB0Z-M7NTGSb6ShGIPtEeltg7pl7HPk0MmQQ==", "FRITZBOX_USERNAME=influxdb", "FRITZBOX_PASSWORD=influxdb-home", "INFLUXDB_VERSION=2", "INFLUXDB_HOSTNAME=192.168.178.139", "INFLUXDB_ORGANISATION=home" ], "ExtraHosts": [], "GroupAdd": null, "IOMaximumBandwidth": 0, "IOMaximumIOps": 0, "IpcMode": "private", "Isolation": "", "KernelMemory": 0, "KernelMemoryTCP": 0, "Links": null, "LogConfig": { "Config": {}, "Type": "db" }, "MaskedPaths": [ "/proc/asound", "/proc/acpi", "/proc/kcore", "/proc/keys", "/proc/latency_stats", "/proc/timer_list", "/proc/timer_stats", "/proc/sched_debug", "/proc/scsi", "/sys/firmware" ], "Memory": 0, "MemoryReservation": 0, "MemorySwap": 0, "MemorySwappiness": null, "NanoCpus": 0, "NetworkMode": "fritzinfluxdb_default", "OomKillDisable": false, "OomScoreAdj": 0, "PidMode": "", "PidsLimit": null, "PortBindings": {}, "Privileged": false, "PublishAllPorts": false, "ReadonlyPaths": [ "/proc/bus", "/proc/fs", "/proc/irq", "/proc/sys", "/proc/sysrq-trigger" ], "ReadonlyRootfs": false, "RestartPolicy": { "MaximumRetryCount": 0, "Name": "unless-stopped" }, "Runtime": "runc", "SecurityOpt": null, "ShmSize": 67108864, "UTSMode": "", "Ulimits": null, "UsernsMode": "", "VolumeDriver": "", "VolumesFrom": null }, "HostnamePath": "/volume1/@docker/containers/bae661bd5a4ddf5133cfc9b772dc4170cd72afd582ee2e9c62c242b0000cd35e/hostname", "HostsPath": "/volume1/@docker/containers/bae661bd5a4ddf5133cfc9b772dc4170cd72afd582ee2e9c62c242b0000cd35e/hosts", "Id": "bae661bd5a4ddf5133cfc9b772dc4170cd72afd582ee2e9c62c242b0000cd35e", "Image": "sha256:3e0c97a18d831770cf6beaab4a4267e27d6ed48f96286770f7422da15accb2d1", "LogPath": "/volume1/@docker/containers/bae661bd5a4ddf5133cfc9b772dc4170cd72afd582ee2e9c62c242b0000cd35e/log.db", "MountLabel": "", "Mounts": [], "Name": "/fritzinfluxdb", "NetworkSettings": { "Bridge": "", "EndpointID": "", "Gateway": "", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "HairpinMode": false, "IPAddress": "", "IPPrefixLen": 0, "IPv6Gateway": "", "LinkLocalIPv6Address": "", "LinkLocalIPv6PrefixLen": 0, "MacAddress": "", "Networks": { "fritzinfluxdb_default": { "Aliases": [ "fritzinfluxdb", "fritzinfluxdb", "bae661bd5a4d" ], "DriverOpts": null, "EndpointID": "51d4e23d59cb49109097f2ad778caac51fbf069cfebff8746c21e3e25df48430", "Gateway": "172.19.0.1", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "IPAMConfig": null, "IPAddress": "172.19.0.2", "IPPrefixLen": 16, "IPv6Gateway": "", "Links": null, "MacAddress": "02:42:ac:13:00:02", "NetworkID": "c86dc8517dad54de9dec2494195018724dc1600e5a90b5aea09104ad416f6fa4" } }, "Ports": {}, "SandboxID": "c1c7b1431cbbb181dee9e0e15b019988ac30cad1e6a0ca79f095aff671efb4be", "SandboxKey": "/var/run/docker/netns/c1c7b1431cbb", "SecondaryIPAddresses": null, "SecondaryIPv6Addresses": null }, "Path": "python", "Platform": "linux", "Portainer": { "ResourceControl": { "Id": 12, "ResourceId": "2_fritzinfluxdb", "SubResourceIds": [], "Type": 6, "UserAccesses": [], "TeamAccesses": [], "Public": false, "AdministratorsOnly": true, "System": false } }, "ProcessLabel": "", "ResolvConfPath": "/volume1/@docker/containers/bae661bd5a4ddf5133cfc9b772dc4170cd72afd582ee2e9c62c242b0000cd35e/resolv.conf", "RestartCount": 0, "State": { "Dead": false, "Error": "", "ExitCode": 0, "FinishedAt": "2023-11-11T17:38:31.024824007Z", "FinishedTs": 1699724311, "OOMKilled": false, "Paused": false, "Pid": 20626, "Restarting": false, "Running": true, "StartedAt": "2023-11-11T17:38:37.10567587Z", "StartedTs": 1699724317, "Status": "running" } }

And this is the stack.

`version: '3'

services:
fritzinfluxdb:
container_name: fritzinfluxdb
image: bbricardo/fritzinfluxdb:latest
restart: unless-stopped
environment:
# FritzBox configuration
- FRITZBOX_USERNAME=XXXXX
# this var should be defined in an ".env" file
- FRITZBOX_PASSWORD=XXXXX

  # InfluxDB configuration
  - INFLUXDB_VERSION=2
  - INFLUXDB_HOSTNAME=192.168.178.139
  - INFLUXDB_ORGANISATION=home
  - INFLUXDB_BUCKET=fritzbox
  # this var should be defined in an ".env" file
  - INFLUXDB_TOKEN=dKjwbIjoTnpcudHFhceu9-An1tERV752927aGezRkib-NsJOxGWB0Z-M7NTGSb6ShGIPtEeltg7pl7HPk0MmQQ==

  # for more config options check fritzinfluxdb-sample.ini

# enable to write debug information to docker logs
# command:
#   - "python"
#   - "/app/fritzinfluxdb.py"
#   - "-v"`

docker

Can you update your repository?

@Maxtor62
Copy link
Author

Hey,

How about this one? https://hub.docker.com/layers/bbricardo/fritzinfluxdb/next-release/images/sha256-b2e73ff1342a04c221d67a14779644f9815fd17eb632fa8105e3d0944793341f?context=explore

Hi,
i installed the next-release and i will try it. I let yow know in a few days if it works.

Thank you
Regards Stefan

@Maxtor62
Copy link
Author

Hi, Day four - seems to be working fine.

Regards

@bb-Ricardo
Copy link
Owner

Awesome, thank you for testing.

@bb-Ricardo bb-Ricardo added this to the 1.3.0 milestone Nov 27, 2023
@congoelmex
Copy link

Hi @bb-Ricardo ,

I've got a similar problem...I tried the docker version as well as the bare install of the next-release and ich got lots of the following errors:

ERROR: Unable to convert FritzBox Lua value '0-1' for 'ha_heating_windowopenactiveendtime' to '<class 'int'>': invalid literal for int() with base 10: '0-1'

These seem to be related to my window contacts which I'm using to turn off the heating when a window is open.
If I close the window, the error disappears.

Do you have any iade, what I could do?

Best regards!

@bb-Ricardo
Copy link
Owner

Hi,

Can you try the next-release branch?

@congoelmex
Copy link

I'm already using the next-release branch.

@congoelmex
Copy link

I suppose it's something similar to what you wrote Maxtor62 in November (#111 (comment)) but I can't figure out, what to change to make this go away. :(

@bb-Ricardo
Copy link
Owner

If you are already on next-release then it needs to be fixed in the code.

d86a337#diff-719dfe4d3aeaf75c2b3d8556030cde98ab33c99d15fa646d928f2183fcfd9077

I guess this also needs to be applied to all other values (and I assumed I did that already)

@congoelmex
Copy link

Thanks for the answer...I ended with patching out the stuff for "ha_heating_windowopenactiveendtime" since I'm not interested in this anyway... ;)

@bb-Ricardo
Copy link
Owner

@congoelmex,

Just released version 1.2.2 which should solve the issue in a more generic approach

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-answer bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants