setting a gio pin as input and export in domoticz
Moderator: leecollings
-
- Posts: 129
- Joined: Saturday 01 October 2016 14:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version: LastBeta
- Location: Italy BG
- Contact:
setting a gio pin as input and export in domoticz
hi to all,
iam testing to use a pin on the gpio to use as an input in domoticz.
i connect a button (normally open) betwenn the physical pin 34 (ov) and the physycal pin 32 (name GPIO.26 and BCM 12).
in this mode when the button is unpressed, on the pin 32 i have nothing, when the buttun is pressed i must have 0v.
if i use the command gpio readall from shell i look always the value of the pin is V 0.
to export in domoticz i use a sysf gpio hardware. in the file to startup domoticz i add this line:
echo 12 > /sys/class/gpio/export
and i can add a virtual device connect to the sysf gpio on bcm 12. i set the type as contact as i find in the wiki.
i think in the export miss something, but i don't understand because from gpio readall the value is always 0.
someone can help me ?
iam testing to use a pin on the gpio to use as an input in domoticz.
i connect a button (normally open) betwenn the physical pin 34 (ov) and the physycal pin 32 (name GPIO.26 and BCM 12).
in this mode when the button is unpressed, on the pin 32 i have nothing, when the buttun is pressed i must have 0v.
if i use the command gpio readall from shell i look always the value of the pin is V 0.
to export in domoticz i use a sysf gpio hardware. in the file to startup domoticz i add this line:
echo 12 > /sys/class/gpio/export
and i can add a virtual device connect to the sysf gpio on bcm 12. i set the type as contact as i find in the wiki.
i think in the export miss something, but i don't understand because from gpio readall the value is always 0.
someone can help me ?
Master (pi3) - MB sensors + Dummy + Sysfs gpio + 1 NodOn MSP-3 + 1 Aeotec DSB28 Energy Meter + 3 Danfoss RS Room + 7 Danfoss Z Thermostat + 1 Swiid Inter + 9 FGS222
Slave01 (pi2) - MB sensors + Dummy + Weather Underground + 2 FGS223 + 1 FGWPE/F
Slave01 (pi2) - MB sensors + Dummy + Weather Underground + 2 FGS223 + 1 FGWPE/F
Re: setting a gio pin as input and export in domoticz
Did you use a pull-up resistor?
-
- Posts: 129
- Joined: Saturday 01 October 2016 14:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version: LastBeta
- Location: Italy BG
- Contact:
Re: setting a gio pin as input and export in domoticz
actually i don't use nothing. tell me how restitor i must use .
Master (pi3) - MB sensors + Dummy + Sysfs gpio + 1 NodOn MSP-3 + 1 Aeotec DSB28 Energy Meter + 3 Danfoss RS Room + 7 Danfoss Z Thermostat + 1 Swiid Inter + 9 FGS222
Slave01 (pi2) - MB sensors + Dummy + Weather Underground + 2 FGS223 + 1 FGWPE/F
Slave01 (pi2) - MB sensors + Dummy + Weather Underground + 2 FGS223 + 1 FGWPE/F
Re: setting a gio pin as input and export in domoticz
10K to Vcc would do, Vcc being 3.3vguantolento wrote: ↑Saturday 04 November 2017 16:12actually i don't use nothing. tell me how restitor i must use .
-
- Posts: 129
- Joined: Saturday 01 October 2016 14:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version: LastBeta
- Location: Italy BG
- Contact:
Re: setting a gio pin as input and export in domoticz
10k is the value of R1 ?
- Attachments
-
- Cattura.JPG (16.64 KiB) Viewed 5056 times
Master (pi3) - MB sensors + Dummy + Sysfs gpio + 1 NodOn MSP-3 + 1 Aeotec DSB28 Energy Meter + 3 Danfoss RS Room + 7 Danfoss Z Thermostat + 1 Swiid Inter + 9 FGS222
Slave01 (pi2) - MB sensors + Dummy + Weather Underground + 2 FGS223 + 1 FGWPE/F
Slave01 (pi2) - MB sensors + Dummy + Weather Underground + 2 FGS223 + 1 FGWPE/F
-
- Posts: 129
- Joined: Saturday 01 October 2016 14:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version: LastBeta
- Location: Italy BG
- Contact:
Re: setting a gio pin as input and export in domoticz
i find this 2 type of connection of the gpio. how i need to use ? pullup or pulldown ?
- Attachments
-
- resistor.JPG (62.81 KiB) Viewed 5056 times
Master (pi3) - MB sensors + Dummy + Sysfs gpio + 1 NodOn MSP-3 + 1 Aeotec DSB28 Energy Meter + 3 Danfoss RS Room + 7 Danfoss Z Thermostat + 1 Swiid Inter + 9 FGS222
Slave01 (pi2) - MB sensors + Dummy + Weather Underground + 2 FGS223 + 1 FGWPE/F
Slave01 (pi2) - MB sensors + Dummy + Weather Underground + 2 FGS223 + 1 FGWPE/F
Re: setting a gio pin as input and export in domoticz
Depends if you want the Gpio to go low (pullup) or high (puldown). Pulldown is not really a pulldown to 0V. I would choose pullup, you van always invert the action in software.
-
- Posts: 129
- Joined: Saturday 01 October 2016 14:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version: LastBeta
- Location: Italy BG
- Contact:
Re: setting a gio pin as input and export in domoticz
but only to make a test. can i give 3.3v directly to the gpio pin? connect directly the button (NO) between the gpio and 3.3v ?
Master (pi3) - MB sensors + Dummy + Sysfs gpio + 1 NodOn MSP-3 + 1 Aeotec DSB28 Energy Meter + 3 Danfoss RS Room + 7 Danfoss Z Thermostat + 1 Swiid Inter + 9 FGS222
Slave01 (pi2) - MB sensors + Dummy + Weather Underground + 2 FGS223 + 1 FGWPE/F
Slave01 (pi2) - MB sensors + Dummy + Weather Underground + 2 FGS223 + 1 FGWPE/F
Re: setting a gio pin as input and export in domoticz
I don't think so, when the switch is open you have a floating input.guantolento wrote: ↑Tuesday 07 November 2017 16:50 but only to make a test. can i give 3.3v directly to the gpio pin? connect directly the button (NO) between the gpio and 3.3v ?
Who is online
Users browsing this forum: No registered users and 1 guest