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

Yes its got all the packages but I did notice in atom that the folder was black which is weird but all the files are there and named plate01 like they are supposed too be.

Do you see the automations under “Developer tools” > “States”? If so, can you trigger it there?

Yeah i dont’ see any hasp automations. that must be the issue. i have an automations folder i keep all my .yaml automations files in. would that cause an issue with the install script.

I have to reload automations after every reboot to get them all to show and i have never understood why.

1 Like

I also have a automations folder with a pile of yamls that is outside of the HASP packages and so I can confirm that approach is compatible with the HASP packages. I suspect whatever is going on with your existing automations is also interfering with the HASP automations. I think you’re going to need to resolve that issue for this to work.

any idea of where to start on that. The automations all work just have to hit the reload to get them to show and the config checker doesnt’ throw any errors or anything.

I’m not a hassio user so I don’t have a lot of experience there. A quick search brought up this thread, which resulted in a re-install to resolve the issue :frowning:

Yeah i regret sometimes moving off my Unraid Server to the PI. Its nice because its not tied to a server i tinker with all the time but has these little querks blegh.

Reinstall fixed it thanks.

1 Like

Hi,

first of all, thanks to everyone who has helped to make this such a great thing!!
I ordered the screen from China and I was able to play around with it already changing some pages and texts.

I would like to contribute as well… I changed the automation group within the package (the one that lists all the automations in one group to be displayed in the view)
Since I already went ahead and added a few new autoomations myself I didnt want to update the group manually all the time to have my automations included. So I wrote an automation to do that for me.
Maybe it is helpful to someone else as well:

  - alias: hasp_plate01_automation_group_members_update
    trigger:
    - platform: homeassistant
      event: start
    - platform: time
      minutes: '/30'
      seconds: 00
    action:
    - service: group.set
      data_template:
        object_id: "plate01_automations"
        entities: >-
          {%- for item in states.automation if ((item.entity_id | lower).startswith('automation.hasp_plate01_')) -%}
          {{ item.entity_id }}
          {% if not loop.last %}, {% endif %}
          {%- endfor -%}

and then I added another one to make a second group that would only list the automations I added myself.
I am using “_se” at the end of all automation names that I make myself for the HASP Plate

  - alias: hasp_plate01_automation_group_members_update_se
    trigger:
    - platform: homeassistant
      event: start
    - platform: time
      minutes: '/30'
      seconds: 00
    action:
    - service: group.set
      data_template:
        object_id: "plate01_automations_se"
        entities: >-
          {%- for item in states.automation if ((item.entity_id | lower).endswith('_se')) -%}
          {{ item.entity_id }}
          {% if not loop.last %}, {% endif %}
          {%- endfor -%}

Here you go, if you wanted to could also add the trigger to update the automatio groups when the HASP boots:

  • platform: mqtt
    topic: ‘hasp/plate01/status’
    payload: ‘ON’

One question still remains for me: I started playing around with the colors (background and text color). Is there some documentation about what value is which color?

Thanks

1 Like

Nice use of the for loops.

here you can find the color codes from Nextion: https://www.itead.cc/wiki/Nextion_Instruction_Set#Nextion_HMI:_Color_Code_List

@luma
I’ve been enjoying my new HAswitchplate when some strange behavior made the device unusable; i’m hoping someone might have some insight.

Everything was working fine, then the display stopped turning on. I was still able to press the screen and the lights configured for that button would respond, however the screen appeared off. I tried to access the web UI and was unable to. After a rebooting the device, the web UI was displayed, however the the screen would never come back on…
Thinking this was a user error, I bought a whole new setup, new screen, new wemos D1 mini and everything worked fine… until the screen would no longer come back on… Pressing the screen does send MQTT messages (the lights respond) but the screen will not come on… Both instances of this issue appeared roughly about a week after installation.
If I take a screen that won’t come on, put the SD card in, and apply 5v, the screen comes on! during the update process …once back in the HAswitchplate setup, the screen does not come on…
I’m not sure that the screen is totaled since it can receive input, and it can turn on since it did so with the SD card…
Home assistant sees it as connected and online… the Web UI sees it as online…
Toggling the backlight toggle doesn’t turn on the screen…

Any ideas?

check what the backlight dimmer is set to in HA. I had the issue and toggling the backlight did nothing, but that was because my backlight was set to 0. Once I moved the dimmer slider the backlight came back on.

1 Like

@michael.leone I love your design, any change to share the STL files? Or when they are online already, can you point me to the location where I can find them? :slight_smile:

Thank you!
I didn’t even think to check if there was a slider…

It’s working great again!
Thanks!

Ok went through the complete thread to see if anyone posted about an issue i’m seeing. I didn’t see anything related so I’ll go ahead and ask. So I am setting up my HASP, things seem to be working as I can update menu names and control my media player and such. The issue i’m having is after some time (haven’t timed it exactly let’s just say 20 minutes) the display reverts back to the main setup screen. After connecting and going to the settings I can see the wifi setting have been cleared. While troubleshooting this I even experienced my mqtt password settings clearing. I flashed another esp8266 to see if that would resolve the issue but the same thing happens there. I’m going to keep working on it to see if I can find a resolution but I wanted to post just in case someone had an similar issue or perhaps has some ideas on things to check. Other WiFi connected devices work just fine.

The improvements @michael.leone did are merged into these?

I think you’re looking at rendered designs for Australian work boxes. I’ll accept PRs for any tested solutions for enclosures outside of NA, but I am unable to design and test anything like that myself for lack of access to standard work boxes from around the world.

Ah, I thought there were PR’s based on those rendered design. My bad. Too bad.

HASP 0.31 release

New release of the Arudino code brings back motion sensor support, enhanced reliability, and several bugfixes. New Home Assistant Automations have been published which should cut down on MQTT traffic (yay duplicate subscription handling in hass) and increase reliability.

Arduino code v0.31

  • Added motion sensor support on pins D0/D1/D2, configurable via web interface
  • BREAKING CHANGE! MQTT namespace for backlight changed status to state. If using backlight automations you will need to change this, and also modify hasp_plate01_00_components.yaml (or re-run deployhasp.sh to bring down the new automations, which you should do anyway).
  • mDNS support
  • Better handling of WiFi connection process
  • Force device name to lower case in web config
  • Cleanup of MQTT subscriptions and better handling of new/existing connections

Home Assistant Automations

  • Removed HASP power-on MQTT subscriptions to get rid of duplicate messages being sent by Home Assistant. The binary_sensor device is now used for all automations to detect the device coming online
  • Changes to file structure to allow examples to be renamed via deployhasp.sh without filling hass log full of errors. If you’d like to utilize functions like Media Player or 3D printer monitoring, you’ll need to copy over the relevant .yaml files from hasp-examples/plate01/<filename>.yaml to your packages folder.
  • Replace deprecated weather API sources
  • Refresh automation group at startup (Thanks @Nightcat!)

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