For sure. And that'd be easy. Was wondering if there were a way to do that more directly. Sounds like there isn't. Thx anyway!
Thanks -- just shot over a snippet related to my watch location updates.
For anyone else interested the logs look a bit like this. Pretty cool what info it's calculating. (Different than just MQTT Rooms output, which is literally just the name of the room. This seems to be way more accurate and actually pins me to a room much longer. Fully aware of 3D space, locally, and globally.
dev:5332024-10-28 01:32:43.556 PMdebugparse(): description = {"id":1,"type":"event","event":{"variables":{"trigger":{"id":"0","idx":"0","alias":null,"platform":"state","entity_id":"device_tracker.watch_ticwatch","from_state":{"entity_id":"device_tracker.watch_ticwatch","state":"Master Bedroom","attributes":{"source_type":"espresense","latitude":xxxx,"longitude":xxxxx,"gps_accuracy":0,"elevation":1.0,"x":17.58,"y":2.685,"z":0.0,"confidence":0,"fixes":1,"best_scenario":"First Floor","friendly_name":"watch:ticwatch"},"last_changed":"2024-10-28T17:32:41.717540+00:00","last_reported":"2024-10-28T17:32:41.717540+00:00","last_updated":"2024-10-28T17:32:41.717540+00:00","context":{"id":"xxxx","parent_id":null,"user_id":null}},"to_state":{"entity_id":"device_tracker.watch_ticwatch","state":"Master Bedroom","attributes":{"source_type":"espresense","latitude":xxxxx,"longitude":xxxx,"gps_accuracy":0,"elevation":1.0,"x":16.472324653349965,"y":3.0281091927428156,"z":0.0,"confidence":1,"fixes":2,"best_scenario":"First Floor","friendly_name":"watch:ticwatch"},"last_changed":"2024-10-28T17:32:41.717540+00:00","last_reported":"2024-10-28T17:32:41.720188+00:00","last_updated":"2024-10-28T17:32:41.720188+00:00","context":{"id":"xxxxx","parent_id":null,"user_id":null}},"for":null,"attribute":null,"description":"state of device_tracker.watch_ticwatch"}},"context":{"id":"xxxxx","parent_id":null,"user_id":null}}}
dev:5332024-10-28 01:32:43.495 PMdebugparse: domain: device_tracker, device_class: null, entity: device_tracker.watch_ticwatch, newVals: [Master Bedroom], friendly: watch:ticwatch
dev:5332024-10-28 01:32:43.492 PMdebugparse(): description = {"id":1,"type":"event","event":{"variables":{"trigger":{"id":"0","idx":"0","alias":null,"platform":"state","entity_id":"device_tracker.watch_ticwatch","from_state":{"entity_id":"device_tracker.watch_ticwatch","state":"not_home","attributes":{"source_type":"espresense","latitude":xxxx,"longitude":xxxx,"gps_accuracy":0,"elevation":1.0,"x":17.58,"y":2.685,"z":0.0,"confidence":0,"fixes":1,"best_scenario":"First Floor","friendly_name":"watch:ticwatch"},"last_changed":"2024-10-28T10:21:22.261612+00:00","last_reported":"2024-10-28T10:21:22.263512+00:00","last_updated":"2024-10-28T10:21:22.263512+00:00","context":{"id":"xxxxx","parent_id":null,"user_id":null}},"to_state":{"entity_id":"device_tracker.watch_ticwatch","state":"Master Bedroom","attributes":{"source_type":"espresense","latitude":xxxxx,"longitude":xxxx,"gps_accuracy":0,"elevation":1.0,"x":17.58,"y":2.685,"z":0.0,"confidence":0,"fixes":1,"best_scenario":"First Floor","friendly_name":"watch:ticwatch"},"last_changed":"2024-10-28T17:32:41.717540+00:00","last_reported":"2024-10-28T17:32:41.717540+00:00","last_updated":"2024-10-28T17:32:41.717540+00:00","context":{"id":"xxxxx","parent_id":null,"user_id":null}},"for":null,"attribute":null,"description":"state of device_tracker.watch_ticwatch"}},"context":{"id":"xxxx","parent_id":null,"user_id":null}}}
dev:5332024-10-28 01:32:43.464 PMdebugparse: domain: sensor, device_class: null, entity: sensor.steve_s_ticwatch_pro_3_gps_espgps, newVals: [master_bedroom], friendly: Steve's TicWatch Pro 3 GPS ESPGPS
dev:5332024-10-28 01:32:43.461 PMdebugparse(): description = {"id":1,"type":"event","event":{"variables":{"trigger":{"id":"0","idx":"0","alias":null,"platform":"state","entity_id":"sensor.steve_s_ticwatch_pro_3_gps_espgps","from_state":{"entity_id":"sensor.steve_s_ticwatch_pro_3_gps_espgps","state":"kitchen","attributes":{"distance":0.51,"friendly_name":"Steve's TicWatch Pro 3 GPS ESPGPS"},"last_changed":"2024-10-28T17:32:00.629604+00:00","last_reported":"2024-10-28T17:32:20.072517+00:00","last_updated":"2024-10-28T17:32:20.072517+00:00","context":{"id":"xxxxx","parent_id":null,"user_id":null}},"to_state":{"entity_id":"sensor.steve_s_ticwatch_pro_3_gps_espgps","state":"master_bedroom","attributes":{"distance":0.77,"friendly_name":"Steve's TicWatch Pro 3 GPS ESPGPS"},"last_changed":"2024-10-28T17:32:41.714024+00:00","last_reported":"2024-10-28T17:32:41.714024+00:00","last_updated":"2024-10-28T17:32:41.714024+00:00","context":{"id":"xxxx","parent_id":null,"user_id":null}},"for":null,"attribute":null,"description":"state of sensor.steve_s_ticwatch_pro_3_gps_espgps"}},"context":{"id":"xxxxx","parent_id":null,"user_id":null}}}
dev:5332024-10-28 01:32:21.847 PMdebugparse: domain: sensor, device_class: null, entity: sensor.steve_s_ticwatch_pro_3_gps_espgps, newVals: [kitchen], friendly: Steve's TicWatch Pro 3 GPS ESPGPS
This entity give lots of interesting informations. However there maybe some caveats to consider before adding them to the device driver.
For the moment there seems to be a discrepancy between how MQTT device_tracker is reporting source_type and what is expected from the HA entity (enforced on september 24, 2024)
HADB try to handle entities according to HA specifications in order to interact adequately with a specified type of devices. The correct course of action in this case is unclear.
Furthermore, I'm not sure I understand the usefullness of this extra informations for automation purposes since the room is already given by the associated sensor.
Ah, see that's the problem, the room is not being sent over.
This is what I see on the hubitat side:
And here's what's on the hass side:
The confusion is that the "MQTT Rooms" -- which does send over data, is only giving the node info. It's pretty much crap data, unfortunately. I think the best way to describe it is like this:
MQTT/ESPresense Companion:
- Set up 4 nodes at the corners of your house, and it can pinpoint your x/y with near perfection. Add upstairs/downstairs, and you get a z-axis.
- A full-on map of your house is used, with room blueprints laid out to use that extrapolated location info to spit out a room, despite only having the 4 nodes total.
MQTT Rooms:
- Put a node in each room. It does no form of triangulation. Basically the 'dumb' base for the 'smart' Companion extension.
- Real-world result is that your devices bounce wildly between the various nodes with no rhyme or reason.
So while technically "MQTT Rooms" spits out the node name kinda/sorta near the tracker in question, it's not really any good. The MQTT output lets you have dozens of rooms that are intelligently calculated.
Hope that helps. Essentially anyone that uses ESPresense would want to use the Companion feature.
I'm curious how consistent that distance data is for you. When I tried ESPresence and also currently with BLE Bermuda, the distance values to each proxy were not consistent enough to reliably calculate anything. I could have my phone sitting still and the calculated distances would jump around multiple feet at a time. Still, I can be in basement and the integration will all of a sudden briefly say that I am on 2nd floor. Since I live in a 3-story house, that adds in calculating location using the Z-axis also. I have settled for just what floor that I am on.
From the data you sent me, the sensor entity only spit out room and distance. Nothing else. The device tracker entity gives latitude, longitude, gps coordinates, etc but only when leaving or entering the premises (home or not home). So moving around your house does not result in updated data for any of those extra values.
If there is other changes reported while moving around in the house, it would be nescessary to figure out what event they generate.
Is there any way to specify the mode like "home/away" for an Ecobee thermostat with this integration? I didn't see the option in device that was created in HE. I could do it in HA, but trying to keep all the rules/automations in one place if I can. I mainly use HA for the dashboards more then anything else.
I did see there is a "preset" option, but it does not seem to do anything. In the device settings it states supported presets 'none'
the Ecobee integration choose to use select_option instead of modes. Either way, select_option has no equivalent in Hubitat and is not supported by HADB. But this excellent write up is a solution:
[RELEASE] Home Assistant Device Bridge (HADB) - #1431 by ritchierich?
Thanks, I will check it out.
Your post peaked my interest and I found a use for a spare ESP32 so I setup one ESPresence device. Like you noticed these devices come across HADB using the "unknown" driver. I ended up modifying the code a bit to pass all of the attributes sent by HA for example:
{friendly_name=ESP Michael Watch, distance=3.95}
I am working with @ymerj in the background on proposing changes to these drivers. Idea with the above change would be that you could create your own "Generic Component X" driver to then parse the data sent from HA since HADB cannot deal with every HA device/sensor. So initially "unknown" HA devices would be created using the unknown driver and from there users can create their own drivers to use by these devices to parse the additional attributes for their own use cases.
Cool deal! Yeah I have 10 of them set up now and I'll probably double that so I can get very reliable results.
As long as I can get the triangulated room data into hubitat, I'll be happy. The non-triangulated room data that comes from "MQTT Rooms" is not very useful to me.
I'm attaching a new log. Perhaps the last one was too limited. To my eyes, it looks like it updates every second or so with GPS location, and also changes room name as I walk around.
It's worth noting that I don't actually have a node in "Upstairs Bathroom", "Living Room", or "Master Closet" -- as those are purely triangulated room locations... IE the entire reason of using ESPresense Companion.
My goal would be to pair each zone on my Aqara FP2 presense sensors with the zone data provided from ESP companion to have granular automations. IE when my girl sits on the couch alone, no tower fan. Anywhere I go, I want hurricane force winds.
I haven’t setup companion yet as I still only have 1 ESP32.
Looking at the logs, is companion room in the “best_scenario” attribute? If yes the changes I am working on with @ymerj will send the entire attributes object down to the child device in HE for unknown type devices. This will all you to create your own custom driver to then leverage best_scenario and other data from HA.
Version 2.9:
- Add windowsShade attribute to blinds
- Add attributes list to unknown sensor
- Add support for espresense thanks to @ritchierich
@stevenascott I will be curious to see what comes across after you update to v2.9 in your devices. Assuming they are currently using the "Generic Component Unknown Sensor" driver you will see all the HA attributes in a state variable for example:
We can certainly take this to a PM and I can work with you on a custom driver if you aren't comfortable writing one. Then once done we can share with the community.
Curious if anyone has successfully passed a text value from HA to HE?
My use case: I have a vacuum integrated with HA. I'd like to get the status (e.g., docked, paused, cleaning, error) into HE where most of our automations reside. But HADB (understandably) doesn't do vacuums and if I create a text helper in HA, then HADB won't know about it either AFAICT.
My workaround is to use an HE dimmer that I've passed to HA via MakerAPI, and then I'm using static mapping (1=Docked, 2=Paused, etc.). It works, but it's a bit inelegant and it's hard to troubleshoot later. Wonder if there's a cleaner way.
Always appreciate ideas from this amazing community. TIA...
I pass the floor that my phone is on from a home tracking integration in Home Assistant called Bermuda BLE Trilateration. It just passes the text value of the entity of whether I am in "Basement" or on "1st Floor" or "2nd Floor".
Doesn't your vacuum already have an entity as part of HA integration that contains "Docked", "Paused", etc.??? If so, just share that entity thru the HADB.
The only thing that comes across from my Roomba is “Roomba bin full”, which is useless info with a self emptying vacuum. I shared a virtual switch to HA and created an automation in HA to turn on the switch when the Roomba is vacuuming, which turns on lights and overrides Motion Lighting rules until the switch turns off. Very basic, but does what I needed. I also created a rule in HE to turn off the switch as a fail safe after 3 hours since a couple times the Roomba became stuck, battery died, and HA didn’t turn off the switch.
Let me doing some digging. After reading your post, I am reminded that I have helped someone else with similar situation using Maker API and an OMNI Sensor. Status information was passed from HA to HE. I thought it was a vacuum but don't remember brand. Unfortunately, it was probably more than a year ago.
I could add support for input_text entity
No luck although I did find a post from Feb '21 describing how I had helped someone with their vacuum in another thread. However, I can't find that original thread.
What entities does the vacuum device have?