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

Add-on doesn't start #33

Closed
Lheriss opened this issue Feb 14, 2024 · 8 comments
Closed

Add-on doesn't start #33

Lheriss opened this issue Feb 14, 2024 · 8 comments

Comments

@Lheriss
Copy link

Lheriss commented Feb 14, 2024

Hi,
I just installed the new version of the add-on on my rpi4 running hass. Theengs doesn't start, and the log outputs what follows.
Anything I can do?
Thanks. Laurent

[21:57:28] INFO: Creating TheengsGateway configuration...
[21:57:33] INFO: IDENTITIES:
[21:57:33] INFO: BINDKEYS:
[21:57:33] INFO: Starting TheengsGateway...
Exception ignored in: <function Client.del at 0x7fa7a89ee0>
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/paho/mqtt/client.py", line 874, in del
self._reset_sockets()
File "/usr/local/lib/python3.9/dist-packages/paho/mqtt/client.py", line 1133, in _reset_sockets
self._sock_close()
File "/usr/local/lib/python3.9/dist-packages/paho/mqtt/client.py", line 1119, in _sock_close
if not self._sock:
AttributeError: 'Client' object has no attribute '_sock'
Traceback (most recent call last):
File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/usr/local/lib/python3.9/dist-packages/TheengsGateway/main.py", line 5, in
main()
File "/usr/local/lib/python3.9/dist-packages/TheengsGateway/init.py", line 55, in main
run(configuration, config_path)
File "/usr/local/lib/python3.9/dist-packages/TheengsGateway/ble_gateway.py", line 648, in run
gw.connect_mqtt()
File "/usr/local/lib/python3.9/dist-packages/TheengsGateway/ble_gateway.py", line 162, in connect_mqtt
self.client = mqtt_client.Client()
TypeError: init() missing 1 required positional argument: 'callback_api_version'

@mihsu81
Copy link
Owner

mihsu81 commented Feb 14, 2024

Hi,
Did you specify your mqtt server IP and credentials?

@Lheriss
Copy link
Author

Lheriss commented Feb 14, 2024

And the debug log shows this :
`# Theengs Gateway Diagnostics

Package Versions

Name Value
Theengs Gateway 1.3.0
Theengs Decoder 1.7.0
Bleak 0.21.1
Bluetooth Clocks 0.2.0
Bluetooth Numbers 1.1.1
Paho MQTT 2.0.0
Bluetooth Adapters 0.17.0

Python

Name Value
Version 3.9.2
Implementation CPython
Compiler GCC 10.2.1 20210110
Executable /usr/bin/python3

Operating System

Name Value
System Linux
Release 6.1.63-haos-raspi
Version #1 SMP PREEMPT Mon Feb 5 11:43:32 UTC 2024
Machine type aarch64

Configuration

File: /root/theengsgw.conf

{
    "adapter": "hci1",
    "bindkeys": {},
    "ble": 1,
    "ble_scan_time": 10,
    "ble_time_between_scans": 60,
    "discovery": "1",
    "discovery_device_name": "TheengsGateway",
    "discovery_filter": "[IBEACON,GAEN,MS-CDP,APPLE_CONT,APPLE_CONTAT,APPLE_CONTAT-device,H5055]",
    "discovery_topic": "homeassistant",
    "enable_tls": 0,
    "enable_websocket": 0,
    "hass_discovery": 1,
    "host": "172.28.8.111",
    "identities": {},
    "log_level": "DEBUG",
    "lwt_topic": "home/TheengsGateway/LWT",
    "pass": "***",
    "port": 1883,
    "presence": 1,
    "presence_topic": "home/presence/TheengsGateway",
    "publish_advdata": 0,
    "publish_all": 1,
    "publish_topic": "home/TheengsGateway/BTtoMQTT",
    "scanning_mode": "active",
    "subscribe_topic": "home/+/BTtoMQTT/undecoded",
    "time_format": "0",
    "time_sync": [],
    "tracker_timeout": 120,
    "user": "***"
}

Bluetooth adapters

Default adapter: hci0

hci0

Name Value
address DC:A6:32:XX:XX:XX
sw_version HomeAssistantRPi4 #1
hw_version usb:v1D6Bp0246d0546
passive_scan True
manufacturer Raspberry Pi Trading Ltd
product None
vendor_id None
product_id None

hci1

Name Value
address 00:01:95:XX:XX:XX
sw_version HomeAssistantRPi4
hw_version usb:v1D6Bp0246d0546
passive_scan True
manufacturer Sena Technologies, Inc.
product 0001
vendor_id 0a12
product_id 0001

@Lheriss
Copy link
Author

Lheriss commented Feb 14, 2024

To answer : yes, MQTT server IP, user and password specified, too...

@Lheriss
Copy link
Author

Lheriss commented Feb 14, 2024

After some research, this could have to do with Paho MQTT | 2.0.0 :

eclipse/paho.mqtt.python#814

@1technophile
Copy link
Collaborator

I'm going to update the addon, hopefully this week. This will fix the issue

@Lheriss
Copy link
Author

Lheriss commented Feb 14, 2024

Nice, thanks!

@1technophile
Copy link
Collaborator

Addon updated

@Lheriss
Copy link
Author

Lheriss commented Feb 19, 2024

Many thanks, it works!

@Lheriss Lheriss closed this as completed Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants