I have continued playing with my M5stack. I now have it programmed to show 3 types of data:
I already posted about the weather forecast. This post is about the other 2 items.
My ESP32 in the garage has a PIR sensor as well as a DHT11. The PIR sensor is used to detect motion, which then initiates an automation to turn on the garage light. This has been super helpful, because we do not have to leave the garage light on: it always turns on when we enter the garage. The DHT11 provides temperature and humidity readings in the garage.
One of the reasons I wanted the M5stack was to be able to use it as a remote control for the house, and I have now achieved that. The code for this is a mess, but it can be found here.
I would prefer to use arrays for things like the names of the switches (both my "friendly name" and the Home Assistant name), and I would prefer to use array length to know when the last item is being viewed. I assume it is possible to do this in ESPHome, but I don't know how to do it yet.
In any case, I can now cycle through the lights, and I can control all but the garage light (because there's no need to control this one manually). This functionality was suprisingly easy to add tonight, and it is super cool: Now I can carry my M5stack, and push a few buttons to control the lights around the house.
I am a system engineer in the Raleigh, NC area. My main interests are Unix, VMware, and networking. More about me, and how I got started.