Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Experience and issues on Apple macOS (10.15.7) #12

Open
DigiH opened this issue Mar 5, 2022 · 10 comments
Open

Experience and issues on Apple macOS (10.15.7) #12

DigiH opened this issue Mar 5, 2022 · 10 comments

Comments

@DigiH
Copy link
Member

DigiH commented Mar 5, 2022

Hi @1technophile and @h2zero

I've installed the Theengs Gateway on my Mac running macOS 10.15.7, admittedly not the latest OS, by using the simple

pip3 install TheengsGateway

as I've seen the

• Apple Mac (not tested yet)

in the Hardware section.

Things are somehow working as expected, with starting the broker connection, the config file being created etc.

But here are the issues I find which don't quite work as expected.

All devices, which I also register with my separate ESP32 OMG, do get nicely recognised, but the published id is always a long uuid which has nothing to do with the devices' MAC addresses, additionally for my iBeacons the name is never registered, nor the mac_type.

For example here is a comparison of the same iBeacon from the TheengsGateway on macOS

{"id":"A7BCF6BE-1FC3-4579-BD82-2385A496BF20","rssi":-73,"brand":"GENERIC","model":"IBEACON","model_id":"IBEACON","mfid":"4c00","uuid":"fbc50733a4e24ec1afcfc4db07663825","major":1,"minor":1,"volt":2.3}

vs. the ESP OMG

{"id":"AA:BB:CC:DD:EE:FF","mac_type":1,"name":"BEACON01","rssi":-73,"brand":"GENERIC","model":"IBEACON","model_id":"IBEACON","mfid":"4c00","uuid":"fbc50733a4e24ec1afcfc4db07663825","major":1,"minor":1,"volt":2.3}

Similarly for the Mi Band 4, where the name is being published, but also before the uuid id

{"name":"Mi Smart Band 4","id":"6C5A59D3-0350-426E-9A9D-7F730735B4AC","rssi":-52,"brand":"Xiaomi","model":"Miband","model_id":"MiBand","steps":846}

vs.

{"id":"AA:BB:CC:DD:EE:FF","mac_type":0,"name":"Mi Smart Band 4","rssi":-86,"servicedata":"4e030000","servicedatauuid":"0xfee0","brand":"Xiaomi","model":"Miband","model_id":"MiBand","steps":846}

and with the same uuids being in the reported topics

home/TheengsGateway/A7BCF6BE-1FC3-4579-BD82-2385A496BF20
home/TheengsGateway/6C5A59D3-0350-426E-9A9D-7F730735B4AC

it's not really what I'd expect and would be compatible with the ESP OMG reports.

Let me know how I can be of help getting Theengs Gateways running properly on macOS.

Thanks

@koenvervloesem
Copy link
Member

This is because of Bleak's macOS backend, which is a bit special.

@DigiH
Copy link
Member Author

DigiH commented Mar 5, 2022

Thanks for the explanation @koenvervloesem :) unfortunately this currently makes the interchangeability with the topics and ids not really compatible with existing OMG or other platform Gateway setups :( but working nicely as a stand alone macOS solution with the unique uuids.

Why the names of my iBeacons are never recognised however seems to be another issue.

@1technophile
Copy link
Member

Thanks for testing with MAC @DigiH is the MAC ADDRESS of your devices part of this "id":"6C5A59D3-0350-426E-9A9D-7F730735B4AC" or this "id":"A7BCF6BE-1FC3-4579-BD82-2385A496BF20"

@DigiH
Copy link
Member Author

DigiH commented Mar 6, 2022

is the MAC ADDRESS of your devices part of this "id":"6C5A59D3-0350-426E-9A9D-7F730735B4AC" or this "id":"A7BCF6BE-1FC3-4579-BD82-2385A496BF20"

@1technophile I already thought they might be, but unfortunately not, they are completely arbitrary uuids from what I can gather so far. Otherwise I would have put the AA…BB:CC… from the MAC addresses into the appropriate uuid indexes ;)

@DigiH
Copy link
Member Author

DigiH commented Mar 6, 2022

@1technophile And even worse! I just confirmed, with a restart of the Mac and starting TheengsGateway again the uuids have changed completely for the same devices - so not really useful for subscribing to ever changing topics :(

@1technophile
Copy link
Member

Seems that having unique ID on Apple device will be complex

@DigiH
Copy link
Member Author

DigiH commented Mar 6, 2022

In @koenvervloesem link above it briefly states that the uuids might be cached, but obviously only on that one specific machine, and it seems that the cache is being cleared with a restart. Just stopping and restarting TheengsGateway seems to keep the uuids the same so far.

@1technophile
Copy link
Member

Some sensors advertize their mac address into the manufacturer data of service data, we could identify those into the decoder and replace the MAC with it, this would enable to have the compatibility with Apple devices.
Nevertheless I'm asking myself if it is worth doing it, do you think there is enough interest/traction?

@DigiH
Copy link
Member Author

DigiH commented Mar 12, 2022

With non of my BT devices advertising their MAC addresses in the manufacturer data, with Apple Mac machines being power hungry PCs compared to ESP32s or even Raspberry Pis I don't rally think it's worth trying to get a topic compatibility on macOS.

Only being compatible with few devices (which contain their MAC in the published data) would probably only confuse people to open issues about why such and such a device doesn't work properly on the macOS side.

I think it's better to keep full gateway compatibility on devices which allow it. And even if someone is running a macOS server continuously and would want to use the Theengs Gateway it would only be something like € 5 investment for an ESP32 ;)

@1technophile
Copy link
Member

Got it, let's put this aside

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants