zewelor / bt-mqtt-gateway

A simple Python script which provides a Bluetooth to MQTT gateway, easily extensible via custom workers. See https://github.com/zewelor/bt-mqtt-gateway/wiki for more information.
MIT License
548 stars 116 forks source link

solved: Type error #251

Closed Werner-G closed 2 years ago

Werner-G commented 2 years ago

H/W: Rpi4 with Bullseye-firmware

When starting I see this logs: (.venv) pi@smarthome:~/bt-mqtt-gateway $ sudo ./gateway.py 15:18:09 Starting 15:18:09 Adding 2 thermostat devices 15:18:10 Adding 1 miflora devices 15:18:10 Adding 1 mithermometer devices 15:18:10 Adding 2 blescanmulti devices 15:18:10 Adding 1 switchbot devices 15:18:10 Adding switchbot device 'heater' (00:11:22:33:44:55) 15:18:10 Adding 1 smartgadget devices 15:18:10 Adding 1 ruuvitag devices 15:18:10 Adding 1 lywsd02 devices 15:18:10 Adding lywsd02 device 'living_room' (00:11:22:33:44:55) Traceback (most recent call last): File "/home/pi/bt-mqtt-gateway/./gateway.py", line 83, in <module> manager.register_workers(global_topic_prefix) File "/home/pi/bt-mqtt-gateway/workers_manager.py", line 86, in register_workers worker_obj = klass( TypeError: __init__() got multiple values for argument 'command_timeout'

No gateway activity. I have checked the gateway.py and workers_manager.py-files, but I cannot see something wrong.

BTW, is it allow the delete all the other workers in the device section of config.yaml since I only want to read out the miflora-device values?

Werner-G commented 2 years ago

Got it. I deleted all other workers in config.yaml and left only one 'command_timeout' - everything is fine now.