Home Automation - Smartkit

SmartKit

SmartKit Rep
Joined
Jun 29, 2008
Messages
8,207
does anyone here know if it is possible to use a power output from another device to use as a status indication?

eg using an alarm keypads led output to see if the system is armed/not armed/alarming?

any idea how to go about this with a sonoff sv and HA?
You'd have to use the GPIO pins.
 

Steamy Tom

Executive Member
Joined
Jan 23, 2019
Messages
5,385
You'd have to use the GPIO pins.
yeah i get, could you possibly assist with more clarification? (sorry i am a bit noob, my concern is blowing the board pumping 2v from an external source into the board)

i have GPIO14 and GND free for example, i can of course wire it straight in but i am not sure if i need a resistor or the wiring configuration as well as what to set the pins as on tasmota
 

Steamy Tom

Executive Member
Joined
Jan 23, 2019
Messages
5,385
yeah i get, could you possibly assist with more clarification? (sorry i am a bit noob, my concern is blowing the board pumping 2v from an external source into the board)

i have GPIO14 and GND free for example, i can of course wire it straight in but i am not sure if i need a resistor or the wiring configuration as well as what to set the pins as on tasmota
the state of the "sensor" i will then need to configure in my HA as something like:

off (not armed)
on (armed)
pulsing on/off (alarming)

edit: the other options maybe are using the outputs that go to the radio?

any ideas guys? (i will buy some small kit if needed, just no idea what to by, some sort of relay that doesnt pass through current or something)
 
Last edited:

Steamy Tom

Executive Member
Joined
Jan 23, 2019
Messages
5,385
Is there a PGM?

That’s how I got it out.

There must be something that outputs the status to their radio after all.
@SauRoNZA can you elaborate on how you acheived this? i have a PGM output (ids816) and i see it measures 2V's when alarm is armed, i am assuming it will pulse 2v when in alarm state
 

SauRoNZA

Honorary Master
Joined
Jul 6, 2010
Messages
37,070
@SauRoNZA can you elaborate on how you acheived this? i have a PGM output (ids816) and i see it measures 2V's when alarm is armed, i am assuming it will pulse 2v when in alarm state
My Spectra has a relay on the PGM so pretty much goes open and closed on the GPIO14 when armed/disarmed.

I don’t know what the results will be when feeding 2v to the GPIO but I don’t see why it would pulse.
 

Steamy Tom

Executive Member
Joined
Jan 23, 2019
Messages
5,385
My Spectra has a relay on the PGM so pretty much goes open and closed on the GPIO14 when armed/disarmed.

I don’t know what the results will be when feeding 2v to the GPIO but I don’t see why it would pulse.
sorry so that PGM isn't giving you a voltage?

to clarify regarding the pulsing, this PGM goes to the current alarm LED, it is lit when armed and flashing when there is an alarm state
 

SauRoNZA

Honorary Master
Joined
Jul 6, 2010
Messages
37,070
sorry so that PGM isn't giving you a voltage?

to clarify regarding the pulsing, this PGM goes to the current alarm LED, it is lit when armed and flashing when there is an alarm state
As far as I know it’s only a case of N/O N/C not sure of a voltage crosses it.
 

Steamy Tom

Executive Member
Joined
Jan 23, 2019
Messages
5,385
As far as I know it’s only a case of N/O N/C not sure of a voltage crosses it.
ah ok, mine definitely has a voltage.

I am thinking i need to use some sort of relay switch, i.e a relay which is in essence a dry contact output, struggling to find what i need, especially at 2v
 

SauRoNZA

Honorary Master
Joined
Jul 6, 2010
Messages
37,070
ah ok, mine definitely has a voltage.

I am thinking i need to use some sort of relay switch, i.e a relay which is in essence a dry contact output, struggling to find what i need, especially at 2v
Yeah I’ve never actually tested it, who knows possibly it does have some or other voltage reading.
 

patrick123

Expert Member
Joined
Apr 10, 2005
Messages
2,862
I am guessing you connect to PGM and N to GPIO and GND?
I cannot see that working, as the GPIO triggers when it is grounded.
What I would suggest is an opto-isolator.
Essentially, 2 of the pins are connected to PGM and N, and the other 2 sides are connected to GPIO and GND.
When the voltage flows between PGM and N, it triggers an internal LED which then allows current to flow between the GPIO and GND, like an electronic version of a relay.
 

Steamy Tom

Executive Member
Joined
Jan 23, 2019
Messages
5,385
I cannot see that working, as the GPIO triggers when it is grounded.
What I would suggest is an opto-isolator.
Essentially, 2 of the pins are connected to PGM and N, and the other 2 sides are connected to GPIO and GND.
When the voltage flows between PGM and N, it triggers an internal LED which then allows current to flow between the GPIO and GND, like an electronic version of a relay.
that is exactly what i ended up ordering last night :) that and a reed relay, i was going to play around but it seems like i am on the right track \:D/

would this work:

or this:
 

patrick123

Expert Member
Joined
Apr 10, 2005
Messages
2,862
that is exactly what i ended up ordering last night :) that and a reed relay, i was going to play around but it seems like i am on the right track \:D/

would this work:

or this:
Yes, the 4N35 would work perfectly.
On the left where it says 5v, that is where you would connect the PGM with about a 100 to 220 ohm resistor.
Pin 2 would be the N.
Pin 5 goes to the GPIO and of course pin 4 goes to GND.

774756
 

Steamy Tom

Executive Member
Joined
Jan 23, 2019
Messages
5,385
Yes, the 4N35 would work perfectly.
On the left where it says 5v, that is where you would connect the PGM with about a 100 to 220 ohm resistor.
Pin 2 would be the N.
Pin 5 goes to the GPIO and of course pin 4 goes to GND.

View attachment 774756
my input is 2v, will i need to adjust the resistor at all, and could you possibly refer me to how i could go about figuring this kind of thing out?
 

patrick123

Expert Member
Joined
Apr 10, 2005
Messages
2,862
my input is 2v, will i need to adjust the resistor at all, and could you possibly refer me to how i could go about figuring this kind of thing out?
The resistor is more to limit the amperage than the voltage, I believe a 220 ohm resistor should work fine.

Edit:
Using the specs off the 4N35 sheet and this online calculator:
http://led.linear1.org/1led.wiz?VS=2;VF=1.3;ID=50
I would rather recommend a 15mA forward current to be safe.

774770
 
Last edited:
Top