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

Installed into the wall in a low voltage bracket (I’m using a 5V micro-USB power supply and feed the power under the outlet cover and up the inside of the wall to it). Glad I finally did this and it works great. I had the display, ESP8266, and cover but never put it anywhere. It’s in a nice central location of my house.

I know I brought this up before and I don’t remember what the cause is, but can you @luma explain to me again why the page does a double or triple refresh when it changes pages? Thanks!

1 Like

:star_struck:

The writeup below is still pertinent although input_slider is now input_number. The updated page flipping automation should address the issue.

1 Like

Hmmm, I have the latest pages automation yet it still refreshes the multiple times on page change. I’ve reloaded automations and restarted HA many times. In fact I’ve had that exact automation file since at least november 6th.

Hello. I have this working and its awesome. In terms of having multiple screens, would it just be a case of having the same on each screen, or is there an easy way of configuring it for multiple screens?

Would I have to have different automation files per screen?

You will need to change the value for mqttNode in the Arduino sketch to some new value, and then you can search+replace (make sure it’s Case Sensitive!) in your automations to replace “HASwitchPlate” (again - Case Sensitive!) with your new mqttNode value. Some of the automations such as HASwitchPlatePages.yaml will need a new copy that is dedicated to the second panel. Most of them could simply be modified to be triggered by messages from either panel and to publish MQTT messages to multiple panels. All automations will need to be either modified or modified+duplicated.

A thermostat “page”/tab/ui would also make sense to be added to this project…if someone is skilled with Nextions I’d be really interested :).

@luma absolutely amazing project. Just came across it today. Really well done.

I don’t have home assistant but I have a nextion that I’m using for some basic home automation and I’d love to install your enclosure in my wall.

Is the PCB available for download or can I order it directly from a pcb printing site?

I assume with the pcb and the bom I can send to a place like sunstone circuits and they’ll print the pcb and assemble everything?

Thanks!

Can I please get the pcb design?

Having some issues. I can change the active screen via home assistant, but everything is blank on the different boxes on most of the pages. Except for Page 2 which shows the time in the top, and day and probably the date (Can’t see since the box is too smal). When I try to change the input text/number in Hass nothing happens on the screen.

I’ve used all the code from git hub.

Any ideas?

Hi,

So some people in an Arduino forum were cautioning me against doing this project as described, saying that putting something like the Mean Well AC/DC converter onto a PCB like this is dangerous because there isn’t enough clearance or something, or distance from the DC portion.

Have people installed this project in their walls without issue? Can anyone speak to the safety of how it’s designed?

Thanks!

this is an “at your own risk” project. steps were taken during the design of this project by the maker to mitigate or prevent issues with high voltage and low voltage in the same enclosure and right next to each other. the problem comes when trying to stuff everything in a box. things could arc, things could short, smoke and flames could happen, but that’s true for anything that uses electricity. I decided to use an external USB 5V power supply and feed the cord inside the wall up to the screen for these reasons.

2 Likes

I have mounted mine in a wall, and I my house hasn’t caught on fire, but I do share the concern about affordance for voltage creepage.

Others have asked for a PCB, I took an initial swing at it only to find that the MeanWell PSU footprint I had downloaded was upside-down. That PCB design takes creepage into account and provides cutouts between the pins on the high-voltage side.

Unfortunately, I’m currently in the middle of a paid development engagement for some LoRAWAN-connected sensors that is taking up 100% of my spare cycles for the next month or so. That project shares some similarities (including that MeanWell supply - it’s so handy!) and the PCB work there should simplify the work on this project, but it will be a month or two before that happens. Until then - proceed with caution! Any time you’re monkeying with high voltage (even at very low current), you stand the risk of doing something dumb unless you know what to look for and what not to do.

Can you subscribe to the pertinent messages (homeassistant/haswitchplate/#) with an MQTT client and paste the results somewhere like hastebin, then share that here?

Not sure what I did, but all of a sudden it started working… =) Now everything looks the way it suppose to. Now I just need to figure out how to set it up everything according to my needs =)

New question, my temperature on the weather-plate shows the temperature without decimals (i.e. 2 C). If I check the sensor in HA it shows 2.2 C. I would like to have it with one decimal on the screen as well. Where to I have to modify to fix this?

Here’s what I did and I get the tenths digit. This is in the action section of the weather automation. It really depends on the sensor you’re reading/displaying and if it is giving you a value with a decimal place.

- service: mqtt.publish
  data:
    topic: 'homeassistant/haswitchplate/HASwitchPlate/command/p[1].b[6].txt'
    payload_template: "\"{{states.sensor.pws_temp_f.state}}F\""
    retain: true

I wanted to circle back to this and follow up on the issue I was having. It appears to be an issue with the built in MQTT broker in HA (or at least the docker image). Once I switched to an external MQTT broker (Mosquitto) in another docker container, the double/triple refresh of the page went away and responsiveness of the display increased. There was nothing wrong with the automation code, just the MQTT broker itself.

Weird! I’ve been using a mosquitto container from the get-go. I wonder if I should be troubleshooting against the built-in broker…

I love this and my screen arrived today, hooked up to a nodemcu and within 30 minute I am up and running. Dimming lights etc… But I have a problem I cannot work out. I used your text directly and changed for my lights but the tabs at the bottom all show as “unknown”

Any idea what I need to change please?

Cheers
Mark

If you’ve copied the configuration.yaml you should have 3 input_number sliders and 3 input_text fields. Try entering text into each of those 3 input_text fields and then power cycling the panel.