Can one ESPHome control another ESPHome device?

Is it possible for one ESPHome device to control another, to read its sensors or to press its virtual buttons? What’s the best way?

Background

I’m making a humidor for 3D printer filament. It consists of a dehumidifier in a cabinet. For wiring and modularity reasons, I’m thinking it should have two ESP32s, one for the dehumidifier and one for the rest of the cabinet.

The dehumidifier will run a cooler and export humidity level, power consumption, etc., but it should be mostly noninteractive.

The cabinet will have door sensors, more humidity sensors, circulation fans, lighting, an LCD display, and maybe some more bells and whistles. I would like the cabinet to display the dehumidifier’s sensor values and to turn the dehumidifier on and off (e.g., when the door is open).

I intend to release the design, and I want to make it feasible for other people to have:

  • dehumidifier standalone
  • dehumidifier under Home Assistant
  • dehumidifier under cabinet control, no HA
  • dehumidifier and cabinet under HA

I guess the third case is the hard one. Is it feasible/reasonable?

Possibly with this component: HTTP Request — ESPHome

There’s an example of an ESP light and an ESP remote here: ESPHome to ESPHome direct communication? - #7 by keex

1 Like

Yeah, that looks like exactly the right thing. Thanks.

I’m wondering about the hardcoded IP address in the example, but I’ll worry about that after I’ve built the hardware.