u-fire / ESPHomeComponents

Components for Microfire sensors that can be used in ESPHome and Home Assistant.
8 stars 7 forks source link

Send Data back from Home Assistant through ESP-Now-Bridge to sensor node #1

Closed Lukatus closed 3 months ago

Lukatus commented 3 months ago

Hi,

is it possible to send data from Home Assistant through ESP-Now-Bridge back to the ESP-Now-sensor? I'd like the sensor to know the state of a binary homeassistant entity, which prevents the sensor from entering deep sleep. How can I access these data at the sensor?

justind000 commented 3 months ago

Only sensor -> HA is currently supported. There has been quite a bit of interest in bi-directional communication, however it isn't on my list of things to do.

A bit of a roadmap would look something like this though:

So at a high level, it doesn't appear that complicated™, however I suspect in practice there will be a few bumps.

Lukatus commented 3 months ago

ah thank you anyway! Great work by the way. Do you have any other suggestion, how I can prevent the sensor from going into deepsleep so that I can upload new code? I want the sensor to be awake only for about 1-2 seconds. I dont think that will be enough for uploading

justind000 commented 3 months ago

Without knowing about your project, I would suggest using a pin if you have any available. Check if pinx is HIGH, if HIGH stay awake, if LOW go to sleep. This works well for development, but obviously not for updating a deployed device.