(.venv) root@aml:~/bt-mqtt-gateway# sudo ./gateway.py
01:07:33 Starting
01:07:34 AM Adding 1 mzbtir devices
01:07:34 AM Updating 1 mzbtir devices
01:07:37 AM Fatal error while executing worker command: AttributeError
Traceback (most recent call last):
File "./gateway.py", line 91, in <module>
raise e
File "./gateway.py", line 73, in <module>
mqtt.publish(_WORKERS_QUEUE.get(timeout=10).execute())
File "/root/bt-mqtt-gateway/workers_manager.py", line 55, in execute
for message in self._callback(*self._args):
File "/root/bt-mqtt-gateway/workers/mzbtir.py", line 72, in status_update
if self.fail_count > self.max_fail_count:
AttributeError: 'MzbtirWorker' object has no attribute 'max_fail_count'
(.venv) root@aml:~/bt-mqtt-gateway# sudo ./gateway.py -d
2020-01-17 01:07:48,801 INFO bt-mqtt-gw gateway.py:61:<module> - Starting
2020-01-17 01:07:48,803 DEBUG bt-mqtt-gw.mqtt mqtt.py:30:__init__ - Setting LWT to: hostname/lwt_topic
2020-01-17 01:07:49,555 INFO bt-mqtt-gw.workers.mzbtir mzbtir.py:16:_setup - Adding 1 mzbtir devices
2020-01-17 01:07:49,555 DEBUG bt-mqtt-gw.workers.mzbtir mzbtir.py:18:_setup - Adding mzbtir device 'name' (68:3E:34:CC:D3:44)
2020-01-17 01:07:49,556 DEBUG bt-mqtt-gw.workers_manager workers_manager.py:96:register_workers - Added mzbtir config with a 2 seconds timeout
2020-01-17 01:07:49,557 DEBUG bt-mqtt-gw.workers_manager workers_manager.py:106:register_workers - Added mzbtir worker with 300 seconds interval and a 35 seconds timeout
2020-01-17 01:07:49,568 DEBUG bt-mqtt-gw.mqtt mqtt.py:116:callbacks_subscription - Subscribing to: hostname/mzbtir/update_interval
2020-01-17 01:07:49,570 DEBUG bt-mqtt-gw.mqtt mqtt.py:116:callbacks_subscription - Subscribing to: hostname/homeassistant/status
2020-01-17 01:07:49,574 DEBUG bt-mqtt-gw.workers_manager workers_manager.py:67:execute - Execution result of command MzbtirWorker.config: [{'topic': 'sensor/68-3E-34-CC-D3-44/mzbtir_name_temperature/config', 'payload': '{"unique_id": "bt-mqtt-gateway/68-3E-34-CC-D3-44/mzbtir_name_temperature", "name": "mzbtir_68:3E:34:CC:D3:44_temperature", "state_topic": "hostname/mzbtir/name/temperature", "availability_topic": "hostname/mzbtir/name/availability", "device_class": "temperature", "device": {"identifiers": ["68:3E:34:CC:D3:44", "bt-mqtt-gateway/68-3E-34-CC-D3-44/mzbtir_name"], "manufacturer": "Meizu", "model": "btir", "name": "mzbtir_68:3E:34:CC:D3:44"}, "unit_of_measurement": "\\u00b0C"}'}, {'topic': 'sensor/68-3E-34-CC-D3-44/mzbtir_name_humidity/config', 'payload': '{"unique_id": "bt-mqtt-gateway/68-3E-34-CC-D3-44/mzbtir_name_humidity", "name": "mzbtir_68:3E:34:CC:D3:44_humidity", "state_topic": "hostname/mzbtir/name/humidity", "availability_topic": "hostname/mzbtir/name/availability", "device_class": "humidity", "device": {"identifiers": ["68:3E:34:CC:D3:44", "bt-mqtt-gateway/68-3E-34-CC-D3-44/mzbtir_name"], "manufacturer": "Meizu", "model": "btir", "name": "mzbtir_68:3E:34:CC:D3:44"}, "unit_of_measurement": "%"}'}, {'topic': 'sensor/68-3E-34-CC-D3-44/mzbtir_name_battery/config', 'payload': '{"unique_id": "bt-mqtt-gateway/68-3E-34-CC-D3-44/mzbtir_name_battery", "name": "mzbtir_68:3E:34:CC:D3:44_battery", "state_topic": "hostname/mzbtir/name/battery", "availability_topic": "hostname/mzbtir/name/availability", "device_class": "battery", "device": {"identifiers": ["68:3E:34:CC:D3:44", "bt-mqtt-gateway/68-3E-34-CC-D3-44/mzbtir_name"], "manufacturer": "Meizu", "model": "btir", "name": "mzbtir_68:3E:34:CC:D3:44"}, "unit_of_measurement": "%"}'}]
2020-01-17 01:07:49,587 DEBUG bt-mqtt-gw.workers_manager workers_manager.py:174:update_all - Updating all workers
2020-01-17 01:07:49,589 INFO bt-mqtt-gw.workers.mzbtir mzbtir.py:58:status_update - Updating 1 mzbtir devices
2020-01-17 01:07:49,589 DEBUG bt-mqtt-gw.workers.mzbtir mzbtir.py:62:status_update - Updating mzbtir device 'name' (68:3E:34:CC:D3:44)
2020-01-17 01:07:53,353 ERROR bt-mqtt-gw logger.py:50:log_exception - Fatal error while executing worker command: AttributeError
Traceback (most recent call last):
File "./gateway.py", line 73, in <module>
mqtt.publish(_WORKERS_QUEUE.get(timeout=10).execute())
File "/root/bt-mqtt-gateway/workers_manager.py", line 55, in execute
for message in self._callback(*self._args):
File "/root/bt-mqtt-gateway/workers/mzbtir.py", line 72, in status_update
if self.fail_count > self.max_fail_count:
AttributeError: 'MzbtirWorker' object has no attribute 'max_fail_count'
Traceback (most recent call last):
File "./gateway.py", line 91, in <module>
raise e
File "./gateway.py", line 73, in <module>
mqtt.publish(_WORKERS_QUEUE.get(timeout=10).execute())
File "/root/bt-mqtt-gateway/workers_manager.py", line 55, in execute
for message in self._callback(*self._args):
File "/root/bt-mqtt-gateway/workers/mzbtir.py", line 72, in status_update
if self.fail_count > self.max_fail_count:
AttributeError: 'MzbtirWorker' object has no attribute 'max_fail_count'
(.venv) root@aml:~/bt-mqtt-gateway#