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

Allright! Spent the last 3 hours on the phone with a couple of HASP users chasing down some problems and I want to report back (and then probably write up a FAQ).

First problem: blueprints will import but cannot be executed (nor saved)
Root cause: The line automation: !include automations.yaml had been commented out in the configuration.yaml. The result is the the GUI could not be used for deploying or modifying automations. Blueprints require being able to interact with the file automations.yaml, so if you disable that in your Home Assistant configuration, you are disabling all Blueprint functionality.
Solution: Leave the line automation: !include automations.yaml in your configuration. If you want to still use YAML for editing automations, either add your existing automations into automations.yaml, or create packages.

Second problem: HASP cannot reach MQTT
Root cause: Network partition.
Solution: Make sure all wired and wireless network devices are able to communicate with each other. Once we straightened out the network, and devices could communicate, then MQTT works as expected. I’ll try and see if I can’t get better status messages shown to the user to help indicate something like this.

Well done!

Are your settings saved across reboots now?

I was only scratching the page 8 comment, ie mqtt was not working. And still isn’t after the new firmware.

Can you try grabbing this flash tool, select your Serial port, the current dev HASP bin, and check “yes” for erase flash.

Haven’t forgotten about you @garrettbeachy!

I just pushed a new version of the Toggle blueprint which brings a couple major changes:

  • You can now define either a state or an attribute to track to determine if something is “on” or “off”
  • I’m now using an Action selector to allow you to determine which action(s) to take in order to make something “on” or “off”.

OK, so how do we turn that into a fan controller?

For a “speed” button (low/medium/high), the fields should be configured like this:


That’s creating a “low” speed button. We want to track the attribute “speed”, and consider this button to be “on” when “speed” matches the text we’ve entered: “low”.

For our “on” action we tell the automation to send a couple of service calls (this works just like creating a regular automation). We send a fan.turn_on, followed by a fan.set_speed with speed: low

For the “off” action, we do the same thing, but with fan.turn_off and fan.set_speed with speed: off

In this example, we want to show the text “low” regardless of the device state, so just enter “low” for both text fields.

“High” and “medium” are duplicates, with the button number changed and the various references to “low” changed to “medium” or “high”.

Off works the same, except we flip the on/off condition. We want the “Off” button to be highlighted when the device is “off”. So, we set it up to function like the low/medium/high example above, but with the on/off conditions reversed, like this:


Then I just use a more normal configuration for a light toggle on top for button 4, and you have yourself a ceiling-fan controller w/ a light on/off toggle plus 4 buttons to control the speed:


The “toggle” blueprint is pretty powerful and with a little creativity you can make it work in a heck of a lot of use cases!

3 Likes

Finally got an alarm panel blueprint ready to go!

The blueprint allows you to select the target alarm system, the length of your code, and the action to take when the user presses “arm”.

Code entry rolls over like a regular alarm panel. So, if you have a 4-digit code set on your alarm panel of “1234” (like my luggage) and you mis-type one of the digits, you can just re-key the whole thing without needing to backspace or whatever.

2 Likes

Very nice!

Thanks for this! Turns out you can simplify it a bit, because calling fan.set_speed also turn on the fan, and calling fan.turn_off sets the speed to “off”. So no need to make multiple service calls!

I apologize for the following dumb question but…

I am in process of completely gutting my very old kitchen (not me, my contractor) and, among other things, rewiring to be completely up to code. If I want my electirical to create a switch box solely for the purpose of connectingh a HASP, what do I tell him to do? It will be a “dummy” box that is not needed to control any lights since it will be created just to host the HASP. Thanks for any help!

Just mains power to it.

How did you make this , i will love to see what and how can you show it somewhere more about it please , it looks so nicely done ,and i wood like to be able to make it to.

I am using Fusion 360 for the design and 3D printing it. So far I have just modified the existing nextion code to fit the display. There are a couple other pictures showing it. My idea is to do a custom layout using the blueprints. Using the display in landscape mode, I can fit a row of buttons on one side for menus and do the equivalent of two displays.

image

1 Like

So basically it’s an outlet, not a switch? I just tell the electricial to wire it up as if for an outlet but to put a blank cover on it?

Two other, possibly dumb, questions:

  1. I know the HASP supports multiple pages but I didn’t see how you swipe to see one of the other defined pages.
  2. I see that the firmware is periodially updated. Are the firmware upgrades idiot-proof?

To be clear, I’m a techie and have been in software for years. I am not, however, a hardware guy. I am writing support for some new integrations and I can configure and customize HA but I don’t know squat about hardware. Thanks.

Correct! If you have a hot and a neutral you should be all set.

There a 3 configurable page-select buttons on the bottom of each screen, as shown below. You have a lot of options there, they can be assigned to directly switch to a given page, or to “scroll” through the list of available pages. The text + font + icons displayed on each button is also configurable

Firmware updates are typically a one-click affair in the web admin page hosted on the device itself. The device periodically checks github to see if an update is available, and can optionally update itself when that happens.

This really is great. My question is how to get two buttons on one row. I know it’s the simple things.

The page layouts are fixed (but if you really want to dig into it, they are in fact editable but you’re going to need to write your own blueprints). Here is a map of available page layouts you can choose from without having to do any development work:

Thanks. I had to redefine a light into a fan and saw the example above.

Some troubleshooting this weekend has had me dig into how better to help the user diagnose connectivity issues. Failed MQTT connection attempts now collect ping and port response information and display the results:

I’ve also made some changes to provide a little more idle time in the retry loop to allow the user to modify settings through the web admin page while MQTT is trying to connect.

5 Likes

I have been trying to keep up with your changes and testing. My HASP is connected through the USB port only. I am having major connection issues. It seems to disconnect from WiFi shortly after connecting to the MQTT broker. Willing help if there is anything I can test out,