Hi,
Sorry for the newbie question, but I’m having trouble with the GPIO:
I copied the example for the GPIO switch
Example configuration.yaml entry
switch:
platform: rpi_gpio
ports:
11: Fan Office
12: Light Desk
Now the two items apear on the homescreen for the HA,
This is what I’m not sure of - is that GPIO pin 11 (BCM17) or GPIO 11 (Pin 23)
Hope that makes sense.
I have a multimeter connected across GND and Pin 11, but when I toggle the switch on HA I don’t see the voltage change, it remains at 3.3VDC.
Hope someone can point me in the right direction
Chris.
Working on GPIO 11 (PIN 23) !!
Some research on pull-up resistor values and I’ll have a crack at the inputs to see what I can do.
May need to invest in some M-F and M-M jumper wires and a breadboard…
Hi,
I’m really sorry to have to ask questions again on something that’s probably very simple, but I’ve searched and can’e see the answer.
I note that the Pi has built in pull-up or pull-down resistors that can be set through the configuration.yaml file when defining the inputs, The exact form isn’t clear to me (sorry)
The options suggest:
pull_mode (Optional): The internal pull to use (UP or DOWN). Default is UP.
So what do I put in the yaml file when setting the inpust as:
binary_sensor:
platform: rpi_gpio
ports:
11: PIR Office
12: PIR Bedroom
Again, really sorry for the repeated questions, but I’d appreciate advice on how to set it for pull-up resistor so the input is activated by being connected to GND.
I’ve read through about 30 configuration.yaml files, and the associated !include binary sensor files and still can’t find the answer.
Would someone please be kind enough to help me out with the correct syntax/format to make those two inputs high by pull-up (the onboard ones)?
Thanks for that, I’ll give it a whirl in the morning - the Pi is at work and I’m messing about with it between calls on the support line.
Hoping to get hold of a Lundix box to link in my Vanderbilt SPC Intruder panel at some point too, and then some Ikea Tradfri lights…
pull up is the default so you don’t need it anyway
pull_mode (Optional): The internal pull to use (UP or DOWN). Default is UP. I would just # it out with a comment saying defaults to pull_up (just so you remember). However I think it needs to be pull_mode: UP
So if you aren’t getting an input then you are connected to the wrong pin on the header. The GPIO/BCM ports you have are pins 37 (26 Office PIR) and 38 (20 Bedroom PIR) of the header. See here https://pinout.xyz/
So to clarify the HA port No. is equivalent to the BCM/GPIO No.s in the diagram I linked (BCM and GPIO are interchangeable names for the broadcom devices pins). The physical pins on the header are where you put the inputs in.