fl4p / batmon-ha

Add-on for Home Assistant to connect JK, JBD, Daly, ANT, SOK and Supervolt BMS via Bluetooth
MIT License
246 stars 53 forks source link

InfluxDB Error pls help... #145

Closed haselnuss1971 closed 9 months ago

haselnuss1971 commented 9 months ago

i get the error:

9:22:59 ERROR [main] Main loop exception: No module named 'influxdb' 09:22:59 ERROR [main] Stack: Traceback (most recent call last): File "/app/main.py", line 335, in asyncio.run(main()) File "/usr/lib/python3.11/asyncio/runners.py", line 190, in run return runner.run(main) ^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/asyncio/runners.py", line 118, in run return self._loop.run_until_complete(task) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "/app/main.py", line 233, in main sinks.append(InfluxDBSink(**{k[9:]: v for k, v in userconfig.items() if k.startswith('influxdb')})) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/bmslib/sinks.py", line 30, in init import influxdb ModuleNotFoundError: No module named 'influxdb' 09:22:59 INFO [main] exit signal handler... (), {}, shutdown already False

What i am missing... Thank you.

7wells commented 9 months ago

Hi, I'm not the developer and no expert, but I wonder why batmon would ask for the optional InfluxDB. Had you (or still have) InfluxDB installed? If still installed, is it properly set up and else running without problems? Did you see the error message right from the first time when you just installed batmon? If only later, do you remember what you changed (if at all)? Besides, maybe you could try re-installing batmon and - if you need it - also InfluxDB. But then do one after the other and immediately check the protocol from the corresponding add-on after you just started it. Hopefully, this helps a bit to find the reason for the problem.

@fl4p I hope you don't mind me chiming in. 😊

fl4p commented 9 months ago

influxdb is an undocumented feature. batmon will write samples directly to the database. I added the missing dependency influxdb to requirements.txt. next release will fix it

fl4p commented 9 months ago

see https://github.com/fl4p/batmon-ha/blob/master/doc/InfluxDB.md

fl4p commented 9 months ago

should've been fixed with v0.0.71, please re-open if needed