Mqtt
Chad Gard
chad at holeinthewoodsfarm.com
Wed Feb 23 16:39:14 EST 2022
I think one of the major reasons for the manual setup is simply knowing which witch is which. When I fired up the first ESPresense sensor, it immediately found dozens of ble beacons. Some you could figure out reasonably, because they have either their manufacturer or their model number as part of their id. But some I still haven’t identified. I figured out today that one was the radio in our box truck - it apparently transmits it’s BLE beacon even when the truck/radio are off. Which might explain some battery drain issues I’ve been having. And our house is in the middle of a 35 acre farm, with farms surrounding us. And we really don’t have that many techy gizmos compared to many people. Someone living in a NYC apartment building? Yowsers!
The ESPresense firmware does offer a terminal output, though, which shows all of the beacons it’s tracking, and if you put something just about touching the ESP32, it flags it as ‘close.’ That has been by far the easiest way to identify things.So, if’n you do a “create new units in XTension” checkbox, I think it would be wise to at least have an option/preference to require the new unit be “close,” not just somewhere in range.
FWIW, here’s the trip back to 1990 (and, I don’t really see any advantage to using yaml vs xml or whatever. It’s really a weird experience for those of us who are used to white space only existing for the benefit of humans, and you can break a lot with a misplaced space...):
############ ESPresence tracking ###################
- platform: mqtt_room
device_id: "iBeacon:fda50693-a4e2-4fb1-afcf-c6eb07647825-10065-26049"
name: 'paislee_presence'
state_topic: 'espresense/devices/iBeacon:fda50693-a4e2-4fb1-afcf-c6eb07647825-10065-26049'
timeout: 60
away_timeout: 120 # number of seconds after which the enitity will get status not_home
Each beacon/device/etc gets an entry like that.
Platform is always the same - mqtt_room was the name of the project ESPresence took over and extended
Device_id is the id/fingerprint (not Mac address) off the tracker. iOS device id’s stay the same, even thought their MAC address changes. No apparent standard on how long they are or what format they are. They don’t all include something indicating what kind of device they are, though this one, an iBeacon, does.
Name is my name for the tracker (Paislee is our new puppy)
State_topic is the mqtt topic the beacon data is published to. It’s always espresense/devices/[the device id]
I’m not sure what timeout is a timeout for, but default is 60 and I left it there,
Away_timeout is basically the time it takes for ESPresence to declare something “not_home” if it is not sensed by any of the trackers you have set up.
In an XTension version of this, I think you’d need to retain a place to enter the device_id, just like an X10 address or whatever, while “name” could just be the unit name.
--
Chad
-What's Cookin' at the Farm? Recipes, menus, and more at http://twie.holeinthewoodsfarm.com
> On Feb 23, 2022, at 12:53 PM, James Sentman <james at sentman.com> wrote:
>
> Manually editing the YAML file is so 1990 ;) except… there wasn’t any YAML back then ;)
>
> The way it woudl work in XTension is similar to the way it works with the old arp and pin plugin. If you’re looking for a new device you turn on the “create new units in XTension” checkbox, and then once it’s there and working you turn that off so you don’t end up with an entry for every persons phone who walks by the house while walking their dog ;) But no manual editing of configuration files ;)
>
>> On Feb 23, 2022, at 12:25 PM, chad at holeinthewoodsfarm.com <mailto:chad at holeinthewoodsfarm.com> wrote:
>>
>> Also, espresence implements tracking things by a Bluetooth fingerprint, which doesn’t change. It reports both the MAC address and the fingerprint via mqtt, so if you create your home assistant entities by fingerprint (you do actually need to manually enter the addresses of what you need to track in your HA yaml files - it auto creates devices for the esp32 stations, but not the devices you want to track. Which is probably wise, because anytime someone visited with a ble device, it would be adding things. Anyone with a phone and a smar watch would already have two…) rather than MAC address, the iOS changing MAC address all the time is a non-issue.
>
> Thanks,
> James
>
>
> James Sentman http://www.PlanetaryGear.org <http://www.planetarygear.org/> http://MacHomeAutomation.com <http://machomeautomation.com/>
>
>
>
>
> _______________________________________________
> XTensionList mailing list
> XTensionList at machomeautomation.com
> http://mail.machomeautomation.com/mailman/listinfo/xtensionlist
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.machomeautomation.com/pipermail/xtensionlist/attachments/20220223/9092f21f/attachment.html>
More information about the XTensionList
mailing list