I'm using Raspberry to control some devices (relays) by means of the RS485 serial bus.
It is quite simple to send a command to the relays through this bus.
My question is: how can I send a simple input to the raspberry. Specifically, I'd like to have a physical switch (like the one that we use to switch on a light in our houses) to send an input to the raspberry.
Are there some off-the-shelf devices to do this? or should I build something from scratch to transform the physical input in a signal on the serial bus, by implementing the required protocol via some integrated circuits?