Giter VIP home page Giter VIP logo

Comments (6)

hannseman avatar hannseman commented on May 30, 2024

Could you try running it with just one device active (remove the battery from one of them) and not specifying any address in the config. This is just to make sure that it’s just not the address ID that is wrong. Keep the sensor close to the device that is running homebridge.

Also could you please provide your homebridge config.

from homebridge-mi-hygrothermograph.

JalilCejin avatar JalilCejin commented on May 30, 2024

Got it to work based on your suggestions.

I'm getting the address ID from nRF app on iOS, it shows 2 addresses. DFU and Primary service, tried both but no luck.

Any ideas?

{ "bridge": { "name": "BRCX1", "username": "CC:22:3D:E3:CE:30", "port": 51826, "pin": "777-88-777" }, "platforms": [ { "platform": "HarmonyHub", "name": "homebridge-harmonyhub-plugin" }, { "platform": "config", "name": "Config", "port": 8081, "sudo": false, "log": { "method": "file", "path": "/users/jalil/.homebridge/logfile.log" } } ], "accessories": [ { "accessory": "Hygrotermograph", "name": "Temperature & Humidity", "timeout": 15, "temperatureName": "Temperature", "humidityName": "Humidity", "fakeGatoEnabled": true } ] }

from homebridge-mi-hygrothermograph.

hannseman avatar hannseman commented on May 30, 2024

I think the documentation is wrong about being able to use the nRF-app to retrieve the address/id you need. Each MacOS/iOS device will have its own unique identifier for each device that you use. On Linux systems you can use the MAC-address but this is on not available on Apple systems due to security reasons. Instead they use these UUIDs.

Either you can try using the Apple MacOS-app Bluetooth Explorer to find the UUID but for now the simplest way might be to just run homebridge in debug-mode by homebridge -D. This will output more verbose logging about discovered sensors:

[2019-5-3 23:21:16] [Temperature & Humidity] [] Discovered peripheral
      Id: XXX
      LocalName: undefined
      rssi: -51
      serviceData: 5020....
[2019-5-3 23:21:16] [Temperature & Humidity] [] Discovered peripheral
      Id: YYY
      LocalName: undefined
      rssi: -51
      serviceData: 5020....

Look for entries where the field Id differ (in this example YYY and XXX). Hopefully you'll only see 2 different Ids here (if you are using 2 sensors). Copy each Id value into their respective address config.

If you find an easier way to get the device UUID on MacOS please let me know. I actually started a project a while back to build a command line tool which outputs the UUIDs in range on MacOS. Maybe I should try and finish it..

from homebridge-mi-hygrothermograph.

JalilCejin avatar JalilCejin commented on May 30, 2024

OK, so I was able to find some new information.

  • The UUID for the device is unique to the device and not to MacOS. I was able to scan the device with both the Mac and iPhone and both show the same UUID. So if you are able to get it from the iPhone, it would be the same on the Mac.

  • There are 2 service UUIDs, both are listed as Primary Service so still looking out for which one to use, tried with both but no luck.

  • There is a way to get the mac address in MacOS. To achieve it you must be fast. Open bluetooth in System Information, then open bluetooth explorer, explore for BLE devices and when the sensor shows up, click on it and then on connect, as soon as you click on connect, switch to the System Information window and press Command-R as soon as bluetooth explorer shows some info. It will display the MAC address of the device. Will try to see if something happens using this MAC address.

from homebridge-mi-hygrothermograph.

JalilCejin avatar JalilCejin commented on May 30, 2024

Update 2: Good news

Used the MAC address found in System Information/Bluetooth in the config file in lowercase (uppercase didn't work) and voila, it's now reading the sensor correctly.

I never got it to work with the UUID (later, I discovered 4 more addresses for the same sensor, leading me to believe that each service has its own UUID. So If you are using MacOS, using the MAC address with the method provided above should do the trick.

from homebridge-mi-hygrothermograph.

hannseman avatar hannseman commented on May 30, 2024

@JalilCejin good to hear!

Weird that you had problems with uppercase not working, this is supposed to be handled: https://github.com/hannseman/homebridge-mi-hygrothermograph/blob/master/lib/scanner.js#L141-L150

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.