Attempting to design (simple) indoor/outdoor temperature monitoring device. I’ve assembled two ESP32 (Dev) boards with AHT20 temperature/humidity sensors. I envision the ‘receiver’ device#1 to measure indoor temperature, receive outdoor temperature from device#2, and report/display both values. Both devices appear to be working independently as expected.
Using ESPHome to build the yaml files. Pulled (what should have been) a simple set of instructions to implement ESPNOW from ESPHome.
It appears that my device#2 (Provider) is functioning properly. It reports temp/humidity as expected, but indicates failure to transmit data to device#1. I suspect device#1 to be configured incorrectly. Specifically, for device#1 (Consumer), packet_transport: providers: - name: The example says to use ‘Provider device name’, but this does not seem to work. Anyone got some insight on this?
outdoor-temp-xmtr file appears to validate, compile, and upload without incident. Below see partial results of log showing reporting of temperature and relative humidity, and Send failure.
On review, it appears that my files (submitted above) do not accurately reflect line indents critical to the yaml file. Below, please find a second attempt to post these (using </>) appropriately.
File for the Outdoor (intended as ‘Sending’) device…
You wrote that you were having validation errors with the receiver file, are those solved already? Because if your transmitter is sending to a receiver that’s not running, it is to be expected to get errors on the transmitter.
As for setup, from what I remember:
both transmitter and receiver have to declare each other as peer in the top-level espnow: configuration (using peers);
the transmitter should also set the peer_address in the ESP-NOW packet transport configuration;
Gents, thanks for the responses. Since I’m relatively low on the ‘learning-curve’, ‘Take a step back’ is excellent advice. My attempt to learn basic setup and communication protocols got me a bit tangled up. I think perhaps a ‘divide and conquer’ strategy may work better.
Currently, I have two ESP32 (Dev) equipped with AHT20 temperature sensors running (on my bench) as (#1) ‘Indoor’ and (#2) ‘Outdoor’. And, I have a single ssd1306 (128X64) display that works correctly with either device.
What I envision is my transmission of the outdoor temperature value from my ‘Outdoor’ (#2) device to my ‘Indoor’ (#1) device. And, my ‘Indoor’ (#1) device to display both the recorded indoor temperature and the transmitted outdoor temperature.
Before attempting to ‘blend’ my operational devices with ESPNOW communication protocol, I think it might be simpler (learning-curve-wise) to set aside my working operational code, and focus on simplified code for the ESPNOW communication protocol. Once that is working to my satisfaction, I can move forward to combining both operational components.
Any additional recommendations you have are appreciated. Meanwhile, I’ll come back to this string when I have an experimental sketch to work through.
OK, Planning on getting to better understanding of ESPNOW in a couple of steps.
STEP #1: Compile code on ‘Outdoor’ ESP32 to display simple text to my ssd1306.
STEP #2: Compile code to transmit ‘simple text’ from ‘Outdoor’ ESP32 to ‘Indoor’ ESP32.
Below please find a tentative sketch for STEP #1. There is nothing displayed when this is run. I suspect that although I have defined text_sensor: id:, I have not populated it; i.e., there is nothing to display. How do I populate my defined id: my_text_id?