Skip to content

Working Sample #186

@CFenner

Description

@CFenner

I tried to get your sample to work, but fail for various reasons.

I'm trying to connect to a mesh of luminaries from Steinel, who I believe is a partner of Silvair. In the end, I'm trying to create an integration for the Steinel Mesh devices into Home Assistant, a large open source home automation platform.

I know you don't give tech support from other issues, but it would be really great if you could update the sample to work with the current version of bluetooth-mesh and maybe add one comment or another about it.

Currently I have issues initializing the app. I'm running on MacOS, could it be related to that as blueZ seems to be only for Linux?

Traceback (most recent call last):
  File "~/main.py", line 186, in <module>
    asyncio.run(main())
  File "/opt/homebrew/Cellar/python@3.11/3.11.6_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/runners.py", line 190, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/python@3.11/3.11.6_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/python@3.11/3.11.6_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "~/main.py", line 163, in main
    await app.run(addr)
  File "~/main.py", line 92, in run
    async with self:
  File "~/.venv/lib/python3.11/site-packages/bluetooth_mesh/bluez/application.py", line 323, in __aenter__
    await self.dbus_connect()
  File "~/.venv/lib/python3.11/site-packages/bluetooth_mesh/bluez/application.py", line 297, in dbus_connect
    message_bus = dbus_next.aio.MessageBus(bus_type=dbus_next.BusType.SYSTEM)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "~/.venv/lib/python3.11/site-packages/dbus_next/aio/message_bus.py", line 122, in __init__
    super().__init__(bus_address, bus_type, ProxyObject)
  File "~/.venv/lib/python3.11/site-packages/dbus_next/message_bus.py", line 85, in __init__
    self._setup_socket()
  File "~/.venv/lib/python3.11/site-packages/dbus_next/message_bus.py", line 575, in _setup_socket
    raise err
  File "~/.venv/lib/python3.11/site-packages/dbus_next/message_bus.py", line 548, in _setup_socket
    self._sock.connect(filename)
FileNotFoundError: [Errno 2] No such file or directory

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions