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

If the state is either ‘on’ or ‘off’ and not some third state, can’t you just replace the elif with an else?

If On, Then Off
Else (it can only be off so) Turn On

1 Like

How are you adjusting the dim value? If you have MQTT discovery enabled, the HASwitchPlate should create a dimmer device. When you send dim commands using that dimmer (or sending -t 'homeassistant/light/HASwitchPlate/brightness' -m 90) it will set the new dim value and save that as the new saved value.

You’re right. When the trigger.platform condition has been separated the service_template could now have Else instead of Elseif (which was not possible in my version of automation)

1 Like

Mine stopped for a few days now. It stuck on Initializing… I still haven’t have time to dig into it

I’m using all of your code and nothing fancy with the backlight object on the frontend. I honestly think what happened was the last command the display got was to turn the backlight off because I toggled it off from the frontend (dims=0) and a disconnect happened between the frontend and the display because no matter how many times I tried to set the display brightness or toggle the light switch from the frontend, nothing changed the brightness.

Still Stuck on Initializing! any Ideas? I checked wiring looks right.Tried changing page in HA, Can I just send a command via MQTT to show something?

For folks having trouble with the system stuck on “Initializing”, can you re-download the latest copy of the automations and configuration.yaml? Recent breaking changes in Hass renamed the input_slider component originally used to input_number, which broke the page change process I was using. The updated code for configuration and automation should resolve those issues.

1 Like

Do you have a sequence of events which you can execute to force this behavior? I’ve been trying to make it happen on my end with no luck. Using the auto-created dimmer I can set the brightness to 0 and the backlight turns off. Then dragging the slider to any other value turns the backlight back on. If you can re-create the process (and maybe post a mosquitto_sub log of the activity) it’d help with tracking down the issue.

I’m very interested to see how happy you are with this. I bought the screen, but haent had time to play with it… That and everywhere I want to put it is double gang. :frowning:

Either way, I am patient, but very excited by this.

1 Like

Ok, I’ve tried everything I can think of and here’s what I found. Most of it is just taking things as they are presented to me and not digging further. I just assumed when HA told me the brightness was 100% that it knew what it was talking about. I got it to happen again by turning off the display, unplugging/cycling power to the display and at the same time rebooting HA. In other words it was a perfect storm of conditions. When HA came back up it reported the screen brightness was 100%, but the screen was actually off. As soon as I touched the brightness, the display changed and came back.

Hello, this is e realy great work.
But how can i control this with Node-Red ?
Is there a example ?

You guys ROCK!!!

Ok figured it out I think? It appears to be the otaPassword I had put one in but no go and when removed it works fine. If I remember or can figure it out I’ll investigate why later. But for now let me play with this awesome Idea

Thanks @luma Awesome Work!

I’ve had mine mounted in the wall for a month and some change, and it works great. No issues with it locking up or otherwise requiring manual intervention. Rebooting my WiFi AP, Hass, or MQTT all results in the device retrying connections until it’s happy again.

I haven’t built out automation examples for other MQTT platforms but I am 100% confident this will work great w/ Node-Red. Take a look at the included Hass automation examples, the MQTT documentation, and the Nextion command reference to get an understanding of how to send messages to the device and how those messages are formatted.

Hi luma, it works fine with node-red, i can send and receive from the HMI,
i make a mistake with the topic :frowning_face:
Now i can explore all the possibilitys.

many thanks

1 Like

Will the HASP PCB board be available for sale/purchase? If so, how/when? :smiley:

Yeah so about that PCB… I kinda messed it up :} The footprint for the PSU was inverted, which actually still works if I invert all the other parts on the board, but I also have issues with the connectors fitting within the existing enclosure. I’m currently waiting for a couple phoenix-style connector options to show up from :cn: and then work on completely re-doing the PCB (but this time w/ the correct orientation on the PSU). I have discovered that I can export a completed PCB STEP file into STL which will let me 3d-print a test run to ensure everything fits like I should, so hopefully the next run will be my last.

Here’s the batch of 4 I ordered (PCBs.io sent 5 because they’re cool) with one assembled in it’s upside-down orientation. Note the connectors hanging off of the board.


Detail showing the WeMos and RADAR module, both mounted upside down:

6 Likes

Even with the mistakes, looks amazing.

Finally put it all together for a test drive!! Exceptional work coding it all & putting it all together

1 Like