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

hi,

i was installing a fresh instance of hassio and then i pasted the packages folder and made changes to HA like when i previously installed but this time check config is giving me this error and i cannot find a solution to it

config for [automation]: required key not provided @ data[‘action’]. Got None
required key not provided @ data[‘trigger’]. Got None. (See ?, line ?). Please check the docs at https://home-assistant.io/components/automation/

TIA -

EDIT- moved all the automations into the automation.yaml main file and to format a lot now its working automations inside packages doesn’t seem to work for HASSIO 0.78

@luma - Any idea when you’ll have more premade devices?

So, I totally failed at getting the MFRC522 working via serial… I’ve purchased a different reader (PN532) and have been successful in getting this working using the SoftwareSerial library.

If you don’t mind (I don’t want to de-rail this thread!) - Can you advise if my approach is the best way to integrate something like this to HASwitchPlate code ?

I’m thinking of adding a new condition to check for within :-

void mqttCallback(String &strTopic, String &strPayload)  

for something like

(strTopic == (mqttCommandTopic + "/rfid"))

With a payload of either read or write (to allow me to program new fobs/cards)

In normal operation I envisage a button on the nextion alarm panel for ‘RFID’ touching the screen should fire a ‘read’ command to this topic, which the above would respond to.
In this function I’ll await a card to be detected for max 5 seconds and fire sendNextionCmd to show a timeout/success/failure page.

Does the above sound the correct approach ? - I’m slightly concerned about blocking any of the original code, since i’m fairly new to this…

1 Like

Looks about right! This sounds really cool, I’ll be interested to hear how it goes.

I’ve been working on a new release and got sidetracked by (what I presumed was) a horrible bug in my new MQTT connection code. Instead, it appears to be a bug in the latest releases of Hass that has yet to be resolved.

This bug only impacts people using the embedded mqtt broker hbmqtt. If you’re running your own MQTT broker (mosquitto, et al) you shouldn’t have a problem.

You can install a different version of hbmqtt with pip3 install hbmqtt==0.9.2 and that will work for one hass session, but hass will automatically upgrade when it launches and the next time you reboot it will be broken again. Setting up a username/password also appears to resolve the issue. Based on testing, this is not a bug in hbmqtt but rather in something that hass is doing when presented w/ hbmqtt version 0.9.4. Until this issue is resolved, hass.io installations are likely not going to work out of the box.

I think the best one can do at the moment is to “thumbs up” the bug report and hope someone smarter than myself can dig into the hass MQTT code and address the issue.

To be fair I could never get the built-in broker to work with hass.io anyway. hass.io makes it pretty easy to use Mosquitto as an add-on… and there’s even one with Mosquitto and a web-based MQTT client to view and troubleshoot all packaged as a one-click install. I’d vote to just suggest that Mosquitto be the MQTT broker of choice, anyway!

1 Like

Nextion and standard ILI9341 SPI TFT LCD Touch Panel are the same ?
I mean can we use an ILI9341 for this projet ?

Nope, not at all. The Nextion panel is an integrated microcontroller + display controller + LCD touchscreen. The ILI9341 is just the panel and display controller, there is very little in common between the two.

1 Like

HASP 0.30 release

New release of the Arudino code brings a new group feature from @rohankapoorcom and some reliability fixes.

HASP Groups

@rohankapoorcom had a great idea to add the concept of HASP groups, which allow several devices to all respond to a single message. You can assign the group name for each device in the admin web interface. All devices with the same group name will subscribe to the group topic and execute commands presented under that topic.

Traditional Node usage:

Set the text label on page 1 object 4 to “Lamp On” on device plate01: mosquitto_pub -h mqtt -t hasp/plate01/command/p[1].b[4].txt -m '"Lamp On"'

Group usage:

Set the text label on page 1 object 4 to “Lamp On” on all devices with the group set to plates: mosquitto_pub -h mqtt -t hasp/plates/command/p[1].b[4].txt -m '"Lamp On"'

The only difference between the group and node approach is that all responses from the device will appear under the node namespace, no messages will be published by the device under the group namespace, so group commands are one-way (controller to HASP device).

Reliability fixes

Several people (myself included) have experienced an edge case where WiFi connects but for one reason or another an IP address isn’t assigned, or MQTT isn’t reachable, and there is an edge case where the device is “stuck” requiring a power cycle. Several additional checks and retry intervals have been implemented to hopefully prevent this sort of issue. If an IP address isn’t assigned, the device will restart. If MQTT cannot be reached after 5 attempts, the device will restart. These behaviors along with several new checks should help prevent having to pull power on an installed device in order to make it reachable over the network in the case of any failure to successfully connect to MQTT.

If you’re using the AutoFirmwareUpdate automation your devices should pull this update at 3:00am. Otherwise, log into the admin web page and you can pull the update from the firmware page.

1 Like

Luma just printed the single Plate

and It fits into the New Zealand Plate Holds screw line up
Thanks again

2 Likes

@luma hope you don’t mind I showed your wall plates off in a video about hass.io. https://www.youtube.com/watch?v=PvPzMDeciwY

2 Likes

Hey wow! That’s a great video, I’ve liked and subscribed :smiley:

Wow this is AMAZING!
Just what was needed to make the house smarter! I bought some PCB’s to support your efforts.
Installation was really easy, but i’m really struggling with integrating it into home assistant. I managed to trigger the “first time setup”, but I don’t know where to go from there…

Any pointers? I couldn’t find much on instructions or any tutorial videos… Any tip, or advice would be appreciated.

Thanks

Where are you at with it right now? Can you interact with the display? Are pages flipping when you press the bottom 3 buttons?

Yeah. Everything seems to be working normally, I just don’t know where to start adding my devices. Any help would be appreciated.
I did manage to add a light and toggling it worked, but it messed up the functionality of the buttons being displayed; so I’m looking for the correct way to implement it into my hassio.
If you’ve got an example you could point me to or any tips, that would be great
Thanks in advance!

I’d start with reviewing the automations included with the package, starting at page 1. Once you have a handle on what’s happening there, proceed to page 2, etc. The page automations build on each other, with each page presenting new ideas of how to use this.

@luma Hi. I have just flashed the D1 mini and copied the tft file to the display. It worked at first, where I got the qr code and so on. After I messed up the whole config and setup - I decided to start over. I erased the d1 mini - flashed it again and now I don’t have any life on the display at all. how can this be?

Define “I don’t have any life on the display at all.” Does it appear to power on? What color is the background? Is there any text?

Great video. Would love to see a follow up with the HA Switchplate more in depth. Just curious as to what different use cases have been done with it.

1 Like

Any tutorial videos on how to setup the HA SwitchPlate?
I’m stuck where you were. I can get the button to toggle a light, but button press isn’t displayed… How’d you figure it out?
Can you share a sample YAML?

Thanks!

1 Like