Giter Club home page Giter Club logo

mitemp's Introduction

mitemp_bt - Library for Xiaomi Mi Temperature and Humidity Sensor (v2) with Bleutooth LE and the LCD display

This library lets you read sensor data from a Xiaomi Mi BluetoothLE Temperature and Humidity sensor.

NOTE: this library is not maintained - I am not using the device any more.

Functionality

It supports reading the different measurements from the sensor

  • temperature
  • humidity
  • battery level

To use this library you will need a Bluetooth Low Energy dongle attached to your computer. You will also need a Xiaomi Mi Temperature and Humidity sensor.

To use with home-assistant.io, implement the following GIST in HA: https://gist.github.com/ratcashdev/28253bb2c220788e4961f213fe87ff33

Backends

This sensor relies on the btlewrap library to provide a unified interface for various underlying btle implementations

  • bluez tools (via a wrapper around gatttool)
  • bluepy library

bluez/gatttool wrapper

To use the bluez wrapper, you need to install the bluez tools on your machine. No additional python libraries are required. Some distrubutions moved the gatttool binary to a separate package. Make sure you have this binaray available on your machine.

Example to use the bluez/gatttool wrapper:

from mitemp_bt.mitemp_bt_poller import MiTempBtPoller
from btlewrap.gatttool import GatttoolBackend

poller = MiTempBtPoller('some mac address', GatttoolBackend)

bluepy

To use the bluepy library you have to install it on your machine, in most cases this can be done via: pip3 install bluepy

Example to use the bluepy backend:

from mitemp_bt.mitemp_bt_poller import MiTempBtPoller
from btlewrap.bluepy import BluepyBackend

poller = MiTempBtPoller('some mac address', BluepyBackend)

pygatt

This device needs notification support from the underlying backend in btlewrap. Currently only Gatttool or Bluepy provide this possibility. Pygatt is therefore not supported. PRs to enhance btlewrap library's pygatt support should be directed to: https://github.com/ChristianKuehnel/btlewrap

Conttributing

please have a look at CONTRIBUTING.md


Projects Depending on mitemp_bt

https://github.com/home-assistant/home-assistant

mitemp's People

Contributors

f-bader avatar lucagiove avatar martinhjelmare avatar onkelbeh avatar ratcashdev avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

mitemp's Issues

Mac Adress range check in demo.py

Hi,

I just tested your code with my Xiaomi Temperature and Humidity sensor.
The first time I ran this script, I got the error "argument mac: The MAC address "58:2d:34:31:9a:b8" seems to be in the wrong format"
But when I uncomment this line, I just got the right data. I don't know why there is a check on the "4c:65:A8:...." range, but the "58:2d:34..." range works just fine too.

I changed the "raise exception..." to a regular "print ..." and got the following output:

./demo.py --backend bluepy poll 58:2d:34:31:9a:b8
The MAC address "58:2d:34:31:9a:b8" seems to be in the wrong format
Getting data from Mi Temperature and Humidity Sensor
FW: 00.00.66
Name: MJ_HT_V1
Battery: 100
Temperature: 20.0
Humidity: 54.0

Error with Xiaomi temp sensor v2

Hello
I try to use your code to read the new xiaomi temp sensors
The command : demo.py --backend bluepy poll MAC gives the result finishing by :
...
self.battery = int(ord(res_battery))
TypeError: ord() expected a charcter, but string of length 15 found

How can i make it work with thoses sensors please ?

Issue with Temperature value less than 10degC

Hi,
Actually got the wrong code and debugged that but here I am and I think this is the one included with Home Assistant...

It appears as if the sensor platform code stops returning values if the temperature is below 10degC. This possibly also affects humidity but I can't verify this.

I'm running Hass.io on a RPI 3 with several of these sensors. The ones above 10degC continue to work normally; only one is dropping below 10deg C and when it does temperature, humidity, and battery values for only this sensor freeze and don't update until temp goes back above 10degC.

I believe there is a single digit temperature (and humidity) bug in the code. I'd never debugged / written python code before tonight (so I'm hacking a bit) but I got this far.

A double figure temperature (15degC) returns a 14 byte code: 54 3d 32 30 2e 33 20 48 3d 34 36 2e 35 00
But a single digit temperature (8 degC) returns a 13 byte code: 54 3d 38 2e 32 20 48 3d 34 36 2e 36 00
I can't work out what type the data is in when it gets passed in here

    def handleNotification(self, handle, raw_data):  # pylint: disable=unused-argument,invalid-name
        """ gets called by the bluepy backend when using wait_for_notification
        """
        if raw_data is None:
            return
    data = raw_data.decode("utf-8").strip(' \n\t')

But this then calls self._check_data() which calls self._parse_data()

And the bug I think lies here:

        res[MI_HUMIDITY] = float(data[9:13])
        res[MI_TEMPERATURE] = float(data[2:6])

If temp is single digit this should be 2:5 and 8:12 and if humidity is single digits it should be 8:11.

I think the data is a byte array string... in which case this should work in _parse_data:

        data = self._cache

        temp,humidity  = data.replace("T=", "").replace("H=", "").rstrip(' \t\r\n\0').split(" ")

        res = dict()
        res[MI_HUMIDITY] = float(humidity)
        res[MI_TEMPERATURE] = float(temp)

Great work on the sensor code - it was a breeze to get the sensors configured and running. Happy to help with this bug further if I can! I have no idea how to check this with Home Assistant or run unit tests and submit.

Cheers,
Stewart

Minus sign removed between temperatures -0,1°C and -0,9°C

Hi, it somehow removes minus sign from temperatures between -0,1°C and -0,9°C?

poller error

You can see in the graph (upper), that the temperature is going down. When the temperature reaches -0,1 °C it actually sends +0,1 °C, -0,2 °C sends + 0,2 °C , etc... up to -0,9 °C.. The temperature -1°C is ok.

Broken pip installer in version 0.0.4

Hi,

when I install mitemp_bt module version 0.0.4 through pip, I do not have the python files. So I did:

pip install mitemp_bt

Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting mitemp_bt
  Using cached https://www.piwheels.org/simple/mitemp-bt/mitemp_bt-0.0.4-py3-none-any.whl
Requirement already satisfied: btlewrap>=0.0.8 in /home/pi/TerrariumPI/venv/lib/python3.7/site-packages (from mitemp_bt) (0.0.8)
Requirement already satisfied: typing<4,>=3 in /home/pi/TerrariumPI/venv/lib/python3.7/site-packages (from btlewrap>=0.0.8->mitemp_bt) (3.7.4.3)
Installing collected packages: mitemp-bt
Successfully installed mitemp-bt-0.0.4

So it looks installed. Also with pip show mitemp_bt it shows:

Name: mitemp-bt
Version: 0.0.4
Summary: Library to read data from Mi Temperature and Humidity Sensor (V2) using Bluetooth LE with LCD display
Home-page: https://github.com/ratcashdev/mitemp
Author: ratcashdev
Author-email: [email protected]
License: MIT
Location: /home/pi/TerrariumPI/venv/lib/python3.7/site-packages
Requires: btlewrap
Required-by: 

But when I want to use it in python I does not exists. In Python:

>>> from mitemp_bt.mitemp_bt_poller import MiTempBtPoller
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'mitemp_bt'

With version 0.0.4 there is no folder lib/python3.7/site-packages/mitemp_bt where version 0.0.3 does create one. There is a folder called lib/python3.7/site-packages/mitemp_bt-0.0.4.dist-info but that does only contain the meta data of the package.

So it looks like that version 0.0.4 does not install fully. When I use 0.0.3, it all works. Version 0.0.3 will create the lib/python3.7/site-packages/mitemp_bt folder. But also upgrading to version 0.0.4 will remove the mitemp_bt folder and the needed python files.

What is going on here? Can you check?

Compatible with WSDCGQ01LM?

Hi,

is it compatible with WSDCGQ01LM? is there a way to get the Data of WSDCGQ01LM with a raspberry pi 4 without zigbee?

thanks

Unsupported firmware ?

I am using this module on a raspberry PI running the standard home-assistent setup. Currrent versions are core-2021.11.5, supervisor-2021.10.8 and Home Assistant OS 6.6.

The hardware is recently bought from https://www.aliexpress.com/item/1005003430486580.html and works fine in the MI app on Android.

From the Debug logs I get following result (not clear why there is only one read action in the log, according to the code the line where the battery info is read should also be logged).

2021-12-08 16:19:08 DEBUG (SyncWorker_6) [mitemp_bt.mitemp_bt_poller] Filling cache with new sensor data.
2021-12-08 16:19:11 DEBUG (SyncWorker_6) [mitemp_bt.mitemp_bt_poller] Received result for handle 36: b'Time\x00'
2021-12-08 16:19:12 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.bathroom_upstairs_temperature fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 468, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 658, in async_device_update
raise exc
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/mitemp_bt/sensor.py", line 147, in update
data = self.poller.parameter_value(self.entity_description.key)
File "/usr/local/lib/python3.9/site-packages/mitemp_bt/mitemp_bt_poller.py", line 126, in parameter_value
self.fill_cache()
File "/usr/local/lib/python3.9/site-packages/mitemp_bt/mitemp_bt_poller.py", line 59, in fill_cache
self.firmware_version()
File "/usr/local/lib/python3.9/site-packages/mitemp_bt/mitemp_bt_poller.py", line 106, in firmware_version
self.battery = int(ord(res_battery))
TypeError: ord() expected a character, but string of length 15 found
2021-12-08 16:19:12 DEBUG (SyncWorker_5) [homeassistant.components.mitemp_bt.sensor] Polling data for Bathroom upstairs Humidity
2021-12-08 16:19:12 DEBUG (SyncWorker_5) [mitemp_bt.mitemp_bt_poller] Filling cache with new sensor data.
2021-12-08 16:19:12 WARNING (SyncWorker_5) [homeassistant.components.mitemp_bt.sensor] Polling error Could not read data from Mi Temp sensor A4:C1:38:8D:C1:57
2021-12-08 16:19:38 DEBUG (SyncWorker_3) [homeassistant.components.mitemp_bt.sensor] Polling data for Bathroom upstairs Temperature
2021-12-08 16:19:38 DEBUG (SyncWorker_3) [mitemp_bt.mitemp_bt_poller] Using cache (0:00:26.449007 < 0:05:00)
2021-12-08 16:19:38 WARNING (SyncWorker_3) [homeassistant.components.mitemp_bt.sensor] Polling error Could not read data from Mi Temp sensor A4:C1:38:8D:C1:57

and so on.

The error is not repeated in the log but no data is ever received, also not when the cache timeout expires.

If there is anything I can do to help debug this please let me know.

Data reading float conversion exception

Sensor data collection stops after the following traceback.
Probably there is another bug that prevents data to be collected after an exception not sure if in this repository or in the component code, for sure there are many people affected by this problem:
home-assistant/core#24313

I'll try to work on a PR at least for the parsing exception.

Update for sensor.salotto_temperature fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 281, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 461, in async_device_update
    await self.hass.async_add_executor_job(self.update)
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/mitemp_bt/sensor.py", line 156, in update
    data = self.poller.parameter_value(self.parameter)
  File "/usr/local/lib/python3.7/site-packages/mitemp_bt/mitemp_bt_poller.py", line 126, in parameter_value
    self.fill_cache()
  File "/usr/local/lib/python3.7/site-packages/mitemp_bt/mitemp_bt_poller.py", line 69, in fill_cache
    self.ble_timeout)  # pylint: disable=no-member
  File "/usr/local/lib/python3.7/site-packages/btlewrap/bluepy.py", line 27, in _func_wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/btlewrap/bluepy.py", line 93, in wait_for_notification
    return self._peripheral.waitForNotifications(notification_timeout)
  File "/usr/local/lib/python3.7/site-packages/bluepy/btle.py", line 560, in waitForNotifications
    resp = self._getResp(['ntfy','ind'], timeout)
  File "/usr/local/lib/python3.7/site-packages/bluepy/btle.py", line 416, in _getResp
    self.delegate.handleNotification(hnd, data)
  File "/usr/local/lib/python3.7/site-packages/mitemp_bt/mitemp_bt_poller.py", line 198, in handleNotification
    self._check_data()
  File "/usr/local/lib/python3.7/site-packages/mitemp_bt/mitemp_bt_poller.py", line 145, in _check_data
    parsed = self._parse_data()
  File "/usr/local/lib/python3.7/site-packages/mitemp_bt/mitemp_bt_poller.py", line 181, in _parse_data
    res[MI_HUMIDITY] = float(dataparts[1])
ValueError: could not convert string to float: '53.0\x02'

Support to Mijia ClearGrass

The new Mijia version with updated Electronic Paper screen would be nice:

https://cleargrass.com/cg_temp_rh_monitor/overview

The unit seems very familiar with the old LCD model but the regular xiaomi_miio won't read from it.
Technology is BLE but the Services in the device are different and the binary array retrieved in _parse_data looks very different (looks encrypted).

ValueError: could not convert string to float: '3.3\x00'

I got this error with Home Assistant
0.82.1:

Update for sensor.outsidebalkon_temperature fails
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity.py", line 221, in async_update_ha_state
    await self.async_device_update()
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity.py", line 349, in async_device_update
    await self.hass.async_add_executor_job(self.update)
  File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
    future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/sensor/mitemp_bt.py", line 142, in update
    data = self.poller.parameter_value(self.parameter)
  File "/srv/homeassistant/lib/python3.5/site-packages/mitemp_bt/mitemp_bt_poller.py", line 132, in parameter_value
    return self._parse_data()[parameter]
  File "/srv/homeassistant/lib/python3.5/site-packages/mitemp_bt/mitemp_bt_poller.py", line 177, in _parse_data
    res[MI_HUMIDITY] = float(data[9:13])
ValueError: could not convert string to float: '3.3\x00'

Hardware: RPi3 B+
Bluetooth: OnBoard
Network over: LAN

myUser@raspberrypi:~ $ dpkg --status bluez | grep ‘^Version:’
Version: 5.43-2+rpt2+deb9u2

Because of my bluez version and this bug here, I add this line to the /etc/bluetooth/main.conf

DisablePlugins=pnat
Here is another mi_bt_poller, perhaps it helps: https://github.com/pFenners/mijia-sensor-domoticz/blob/master/mijia/mijia_poller.py

I dont think that my config is the problem. Here is my config snip: Home-Assistant Community

Greetings by uniat

Could this be extended to work with the Xiaomi Body Scale?

Basically the title says it all. I've got a Xiaomi Scale that seems to work in a very similar fashion to the HT sensor. It emits BLE and it seems that the data is just encoded differently (I haven't dug very deep yet).

If so, would you accept a PR to this library for adding support for this device? I'm looking for a cleaner fashion to bring this data into Home Assistant, rather than the current implementations floating around that rely on an mqtt gateway.

Thanks!

gatttool not found: [WinError 2]

Trying to execute this code:
from mitemp_bt.mitemp_bt_poller import MiTempBtPoller
from btlewrap.gatttool import GatttoolBackend

poller = MiTempBtPoller('my mac address', GatttoolBackend)

Output:
gatttool not found: [WinError 2]
I have already install pyblyez lib.
Help pls!

Managing exceptions

Hi! Thanks for your code
I'm using your code to read three sensors from a Raspberry 3b+, and the post the temperature and humidity data to emoncms.

My problem is that when one sensor does not reply to ask, the program raise an exception and finish. I've tried catching the exceptions with no luck.

Here an example, when sensor "Comedor" does not reply (is too far or with no battery):

Patio - 4c:65:a8:xx:xx:26
Temp: 29.3C
Humi: 40.8%

Dormitorio_Tommy - 4c:65:a8:xx:xx:bd
Temp: 22.2C
Humi: 60.3%

Comedor - 4c:65:a8:xx:xx:7f
Traceback (most recent call last):
  File "./hygrometers2emoncms.py", line 28, in main
    print("Temp: {}C".format(poller.parameter_value(MI_TEMPERATURE)))
  File "/home/pi/mitemp/mitemp_bt/mitemp_bt_poller.py", line 125, in parameter_value
    self.fill_cache()
  File "/home/pi/mitemp/mitemp_bt/mitemp_bt_poller.py", line 59, in fill_cache
    self.firmware_version()
  File "/home/pi/mitemp/mitemp_bt/mitemp_bt_poller.py", line 90, in firmware_version
    res_firmware = connection.read_handle(_HANDLE_READ_FIRMWARE_VERSION)  # pylint: disable=no-member
  File "/home/pi/mitemp/btlewrap/gatttool.py", line 24, in _func_wrapper
    return func(*args, **kwargs)
  File "/home/pi/mitemp/btlewrap/gatttool.py", line 257, in read_handle
    raise BluetoothBackendException("Exit read_ble, no data ({})".format(current_thread()))
btlewrap.base.BluetoothBackendException: Exit read_ble, no data (<_MainThread(MainThread, started 1995980816)>)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./hygrometers2emoncms.py", line 55, in <module>
    main()
  File "./hygrometers2emoncms.py", line 44, in main
    except (BTLEDisconnectError, BluetoothBackendException, BluetoothBackendException):
NameError: name 'BTLEDisconnectError' is not defined

And this is my code:

#!/usr/bin/env python3
"""Reads hygrometers temp and humidity and post data to emoncms"""

import argparse
import re
import logging
import sys

from btlewrap import available_backends, BluepyBackend, GatttoolBackend, PygattBackend
from mitemp_bt.mitemp_bt_poller import MiTempBtPoller, \
    MI_TEMPERATURE, MI_HUMIDITY, MI_BATTERY
from time import sleep
from urllib.request import urlopen

def main():

   while True:
    try:

       """Poll data from the sensor."""
       backend =GatttoolBackend
       sensors = {"Patio":"4c:65:a8:xx:xx:26", "Dormitorio_Tommy":"4c:65:xx:xx:xx:bd", "Comedor":"4c:65:a8:xx:xx:7f"}
       for sensor in sensors:
         print(sensor + " - " + sensors[sensor])
         poller = MiTempBtPoller(sensors[sensor], backend)
         print("Temp: {}C".format(poller.parameter_value(MI_TEMPERATURE)))
         print("Humi: {}%".format(poller.parameter_value(MI_HUMIDITY)))
         print("")

         temp = format(poller.parameter_value(MI_TEMPERATURE))
         humidity = format(poller.parameter_value(MI_HUMIDITY))

         url = "http://192.168.2.245/emoncms/input/post?node=1&apikey=fc30c6xxxxxxxxxxx8635b017f0&json={'Temp_" + sensor + "':"
         url = url + temp + '}'
         urlopen(url)

         url = "http://192.168.2.245/emoncms/input/post?node=1&apikey=fc30cxxxxxxxxxxx8635b017f0&json={'Humidity_" + sensor + "':"
         url = url + humidity + '}'
         urlopen(url)

       sleep(60)
    except (BTLEDisconnectError, BluetoothBackendException, BluetoothBackendException):
       print("El sensor no responde")


    except KeyboardInterrupt:
       logging.info("Stopping...")

    except:
       print("Excepcion no controlada")

if __name__ == '__main__':
    main()

Really thanks for your code and for your help

Readings mismatch

Hi,
any idea why there's such a mismatch on readings depending on the backend used?

python3 demo.py --backend gatttool poll 58:2D:34:34:77:BD; python3 demo.py --backend bluepy poll 58:2D:34:34:77:BD
Getting data from Mi Temperature and Humidity Sensor
FW: 00.00.66
Name: MJ_HT_V1
Battery: 100
Temperature: 27.2
Humidity: 36.1

Getting data from Mi Temperature and Humidity Sensor
FW: 00.00.66
Name: MJ_HT_V1
Battery: 100
Temperature: 28.3
Humidity: 33.6

gatttool readings are the same as the device's screen, bluepy shows wrong data.

Thanks!

Why clearing cache when Temp=0

In the _check_data function there is the following validation:

  if parsed[MI_TEMPERATURE] == 0:  # humidity over 100 procent
    self.clear_cache()
    return

Why is clearing cache when temp=0? This does not make sense to me. Maybe when humidity below 0, but not temperature.

I'm right?

support mqtt

Thank you very much for your code.
Could you please update the code so that it can publish data to the mqtt broker and support more than one sensor?
Thank you.

Bluepy crash occourrences

while using your code the script crashes (usually after 10-14H) leaving this error.

Exception ignored in: <function _BackendConnection.__del__ at 0x7575bd68> Traceback (most recent call last): File "/home/pi/.local/lib/python3.7/site-packages/btlewrap/base.py", line 55, in __del__ self._cleanup() File "/home/pi/.local/lib/python3.7/site-packages/btlewrap/base.py", line 59, in _cleanup self._backend.disconnect() File "/home/pi/.local/lib/python3.7/site-packages/btlewrap/bluepy.py", line 26, in _func_wrapper return func(*args, **kwargs) File "/home/pi/.local/lib/python3.7/site-packages/btlewrap/bluepy.py", line 63, in disconnect self._peripheral.disconnect() File "/home/pi/.local/lib/python3.7/site-packages/bluepy/btle.py", line 453, in disconnect self._writeCmd("disc\n") File "/home/pi/.local/lib/python3.7/site-packages/bluepy/btle.py", line 305, in _writeCmd self._helper.stdin.flush() BrokenPipeError: [Errno 32] Broken pipe Exception ignored in: <function BluetoothInterface.__del__ at 0x7575bbb8> Traceback (most recent call last): File "/home/pi/.local/lib/python3.7/site-packages/btlewrap/base.py", line 17, in __del__ self._backend.disconnect() File "/home/pi/.local/lib/python3.7/site-packages/btlewrap/bluepy.py", line 26, in _func_wrapper return func(*args, **kwargs) File "/home/pi/.local/lib/python3.7/site-packages/btlewrap/bluepy.py", line 63, in disconnect self._peripheral.disconnect() File "/home/pi/.local/lib/python3.7/site-packages/bluepy/btle.py", line 453, in disconnect self._writeCmd("disc\n") File "/home/pi/.local/lib/python3.7/site-packages/bluepy/btle.py", line 305, in _writeCmd self._helper.stdin.flush() BrokenPipeError: [Errno 32] Broken pipe Exception ignored in: <function Peripheral.__del__ at 0x7563be88> Traceback (most recent call last): File "/home/pi/.local/lib/python3.7/site-packages/bluepy/btle.py", line 630, in __del__ self.disconnect() File "/home/pi/.local/lib/python3.7/site-packages/bluepy/btle.py", line 453, in disconnect self._writeCmd("disc\n") File "/home/pi/.local/lib/python3.7/site-packages/bluepy/btle.py", line 305, in _writeCmd self._helper.stdin.flush() BrokenPipeError: [Errno 32] Broken pipe

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.