Features Wishlist

Guition 4" screen with 3 relays

IdcslSuggested this wish ·

Hi Max,

Great project and a real game changer for these screens so well done.

I have one of the mains powered screens that incorporates 3 relays. Is it possible to use these relays in some way as I would like to have these screens as replacements for wall light switches?

Thanks Ian

Originally shared on GitHubOriginal authors and dates are preserved.

View original

Discussion 7

Add a comment
MaxGramser

Thanks Ian! And yes this is a thing that i would incorporate, can you show me a link of what exact screen you have?

Original on GitHub

Idcsl

Ok Max this is the link for the actual screen which I got from the Guition store. [https://www.aliexpress.com/item/1005006622809642.html] Its available in 2 versions with either 1 or 3 relays.

The screen is identical to the non relay version which I have also been using to great effect now. I'll attach a photo as well showing the rear of my unit.

Image

Original on GitHub

MaxGramser

Thanks for the link and the photo, Ian! Good news: you don't need a different firmware for this. The relays can be added to your screen through its Override YAML, and they then show up in Home Assistant as normal switches.

  1. Open ESP Screens, open your screen and click Override YAML.
  2. Paste this:
switch:
  - platform: gpio
    id: relay_1
    name: "Relay 1"
    restore_mode: RESTORE_DEFAULT_OFF
    pin:
      number: GPIO40
      inverted: true
  - platform: gpio
    id: relay_2
    name: "Relay 2"
    restore_mode: RESTORE_DEFAULT_OFF
    pin:
      number: GPIO2
      inverted: true
  - platform: gpio
    id: relay_3
    name: "Relay 3"
    restore_mode: RESTORE_DEFAULT_OFF
    pin:
      number: GPIO1
      inverted: true
  1. Click Save & check, then update the screen's firmware so it builds with the override.
  2. In Home Assistant the screen's device now has three switches (switch.<your_screen>_relay_1 and so on). Put them on a tile in ESP Screens like any other switch, and the screen works as your wall switch.

A few notes:

  • The pins come from ESPHome's device page for this board. If a relay clicks on while its switch says off, change inverted: true to false for that relay.
  • You can rename each relay with name:, for example "Ceiling light".
  • RESTORE_DEFAULT_OFF keeps each relay's state across a restart.
  • A tile switches through Home Assistant. If Home Assistant is down, the relays keep their state, but the tile can't change them until it is back.
  • Please double check the wiring and the relay rating for your load, as this is mains voltage.

I don't have the relay version myself, so I could only check that the configuration builds, not that the relays click. Could you let me know if it works on yours? I've also added this to the Guition docs, so the next person with a relay base finds it there.


Like my work? Consider buying me a coffee, much appreciated!

Original on GitHub

Idcsl

Hi Max,

Thank you so much for implementing the relays. It all works perfectly. The only comment to make is that you do need to change the inverted: label from true to false for all relays. The tiles then show the relays when on correctly.

Ian

Original on GitHub

MaxGramser

Great to hear it works, Ian, and thanks for testing it on the real thing! You're right about inverted: the relays on this base are active-high, so all three need inverted: false. I've corrected the example in the Guition docs, so the next person with a relay base gets it right the first time.


Got a screen running? Tell others which board you have and what works on the Tessera website. It helps everyone pick a screen that works.

Like my work? Consider buying me a coffee, much appreciated!

Original on GitHub

MaxGramser

One more question, just out of curiosity: are you in Europe, running the relays on 230 V mains?


Got a screen running? Tell others which board you have and what works on the Tessera website. It helps everyone pick a screen that works.

Like my work? Consider buying me a coffee, much appreciated!

Original on GitHub

Idcsl

Yes Max I'm in the UK and therefore its on 230 V main power.

Original on GitHub

Add your thoughts, a screenshot or a useful link.

Markdown & basic HTML
Paste or drop images · URLs on their own line become previews0 / 10,000
Sign in with GitHub to commentYour draft stays in this browser tab.