Features Wishlist
Use GPIO on the Board
What would you like to add
In my CYD I have connected 2 physical button to GPIO to turn on and off the light in the hallway and control the light outside the door. On another display I have a 18b20 connected to GPIO and I woulk like to mantain temperature reading. Is this possible to handle these GPIO with Tessera?
Thanks
How this relates to Home Assistant
Handle physiscal button connected and temperature sensor to GPIO
Pictures, mockups, or examples
No response
Before submitting
- I searched the existing issues and this has not already been requested
Discussion 2
Add a commentHi Marco, thanks for asking! Yes, both work today, with no new firmware needed. Every screen has its own Override YAML, a small file that loads after the shared package and stays in place through every update. Anything you add there is built into that screen's firmware and shows up in Home Assistant as an entity of the screen.
How to add it
···and choose Override YAML (advanced).The two buttons on your CYD
On the CYD, GPIO22 and GPIO27 are free on the CN1 connector (GND, GPIO22, GPIO27, 3.3V). Wire each button between its pin and GND. The pin's internal pull-up does the rest, so no resistor is needed.
Each press toggles its light. The 30 ms filter keeps one press from toggling the light twice when the contacts bounce. If you use rocker switches that stay where you flip them, write
on_state:instead ofon_press:. If you'd rather switch the lights from a Home Assistant automation, leave out theon_presspart and use the two button entities as triggers.The DS18B20 on your other screen
Which board is that one? The free pins depend on it. The sensor goes on a free pin, with its other wires on 3.3V and GND, and a 4.7 kΩ resistor between data and 3.3V (some DS18B20 modules have it on board already). With the pin filled in:
GPIO27is the CYD's pin here. Tell me the board and I'll give you the right one. It becomes a temperature entity of that screen, so you can also put it on a tile. Keep the sensor a little away from the screen itself: the board and the backlight get warm, and a sensor inside the case reads a few degrees too high.I checked that both snippets build on the current CYD firmware. I don't have buttons or a DS18B20 on my bench screens, so I couldn't try them on real hardware. I'd love to hear how it works for you! I also wrote it up in the manual, with wiring drawings and a few more recipes (a rocker switch, a motion sensor, a relay): Buttons, sensors and other hardware.
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.
Want me to keep building? Consider supporting monthly or buying me a coffee, much appreciated!
Original on GitHub
I use a CYD as board.
Thanks
Original on GitHub