dominikberse / homeassistant-bluetooth-mesh

Allows to use bluetooth mesh devices directly from homeassistant
61 stars 15 forks source link

Can't Scan Device #2

Closed svhoy closed 1 year ago

svhoy commented 1 year ago

Hi,

i cloned your Repo to a Raspberry Pi 3B and started a scan with python3 gateway.py scan. Unfortunately I just get the following output:

DeprecationWarning: There is no current event loop
 loop = asyncio.get_event_loop()
INFO:root:Generating device_key...
INFO:root:Generating network_key...
INFO:root:Generating app_key...
INFO:MqttGateway:Connecting to org.bluez.mesh

After that nothing happens. If do a scan with meshctl I found my device that I am looking for. So I think I configure meshctl correct. The connection to bluez seems never to be finshed.

This is my config.yaml:

mqtt:
  broker: test
  nide_id: mqtt_mesh
mesh: 
  55:
    uuid: 0000dddd0000dddd0000dddd0000dddd
    name: raspberry 
    type: light
    relay: true

and this the genrated store.yaml:

keychain:
  app_key: ea9e8451a8a796ecf15e028c43fc2018
  device_key: dbe6caba611cc74bb8c0eb4e45ccd17c
  network_key: 498d8d3dcf4580ae701492210dd93b63
local:
  address: 1
  iv_index: 5
mgmt: {}
nodes: {}
prov:
  base_address: 4
scan: {}

Maybe you know what I am doing wrong. Thanks for your help in advance.

dominikberse commented 1 year ago

Hey,

on first sight it looks like the bluetooth-mesh service is not running. Try either running it directly from command line with bluetooth-meshd --nodetach --debug (would recommend that for the first try), or using systemctl start bluetooth-mesh.

If you see some error message that the bluetooth device is not available, it might be neccessary to stop the default bluetooth service first or to release the bluetooth device manually using something like sudo hciconfig hci0 down.

Hope that helps.

svhoy commented 1 year ago

Thanks for the hint. It seems that the probleme is sovled with that.