Hey everyone,
I recently installed Seeed’s mmwave human detection sensor with esphome at an office.
The sensor is connected to a home assistant instance over WiFi. I realized I forgot something in the esphome config and was wondering if I could upload a new yaml bin config into the sensor over the air through home assistant. Is this possible via the add-on esphome builder? I have remote access to their HA and their WiFi router.
I really don’t want to physically visit the place to update over usb. Installed yaml config does have
ota:
- platform: esphome
Yep, this will work. Only real issue is if the hardware would struggle with compiling; what device is HA running on?
HA is running on a 8gb rpi4. I installed the add-on. The esphome integration works fine and it shows sensor values. But the addon isn’t auto detecting the sensor? Not sure how this works. Here’s yaml that’s currently on the device, if it helps :
substitutions:
name: "mmwave2
friendly_name: "mmwave2"
esphome:
name: "${name}"
friendly_name: "${friendly_name}"
name_add_mac_suffix: true
project:
name: "mmwave.2"
version: "3.0"
platformio_options:
board_build.flash_mode: dio
board_build.mcu: esp32c3
# external_components:
# - source: github://limengdu/mmwave-kit-external-components@main
# refresh: 0s
esp32:
board: esp32-c3-devkitm-1
variant: esp32c3
framework:
type: esp-idf
api:
# Enable logging
logger:
hardware_uart: USB_SERIAL_JTAG
level: DEBUG
ota:
- platform: esphome
wifi:
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "mmwave2"
captive_portal:
# Sets up Bluetooth LE (Only on ESP32) to allow the user
# to provision wifi credentials to the device.
esp32_improv:
authorizer: none
# Sets up the improv via serial client for Wi-Fi provisioning.
# Handy if your device has a usb port for the user to add credentials when they first get it.
# improv_serial: # Commented until improv works with usb-jtag on idf
uart:
id: uart_bus
baud_rate: 115200
rx_pin: 4
tx_pin: 5
parity: NONE
stop_bits: 1
seeed_mr24hpc1:
id: my_seeed_mr24hpc1
text_sensor:
- platform: seeed_mr24hpc1
heart_beat:
name: "Heartbeat"
product_model:
name: "Product Model"
product_id:
name: "Product ID"
hardware_model:
name: "Hardware Model"
hardware_version:
name: "Hardware Version"
keep_away:
name: "Active Reporting Of Proximity"
motion_status:
name: "Motion Information"
custom_mode_end:
name: "Custom Mode Status"
binary_sensor:
- platform: seeed_mr24hpc1
has_target:
name: "Presence Information"
sensor:
- platform: seeed_mr24hpc1
custom_presence_of_detection:
name: "Static Distance"
movement_signs:
name: "Body Movement Parameter"
custom_motion_distance:
name: "Motion Distance"
custom_spatial_static_value:
name: "Existence Energy"
custom_spatial_motion_value:
name: "Motion Energy"
custom_motion_speed:
name: "Motion Speed"
custom_mode_num:
name: "Current Custom Mode"
switch:
- platform: seeed_mr24hpc1
underlying_open_function:
name: Underlying Open Function Info Output Switch
button:
- platform: seeed_mr24hpc1
restart:
name: "Module Restart"
custom_set_end:
name: "End Of Custom Mode Settings"
select:
- platform: seeed_mr24hpc1
scene_mode:
name: "Scene"
unman_time:
name: "Time For Entering No Person State (Standard Function)"
existence_boundary:
name: "Existence Boundary"
motion_boundary:
name: "Motion Boundary"
number:
- platform: seeed_mr24hpc1
sensitivity:
name: "Sensitivity"
custom_mode:
name: "Custom Mode"
existence_threshold:
name: "Existence Energy Threshold"
motion_threshold:
name: "Motion Energy Threshold"
motion_trigger:
name: "Motion Trigger Time"
motion_to_rest:
name: "Motion To Rest Time"
custom_unman_time:
name: "Time For Entering No Person State (Underlying Open Function)"
Did you redact your WiFi credentials, because you don’t have any listed.
If it’s unable to find the device when wirelessly flashing, you can add the ’ use_address’ parameter to tell it what IP address to flash to.
1 Like
Holy crap, that worked!
Thanks a ton!
Nope I didn’t have anything for wifi ssid and password to begin with - I figured it would be better deciding which network to connect to via the ap hotspot.
Also lucky that I have remote access to their HA. Hypothetically, if I didn’t, I’d have to connect using the WiFi their sensor’s connected to, right? I imagine this isn’t possible remotely?
Thanks again.
Also another quick question :
Now that I’ve uploaded the use_address: line, will the sensor always use the specified address when trying to connect to the network? We’ve essentially assigned to it a static ip with that line? I was considering reserving the IP on their router but since we’re already assigning an ip on the esphome yaml, guess i can skip that part
The use address piece just tells it to upload the firmware wirelessly to that address, it doesn’t make it a static address or anything like that. You can do that either in your router or by setting a static address in the YAML.
1 Like