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

This is really great. Can we have a night mode where hasp turns backlight on upon touch for like 20 secs and only executes button touches if the backlight is on?

I put the backlight condition in every hasp automation currently which is a lot of editing at the moment. Would this be easier with blueprints?

My HASP seems to work fine but I canā€™t get mqtt msgs out. I can see msgs coming in and I can change txt, colors, etc but if I press any buttons on the display ā€¦ nothing is seen via MQTT?.?.?

Any ideas on how to troubleshoot this?

Thatā€™s usually a pretty good sign that something is wrong with TX from the Nextion making its way to RX on the HASP.

Based on your username, I think you might have just purchased this device from me. If youā€™d like to tear the thing apart and troubleshoot connections, the wire of interest is the blue one between the LCD and the board. Itā€™s possible something got bumped around in shipping.

If youā€™d rather just swap it out and skip the troubleshooting, shoot me a DM here and I can arrange a replacement. I donā€™t want to waste your time troubleshooting a device that you bought and which should have made it to you in working order.

Work on the next HASP release continues! Several people have asked about page selection options, and I think I might have a solution that should meet most needs.

As noted before, all of the core HASP functionality has been collapsed into a single blueprint. The page select configuration workflow looks like this:

This works a lot like HASP has always worked, you have 3 page buttons and you can assign text, font, and destination page to each. Today Iā€™ve added an option to enable ā€œpage scrollingā€. This will do a few things.

First, the left-most page select button (button 1) and the right-most button (button 3) will scroll up and down through available pages. Pretty straightforward so far. In this mode, one might want to use icons instead of text for the labels, like this:

Next, there is now a configurable ā€œPage scroll listā€. Most users arenā€™t using every HASP page, so this list allows you to exclude unused pages from the page scrolling. Further, this list can be re-ordered as desired. Want to flip pages from 1 to 4 to 8 to 2 to 7, and then loop back around again to 1? No problem, just provide a comma-separated list of the pages and the order you want them to appear:

When using the scroll mode the middle button (page button 2) can now have a unique label for each page. With this you can use page button 2 to display the current function. Pressing page button 2 still brings you to the assigned page, so you can continue to use that as a direct page selection button. If you donā€™t want a bunch of different labels, just set the same label for each of the 12 pages.

Finally, a blueprint will be offered to assign page-select functions to any other button you want. Some users have been using page 6 as a page-select menu. Now, you can deploy a blueprint for each button with a text label which will bring the user to the selected page, or increment/decrement like the page scrolling buttons.

Iā€™m trying to avoid over-complicating things here, so the base defaults will work like they always have and you can feel free to ignore the rest of the options. Setting up a HASP out-of-the-box is now a few mouse clicks, and you can then browse through available blueprints, import the functions you want to use, and then deploy them to each HASP button.

3 Likes

I am French and do not know a word of English, but with google ā€¦ It is a little over 1 year since I discovered your exellent project. I am quite old, but very interested in everything. Completely beginning both in electronics and programming. Thanks to you, I succeeded in making me a device that works and allows me to have a great time. I wanted to thank you for your sharing and your advice. I am now very impatient to discover your new version.

3 Likes

Call for testers!

Iā€™m getting pretty good results with the planned updates for HASP and could use some help from an adventurous user or two.

This isnā€™t ready for release yet for a few reasons:

  • The current HASP firmware and blueprints make use of several features coming in the 2020.02 release. Youā€™ll need to be running a beta release of Home Assistant for any of this to work.
  • Performance is slow in some situations due to a large number of MQTT messages being processed. The major performance hit is going to persist until MQTT template triggers are available. An additional performance boost could be seen if this idea is implemented. The problems experienced are compounded with each HASP device added, so I wouldnā€™t recommend running more than one or two HASPs on the new codebase quite yet.
  • The entire codebase is still under development. Anyone looking to do some testing is going to have to deal with the fact that Iā€™m publishing new blueprints and changes to old ones several times a day.
  • No documentation has even been started yet. Fortunately, itā€™s all loads easier and I can talk you through it on Discord.
  • Finally, it needs more testing. Thatā€™s where you might come in :smiley:

If you think youā€™re up to it, come talk to me on Discord!

also I cannot thank @emontnemery enough for that PR Iā€™ve linked above. Itā€™ll be a critical enabling element to make this new approach for HASP users work fast and reliably. Weā€™ll all be in their debt once that PR is merged!

While Iā€™m asking yā€™all to do my work for meā€¦

Anyone who has worked with the source Nextion document on this project has likely discovered that we are pushing the limits of the memory available on the device. Adding new controls generally means removing something somewhere else. The primary issue is something called ā€œglobal memoryā€, which is essential to the core workings of HASP.

Page 11 has a single button on it, because we didnā€™t have enough memory to put much more than that. That page never was included in any of the core automations because I couldnā€™t think of anything to do with a single button.

Iā€™ve been working on an alternative solution for that page, one which could bring a much-needed function to HASP:

How about a color picker with a palette of available colors? The top-left button there is a normal button, that can toggle a light on and off. The slider to the right of that can handle dimming the selected light.

Below that are a bunch of colors. Normally this would take a bunch of memory, but there is a way to avoid that - instead of making those squares into button, we can provide an image file, display it on the screen, and capture x,y coordinates of touch events. I can then turn those x,y touch events into commands to set the color on a light.

Because these arenā€™t buttons, we cannot do things like changing the color of one of those buttons. What we can do however is to provide multiple palettes and switch between them.

So hereā€™s the part where I ask you questions and maybe to do things

First off - does this seem like a good idea? Did anyone have some amazing use for one big-ass button on page 11 and Iā€™m screwing everything up for you? Does having a color control seem like a waste of memory? Is there some better thing I could put there (which doesnā€™t involve anything likeā€¦ buttons, or controls. Just pictures at this point)?

Second - if anyone would like to change this color palette, or add additional colors to a new palette, grab the image below, edit it to include your ideas, and post the result here! The image size must stay the same, and boxes need to be in the same place as the existing one for this to work.

I donā€™t know if Iā€™d ever need a color pallet on hand, but being able to select white color temps would be very useful (though that could just be via a slider).

Is there any chance a backlight timeout / tap to turn on backlight without triggering underlying controls in the works for the blueprint release? Iā€™ve tried a few ways of doing it previously but havenā€™t been able to achieve it reliably.

Yup! Thatā€™s through the sleep command, there has been substantial work in the firmware to enable backlight state tracking + sleep to function like it should.

Because @kson asked so nicely:

4 Likes

Whoop Whoop! This is really great! Thank you!

Look what i ju

Look what i just got in the mail. No clue what to do with it thats were you smart pep come in.
its a wt32-sc01 3.5"

1 Like

:raised_hands: :raised_hands: :raised_hands:

@luma I assume you meant 2021.02 release? if so what else is needed for the blueprint release? Im dead keen to reflash my nextion for the speed increase and blueprints as I rebuilt my HA install a month or two ago and havenā€™t set it back up yet.

lol yup, I did in fact mean that. And hey great news itā€™s available! HMU on Discord if youā€™d like to kick the tires.

1 Like

So I havenā€™t been following the discussion about the new changes too closely, but from what I have seen, it is looking pretty good. Does any of these new changes involve a larger display? I am going to need to get two more units, but will be waiting until after the new release is posted and if a larger display is available, would like to use it.

The project is still focused on something which will fit within a NA-spec work box. The 2.4 PCB has less than 3mm between it and the screws which run into a standard workbox. As a result, the design isnā€™t going to allow for bigger displays.

The code however does allow for it, and others here have made it work. The blueprints arenā€™t keyed to display size, but one would need to make a ā€œbigā€ version of the HMI file in the Nextion editor to fit the larger screen.

Okay. To summarize what needs to be done for a larger display. The PCB and firmware does not have to change. The back part of the 3D printed in-wall case could stay the same, be the face plate for a larger display would need to be created. A ā€œbigā€ version of the Nextion file would also need to be created. Iā€™m guessing that the layout could be the same, but the coordinates would have to be adjusted for the larger display. I think I can handle all that. How is your supply of PCBs? Going to need to order a couple. :slight_smile: