Giter VIP home page Giter VIP logo

Comments (10)

karolt avatar karolt commented on May 30, 2024 1

So yes, right now I get the correct data in the console if I don't press the button.
And it works no matter if I place an address parameter in the config file or not.

from homebridge-mi-hygrothermograph.

hannseman avatar hannseman commented on May 30, 2024

from homebridge-mi-hygrothermograph.

meliot avatar meliot commented on May 30, 2024

Uhm, surprisingly I can't replicate the problem anymore. Probably as you said there was another device conflicting with mine, in the same building, and now it's gone. I have just a Yeelight lamp and a SonOff sensor connected to the HomeBridge but none with Bluetooth.
Thanks for your help!

from homebridge-mi-hygrothermograph.

hannseman avatar hannseman commented on May 30, 2024

No problem! If you start seeing this again - get back to me with some debug-logs and I'll see if I can mitigate the error.

from homebridge-mi-hygrothermograph.

karolt avatar karolt commented on May 30, 2024

Hi @hannseman,
I'm getting a similar "Unknown event type: 2" error in a MacOS console after pushing the Bluetooth button on the sensor.

Here is the log from running homebridge -D:

[2019-5-3 22:40:00] [Temperature & Humidity] Started scanning.
[2019-5-3 22:40:04] [Temperature & Humidity] [] Discovered peripheral
      Id: d61xxxxxxxxxxxxxxxxxxxxxxxxxx
      LocalName: undefined
      rssi: -31
      serviceData: 7122aaxxxxxxxxxxxxxxxxxxxx
[2019-5-3 22:40:04] [Temperature & Humidity] Error: Unknown event type: 2. 7122aa019d94f5dfa8654c0d0200020d10
    at Parser.parseEventData (/usr/local/lib/node_modules/homebridge-mi-hygrothermograph/lib/parser.js:174:15)
    at Parser.parse (/usr/local/lib/node_modules/homebridge-mi-hygrothermograph/lib/parser.js:56:23)
    at Scanner.parseServiceData (/usr/local/lib/node_modules/homebridge-mi-hygrothermograph/lib/scanner.js:161:38)
    at Scanner.onDiscover (/usr/local/lib/node_modules/homebridge-mi-hygrothermograph/lib/scanner.js:90:25)
    at Noble.emit (events.js:189:13)
    at Noble.onDiscover (/usr/local/lib/node_modules/homebridge-mi-hygrothermograph/node_modules/@abandonware/noble/lib/noble.js:178:10)
    at NobleMac.emit (events.js:189:13)

Node Version: v10.15.3
plugin version: 2.2.1

The sensor worked fine with a Xiaomi home iOS app.

I'll appreciate your help.

from homebridge-mi-hygrothermograph.

hannseman avatar hannseman commented on May 30, 2024

Hi @karolt! Thanks for your report. Does the plugin not work at all or are you seeing this error along with seeing correct data? Maybe you could let it run for a couple of minutes with the sensor next to the device that is running homebridge and paste the full logs here?

It looks like this plugin is picking up some other device data. Are you running Xiaomi Flower Care devices as well? Could you please paste your homebridge config? If you haven't already you should specify the address config option. The correct value to insert here is a bit tricky to find as MacOS does not allow access to the raw MAC-addresses of bluetooth devices but instead assigns its own unique id.

The easiest way might be to let homebridge run for a while and look for a discovered peripheral where the serviceData starts with 5020 and then copy and paste the value of Id::

[2019-5-3 22:40:04] [Temperature & Humidity] [] Discovered peripheral
Id: ...
LocalName: undefined
rssi: -31
serviceData: 5020...

from homebridge-mi-hygrothermograph.

karolt avatar karolt commented on May 30, 2024

Hi,
Funny thing - after starting the homebridge once again, I saw correct data from the sensor:

[2019-5-3 23:21:13] [Temperature & Humidity] Start scanning.
[2019-5-3 23:21:13] [Temperature & Humidity] Started scanning.
[2019-5-3 23:21:16] [Temperature & Humidity] [] Discovered peripheral
      Id: ....
      LocalName: undefined
      rssi: -51
      serviceData: 5020....
[2019-5-3 23:21:16] [Temperature & Humidity] [] Temperature: 24.9C
[2019-5-3 23:21:16] [Temperature & Humidity] [] Humidity: 44.2%
[2019-5-3 23:21:26] [Temperature & Humidity] [] Discovered peripheral
      Id: ....
      LocalName: MJ_HT_V1
      rssi: -50
      serviceData: 5020...
[2019-5-3 23:21:26] [Temperature & Humidity] [] Battery level: 52%

And then, after pushing the Bluetooth button again, a got flooded with the error messages (the same i pasted in my previous message).

So it looks like, the sensor is getting discovered properly. But apart from that, sth different happens and that causes the errors. And since the error messages flood the screen, I have not spotted the correct data before.
The error messages keep coming as long as the sensor is in a discovery mode. After the bluetooth icon stops blinking, the error messages stop coming.

And for the record, the temp&humidity sensor is the only xiaomi device I have.

from homebridge-mi-hygrothermograph.

hannseman avatar hannseman commented on May 30, 2024

Interesting! Yes this plugin does not connect to the device so there’s no need to press the Bluetooth button to set the device in pairing mode.

Did I understand you correctly that everything works as expected if the button isn’t pressed? If so please go ahead and close this issue and I’ll update the documentation to describe that there’s no need to press the Bluetooth button.

from homebridge-mi-hygrothermograph.

karolt avatar karolt commented on May 30, 2024

PS. I don't have a "close issue" button, so I guess you have to do this ;-)

from homebridge-mi-hygrothermograph.

hannseman avatar hannseman commented on May 30, 2024

PS. I don't have a "close issue" button, so I guess you have to do this ;-)

Forgot that this issue wasn’t opened by you originally. :)

Thanks for your detailed report. I’ll update the docs and see if I can suppress this error.

from homebridge-mi-hygrothermograph.

Related Issues (20)

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.