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

How do you set images an icons? Just got mine set up and looking for the best way to get close to what you have.

You have to create a .png for every icon you have.
Yet the Nextion Editor canā€™t handle transparency in png so you have to make the background of the icon the same color as the background where you place it.

The automation part in HA looks like this.

- service: mqtt.publish
  data_template:
    topic: 'hasp/plate01/command/p[3].b[15].pic'
    payload_template: >-
      {% if states.sensor.dark_sky_icon_3.state == "rain" -%}
        {{ 13 }}
      {%- elif states.sensor.dark_sky_icon_3.state == "partly-cloudy-day" -%}
        {{ 14 }}
      {%- elif states.sensor.dark_sky_icon_3.state == "partly-cloudy-night" -%}
        {{ 14 }}
      {%- elif states.sensor.dark_sky_icon_3.state == "sun" -%}
        {{ 15 }}
      {%- endif %}

Where every number is the id of the picture uploaded to the Nextion.

2 Likes

can I get your 3D printed file
please and thank you

Did the setup of HA SwitchPlate with my Nextion display and Wemos D1 Mini before but was playing around with another project using the Nextion display and Wemos using ESPHome to flash firmware to the Wemos.

After flashing the HA Switchplate firmware to the Wemos mini again (following this guide https://github.com/aderusha/HASwitchPlate/blob/master/Documentation/01_Arduino_Sketch.md) and installed the HASwitchPlate.tft to the Nextion via a SD card, WiFi and MQTT are connected after a reboot of the Wemos.

Both the Wemos D1 Mini and the Nextion where flashed with other software, how do the HA Switchplate project still know the WiFi and MQTT login credentials?

Look into SPIFFS on the ESP devices - ESPHome probably didnā€™t erase the SPIFFS.

SPIFFS is basically a separate partition on the storage on the ESP device. This space is separate of the flashed sketch/binary.

The ESP8266 for Arduino environment uses standard locations on flash for WiFi creds and user-defined storage via EEPROM. By default, that area isnā€™t overwritten when you flash a new sketch, so when you go back to a sketch that bothers to read those values (like HASP), theyā€™ll still be there.

1 Like

Zonko please share your config, it looks AWESOME.

Iā€™ve finished the 3,2" version a few minutes ago. Just have to set everything up for the 2,4" one. As soon as Iā€™m done I will upload all files. Either today or tomorrow.

@Jafterdark
Made some changes to the 3D file. When I printed it again and Iā€™m itā€™s working like I expect it i will upload the stl too.

4 Likes

thank you I appreciate it man looks very nice

I need somebody who tests my 2.4" version.
All of a sudden my 3.2" version stopped workingā€¦or letā€™s say it freezes as shortly after connecting to the MQTT broker.
The only solution for now was too remove a few pages.
I could need somebody who flashes the 2.4" Nextion to check if I have to delete some pages on that too as I only have 3.2" at hand.

@zonko

Are you on Discord? I am available on DrZzs and HA room.

Hereā€™s the link for my case. Maybe it helps someone although itā€™s for 3.2"

3 Likes

Iā€™ve finished the designs for the 2.4" Nextion Panel. Thanks to @madrian who spent tons of hours testing my designs to sort out all issues.
I will upload the 3.2" version in the coming days when Iā€™m done testing mine.

For now it will use two pages if you have an additional temperature sensor in your house.
You can switch between the two pages by clicking the actual temperature.
I want to change that so it will only use one page but that will need some further testing.
Iā€™m thinking about using an input boolean which will send different values for each state.

4 Likes

Quick overview video:

4 Likes

Now, how do I make this fit into a UK socket? :frowning:

1 Like

Thanks Nick! Now I just need to locate some PCBā€™s and Iā€™m set :slight_smile:

I did note the UK one was experimental and untested.

Was it ā€œtestedā€ now? The filename for UK is " HASwitchPlate_front_single_UK-UNTESTED.stl"

Ah you just answer in parallel :wink: