Skip to content

InfluxDB write issue #328

@andymike171087

Description

@andymike171087

BatMON starts correctly and connects to both MQTT and InfluxDB add-ons in Home Assistant (connection parameters verified).
However, during startup it prints a warning:

17:57:21 WARNING [main] Failed to load influxdb sink: No module named 'mqtt_util'

After this, MQTT messages are still published as expected, but no data is written into InfluxDB.
Even when I create a new database manually, BatMON does not create measurements (previously it created measurements like battery1, etc.).
It seems the InfluxDB sink is not initialized at all after the warning.

Steps to reproduce
1. Run BatMON add-on with valid InfluxDB v1 connection parameters
2. Observe logs during startup
3. Verify that no new measurements appear in the database

Expected behavior
InfluxDB sink should load without errors and create measurement entries (e.g., battery1) as it did before.

Environment
• Home Assistant OS 16.2 (Raspberry Pi 5)
• Add-on: InfluxDB 5.0.2
• BatMON version: latest
• InfluxDB configured for v1 compatibility (database + username/password)
• MQTT working fine
Startup logs:

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
MQTT broker:     addons@core-mosquitto:1883
17:57:09 INFO [main] Started in pair-only mode (bleak 0.13.1a1)
17:57:09 INFO [main] No PSK, nothing to pair
17:57:09 INFO [main] exit signal handler... (), {}, shutdown was False
17:57:11 INFO [main] Power cycle bluetooth hardware
Unable to open mgmt_socket
Unable to open mgmt_socket
17:57:14 INFO [bt] BT Discovery:
17:57:19 INFO [bt] BT               addr                       name
17:57:19 INFO [bt] BT 57:13:9A:FE:F6:3A                       None
17:57:19 INFO [bt] BT C8:47:80:1D:DC:B2                407052C1264
17:57:19 INFO [bt] BT 5F:E1:76:ED:10:C1                       None
17:57:19 INFO [bt] BT 4E:72:E3:82:B8:DE                       None
17:57:19 INFO [bt] BT 55:7A:C4:60:00:C4                       None
17:57:19 INFO [bt] BT 5A:1E:22:83:73:51                       None
17:57:19 INFO [bt] BT 44:41:94:EA:02:A8                       None
17:57:19 INFO [bt] BT D8:C1:0B:87:F8:23                       None
17:57:19 INFO [bt] BT 55:05:A9:71:CA:91                       None
17:57:19 INFO [bt] BT D9:69:27:71:43:99                       None
17:57:19 INFO [bt] BT 61:32:BA:C2:0E:87                       None
17:57:20 INFO [main] Batmon ver 1.89, Bleak ver 1.1.0, BtBackend ver bluez-v5.82
17:57:21 INFO [main] connecting mqtt homeassistant@core-mosquitto:1883
17:57:21 WARNING [main] Failed to load influxdb sink: No module named 'mqtt_util'
17:57:21 INFO [main] Fetching 1 BMS + 0 virtual + 0 others serially, period=1.00s, keep_alive=True
17:57:21 INFO [sampling] connecting bms JKBt(C8:47:80:1D:DC:B2,battery1)
17:57:21 INFO [main] mqtt watchdog loop started with timeout 300.0s
17:57:23 INFO [sampling] connected bms JKBt(C8:47:80:1D:DC:B2,battery1)!
17:57:24 INFO [jikong] JKBt(C8:47:80:1D:DC:B2,battery1) SW ver 11.54 detected frame ver: 32s (fw>=11)
17:57:24 INFO [sampling] battery1 subscribing for {'charge': True, 'discharge': True, 'balance': True} switch change
17:57:24 INFO [sampling] battery1: BmsSampl(55.9%,U=26.0V,I=9.49A,P=247W,Q=157/280Ah,mos=28°C)
17:57:24 INFO [sampling] battery1 volt=[3250,3252,3252,3253,3253,3252,3250,3248] temp=[24.2, 23.7, 0.0, 0.0]
17:57:24 INFO [sampling] Sending HA discovery for battery1 (num_samples=0)

Thanks in advance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions