Yes, I can confirm that GENERIC type will show for all generic beacons. And I can also confirm that only some beacons report a name. And I can also confirm that the manufacturer string is not going to be unique.
So… yes, you may well have to use the MAC address.
I can also confirm that this is highly irritating to me too.
Yeah, that sounds right to me. Name reporting is optional for these devices and, as a reminder, a user or the device may change the name from time to time.
The reason I am using the app config first before the name, is that I can see some beacons giving out the same name. Eg MIBand2
Yeah kind of figured that out. Will need to also look into the possibility of constantly checking against the MAC of a beacon against a previous name when it receives any data. That will be fun
I have made the updates to allow for tracking beacons. The updated file can be found here on GitHub.
I haven’t updated the app on this page, as its totally untested since I don’t have a Beacon, so will be depending on what you tell me if there are bugs. I will be ordering some, but if you want to try it out, please do.
The following are the new changes:
In the apps.yaml config, you can declare the following using the below format
if report_only_known_beacons is set to True (its true by default anyway if not declared), it will only process those beacons that have been declared in the config. If set to False, and if known_beacons is empty, the app will try to generate names for any beacon the monitor system presents to it using the following algorithm:
it will check if it reported its name, if it did it will check if the name has been used before (as sometimes the same name can be broadcast-ed from similar devices)
if the name has been used before for a MAC address, it will generate one like <name>_1, <name>_2 and so on.
If it doesn’t broadcast any name, its MAC address will then be used.
Now as @andrewjfreyer highlighted earlier, if for any reason the name of the beacon was changed on the device, without declaring it in the apps.yaml file, it will keep using the previous one generated.
In every step of the way, Logs will be outputted to let the one know that no name has been declared and what the system is now using.
Do let me know if you find any bugs, as I said it totally untested. I am look into using Beacons at home now, as they seem to have better features and might be better for distance calculation and triangulation.
If updated to the latest monitor line 131 or so will be broken as the topic won’t have owner. I think using KNOWN_MAC should suffice (as well as updating the splits). I’ll give that a try.
It means the network connection between your Appdaemon instance and your broker is not stable. From the message, I can assume you have your broker running on another computer right?
My AppD instance is connected to 3 brokers, 1 local, the other on another computer but on my network and the last is CloudMqtt. I get that quite a bit with CloudMqtt as my internet connection goes down quite a bit thanks to my little girl.
So I advise you investigate why your network connection to the broker is not solid as that’s the only reason that will happen. I did put that in, just for scenarios like this.
Hmmmm interesting as I don’t have any control over that, as it’s when the client disconnects it happens. I will do some more research around the paho-mqtt client and get back to you.
I have made some updates to the app, and its avaible on GitHub.
Well contrary to what I said about not having beacons at home, my Flowercare and Chromecast devices all showed up as beacons . But the data seems so often, I was running out of threads in Appdaemon. So I might have to look into redesigning the app, but first I want to ask if you get the same issue so I can tell its just me; as I have other process intensive apps running.
On the MQTT plugin side of things, I really couldn’t determine what the issue was. Fact is that the HASS and MQTt plugins behave differently as far as connection to endpoint. The HASS plugin establishes a connection, gets its data and closes the connection constantly in a while loop. On the other hand, the MQTT plugin just stays connected as far as I know.
Can you please check if the time delta between the connection being lost is constant?