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

I’ll check this for you today. Was busy this weekend out at some autocross events so I haven’t even touched a computer all weekend. My auto update should have run so it should be all up to date.

I like the idea and I just bought another 3-pack of Sonoff basics the other day. The Sonoff just has extremely limited memory and storage space… but I’ll try it out and see if I can figure out what the demands of the program actually is. This might work!

FYI no more reboots when changing brightness on a fresh reboot, at least so far!

1 Like

I happened to notice after the latest HASP update, seeing the following in the home assistant error log whenever the HASP publishes a status topic update.

No matching payload found for entity: plate01 Connected with state_topic: hasp/plate01/status
‎8‎:‎21‎ ‎AM components/binary_sensor/mqtt.py (WARNING)

It’s not super simple to figure out which variable is having the payload issue. I tried added the status JSON parameter to the main status sensor but that didn’t seem to correct it. Thoughts?

Getting the same WARNING

Its to do with HA and the mqtt.py

I think the mqtt.py over thinking the topic (thats my understanding of it).

Have put a Feature Request in.

plz comment on that topic if like of dislike the Idea

hello wonderful people in this group , i have one question its regarding yaml and mqtt which is not related to this topic but i have been wanting help from so many days posted in so many different related topics no one responds will be very helpful if any one here can help and no one kicks me out for asking things like these here sorry you guys dont have to as its not topic related here goes,

i have a dimmer this its audrino code i can get the dimmer to work on off commands but the devloper insists mqtt payload needs to include the word Dimmer:50 but to my knowledge pay load has to only be words numeric value is sent thru slider

scovered through the internet some one with openhab had same dimmer with same problem but some one helped in community and solved his problem https://community.openhab.org/t/mqtt-dimmer-command-payload-help/39337

the arduino code shared by dev is

for (i = 0; i < length; i++) {
buf[i] = payload[i];
}
buf[i] = ‘\0’;
String msgString = String(buf);
Serial.println(" message: " + msgString);

if (msgString.substring(0,6) == “R13_ON”)
{
Serial.println(“Dimmer:99”);
}
else if (msgString.substring(0,7) == “R13_OFF”)
{
Serial.println(“Dimmer:0”);
}
else if (msgString.substring(0,6) == “R14_ON”)
{
Serial.println(“R_1 switched via web request to 1”);
}
else if (msgString.substring(0,7) == “R14_OFF”)
{
Serial.println(“R_1 switched via web request to 0”);
}
else if (msgString.substring(0,7) == “Dimmer:”)
{
Serial.print(“Dimmer:”);
Serial.println(msgString.substring(7,9));

this is my yaml entry

platform: mqtt
name: “test light”
command_topic: “bruno”
state_topic: “bruno”
payload_on: “R13_ON”
payload_off: “R13_OFF”
brightness_command_topic: “bruno/Dimmer”
brightness_state_topic: “bruno/Dimmer”

tried with “bruno/Dimmer:”
the developer keeps saying payload command is Dimmer:xx

this is the whole story , please help TIA

is it necessary that automations remains in the packages folder can’t we use use entties and do new automations like we would i understand editing old ones makes it easier

also @luma do you have STL for snap on front plate with no screws in front just to hide screws will like to give it a try if its there

Thank you

I don’t really understand what that project is all about and the GitHub page doesn’t tell me anything useful (and I don’t want to sideline this thread) so what I’ll offer is this: Hass can send nearly any MQTT message you tell it to. Check the docs on using mqtt.publish here and how Jinja2 templates can be deployed here. If you have specific questions relating to how Hass can send a specific message, you’ll probably find help here in the forums or in the official Discord chat for Home Assistant here.

You are free to setup the automations any way you like! I am distributing them using packages for a bunch of good reasons, but feel free to tear into them and modify at will. The one downside is that it will be difficult for others to answer questions about your own setup if you get too far off the path, so understand that doing so is going to require that you take ownership of the environment from that point forward. So long as you’re OK with that, there’s no technical reason you couldn’t or shouldn’t put the automations where you feel they would work best for you.

Snap-fit front plates aren’t in my current to-do list but the source 3D models are available and usable in the free edition of SketchUp if you’re interested in making changes for your own use!

@Daemonic Did you manage to get any further with this? I’m looking for solutions for mounting in the UK.

@luma How can I execute the deployhasp.sh if I don’t actually have access to a full CLI (I’m using HassIO). Is there something else I can do? I have access to the filesystem, I just can’t run very many commands.

The deployhasp.sh script does two things:

  • downloads hasppackages.tar.gz and extracts it to the packages folder under your hass installation
  • renames the files and does a search/replace on everything inside the files from plate01 to a new device name provided by the user

So, you can download that same file and extract it into your hass.io installation under packages and so long as your one HASP device is named plate01 (the default name), then it should work without further modification. If you want to deploy additional devices in your environment (or if you want to rename the one you have), you’ll either need to figure out a way to run that script or handle the file and contents renaming manually.

At some point I’m probably going to have to learn how hass.io works on a test system somewhere as the topic keeps coming up. I know others here in the thread have successfully deployed this under hass.io so I know it works, but I’ve done nothing to simplify or document the process for this project which is something I probably should be doing.

Thanks for responding so fast. I have almost got everything perfect. Just one item: I know the screen is connected to MQTT because I can send commands to change text, press buttons, etc. but it doesn’t seem to be sending states back when I press buttons on the screen itself. I am testing with mqtt-spy. Any advice?

Edit: Lol nvm its working just fine I’m just dumb. So you route the incoming mqtt messages to trigger automations within HA? Sounds good to me thanks for all the help.

Edit2: Is there a way to get a button to stick ON/OFF, rather than be ON when pushed and OFF when let go?

Yes, there are several ways to make something like that happen, all of which are going to take some work on your side. You can modify the Nextion HMI and upload your modifications to the panel if you want to try working with the Nextion HMI editor. Alternately, you can use Home Assistant automations to change the color of the button in response to the changing state of the light (so, send a command to make the background of the button dark when the device is off, or light when it’s on). See the hasp_plate01_p0_PageButtonColors for an example of what that might look like.

OK these colors are seriously cool. I did some with changing text for different states too. I wonder what this thing can’t do.

Images at this point of time for what it can do Im more than happy with it

I am using the touch panel and code from this post but I am substituting a NodeMCU and microusb power supply. I want to test that everything works as I want with what I have on hand, then I will invest into the actual setup. Anyway, I had everything setup perfectly last night (touch buttons toggle lights, motion sensor to trigger backlight, etc.) However, I woke up this morning and there seems to be a disconnect between the panel, NodeMCU, or HA. Looking in HA it says the panel is connected and status is good, but toggling the backlight switch doesn’t turn on the backlight. In addition, I can press buttons on the panel but they don’t toggle the lights as they did last night. During these events I can see the LED lighting up on the NodeMCU indicating wifi transmission. I’ll need to check if the events are being received by HA after work, but I think since the backlight switch isn’t working the answer will be no. Has anyone had this issue before?

Yes. Go into the light component in HA and drag the brightness all the way down then all the way up. If that doesn’t fix it, it sounds like your MQTT server is not responding or working properly.

Darn that didn’t work :frowning:I tested the MQTT messages that are supposed to be coming from the ESP8266 using MQTT spying apps and it doesn’t detect anything so for some reason the chip just stopped sending or receiving MQTT messages even though the led still blinks.