Athom Human Presence Sensor mmwave (share your experiences)

@sender, as @sparkydave suggested, try turning down the ‘Maintain Sensitivity’ setting. I had to change mine to 0 in order for the PS01 to stop detecting the furnace running! :crazy_face:

It was 5 indeed. Now trying 3. Thanks

Hi All, had one of these trailing for a couple of weeks and they work well. Got another couple coming for other rooms.

My question is, are being using the Occupancy entity for automations? E.g. lights on / off etc?

I use it for lighting control to ensure the light doesn’t turn off while someone is still in the area.

Example code
alias: Alfresco LED Strip Auto
description: Alfresco LED Strip Auto
trigger:
  - platform: state
    entity_id:
      - binary_sensor.paradox_z6_alfresco_pir
    to: "on"
  - platform: state
    entity_id:
      - binary_sensor.alfresco_presence_sensor_f9a541_pir_sensor
    to: "on"
  - platform: state
    entity_id:
      - binary_sensor.paradox_z3_garage_door
    to: "on"
condition:
  - condition: or
    conditions:
      - condition: sun
        before: sunrise
        before_offset: "-01:00:00"
        after: sunset
        after_offset: "-00:15:00"
      - condition: state
        entity_id: light.alfresco_led_strip
        state: "on"
      - condition: template
        value_template: >-
          {{ states('sensor.garage_multisensor_illuminance') | int(0) <
          states('input_number.alfresco_min_lux') | int(1) }}
action:
  - service: light.turn_on
    data:
      brightness_pct: 90
    target:
      entity_id: light.alfresco_led_strip
  - wait_template: >-
      wait_template: "{{
      is_state('binary_sensor.alfresco_presence_sensor_f9a541_occupancy', 'off')
      }}"

      timeout: '01:00:00'
    continue_on_timeout: true
    enabled: false
  - wait_for_trigger:
      - platform: state
        entity_id:
          - binary_sensor.alfresco_presence_sensor_f9a541_occupancy
        to: "off"
        for:
          hours: 0
          minutes: 2
          seconds: 0
    timeout:
      hours: 0
      minutes: 20
      seconds: 0
      milliseconds: 0
  - delay: >-
      00:0{{ states.input_number.alfresco_spotlight_auto_off_time.state | int(1)
      }}:10
    enabled: false
  - choose:
      - conditions:
          - condition: state
            entity_id: schedule.back_yard_lighting_time_extend
            state: "on"
        sequence:
          - delay:
              hours: 0
              minutes: 20
              seconds: 0
              milliseconds: 0
      - conditions:
          - condition: state
            entity_id: schedule.back_yard_lighting_time_extend
            state: "off"
        sequence:
          - delay:
              hours: 0
              minutes: 0
              seconds: 3
              milliseconds: 0
  - service: light.turn_off
    data: {}
    target:
      entity_id: light.alfresco_led_strip
trace:
  stored_traces: 20
mode: restart
1 Like

Hi All, I have 3 of these now after testing 1 for a month - they work really well for my usage where I just want to detect if there is person or people in the room. I dont need zones etc.

Ive just added 2 more, gone thru the steps to connect to the wifi and then bring them into HA as follows:

image

However they don’t appear in the ESP Home add-on… any idea why they are not there nor any option to Adopt? Note 9db0e8 is the Lounge Presence Sensor, which was my first one.

Hi there, I discussed this a bit above in a prior post of mine (what to do if your device is not discovered). I am pasting it here:

…In my case when setting up the Athom devices, they showed up for adoption in ESPHome dashboard so I had no issues there. But if it doesn’t show up you should be able to manually add it to ESPHome via Settings->Devices & Services->ESPHome->Add Device. Once it’s in the ESPHome dashboard you can “adopt” it…

If that doesn’t help (and no one else here has tips) I recommend contacting the ESPHome folks via Discord. :wink: Link below.

Yea, the thing is is that HA is seeing the device as soon as it connects to wifi. Click the Configure button and everything is in HA. But there is nothing in ESPHome.

Yep, that’s why I suggested within Home Assistant to do the following:

Settings->Devices & Services->ESPHome->Add Device

Then you should be able to put the IP address or hostname of the device and ESPHome should then be able to add it to the dashboard. If that doesn’t work then something weird is happening and I’d recommend you chat with the ESPHome folks on Discord. :slight_smile:

A question regarding Occupancy… Most of the time this works, but the odd time in my lounge the pir sensor would detect motion, the mmware would not detect motion (as its beyond the range i have set) - but this would not trigger the Occupancy to Detected.

I would have thought that either the pir or the mmWave would trigger Occupancy and the mmWave would keep it on until someone left the room?

It depends on the logic of Occupancy sensor written in the YAML.

I did run Blackadder YAML and tweaked the logic for my particular case

That is the benefit of ESPHome is how easy it is easy to make these changes …the bit you are looking for in the YAML is…

  - platform: template
    name: "Occupancy"
    id: occupancy
    device_class: occupancy
    lambda: |-
      if ( id(mmwave).state and id(pir).state) {
        return true;
      } 
      else if (id(mmwave).state == 0 and id(pir).state == 0) {
        return false;
      } 
      else {
        return id(occupancy).state;
      }

1 Like

OK thanks, so ive installed Blackadder’s config… all good here so far.

Just so i’m understanding this correct, in your example above… this is “when both the mmWave and pir state is on, then set occupancy to on”?

correct … but this particular logic statement has alternative outcomes… so when do you want Occupancy to be true? perhaps you are seeking

if ( id(mmwave).state or id(pir).state) {

I see, thanks!

Since today’s ESPHome 2024.5.1 update, i’ve started to get the following error. Does anyone know how to fix this? I’ve read something about a minimal firmware to flash to enable OTA again – is this the right path?

There seem to be already a bug entry here OTA stops working after upgrade to 2024.5.0 · Issue #5804 · esphome/issues · GitHub

Processing athom-presence-sensor-f9a753 (board: esp8285; framework: arduino; platform: platformio/[email protected])
--------------------------------------------------------------------------------
HARDWARE: ESP8266 80MHz, 80KB RAM, 1MB Flash
Dependency Graph
|-- ESPAsyncTCP-esphome @ 2.0.0
|-- ESPAsyncWebServer-esphome @ 3.2.0
|-- DNSServer @ 1.1.1
|-- ESP8266WiFi @ 1.0
|-- ESP8266mDNS @ 1.2
|-- noise-c @ 0.1.4
|-- Wire @ 1.0
|-- ArduinoJson @ 6.18.5
RAM:   [=====     ]  49.1% (used 40240 bytes from 81920 bytes)
Flash: [======    ]  59.4% (used 608089 bytes from 1023984 bytes)
========================= [SUCCESS] Took 3.78 seconds =========================
INFO Successfully compiled program.
INFO Resolving IP address of athom-presence-sensor-f9a753.local
INFO  -> 192.168.1.71
INFO Uploading /data/build/athom-presence-sensor-f9a753/.pioenvs/athom-presence-sensor-f9a753/firmware.bin (612240 bytes)
INFO Compressed to 414748 bytes
ERROR Error binary size: Error: ESP does not have enough space to store OTA file. Please try flashing a minimal firmware (remove everything except ota)
 [ERROR] /config/esphome/athom-presence-sensor-f9a753.yaml

I’m seeing exactly the same - looks like the size of the compiled file is maybe bigger than before - never had an issue before the latest updates :frowning:

To be honest, I can’t see any reason to continually update ESPHome and take the considerable time to update all devices. Seems like a pretty poor system when there are no useful updates to these devices.

Here is a ESPHome bug entry with some solutions

This one from @tarontop catched my eye.
EDIT: i’ve tried it and i couldn’t increase the flash size to 2MB at all.

Only solution which worked was to downgrade via HA partial backup to ESPHome 2024.4.2,
then install the 2024.4.2 to all Athom’s, and finally to upgrade ESPHome back to 2024.5.2 and upgrade all Athom’s to the latest version. – very cumbersome process –

When the update has nothing to do with the hardware (attached sensors etc.) you are using then there is no need to update.

Also, I have two of these sensors and mine both updated to ESPhome 2024.5.2 without any issue.

Yes but a) you have to look through the update docs and try to work out how the device is affected and b) I don’t think there’s any way to skip the update so it will continually show and nag you.

ALL of my Athom Presence sensors were affected.

Not really. If it isn’t broken, just leave it. It’s very rare that ESPhome updates include ‘breaking changes’.

Just hit the ‘skip update’ button and it won’t nag you until the next monthly update, or leave out the ‘firmware version’ section of code so HA doesn’t respond at all. My Athoms are like this, they show an update as being available in the ESPhome dashboard but not in the HA updates section.

2 Likes

FYI @Hell255 I had the same issue as you. I decided to just disable the update entity for the Athom presence sensors. If some breaking change is released later I will do the work to connect a USB cable and update locally, then maybe OTA updates would work afterward. I followed the steps at the below link to resolve it for my Athom sensors. Now I won’t see the update available notifications for them…

@sparkydave interesting that the update worked for you without issues. I had been updating my Athoms diligently with every ESPHome update. Latest I was able to update was ESPHome version 2024.5.0. Now it won’t work over OTA, with the size error Hell255 mentioned. You must be lucky; buy a lottery ticket! :smiley: