HA SwitchPlate HASPone: DIY In-Wall Touchscreen Home Assistant Controller

Work on the power supply protoboard and rear enclosure design is progressing and my printer is running what should be a usable version for mounting. I’m going to hold off on the relay for a spell, as they only way I can see to safely make that happen will require a custom PCB as I don’t feel like a protoboard is going to be safe for 15A/120VAC loads.


It’s very nice. I can’t for the final product. In the meantime, i was trying to playing around with the initial release of your code, for some reason I cannot get the lcd to boot up.

Very nice. Is it possible to have the black background with yellow text? This is especially during night time as the blue light can cause human’s eyes to wake up. In case anyone does not know, white is comprised of red, green, and blue mixed together. If blue is eliminated, it becomes yellow.

Also, what’s that two-line blue display that I saw when you are showing a new project that you’ve been working on?

1 Like

Confirm you have the ESP8266 pin you’ve defined with SoftwareSerial as “TX” in the sketch connected to the “RX” pin of the LCD and ESP8266 “RX” pin connected to LCD “TX” pin. Also, if you aren’t using the included HMI file your panel will be running at 9600 while the micro is running at 115200. In the included HMI file, page 0 has a preinitialize event of bauds=115200 which will set and save the highest available data rate (helpful as we’re moving more data than a traditional Nextion system might). This only needs to be run once as the value is saved for future boot cycles. The pre-included Nextion UI should already have this, so you can copy the TFT file to an SD card, boot the panel once, and it should then work.

Yes, using the provided UI code you can send MQTT commands from Hass to change the background/button/font colors and could further do so via a time trigger, although writing such an automation would likely involve a long script if you wanted the transition to be gradual (like f.lux for your wall).

APC G5, basically an overpriced power strip. Looks nice on my desk though :sunglasses:

Thank you for your reply, i’ll give that a try.

Quick question; is the software made for any model of Nextion LCD?

This looks amazing. Fantastic work. I’ve been wanting something like this since I first started messing around with home automation ~5 years ago.

I would need it to work in a typical multi-gang decora face plate though – the places I would use this all have existing switches. If it could do that, I would probably pay $150-$200 for one.

The ESP8266 is running Arduino code that for the most part is acting as a gateway between MQTT and the Nextion command language, allowing Home Assistant to send Nextion commands to the panel. As a result, the Arduino code for the ESP8266 should support any Nextion panel. Designing an enclosure for other sized panels is left as an exercise for the user :smiley:

2 Likes

First, thanks for the kind words. I also had been waiting for something like this to come on the market in a platform-agnostic manner (the Wink Relay was so close!) but eventually decided I’d have to make one if it was going to happen.

In regards to the multi-gang Decora requirement, can you explain a bit about what you think that should look like? Are you talking (one/two/three) Decora cutouts + one LCD panel?

Ok, i copied the nextion ui to an sd card, but i’ve got an error saying that the screen mode i’m using is not compatible with the code. My Nextion LCP panel model is: NX3224K024-011

That is the Enhanced model which will not work with the pre-compiled TFT file. Fortunately you can compile the provided HMI file and upload it directly using the Nextion Editor.

You can download the editor (sadly, Windows-only) here.

Here’s a guide on how to work with that tool.

thank you very much. Don’t work i’ve got windows, mac, and linux pc

This is amazing!! props to you!

I took some more potato pictures of some demonstration automations. What’s most shameful about these photos is that my wife is a professional photographer and I should know better.

Media player using the WebDings font for control icons and demonstrating auto-font sizing (an ugly hack but it works):

Monitoring head (red) and bed (blue) temps on my 3D printer running a job:

When rapid prototyping gets out of hand:

5 Likes

Yes, I just mean putting it in like any other switch into a multi-gang switch panel. For example, in my basement, I have a triple-gang switch panel. One of those “switches” is just a z-wave accessory switch that doesn’t connect directly to a light, I just use it with Home Assistant automation to turn on and off all the lights in my basement (I have like 9 switches around the basement, this is a shortcut).

I would love to use something like this to swap out that switch, so I have an LCD panel with scenes, plus two regular decora switches, all in the same faceplate.

I have a similar situation upstairs, where I would replace an existing switch with this LCD panel or extend the box to accommodate a 4-gang faceplate, with one of the “switches” being this LCD.

1 Like

Hello, would you mind sharing the details on the 5v power supply you are using?

Thanks

I’ve finally received a handful of these Mean Well supplies and they are great. Mean Well is a well-known company and the unit itself fits perfectly on a 40x60mm protoboard.

1 Like

This is awesome work. It is exactly whst i have been researching for the past few weeks. Will have to try this out. Thanks for sharing

I’ve completed initial work on the back half of the enclosure to fit the protoboard with PSU and microcontroller:

I’ve also renamed the project to something that shouldn’t step on anyone’s trademark and have posted some minor Arduino code changes along with substantial work on the Home Assistant automations, all of which you can find at the new GitHub repo linked in the OP.