ESPresense - MQTT-Room - help for Sensor in HA

What is your “away_timeout: 120” ??

I thought I had to use the same state_topic as the one I’m seeing in MQTT Explorer. But with “espresense/rooms” it does indeed work now. Yay!!! Thank you

I’ve changed it to 10 sec now as I want quicker results.

How do you do that? Do you have a code example?

Read the documentation, it is decribed how do you can do that

Apple | ESPresense

Interesting, thanks for pointing me to this - I have been all over the doc but have not seen/understood this. Thanks again :slight_smile:
My Espresense set-up now slowly starts to work properly - I have set up two ESP32 sensors in different rooms.
What have been the best values for the Start counting / Stop counting / Maximum distance parameters for your set-up?

trying to setup apple iPhone presence in the configuration.yaml file - its kind of working but will only show the correct state each time i reboot. i cant add timeout lines to the file it says config error when i try and add either of the following
timeout: 5
away_timeout: 120

here is the complete file i have changed some letters/numbers to x for security

Loads default set of integrations. Do not remove.

default_config:

Load frontend themes from the themes folder

frontend:
themes: !include_dir_merge_named themes

Text to speech

tts:

  • platform: google_translate

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

sensor:

one for each beacon we need to track

  • platform: mqtt_room
    name: “lounge”
    device_id: “espresense/settings/iBeacon:e5ca1ade-f007-xxx1-0000-000000000000-164-54294”
    state_topic: ‘espresense/rooms’

  • platform: mqtt_room
    name: “study”
    device_id: “device_id: espresense/settings/iBeacon:e5ca1ade-xxx-ba11-0000-000000000000-4-30486”
    state_topic: ‘espresense/rooms’

  • platform: mqtt_room
    name: “Iphone-Lewis”
    device_id: “irk:apple:1007:xx-x”
    state_topic: ‘espresense/rooms’
    timout: 5
    away_timeout: 30

  • platform: mqtt_room
    name: “kitchen”
    device_id: “espresense/settings/iBeacon:e5ca1ade-f007-xxxa11-0000-000000000000-172-56606”
    state_topic: ‘espresense/rooms’

Remove espresense/settings/ from your device_id

Yeah, that’s what I ended up with :slight_smile:

I’m also having issues with my presence detection. Hopefully it’s as easy a fix as the issues above! My result is always not_home/null distance as well.

The data is being sent to espresense/devices/name:uh_d81041039d81/my_room:

{
  "mac": "d81041039d81",
  "id": "name:uh_d81041039d81",
  "name": "UH_D81041039D81",
  "idType": 35,
  "rssi@1m": -71,
  "rssi": -81,
  "raw": 1.93,
  "distance": 1.98,
  "var": 0.03,
  "int": 4218
}

My configuration.yaml:

sensor:
  - platform: mqtt_room
    device_id: "name:uh_d81041039d81"
    state_topic: "espresense/rooms"
    timeout: 10
    away_timeout: 15

I join with my question once: My problem lied in integrating into the configuration.yaml. So far, nobody can help where the problem lies.
Error: platform mqtt_room property platform is not allowed

There was a change of the mqtt topic in newer versions of esprense.
According to my configuration, your sensor now has to look this way:

sensor:
  - platform: mqtt_room
    device_id: "name:uh_d81041039d81"
    state_topic: "espresense/devices/name:uh_d81041039d81"
    timeout: 10
    away_timeout: 15

You are using the wrong domain. The mqtt-room integrations does not have to be under mqtt:, it must be under sensor:
so it has to look like:

sensor:
  - platform: mqtt-room
    name: "iphone-hXXX"
    device_id: "phone:iphonehXXX"
    ......