Hello,
There are many instructions on the network how to control the relay, let's turn on the lamp with domoticz and it actually works after configuration
. My question is how do I add a doorbell switch to all of this? I do not know how to set the GPIO pin in domoticz as the input and connect it in the program so that the switch can be turned on both with the bell switch and remotely with domoticz.
I will add that I want to use a raspberry to control lighting at home and this is where another question arises. There are too few GPIO pins in raspberry for me to use them as inputs and outputs for that lighting. Is it enough to buy an external extension of the GPIO pins to solve this problem and it will be possible to configure it so that in domoticz these pins are also visible, or do I need to connect it all, for example, under the arduinono mega (here there are enough pins and the control is currently working) and connect them with raspberry using mysensors? Let me add that I would prefer to omit the arduino entirely if it was possible ... Thanks in advance for your help.
There are many instructions on the network how to control the relay, let's turn on the lamp with domoticz and it actually works after configuration

I will add that I want to use a raspberry to control lighting at home and this is where another question arises. There are too few GPIO pins in raspberry for me to use them as inputs and outputs for that lighting. Is it enough to buy an external extension of the GPIO pins to solve this problem and it will be possible to configure it so that in domoticz these pins are also visible, or do I need to connect it all, for example, under the arduinono mega (here there are enough pins and the control is currently working) and connect them with raspberry using mysensors? Let me add that I would prefer to omit the arduino entirely if it was possible ... Thanks in advance for your help.