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: