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

Which web application?

If you’re still connected to MQTT, you can do a factory reset of the device by sending the MQTT command: hasp/plate01/command/factoryreset, substitue plate01 for your device name.

The HASP will wipe out all settings, including any passwords, WiFi creds, and MQTT configuration. You’ll have to run through the WiFi and MQTT configuration process again but the rest of your config lives in Home Assistant and won’t be impacted.

1 Like

Just showing my configuration. I use 3.5" enhanced version. It has 32 MB flash!

16 Likes

wow, really looks good would you share config files also the icons on weather page do they change according to weather and everything.

hi @luma please suggest what should be done here, when there is a power cycle in the house (power goes out comes back in few minutes) after that screen will boot and will wait few seconds as it wont find the known wifi AP, because of the power cycle wifi router also takes a minute to boot it will go to AP mode and then stay there until i open the wall plate and recycle specifically restart screen power.

please suggest a way to make it wait at least 5 minutes before it can go into Ap mode and broadcast ssid which is plate0xx-xxx

TIA

That should already be happening - both the AP mode and static WiFi connection both have timeouts, after which they reboot the HASP to try again. The compiled BIN provided uses a 5 minute timeout. Can you capture serial output during this scenario? I’d be interested to see what’s happening on your side. In my testing it will cycle the system until it’s able to connect, even if it goes into AP mode on initial failure.

well may be i left i critical part between it all with power cycle i meant the pi running hass also power cycle along side.

also trying to replicate the scenario with usb plugged on the plate and power cycling all 3 at same time posting results soon.

well i timed it , it does try to reconnect every 5 mins in exact 5 minutes after the qr code appeared it tried to reconnect and business as usual.

Loving them plates as always , cheers !!!

Have anyone making a sort of Thermostat control with the HA switchplate? I would like to monitor and control my whole heating system in the house :slight_smile:

I’m actually about to finish the thermostat.

It should actually work without any problems.

hi @luma,

so i was going through sketch, basically wanted wifi to look out for known connection little longer or try to reconnect to known wifi if failed earlier than 5 mins so need a little help not too ide savvy i am .

const unsigned long connectTimeout = 300;           // Timeout for WiFi and MQTT connection attempts in seconds
const unsigned long reConnectTimeout = 15;          // Timeout for WiFi reconnection attempts in seconds 

if i change connect time out - that is reconnect after 5 mins &
if i change reconnect Timeout to say 60 seconds will it keep on looking for known wifi for a whole minute before showing barcode ?

TIA

connectTimeout is used during system startup, showing the QR code for connectTimeout seconds if it’s unable to connect. This is set to 5 minutes to give the user enough time to connect to the AP and make configuration changes. Setting it to a lower value increases the likelihood that the device is going to reboot while you’re in the middle of trying to set it up for WiFi.

reConnectTimeout is used after the system is running and connected, in the event that an existing WiFi connection is dropped. The system will attempt to re-establish the WiFi connection for reConnectTimeout seconds before restarting the device.

Hi all. Great work and just got my first SwitchPlate up and running with the first time setup option.

Probably been asked before and I have searched the thread.

The default button layout is ideal for what I need, but how do I rename the buttons? You can rename the page buttons via the HA front end.
Can it be done via mqtt or do I need to use nextion editor?

Had a look at the editor but can’t open tft files and the hmi file on the github is different to the default first time setup layout. Can I extract/convert the tft back to hmi or does anyone have a copy?

Cheers

All the text on the display is being sent by Home Assistant automations, found in the packages/<plate name> folder in your Home Assistant installation. Read the docs starting here and it will walk you through making some basic changes.

Must have missed that page! Cheers

1 Like

HASP v0.38 release

Stability and performance improvements

ESP8266 code v0.38

  • Updated ESP8266 Arduino core to 2.5.2, which comes more stability and performance improvements
  • Fix mDNS. Again.
  • Update ArduinoJSON to 6.x for easier builds, better performance, and lower memory utilization
  • Fixed issue with SoftwareSerial for debug messages

Home Assistant Automations

  • Fixed automations utilizing JSON messages to remove trailing null array element
  • Changed Page 9 (graph) color automations to only trigger when page is selected
  • Yay MDI icons changing names for no apparent reason. Fixed.
  • Added “default page” example automation, set a default page for HASP and it will switch back to that page after a set time

ESP8266 Update Procedure

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.

Home Assistant Update Procedure

Run the deployhasp.sh script to pull down the updated automations using one of the guides below:

Links for more HASP info

1 Like

I sure can help you, here it is!

2 Likes

Many thanks Luma …

Custom-Pages-for-HASP: Update 0.4

  • Add shell script to configure all pages:
  • Add Additional Automations:
    • hasp_plate01_00_default_page.yaml:
      Switch back to Default Page(Clock/Weather page) after a set time if there is no user input.
    • hasp_plate01_00_noinput_dimbacklight.yaml:
      Dim light if there is no user input for a set time.
      Brighten HASP when button pressed.
    • hasp_plate01_00_motionsensor.yaml:
      Activate sleep mode when no motion is detected for a set time. Deactivate if motion gets detected
1 Like

I have tried to solder the pins like in this post HA SwitchPlate - DIY LCD Touchscreen wall switch replacement but my solder gear is not that good so I stopped doing that for now and used the default connector again.

Now, I am able to change the text on the display via MQTT, but touching the screen does not fire the automations anymore. Changing tabs is not possible by touching it. The background color is changing when touching a button.

Maybe the soldering project has damaged the pins or connections…? The tin on the pins does not touch each other.