Giter Site home page Giter Site logo

mitemp_bt's People

Contributors

flavio20002 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

mitemp_bt's Issues

Issue with Temperature value less than 10degC

Hi,
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.

Suspect there is a single digit temperature (and humidity) bug in the code? I've never debugged python code before but I'm happy to try and look tonight.

I've had a quick look at the code and this might be the issue:

    # Parse the output
    res = re.search("( [0-9a-fA-F][0-9a-fA-F])+", result)

which is in
def write_readnotif_ble(mac, handle, value, retries=3, timeout=20, adapter=‘hci0’):
and
def read_ble(mac, handle, retries=3, timeout=20, adapter=‘hci0’):

Appears as if it needs to have 2 characters for a result to be found… But if the display is returning a 0 in front this should work. Wondering if the parse of the handle from the sensor (in format 0xXX) is only returning 1 (e.g. 8.3) rather than 2 (e.g. 08.3) characters for the non-decimal part…

Some comments are here with 2 other users with the same issue:
https://community.home-assistant.io/t/xiaomi-mijia-bluetooth-temperature-humidity-sensor-compatibility/43568/36

Great work on the sensor code - it was a breeze to get the sensors configured and running. Happy to help with this bug if I can!

Cheers,
Stewart

Not receiving data

Hi,

so i installed hass.io on a pi3 and added mitemp_bt to my sensors in yaml. Unfortunatelly I only get an "Updating mitemp_bt sensor took longer than the scheduled" for both of my xiaomi sensor.

This is my config:
`sensor:

  • platform: yr

  • platform: mitemp_bt
    mac: '4c-65-a8-d4-c5-xx'
    name: Living Room Temp
    force_update: false
    median: 3
    monitored_conditions:

    • temperature
    • humidity
  • platform: mitemp_bt
    mac: '4c-65-a8-d5-41-xx'
    name: Hall Temp
    force_update: true
    median: 1
    monitored_conditions:

    • temperature
    • humidity`

As you can see, neither false nor true force_update is working. What am I doing wrong?

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.