Athom Human Presence Sensor mmwave (share your experiences)

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:

@bryanw Since 2024.5.4 (May 28th release) OTA is fixed for me!

I needed to retry the OTA installation several times, but it then worked.
See release notes ESPHome 2024.5.0 - 15th May 2024 — ESPHome

with the fix “Also reduces fw size.”
[helpers] Move Base64 string to cpp by gabest11 · Pull Request #6819 · esphome/esphome · GitHub


Still, if the latest OTA really doesn’t work for you, then do a 2-step OTA procedure:
First, install a minimal version with OTA.
Second, install the full version with OTA.
Don’t forget to change your friendly_name, name and key.
Note: sometimes i had to retry the update several times until it went through.


Step 1 - Minimal OTA config

substitutions:
  name: athom-presence-sensor-my-id
  friendly_name: My Nice Athom
  
esphome:
  name: ${name}
  name_add_mac_suffix: false
  friendly_name: ${friendly_name}

esp8266:
  board: esp8285
ota:
logger:

api:
  encryption:
    key: XYZXYZXYZXYZXYZXYZXYZXYZXYZXYZXYZXYZ

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

Step 2 - Full OTA config

substitutions:
  name: athom-presence-sensor-my-id
  friendly_name: My Nice Athom

packages:
  Athom_Technology.Presence_Sensor: github://athom-tech/athom-configs/athom-presence-sensor.yaml

esphome:
  name: ${name}
  name_add_mac_suffix: false
  friendly_name: ${friendly_name}

api:
  encryption:
    key: XYZXYZXYZXYZXYZXYZXYZXYZXYZXYZXYZXYZ

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
1 Like

@Hell255 - Thank you for sharing this information! I noticed my Athom sensors updated fine now. :slight_smile: Glad it was fixed.

1 Like

Thanks for sharing this, but even with the base config and trying it a BUNCH of times including resetting the device - I didn’t have any luck.
I think I’m going to have to factory reset my two units, adopt them, and then update their configs. :frowning:

1 Like

I have 2 of these. One in my living room and one in my basement media area. Main purpose is to turn off the lights/tv when no one is there and they are left on. I am overall very happy with the devices. using blakadder’s config.

I have several different esp based presence sensors (screek, athom, apollo, seeedstudio kit). The best in my opinion on accuracy/true positives/false positives are the screeks. I haven’t played much with the apollo one yet. The athoms are good enough and reliable enough that I put them to use right away with minimal tweaking to get the result I was looking for. I would recommend also looking into the screek products (I am using two 2A’s and one 1U). They don’t however have a PIR if that is something you specifically are wanting.

Thanks for sharing your experience! I was considering the screek devices for a time, then decided to just build the rest of my presence sensors using ESP32 boards and sensors from Ali Express.

The “homemade” presence sensors work well now, but required a LOT more tuning that the Athom sensor. Athom sensors work really well and require minimal setup. Glad to hear the screek are pretty good too. I believe the Apollo is highly rated & you’ll find that works very well too.