Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to make it work [newbee & confused] #124

Open
grego1981 opened this issue Apr 7, 2022 · 0 comments
Open

Trying to make it work [newbee & confused] #124

grego1981 opened this issue Apr 7, 2022 · 0 comments

Comments

@grego1981
Copy link

grego1981 commented Apr 7, 2022

Describe the bug
I'm trying to implement the solution, the presense detection is most inaccurate and cannot fully understand how to tune it, ROI area eludes me, what does it refer to and how to measure the correct one for each use?
The sensor is mounted in a door opening of 80cm and the sensor is in the middle of the frame. It detects the distance as 2200mm instead of 800-900 which will be the logical one. Nevertheless when passing in fron of the sensor numbers change but the counter is rarely working correctly either by direction or even as number of passes.

Below my config for ESPHome, following the readme and some yml files in the repository. Any help or insight more than welcome!

substitutions:
devicename: mbedroomprsensor
friendly_name: $devicename

external_components:
refresh: always
source:
type: git
url: https://github.com/Lyr3x/Roode
ref: master

esphome:
name: $devicename
platform: ESP8266
board: d1_mini

wifi:
networks:
- ssid: !secret ssid1
password: !secret ssid1_password
use_address: $devicename
fast_connect: True
power_save_mode: none
domain: .local

api:
password: admin
reboot_timeout: 60min
services:
- service: recalibrate
then:
- lambda: "id(roode_platform)->recalibration();"

ota:
password: admin

web_server:
port: 80
auth:
username: admin
password: admin

logger:

i2c:
sda: 4
scl: 5

vl53l1x:
calibration:
ranging: auto

roode:
id: roode_platform
sampling: 2
orientation: parallel
roi: auto
detection_thresholds:
min: 0%
max: 50%
zones:
invert: false
entry:
roi: auto
exit:
roi: auto
detection_thresholds:
min: 0%
max: 90%

button:

  • platform: restart
    name: $friendly_name Restart
    entity_category: config
  • platform: template
    name: $friendly_name Recalibrate
    on_press:
    • lambda: id(roode_platform)->recalibration();
      entity_category: config

number:

  • platform: roode
    people_counter:
    id: counter
    name: $friendly_name people counter

binary_sensor:

  • platform: status
    name: $friendly_name API Status
  • platform: roode
    presence_sensor:
    name: $friendly_name presence

sensor:

  • platform: roode
    id: mbedroomprsensor
    distance_entry:
    name: $friendly_name distance zone 0
    filters:
    - delta: 100
    distance_exit:
    name: $friendly_name distance zone 1
    filters:
    - delta: 100
    max_threshold_entry:
    name: $friendly_name max zone 0
    max_threshold_exit:
    name: $friendly_name max zone 1
    min_threshold_entry:
    name: $friendly_name min zone 0
    min_threshold_exit:
    name: $friendly_name min zone 1
    roi_height_entry:
    name: $friendly_name ROI height zone 0
    roi_width_entry:
    name: $friendly_name ROI width zone 0
    roi_height_exit:
    name: $friendly_name ROI height zone 1
    roi_width_exit:
    name: $friendly_name ROI width zone 1
    sensor_status:
    name: Sensor Status

  • platform: wifi_signal
    name: $friendly_name RSSI
    update_interval: 60s

  • platform: uptime
    name: Uptime Sensor
    id: uptime_sensor
    update_interval: 60s
    internal: true
    on_raw_value:
    then:
    - text_sensor.template.publish:
    id: uptime_human
    state: !lambda |-
    int seconds = round(id(uptime_sensor).raw_state);
    int days = seconds / (24 * 3600);
    seconds = seconds % (24 * 3600);
    int hours = seconds / 3600;
    seconds = seconds % 3600;
    int minutes = seconds / 60;
    seconds = seconds % 60;
    return (
    (days ? String(days) + "d " : "") +
    (hours ? String(hours) + "h " : "") +
    (minutes ? String(minutes) + "m " : "") +
    (String(seconds) + "s")
    ).c_str();
    text_sensor:

  • platform: template
    name: $friendly_name Uptime Human Readable
    id: uptime_human
    icon: mdi:clock-start

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant