Coder Social home page Coder Social logo

python-toothbrush's People

Contributors

steinrobert avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

python-toothbrush's Issues

Support of Oclean One

Hello,

Thanks for your work.
I'm checking to have my toothbrush added to Home assistant. Here is the production: https://www.oclean.com/en/one/
It was requested on https://community.home-assistant.io/t/oclean-one-bluetooth-toothbrush/105853

I try to run your script but it doesn't work on my side. Can you please help?
I created fancy.py

cat python-toothbrush/toothbrush/fancy.py
from toothbrush.base import Toothbrush
from toothbrush.constants import ROUTINE, INTENSITY

class FancyToothbrush(Toothbrush):
    attributes = [ROUTINE, INTENSITY]  # defines which attributes are available
    handles = {                        # defines under which handle the attributes can be read
        INTENSITY: 0x11,
        ROUTINE: 0x12
    }
Python 3.7.3 (default, Dec 20 2019, 18:57:59)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from toothbrush.fancy import FancyToothbrush
>>> fancy = FancyToothbrush("70:28:45:xx:xx:xx")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/root/python-toothbrush/toothbrush/base.py", line 14, in __init__
    self.update()
  File "/root/python-toothbrush/toothbrush/base.py", line 21, in update
    peripheral = self.peripheral
  File "/root/python-toothbrush/toothbrush/base.py", line 18, in peripheral
    return Peripheral(self.address, "public")
  File "/usr/local/lib/python3.7/dist-packages/bluepy/btle.py", line 391, in __init__
    self._connect(deviceAddr, addrType, iface)
  File "/usr/local/lib/python3.7/dist-packages/bluepy/btle.py", line 439, in _connect
    raise BTLEDisconnectError("Failed to connect to peripheral %s, addr type: %s" % (addr, addrType), rsp)
bluepy.btle.BTLEDisconnectError: Failed to connect to peripheral 70:28:45:xx:xx:xx, addr type: public

70:28:45:xx:xx:xx is my Oclean X toothbrush MAC address

Thank you.

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.