mmWave human presence for under $20?!

Glad it’s working for you!

Seeed staff/support has already confirmed to me and others plus it’s in the docs… “somewhere” lol that the range is limited. Anything 100 or over on heart rate or 25 or over on resp rate is out of bounds but I’m not certain what that will show. Also the range of the BHA vs FDA radar is precisely 1.5 Meters vs 6.0 so that figures. I’ve seen it cut in/out at close to 2 Meters. The interesting thing about this, is that Seeed has also confirmed that the hardware is identical and the firmware is interchangeable (they didn’t quite say it like that) but that the price is higher on the BHA because of the different firmware, basically… you’re paying more for “software” and development costs that when into it. But of course they aren’t going to suggest, nor am I, that you simply swap firmware around. Anyway the interesting thing is that the basic functions of presence and movement seem to also be quite limited on the BHA since it’s only able to accurately detect at .4 to 1.5 M (it has not just a max but also a min distance) whereas the FDA can sense a flea crawling on a dog at 5.5M, well ok maybe not quite but it does detect very small movements. You can see this in my other repository:

It does seem like you’re getting what is intended for this sensor hardware with the Heart Breath firmware.

Thanks @DuncanIdahoCT for sharing your wisdom on this sensor. While its disappointing the HR/RR range and accuracy of this sensor is somewhat limited, I guess this is the beginning of a disruptive phase for touchless health metrics measurements. There are already cuff less blood pressure (BP) measurement devices. It would be nice if seeed exposed the raw readings from the sensor before their algorithms are applied to derive HR. Using more sophisticated algorithms and signal processing applied at the microcontroller level may yield better results. What I’m curios about is if the limitations are radar (hardware) or algorithm specific.
I must also explore other MMWave sensors for HR/RR. Remember seeing one from Germany that exposes the raw data (a lot more expensive though). The google soli based devices for instance (Nest Hub) are 24GHz and provide fairly accurate RR, but not HR.

This grafana histogram shows the 95th percentile distribution of HR/RR readings over a 24 hr. period in my living room. So exposed to multiple people in various conditions/activities (inc. exercising). As you can observe, the HR range is limited to 65-95, with a skew towards 85-90.

@DuncanIdahoCT, Agree. Noticed the less flappy presence on these.
I don’t have the FDA, but the following two, which I will test and report on.

The R24B is supposed to be able to measure sleep state and BR.
I have the DFRobot and have similar observation to you.

Hello,
I have exactly the same problem as Wijay. I have built 3 sensors with the presence detection lite modules. One of them works perfectly, the other two also worked at first, but then suddenly stopped sending data to home assistant. Unfortunately, I can’t get it to work again by unplugging and plugging in the 5v supply for the sensor. It would be great if there was a solution to the problem.

1 Like

Same problem as @Wijayw and schmaxi .

@SerenaLiang0320 could you please provide some help? followed the tutorial step by step , using described esp and sensor and nothing works.


No matter what i do, everything stays unknown. Also i cant set some of the properties as they were in some of your screenshots - below minimum value?

[18:46:35][C][mdns:108]: mDNS:
[18:46:35][C][mdns:109]:   Hostname: seeedpresence1
[18:46:35][C][ota:093]: Over-The-Air Updates:
[18:46:35][C][ota:094]:   Address: seeedpresence1.local:3232
[18:46:35][C][ota:097]:   Using Password.
[18:46:35][C][api:138]: API Server:
[18:46:35][C][api:139]:   Address: seeedpresence1.local:6053
[18:46:35][C][api:141]:   Using noise encryption: YES
[18:47:05][D][text_sensor:067]: 'Standard protocol type': Sending state ''
[18:47:05][D][text_sensor:067]: 'Standard Product ID': Sending state ''
[18:47:09][D][main:336]: text_sensor on_raw_value
[18:47:09][D][text_sensor:067]: 'Standard Product model': Sending state ''
[18:47:22][D][text_sensor:067]: 'Standard Firmware version': Sending state ''
[18:47:24][D][text_sensor:067]: 'Standard Hardware model': Sending state ''
[18:48:05][D][text_sensor:067]: 'Standard protocol type': Sending state ''
[18:48:05][D][text_sensor:067]: 'Standard Product ID': Sending state ''
[18:48:09][D][main:336]: text_sensor on_raw_value
[18:48:09][D][text_sensor:067]: 'Standard Product model': Sending state ''
[18:48:22][D][text_sensor:067]: 'Standard Firmware version': Sending state ''
[18:48:24][D][text_sensor:067]: 'Standard Hardware model': Sending state ''
[18:49:05][D][text_sensor:067]: 'Standard protocol type': Sending state ''
[18:49:05][D][text_sensor:067]: 'Standard Product ID': Sending state ''
[18:49:09][D][main:336]: text_sensor on_raw_value
[18:49:09][D][text_sensor:067]: 'Standard Product model': Sending state ''
[18:49:22][D][text_sensor:067]: 'Standard Firmware version': Sending state ''
[18:49:24][D][text_sensor:067]: 'Standard Hardware model': Sending state ''

My all attempt is also the same :slight_smile: UNKNOWN

[09:00:58][D][main:342]: text_sensor on_raw_value
[09:00:58][D][text_sensor:067]: 'Standard Product model': Sending state ''
[09:01:05][D][text_sensor:067]: 'Standard protocol type': Sending state ''
[09:01:10][D][text_sensor:067]: 'Standard Firmware version': Sending state ''
[09:01:46][D][text_sensor:067]: 'Standard Product ID': Sending state ''
[09:01:54][D][text_sensor:067]: 'Standard Hardware model': Sending state ''
[09:01:58][D][main:342]: text_sensor on_raw_value
[09:01:58][D][text_sensor:067]: 'Standard Product model': Sending state ''
[09:02:05][D][text_sensor:067]: 'Standard protocol type': Sending state ''
[09:02:10][D][text_sensor:067]: 'Standard Firmware version': Sending state ''
[09:02:46][D][text_sensor:067]: 'Standard Product ID': Sending state ''
[09:02:54][D][text_sensor:067]: 'Standard Hardware model': Sending state ''
[09:02:58][D][main:342]: text_sensor on_raw_value
[09:02:58][D][text_sensor:067]: 'Standard Product model': Sending state ''
[09:03:05][D][text_sensor:067]: 'Standard protocol type': Sending state ''
[09:03:10][D][text_sensor:067]: 'Standard Firmware version': Sending state ''
[09:03:46][D][text_sensor:067]: 'Standard Product ID': Sending state ''
[09:03:54][D][text_sensor:067]: 'Standard Hardware model': Sending state ''
[09:03:58][D][main:342]: text_sensor on_raw_value
[09:03:58][D][text_sensor:067]: 'Standard Product model': Sending state ''
[09:04:05][D][text_sensor:067]: 'Standard protocol type': Sending state ''
[09:04:10][D][text_sensor:067]: 'Standard Firmware version': Sending state ''
[09:04:46][D][text_sensor:067]: 'Standard Product ID': Sending state ''
[09:04:54][D][text_sensor:067]: 'Standard Hardware model': Sending state ''
[09:04:58][D][main:342]: text_sensor on_raw_value
[09:04:58][D][text_sensor:067]: 'Standard Product model': Sending state ''
[09:05:05][D][text_sensor:067]: 'Standard protocol type': Sending state ''
[09:05:10][D][text_sensor:067]: 'Standard Firmware version': Sending state ''
[09:05:46][D][text_sensor:067]: 'Standard Product ID': Sending state ''
[09:05:54][D][text_sensor:067]: 'Standard Hardware model': Sending state ''
[09:05:58][D][main:342]: text_sensor on_raw_value
[09:05:58][D][text_sensor:067]: 'Standard Product model': Sending state ''
[09:06:05][D][text_sensor:067]: 'Standard protocol type': Sending state ''
[09:06:10][D][text_sensor:067]: 'Standard Firmware version': Sending state ''
[09:06:46][D][text_sensor:067]: 'Standard Product ID': Sending state ''
[09:06:54][D][text_sensor:067]: 'Standard Hardware model': Sending state ''
[09:06:58][D][main:342]: text_sensor on_raw_value
[09:06:58][D][text_sensor:067]: 'Standard Product model': Sending state ''
[09:07:05][D][text_sensor:067]: 'Standard protocol type': Sending state ''
[09:07:10][D][text_sensor:067]: 'Standard Firmware version': Sending state ''
[09:07:46][D][text_sensor:067]: 'Standard Product ID': Sending state ''
[09:07:54][D][text_sensor:067]: 'Standard Hardware model': Sending state ''
[09:07:58][D][main:342]: text_sensor on_raw_value
[09:07:58][D][text_sensor:067]: 'Standard Product model': Sending state ''
[09:08:05][D][text_sensor:067]: 'Standard protocol type': Sending state ''
[09:08:10][D][text_sensor:067]: 'Standard Firmware version': Sending state ''
[09:08:46][D][text_sensor:067]: 'Standard Product ID': Sending state ''
[09:08:54][D][text_sensor:067]: 'Standard Hardware model': Sending state ''
[09:08:58][D][main:342]: text_sensor on_raw_value
[09:08:58][D][text_sensor:067]: 'Standard Product model': Sending state ''
[09:09:05][D][text_sensor:067]: 'Standard protocol type': Sending state ''
[09:09:10][D][text_sensor:067]: 'Standard Firmware version': Sending state ''
[09:09:46][D][text_sensor:067]: 'Standard Product ID': Sending state ''
[09:09:54][D][text_sensor:067]: 'Standard Hardware model': Sending state ''
[09:09:58][D][main:342]: text_sensor on_raw_value
[09:09:58][D][text_sensor:067]: 'Standard Product model': Sending state ''
[09:10:05][D][text_sensor:067]: 'Standard protocol type': Sending state ''
[09:10:10][D][text_sensor:067]: 'Standard Firmware version': Sending state ''
[09:10:46][D][text_sensor:067]: 'Standard Product ID': Sending state ''
[09:10:54][D][text_sensor:067]: 'Standard Hardware model': Sending state ''
[09:10:58][D][main:342]: text_sensor on_raw_value
[09:10:58][D][text_sensor:067]: 'Standard Product model': Sending state ''
[09:11:05][D][text_sensor:067]: 'Standard protocol type': Sending state ''
[09:11:10][D][text_sensor:067]: 'Standard Firmware version': Sending state ''
[09:11:46][D][text_sensor:067]: 'Standard Product ID': Sending state ''
[09:11:54][D][text_sensor:067]: 'Standard Hardware model': Sending state ''
[09:11:58][D][main:342]: text_sensor on_raw_value
[09:11:58][D][text_sensor:067]: 'Standard Product model': Sending state ''
[09:12:05][D][text_sensor:067]: 'Standard protocol type': Sending state ''
[09:12:10][D][text_sensor:067]: 'Standard Firmware version': Sending state ''
[09:12:46][D][text_sensor:067]: 'Standard Product ID': Sending state ''
[09:12:54][D][text_sensor:067]: 'Standard Hardware model': Sending state ''
[09:12:58][D][main:342]: text_sensor on_raw_value
[09:12:58][D][text_sensor:067]: 'Standard Product model': Sending state ''
[09:13:05][D][text_sensor:067]: 'Standard protocol type': Sending state ''
[09:13:10][D][text_sensor:067]: 'Standard Firmware version': Sending state ''
[09:13:46][D][text_sensor:067]: 'Standard Product ID': Sending state ''
[09:13:54][D][text_sensor:067]: 'Standard Hardware model': Sending state ''
[09:13:58][D][main:342]: text_sensor on_raw_value
[09:13:58][D][text_sensor:067]: 'Standard Product model': Sending state ''
[09:14:05][D][text_sensor:067]: 'Standard protocol type': Sending state ''

Hi,

i found solution for me. Disconect +5V from sensor and connect. After this step, works fine.
But is no good. This step should be performed every time after a power outage.

Hey Everyone, I am sooo sorry for missing your info, I already asked our technical support to check this thread, and recently we are releasing a questionaire to collect feedback about mmWave. And also, we received many feedback in our technical support team, I will ask our technical support to reply here. So sorry for the incovenience.

2 Likes

Hi Serena. Thanks for the info. Is there any update on this?

Hi, our application engineer already checked all feedback here, and he is already dedicated to fixing the bugs but has not achieved any progress yet. :pensive:
Please give us more time…

1 Like

Sure. Please let us know, when there is any progress.

Our team already has a long meeting to analyze the problems listed on the questionnaire and set up a to-do-list to fix them, will bring updates sooner…

Hi Serena, looking forward to the fix. Could you comment on another query I raised earlier.
How do we perform firmware updates on these mmWave radar sensors.

Thanks.

Hi Wijay, we had fully realized this problem since it has been brought up many times before, and our team is searching for solutions to debug it, please give us more time to test and to make it more stable. :fist:

As for the sensitivity issue and parameter settings, we will release a form in which we will list some recommended parameters and sensitivity settings for some common scenarios, such as bedroom, office monitoring, and warehouse monitoring, to make your using experience more convenient and time-saving. This form will be available at the end of next week. Stay tuned!

1 Like

Hi Wijayw,

Could you please share your yaml code on how you configured things?
As for the moment i get the xiao esp32c3 to boot correctly on my 1 try, esphome and HA does recognize it and the device is online.
I followed the seeed wiki.
But when I disconnect en reconnect to a usb power block the device seems to boot but doesn’t come online.
So I wonder how your yaml code looks like :smiley:

Thanks a lot,
Br Raymond

Hi Everyone, more detailed and friendly wikis are finally here! Our engineer wants me to say sorry to you all, we have tried our best to improve the wikis, and still, we welcome any more feedback and will keep improving.

  1. User Manual has been updated to Version 1.5, which splits into the standard mode, custom mode, and underlying open parameters lists.
    Note: when you want to custom the parameters, you need to check the underlying open parameter lists
  2. Add explanations about parameters and content that users care about, something like function, range, default value, and units
    Check here: https://files.seeedstudio.com/wiki/mmWave-radar/MR24HPC1_User_Manual-V1.5.pdf

More importantly!! We know that many of you have difficulty in sensitivity settings or finding a suitable parameter setting for your deployment environment, we have a table to list some recommended parameter settings for some common environments like bathrooms and offices.
Check here: https://files.seeedstudio.com/wiki/mmWave-radar/MR24HPC1_Quick_Setup_Template-V1.0.pdf

  1. Standard mode can fit most of your needs, check here

  2. for some users with more advanced requirements, check here

3 Likes

Anyone who are still confused by the sensitivity settings of mmWave, please check here: The $6.90 Human Static mmWave Module now includes parameter setting templates. What other features should it further introduce/develop? - #2 by ferbulous

Hi Raymond

Here’s my code.

xiao es32c3 yaml

esphome:
  name: xiao-esp32c3
  platformio_options:
    board_build.flash_mode: dio
    board_build.mcu: esp32c3
  includes:
  - R24dvd.h

esp32:
  board: esp32-c3-devkitm-1
  variant: esp32c3
  framework:
    type: esp-idf

# Enable logging
logger:
  hardware_uart: USB_SERIAL_JTAG
  level: DEBUG

# Enable Home Assistant API
api:
  encryption:
    key: "skqlTYVsUQXTx72MuSlCHZwkBObq87yfNoVQzm1yABC="

ota:
  password: "c9b9cf809e41066c36d3638e10a92427"

wifi:
  ssid:  
  password:  

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Xiao-Esp32C3 Fallback Hotspot"
    password: "xBreLShLQguj"

uart:
  id: uart_bus
  baud_rate:  115200
  rx_pin: 20
  tx_pin: 21
 
select:
  - platform: template
    name: "Standard Scene mode"
    id: scene_mode
    icon: mdi:hoop-house
    optimistic: true
    options:
      - "Living room"
      - "Area detection"
      - "Washroom"
      - "Bedroom"
    initial_option: "Living room"
    set_action:
      - logger.log:
            format: "set action option: %s"
            args: ["x.c_str()"]
      - uart.write: !lambda
                  auto index = id(scene_mode).index_of(x);
                  uint8_t value = (uint8_t)index.value() + 1;
                  uint8_t crc = value + 0xB9;
                  return {0x53,0x59,0x05,0x07,0x00,0x01,value,crc,0x54,0x43};

  - platform: template
    name: "Standard unmanned time"
    id: unmanned_time
    icon: mdi:timeline-clock
    optimistic: true
    options:
      - "None"
      - "10s"
      - "30s"
      - "1min"
      - "2min" 
      - "5min" 
      - "10min"
      - "30min"
      - "1hour"
    initial_option: "None"
    set_action:
      - logger.log:
            format: "Chosen option: %s"
            args: ["x.c_str()"]
      - uart.write: !lambda
                  auto index = id(unmanned_time).index_of(x);
                  uint8_t value = (uint8_t)index.value();
                  uint8_t crc = value + 0x37;
                  return {0x53,0x59,0x80,0x0a,0x00,0x01,value,crc,0x54,0x43};
 
  - platform: template
    name: "Custom Presence of perception boundary"
    id: custom_presence_of_perception_boundary
    optimistic: true
    options:
      - "0.5m"
      - "1.0m"
      - "1.5m"
      - "2.0m" 
      - "2.5m" 
      - "3.0m"
      - "3.5m"
      - "4.0m"
      - "4.5m"
      - "5.0m"
    set_action:
      - logger.log:
            format: "Chosen option: %s"
            args: ["x.c_str()"]
      - uart.write: !lambda
                  auto index = id(unmanned_time).index_of(x);
                  uint8_t value = (uint8_t)index.value() + 1;
                  uint8_t crc = value + 0xBF;
                  return {0x53,0x59,0x08,0x0a,0x00,0x01,value,crc,0x54,0x43};
 
  - platform: template
    name: "Custom Motion trigger boundary"
    id: custom_motion_trigger_boundary
    optimistic: true
    options:
      - "0.5m"
      - "1.0m"
      - "1.5m"
      - "2.0m" 
      - "2.5m" 
      - "3.0m"
      - "3.5m"
      - "4.0m"
      - "4.5m"
      - "5.0m"
    set_action:
      - logger.log:
            format: "Chosen option: %s"
            args: ["x.c_str()"]
      - uart.write: !lambda
                  auto index = id(unmanned_time).index_of(x);
                  uint8_t value = (uint8_t)index.value() + 1;
                  uint8_t crc = value + 0xC0;
                  return {0x53,0x59,0x08,0x0b,0x00,0x01,value,crc,0x54,0x43};
 
number:
  - platform: template
    id: sensitivity
    name: "Standard sensitivity"
    icon: mdi:archive-check-outline
    min_value: 0
    max_value: 3
    optimistic: false
    step: 1
    update_interval: 2s
    set_action:
      - uart.write: !lambda
                    uint8_t crc = x + 0xBA;
                    return {0x53,0x59,0x05,0x08,0x00,0x01,(uint8_t)x,crc,0x54,0x43};
 
  - platform: template
    name: "Standard Maximum detectable range of moving target"
    id: moving_target_detection_max_distance
    icon: mdi:map-marker-path
    unit_of_measurement: "cm"
    min_value: 0
    max_value: 65536
    step: 500
    set_action:
      - uart.write: !lambda
                    int h_num = (int)x >> 8;
                    int l_num = (int)x & 0xff;
                    int crc = 0xB6 + h_num + l_num;
                    return {0x53,0x59,0x07,0x01,0x00,0x02,(uint8_t)(h_num),(uint8_t)(l_num),(uint8_t)crc,0x54,0x43};
 
  - platform: template
    name: "Standard Maximum detectable range of stationary target"
    id: static_target_detection_max_distance
    icon: mdi:map-marker-path
    unit_of_measurement: cm
    min_value: 0
    max_value: 65536
    step: 500
    set_action:
      - uart.write: !lambda
                    int h_num = (int)x >> 8;
                    int l_num = (int)x & 0xff;
                    int crc = 0xB9 + h_num + l_num;
                    return {0x53,0x59,0x07,0x04,0x00,0x02,(uint8_t)(h_num),(uint8_t)(l_num),(uint8_t)crc,0x54,0x43};
 
  - platform: template
    name: "Custom Judgment threshold exists"
    id: custom_judgment_threshold_exists
    min_value: 0
    max_value: 250
    step: 1
    set_action:
      - uart.write: !lambda
                    int crc = 0xBD + (int)x;
                    return {0x53,0x59,0x08,0x08,0x00,0x01,(uint8_t)x,(uint8_t)crc,0x54,0x43};
 
  - platform: template
    name: "Custom Motion amplitude trigger threshold"
    id: custom_motion_amplitude_trigger_threshold
    min_value: 0
    max_value: 250
    step: 1
    set_action:
      - uart.write: !lambda
                    int crc = 0xBE + (int)x;
                    return {0x53,0x59,0x08,0x09,0x00,0x01,(uint8_t)x,(uint8_t)crc,0x54,0x43};
 
  - platform: template
    name: "Custom Mode Settings"
    id: custom_mode_settings
    icon: mdi:cog
    min_value: 0
    max_value: 250
    step: 1
    set_action:
      - uart.write: !lambda
                    int crc = 0xBB + (int)x;
                    return {0x53,0x59,0x05,0x09,0x00,0x01,(uint8_t)x,(uint8_t)crc,0x54,0x43};
 
  - platform: template
    name: "Custom Mode Settings End"
    id: custom_mode_setting_completed
    icon: mdi:cog
    min_value: 0
    max_value: 250
    step: 1
    set_action:
      - uart.write: !lambda
                    int crc = 0xBC + (int)x;
                    return {0x53,0x59,0x05,0x0a,0x00,0x01,(uint8_t)x,(uint8_t)crc,0x54,0x43};
 
  - platform: template
    name: "Custom Custom Mode Query"
    icon: mdi:cog
    id: custom_mode_query
    min_value: 0
    max_value: 250
    step: 1
    set_action:
      - uart.write: !lambda
                    int crc = 0x3B + (int)x;
                    return {0x53,0x59,0x05,0x89,0x00,0x01,(uint8_t)x,(uint8_t)crc,0x54,0x43};
 
  - platform: template
    name: "Custom Motion trigger time"
    id: custom_motion_trigger_time
    icon: mdi:camera-timer
    unit_of_measurement: "ms"
    min_value: 0
    max_value: 4294967295
    step: 5000
    set_action:
      - uart.write: !lambda
                    int crc = 0xC4 + (int)x;
                    int h24_num = ((int)x >> 24) & 0xff;
                    int h16_num = ((int)x >> 16) & 0xff;
                    int h8_num = ((int)x >> 8) & 0xff;
                    int l8_num = (int)x & 0xff;
                    return {0x53,0x59,0x08,0x0c,0x00,0x04,(uint8_t)h24_num,(uint8_t)h16_num,(uint8_t)h8_num,(uint8_t)l8_num,(uint8_t)crc,0x54,0x43};
 
  - platform: template
    name: "Custom Movement to rest time"
    id: custom_movement_to_rest_time
    icon: mdi:camera-timer
    unit_of_measurement: "ms"
    min_value: 0
    max_value: 4294967295
    step: 5000
    set_action:
      - uart.write: !lambda
                    int crc = 0xC5 + (int)x;
                    int h24_num = ((int)x >> 24) & 0xff;
                    int h16_num = ((int)x >> 16) & 0xff;
                    int h8_num = ((int)x >> 8) & 0xff;
                    int l8_num = (int)x & 0xff;
                    return {0x53,0x59,0x08,0x0d,0x00,0x04,(uint8_t)h24_num,(uint8_t)h16_num,(uint8_t)h8_num,(uint8_t)l8_num,(uint8_t)crc,0x54,0x43};
 
  - platform: template
    name: "Custom Time of entering unmanned state"
    id: custom_time_of_enter_unmanned
    icon: mdi:camera-timer
    unit_of_measurement: "ms"
    min_value: 0
    max_value: 4294967295
    step: 5000
    set_action:
      - uart.write: !lambda
                    int crc = 0xC6 + (int)x;
                    int h24_num = ((int)x >> 24) & 0xff;
                    int h16_num = ((int)x >> 16) & 0xff;
                    int h8_num = ((int)x >> 8) & 0xff;
                    int l8_num = (int)x & 0xff;
                    return {0x53,0x59,0x08,0x0e,0x00,0x04,(uint8_t)h24_num,(uint8_t)h16_num,(uint8_t)h8_num,(uint8_t)l8_num,(uint8_t)crc,0x54,0x43};
 
text_sensor:
- platform: custom
  lambda: |-
    auto my_custom_sensor = new MyCustomTextSensor();
    App.register_component(my_custom_sensor);
    return {my_custom_sensor->Heartbeat};
 
  text_sensors:
    - name: "Standard Heartbeat"
      icon: mdi:connection
 
- platform: template
  name: "Standard Product model"
  id: product_mode
  icon: mdi:information-outline
  on_raw_value:
    then:
      - logger.log: text_sensor on_raw_value
 
- platform: template
  name: "Standard Product ID"
  id: product_id
  icon: mdi:information-outline
 
- platform: template
  name: "Standard Hardware model"
  id: hardware_model
  icon: mdi:information-outline
 
- platform: template
  name: "Standard Firmware version"
  id: firmware_version
  icon: mdi:information-outline
 
- platform: template
  name: "Standard protocol type"
  id: protocol_type
  icon: mdi:information-outline
 
- platform: template
  name: "Standard moving direction"
  id: keep_away
  icon: mdi:walk
 
- platform: template
  name: "Standard Sports information"
  id: motion_status
  icon: mdi:human-greeting
 
- platform: template
  name: "Standard Presence information"
  id: someoneExists
  icon: "mdi:motion-sensor"
 
- platform: template
  name: "Custom Presence of detection"
  id: custom_presence_of_detection
  icon: mdi:signal-distance-variant
 

button:
  - platform: template
    name: "Standard reset"
    id: "reset"
    icon: mdi:reload
    on_press:
      then:
        - logger.log: Button Pressed
        - uart.write: [0x53,0x59,0x01,0x02,0x00,0x01,0x0F,0xBF,0x54,0x43]
 
switch:
  - platform: template
    id: output_info_switch
    name: "Custom Infor output switch"
    icon: mdi:electric-switch
    assumed_state: true
    turn_on_action:
      - uart.write: [0x53,0x59,0x08,0x00,0x00,0x01,0x01,0xB6,0x54,0x43]
      - delay: 1s
      - lambda: !lambda |-
          id(product_mode).publish_state("");
          id(product_id).publish_state("");
          id(hardware_model).publish_state("");
          id(firmware_version).publish_state("");
          id(protocol_type).publish_state("");
    turn_off_action:
      - uart.write: [0x53,0x59,0x08,0x00,0x00,0x01,0x00,0xB5,0x54,0x43]

sensor:
- platform: custom
  lambda: |-
    auto my_custom_sensor = new UartReadLineSensor(id(uart_bus));
    App.register_component(my_custom_sensor);
    return {
      my_custom_sensor->movementSigns,
      my_custom_sensor->inited,
    };
  sensors:
    - name: "Standard body movement"
      id: movementSigns
      icon: "mdi:human-greeting-variant"
      device_class: "temperature"
      state_class: "measurement"

    - name: "Standard inited"
      id: inited
      icon: mdi:all-inclusive
 
- platform: template
  name: "Custom Motion distance"
  id: custom_motion_distance
  icon: mdi:signal-distance-variant
  on_value:
    then:
      # - logger.log: Custom Motion distance on_value
      - logger.log:
            format: "Custom Motion distance on_value : %d"
            args: ["x"]
  on_raw_value:
    then:
      - logger.log:
            format: "Custom Motion distance on_raw_value : %d"
            args: ["x"]
 
 
- platform: template
  name: "Custom Static distance"
  id: custom_static_distance
  icon: mdi:signal-distance-variant

- platform: template
  name: "Custom Spatial static value"
  id: custom_spatial_static_value
  icon: mdi:counter

- platform: template
  name: "Custom Spatial motion value"
  id: custom_spatial_motion_value
  icon: mdi:counter

- platform: template
  name: "Custom Motion speed"
  id: custom_motion_speed
  icon: mdi:run-fast
1 Like

Hi Serena, thanks for the updated documentation.
Is there any update to the sensor not responding after a power cycle problem?
Surely, that would require a firmware update?

The Tuya ZY-M100 is currently on sale on AliExpress, until the 26th for their anniversary sale. Can be bought for $21.80. Here’s a review od the device, which turned out to be reliant and capable

Here is a comparisson article with another Tuya sensor (PS-HPS) and the Aqara FP1:

1 Like