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

Guys… I have tried literally every single possible way to add .png icon but I failed every time. I have added icon .png file to screen firmware. I successfully flashed it and I read the forums carefully. But the image didn’t show up. Maybe I am missing something? Here is my configuration. Payload 0 = picture ID.

  - alias: hasp_plate01_p2_ToggleInit
    trigger:
    - platform: state
      entity_id: 'binary_sensor.plate01_connected'
      to: 'on'
    - platform: homeassistant
      event: start
    action:
      - service: mqtt.publish
        data:
          topic: 'hasp/plate02/command/p[2].b[5].pic'
          payload: 0 

The ending for the topic must be .picc instead of .pic

Didn’t help :frowning:

  # Set font and text for toggle buttons on device connection
  - alias: hasp_plate01_p2_ToggleInit
    trigger:
    - platform: state
      entity_id: 'binary_sensor.plate01_connected'
      to: 'on'
    - platform: homeassistant
      event: start
    action:
      - service: mqtt.publish
        data:
          topic: 'hasp/plate01/command/p[2].b[5].picc'
          payload: 0 

  # Toggle light1 when p[2].b[4] pressed
  - alias: hasp_plate01_p2_ToggleLight1
    trigger:
    - platform: mqtt
      topic: 'hasp/plate01/state/p[2].b[5]'
      payload: 'ON'
    action:
    - service: homeassistant.toggle
      entity_id: light.balcony

Can you post debug output from the HASP when this fires?

How exactly did you set the icon in the firmware? As a button? Did you set sta of that button to image and select the icon as pic or pic2?
Setting the via HA only makes sense if you have mutliple icons you want to switch through. I.e one icon for on- and one for off-state.
If it’s static like in your example you won’t need to set the icon in the automation.

Another thing…the way you triggered the icon you need to make sure the vscope of that button is global else the picc gets triggered when HASP gets connected or HA starts but if you aren’t on page 2 and you switch to page 2 it won’t load.

Hi there!
Thank you for your input. I reconfigured firmware based on your tips (like setting STA, adding pic and pic2). It worked. Partially. Now switchplate displays the icon. However, whenever I press it, it dissapears. Any tips?
Thank you!

Did you set pic and pic2 with the same icon?
Else you can add an automation in HA:

- alias: trigger icon
  trigger: 
    - platform: state
      entity_id: your_light_component
  action:
    - service: mqtt.publish
      data:
         topic: 'hasp/plate02/p[2].b[5].picc'
         data: 0 

This way it will trigger the icon everytime you hit the button.

It worked! Thanks a lot, mate!

did you use page 6 and convert it to functional button? can you share on how to do this ? which file do i have to edit to make a text available on button at page 6 ?

anyone can help to suggest me on how to add text on page 6 button ?
i only see plate01_p6_ColorConfig page 6 dont have any toggle button line page 3?

I cant help you right now. After the .97 update, my Hassio has crashed big time.
Will check back when I get it going again.

If you take a look at page 6 you can see that the main page is split into 8 buttons, starting with b4 and ending at b11.

If you look at the automations for page 1, you can see several examples of setting the font size, defining button text, and responding when a button is pressed.

You can copy these examples and change p[1] to p[6] to begin developing your own automations for page 6.

You have to edit the p6 toggles yaml file.

Hi, I have been testing HASP for a while and just wondering if it’s possible to implement a “wake on touch” type functionality?

Is this something better handled at the hardware level, or should I write an automation/node-red for it?

is it possibile to mount in horizontal and not in vertical? Id like to replace normal horizontal plate. thx

i dont see any p6 toggles yaml file

It should be in your config/plate01/packages folder if your hasp is using the default name.

there are no P6 toggle yaml files

but the logic is the same as the other pages

- id: Plate01 6_5
  alias: Plate01 6_5
  initial_state: true
  trigger:
  - entity_id: light.office
    platform: state
  condition: []
  action:
  - data:
      topic: hasp/plate01/command/p[6].b[5].bco
      payload_template: "{%- if is_state('light.office', 'on') -%}\n  65504\n\
        {%- else -%}\n  65535\n{%- endif -%}\n"
    service: mqtt.publish
......
    - service: mqtt.publish
      data:
        topic: 'hasp/plate01/command/p[6].b[5].font'
        payload: '1'
    - service: mqtt.publish
      data:
        topic: 'hasp/plate01/command/p[6].b[5].txt'
        payload: '"Office"'
    - service: mqtt.publish
......

just got to watch your text lenght and change the size to match.

  - alias: hasp_plate01_p6_B5
    initial_state: true
    trigger:
      platform: mqtt
      topic: 'hasp/plate01/state/p[6].b[5]'
      payload: 'ON'
    action:
      service: light.toggle
      entity_id: light.office

On mine I have P6 color and P6 toggles yaml files! I’m just going by what I see in my packages
folder. Maybe something changed in an update, but that’s what I have and it works! :wink:

I’m not sure what you mean by “normal horizontal plate”. Can you post a picture or a link to an example?