Giter VIP home page Giter VIP logo

holman-linux-python's People

Contributors

hmoffatt avatar scottmckenzie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

hmoffatt ozarchie

holman-linux-python's Issues

Support for Holman BTX1 Tap Mounted Smart Valve?

It is possible to support the BTX1?

  • bluetoothctl scan displays and allows connection to the BTX1
  • holmanctl doesn't discover them
  • Is it to do with lines 90-92 in holman.py?
    HOLMAN_SERVICE_UUID = '0a75f000-f9ad-467a-e564-3c19163ad543'
    STATE_CHARACTERISTIC_UUID = '0000f004-0000-1000-8000-00805f9b34fb'
    MANUAL_CHARACTERISTIC_UUID = '0000f006-0000-1000-8000-00805f9b34fb'

dbus.connection:Exception in handler for D-Bus signal while connecting to the holman BTV1

Hello,
I am trying this with Holman BTV1

sudo holmanctl --connect

Holman tap timer AA:BB:CC:DD:EE:FF connecting...
Terminate with Ctrl+C
Holman tap timer AA:BB:CC:DD:EE:FF connected
Holman tap timer AA:BB:CC:DD:EE:FF disconnected

ERROR:dbus.connection:Exception in handler for D-Bus signal:
Traceback (most recent call last):
File "/mnt/archive/artiom/Projects/src/venv/holman/lib/python3.10/site-packages/dbus/connection.py", line 232, in maybe_handle_message
self._handler(*args, **kwargs)
File "/mnt/archive/artiom/Projects/src/venv/holman/lib/python3.10/site-packages/gatt/gatt_linux.py", line 394, in properties_changed
self.disconnect_succeeded()
File "/mnt/archive/artiom/Projects/src/venv/holman/lib/python3.10/site-packages/holman/holman.py", line 148, in disconnect_succeeded
self.listener.disconnect_succeeded()
File "/mnt/archive/artiom/Projects/src/venv/holman/lib/python3.10/site-packages/holmanctl.py", line 55, in disconnect_succeeded
sys.exit(0)
SystemExit: 0

What is going wrong? Looks like just disconnecting.

Trouble connecting to BX1

Hi,

I'm trying to connect to the BX1 (HOLMAN_CO3111) with holmanctl (on a raspberry pi) but can't seem to get it to work. It looks like I can connect but then the connection instantly drops and I can't retrieve any of the settings or switch the timer on/off. Have followed your instructions for adding the BTX1 and they appear to have the same service UUID (c521f000-0d70-4d4f-8e43-40d84c50ab38). Have run nRF on my android phone and here's the content. Any help much appreciated. Thanks.

nRF Connect, 2022-08-18
BX1 (AA:BB:CC:DD:EE:FF)
V 19:42:15.157 Connecting to AA:BB:CC:DD:EE:FF...
D 19:42:15.157 gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferred PHY = LE 1M)
D 19:42:16.080 [Callback] Connection state changed with status: 0 and new state: CONNECTED (2)
I 19:42:16.080 Connected to AA:BB:CC:DD:EE:FF
V 19:42:16.099 Discovering services...
D 19:42:16.099 gatt.discoverServices()
D 19:42:16.118 [Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED
I 19:42:16.368 Connection parameters updated (interval: 7.5ms, latency: 0, timeout: 5000ms)
D 19:42:16.703 [Callback] Services discovered with status: 0
I 19:42:16.704 Services discovered
V 19:42:16.718 Generic Access (0x1800)

  • Device Name [R W] (0x2A00)
  • Appearance [R] (0x2A01)
  • Peripheral Preferred Connection Parameters [R] (0x2A04)
    Generic Attribute (0x1801)
    Unknown Service (46a60001-ca26-425a-9bc6-d917829d2906)
  • Unknown Characteristic [N W] (46a60001-ca26-425a-9bc6-d917829d2906)
    Client Characteristic Configuration (0x2902)
    Unknown Service (c521f000-0d70-4d4f-8e43-40d84c50ab38)
  • Unknown Characteristic [R] (0000f003-0000-1000-8000-00805f9b34fb)
    Characteristic User Description (0x2901)
  • Unknown Characteristic [R] (0000f004-0000-1000-8000-00805f9b34fb)
    Characteristic User Description (0x2901)
  • Unknown Characteristic [R W] (0000f005-0000-1000-8000-00805f9b34fb)
    Characteristic User Description (0x2901)
  • Unknown Characteristic [W] (0000f006-0000-1000-8000-00805f9b34fb)
    Characteristic User Description (0x2901)
  • Unknown Characteristic [R W] (0000e001-0000-1000-8000-00805f9b34fb)
    Characteristic User Description (0x2901)
  • Unknown Characteristic [W] (0000c001-0000-1000-8000-00805f9b34fb)
    Characteristic User Description (0x2901)
  • Unknown Characteristic [R W] (0000c002-0000-1000-8000-00805f9b34fb)
    Characteristic User Description (0x2901)
    D 19:42:16.719 gatt.setCharacteristicNotification(46a60001-ca26-425a-9bc6-d917829d2906, true)

Home Assistant Integration

Hi, I was wondering if it would be possible to write a Home Assistant Intergration for your package?

Let me know if you need any further explanation.

Cheers

Holman GATT service missing

Hi,
I installed the pip module and the apt package.
Im on bluetooth version 5.48.

Connection through bluetoothctl is successful:

[bluetooth]# connect F4:12:9E:7C:94:1C
Attempting to connect to F4:12:9E:7C:94:1C
[CHG] Device F4:12:9E:7C:94:1C Connected: yes
Connection successful
[NEW] Primary Service
        /org/bluez/hci0/dev_F4_12_9E_7C_94_1C/service0008
        00001801-0000-1000-8000-00805f9b34fb
        Generic Attribute Profile
[NEW] Primary Service
        /org/bluez/hci0/dev_F4_12_9E_7C_94_1C/service0009
        46a60001-ca26-425a-9bc6-d917829d2906
        Vendor specific
[NEW] Characteristic
        /org/bluez/hci0/dev_F4_12_9E_7C_94_1C/service0009/char000a
        46a60001-ca26-425a-9bc6-d917829d2906
        Vendor specific
[NEW] Descriptor
        /org/bluez/hci0/dev_F4_12_9E_7C_94_1C/service0009/char000a/desc000c
        00002902-0000-1000-8000-00805f9b34fb
        Client Characteristic Configuration
[NEW] Primary Service
        /org/bluez/hci0/dev_F4_12_9E_7C_94_1C/service000d
        c521f000-0d70-4d4f-8e43-40d84c50ab38
        Vendor specific
[NEW] Characteristic
        /org/bluez/hci0/dev_F4_12_9E_7C_94_1C/service000d/char000e
        0000f003-0000-1000-8000-00805f9b34fb
        Unknown
[NEW] Descriptor
        /org/bluez/hci0/dev_F4_12_9E_7C_94_1C/service000d/char000e/desc0010
        00002901-0000-1000-8000-00805f9b34fb
        Characteristic User Description
[NEW] Characteristic
        /org/bluez/hci0/dev_F4_12_9E_7C_94_1C/service000d/char0011
        0000f004-0000-1000-8000-00805f9b34fb
        Unknown
[NEW] Descriptor
        /org/bluez/hci0/dev_F4_12_9E_7C_94_1C/service000d/char0011/desc0013
        00002901-0000-1000-8000-00805f9b34fb
        Characteristic User Description
[NEW] Characteristic
        /org/bluez/hci0/dev_F4_12_9E_7C_94_1C/service000d/char0014
        0000f005-0000-1000-8000-00805f9b34fb
        Unknown
[NEW] Descriptor
        /org/bluez/hci0/dev_F4_12_9E_7C_94_1C/service000d/char0014/desc0016
        00002901-0000-1000-8000-00805f9b34fb
        Characteristic User Description
[NEW] Characteristic
        /org/bluez/hci0/dev_F4_12_9E_7C_94_1C/service000d/char0017
        0000f006-0000-1000-8000-00805f9b34fb
        Unknown
[NEW] Descriptor
        /org/bluez/hci0/dev_F4_12_9E_7C_94_1C/service000d/char0017/desc0019
        00002901-0000-1000-8000-00805f9b34fb
        Characteristic User Description
[NEW] Characteristic
        /org/bluez/hci0/dev_F4_12_9E_7C_94_1C/service000d/char001a
        0000e001-0000-1000-8000-00805f9b34fb
        Unknown
[NEW] Descriptor
        /org/bluez/hci0/dev_F4_12_9E_7C_94_1C/service000d/char001a/desc001c
        00002901-0000-1000-8000-00805f9b34fb
        Characteristic User Description
[NEW] Characteristic
        /org/bluez/hci0/dev_F4_12_9E_7C_94_1C/service000d/char001d
        0000c001-0000-1000-8000-00805f9b34fb
        Unknown
[NEW] Descriptor
        /org/bluez/hci0/dev_F4_12_9E_7C_94_1C/service000d/char001d/desc001f
        00002901-0000-1000-8000-00805f9b34fb
        Characteristic User Description
[NEW] Characteristic
        /org/bluez/hci0/dev_F4_12_9E_7C_94_1C/service000d/char0020
        0000c002-0000-1000-8000-00805f9b34fb
        Unknown
[NEW] Descriptor
        /org/bluez/hci0/dev_F4_12_9E_7C_94_1C/service000d/char0020/desc0022
        00002901-0000-1000-8000-00805f9b34fb
        Characteristic User Description
[CHG] Device F4:12:9E:7C:94:1C UUIDs: 00001800-0000-1000-8000-00805f9b34fb
[CHG] Device F4:12:9E:7C:94:1C UUIDs: 00001801-0000-1000-8000-00805f9b34fb
[CHG] Device F4:12:9E:7C:94:1C UUIDs: 46a60001-ca26-425a-9bc6-d917829d2906
[CHG] Device F4:12:9E:7C:94:1C UUIDs: c521f000-0d70-4d4f-8e43-40d84c50ab38
[CHG] Device F4:12:9E:7C:94:1C ServicesResolved: yes

I disconnected from the device and executed this command:

sudo holmanctl --connect F4:12:9E:7C:94:1C

This gives me an error shown below:

Holman tap timer F4:12:9E:7C:94:1C connecting...
Terminate with Ctrl+C
Holman tap timer F4:12:9E:7C:94:1C connect failed: Holman GATT service missing
ERROR:dbus.connection:Exception in handler for D-Bus signal:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/dbus/connection.py", line 230, in maybe_handle_message
    self._handler(*args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/gatt/gatt_linux.py", line 398, in properties_changed
    self.services_resolved()
  File "/usr/local/lib/python3.6/dist-packages/holman/holman.py", line 158, in services_resolved
    Exception("Holman GATT service missing"))
  File "/usr/local/lib/python3.6/dist-packages/holmanctl.py", line 44, in connect_failed
    sys.exit(0)
SystemExit: 0

Running the discover command does not find any devices:

sudo holmanctl --discover
Terminate with Ctrl+C

(I left it running for a few minutes).

The same happens using the Python script.
Here is the installed versions and dependencies mentioned in README.

daniel@ubuntu:~/repos/holman_component$ bluetoothd --version
5.48
daniel@ubuntu:~/repos/holman_component$ sudo apt-get install --no-install-recommends bluetooth
Reading package lists... Done
Building dependency tree
Reading state information... Done
bluetooth is already the newest version (5.48-0ubuntu3.1).
0 to upgrade, 0 to newly install, 0 to remove and 35 not to upgrade.
daniel@ubuntu:~/repos/holman_component$
daniel@ubuntu:~/repos/holman_component$ pip3 install holman
Collecting holman
  Cache entry deserialization failed, entry ignored
  Cache entry deserialization failed, entry ignored
  Downloading https://files.pythonhosted.org/packages/ec/a1/eb98e8ce58a1b08dc148420550e987d1f74ce791ce1d56e056103b1d3f41/holman-0.0.7-py2.py3-none-any.whl
Collecting gatt>=0.2.7 (from holman)
Installing collected packages: gatt, holman
Successfully installed gatt-0.2.7 holman-0.0.7
daniel@ubuntu:~/repos/holman_component$ pip install holman
Requirement already satisfied: holman in /home/daniel/.local/lib/python2.7/site-packages (0.0.7)
Requirement already satisfied: gatt>=0.2.7 in /home/daniel/.local/lib/python2.7/site-packages (from holman) (0.2.7)
daniel@ubuntu:~/repos/holman_component$

Can you please advise how to proceed? I am not sure what I am missing.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.