Go to advanced search

by duckredbeard
Tue Jun 04, 2019 11:52 pm
Forum: Beginners
Topic: Short blink/long pause LED with gpio zero
Replies: 8
Views: 367

Re: Short blink/long pause LED with gpio zero

Thanks everyone for their replies. I decided to go with

Code: Select all

red = LED(17)
red.blink(0.08, 3)
and seems a good balance. I even had the on cycle shorter, but it doesn't bright up if you make the duration too short.
by duckredbeard
Tue Jun 04, 2019 9:31 am
Forum: Beginners
Topic: Short blink/long pause LED with gpio zero
Replies: 8
Views: 367

Re: Short blink/long pause LED with gpio zero

I thought I had tried something like the

Code: Select all

from time import sleep

red = LED(17)

while True:
    red.on()
    sleep(0.5)
    red.off()
    sleep(2)
but I guess I didn't. Maybe I did the times in the red.on and red.off steps. I will try this again. Thanks!
by duckredbeard
Tue Jun 04, 2019 2:27 am
Forum: Beginners
Topic: Short blink/long pause LED with gpio zero
Replies: 8
Views: 367

Short blink/long pause LED with gpio zero

I am using an LED to indicate that my security system program is running. I would like the LED to have a short blink (a bit longer than a flash) then a pause for 2-3 seconds. All I can find is from gpiozero import LED from signal import pause red = LED(17) red.blink() pause() Where the "red.blink(1)...
by duckredbeard
Wed May 29, 2019 6:51 pm
Forum: Python
Topic: Do more than one thing on GPIO zero PIR
Replies: 5
Views: 450

Re: Do more than one thing on GPIO zero PIR

Thanks for the input. I figured out what I was doing wrong. I have redefined what each "task" will be done upon motion start and stop. def basemotion() r = requests.post("http://bit.ly/xxxxxxx") baseled.on() def basemotionstop() baseled.off() Where I was going wrong was adding the "basepir.when_moti...
by duckredbeard
Tue May 28, 2019 10:10 pm
Forum: Python
Topic: Do more than one thing on GPIO zero PIR
Replies: 5
Views: 450

Re: Do more than one thing on GPIO zero PIR

If I do

Code: Select all

def basemotion():
    r = requests.post("http://bit.ly/xxxxxxx")
    basepir.when_motion = baseled.on
I get the requests.post on the first event but then only the LED on subsequent events.
by duckredbeard
Tue May 28, 2019 9:57 pm
Forum: Python
Topic: Do more than one thing on GPIO zero PIR
Replies: 5
Views: 450

Re: Do more than one thing on GPIO zero PIR

I thought I did that by putting it under the "def" stuff. Where do I put it exactly?
by duckredbeard
Tue May 28, 2019 9:37 pm
Forum: Python
Topic: Do more than one thing on GPIO zero PIR
Replies: 5
Views: 450

Do more than one thing on GPIO zero PIR

I am changing lanes on my garage door/motion/security system. GPIO zero seems to be a more popular way to do this. I would like more than one thing to happen on my PIR sensor events. Here is what I have now, edited to remove the sensitive stuff: from gpiozero import Button, MotionSensor, LED import ...
by duckredbeard
Sat May 25, 2019 2:48 pm
Forum: Python
Topic: SSH command to check variable then requests.post to URL
Replies: 9
Views: 853

Re: SSH command to check variable then requests.post to URL

Can you start me in another direction with the program? The door switches are SPDT switches, I could use both sides of the switch if that would help. This is my first project and this program his evolved from what one member put together for me. If you have another way of monitoring the switch, I wo...
by duckredbeard
Thu May 23, 2019 10:35 pm
Forum: Python
Topic: SSH command to check variable then requests.post to URL
Replies: 9
Views: 853

Re: SSH command to check variable then requests.post to URL

Would there be any benefit to (or way of) making the garage switch states "Global" variables so they could be checked by other programs without having to check the GPIO state? The reason I would have to check on these variables is because Tasker (my android app that does all the GUI for the Security...
by duckredbeard
Thu May 23, 2019 10:30 pm
Forum: Python
Topic: SSH command to check variable then requests.post to URL
Replies: 9
Views: 853

Re: SSH command to check variable then requests.post to URL

I have no idea on the Android side but normally under ssh you would set certificates up first to remove any password issues and then do something like: ssh pi@raspberry.local pgmname Where pgmname is a simple shell script that calls the Python program to do the work as needed. From a very quick rea...
by duckredbeard
Thu May 23, 2019 8:18 pm
Forum: Python
Topic: SSH command to check variable then requests.post to URL
Replies: 9
Views: 853

SSH command to check variable then requests.post to URL

I want to make a program that will execute upon receipt of an SSH command (from the Android app Tasker), where the program will do certain requests.posts. Basic idea is for the program to check a few variable states, then do certain steps depending on the variable states. I already have a program ru...
by duckredbeard
Tue May 21, 2019 1:57 pm
Forum: Beginners
Topic: Push requests to an rpi?
Replies: 1
Views: 410

Re: Push requests to an rpi?

Did you ever get this Tasker/SSH to work for you? I am a heavy user of Tasker and I'm looking for a way to start and end programs on the pi. Mostly to have it check the status of my home security system. Currently, I have two doors and a motion detector, but I will be adding at least 4 more door/win...
by duckredbeard
Tue May 21, 2019 1:08 pm
Forum: Python
Topic: Use 3.8VAC as input
Replies: 7
Views: 449

Re: Use 3.8VAC as input

Confirmed 3.5VAC at 233hz (+/- 3hz). Would be sweet if I could use that as an input. Ehm, is it possible that you make a picture of that sensor. Is the input, (power supply) of that sensor DC? Input is about 11VDC. Linky for the part: https://store.geniecompany.com/collections/opto-luctor/products/...
by duckredbeard
Mon May 20, 2019 8:01 pm
Forum: Python
Topic: Use 3.8VAC as input
Replies: 7
Views: 449

Re: Use 3.8VAC as input

Confirmed 3.5VAC at 233hz (+/- 3hz). Would be sweet if I could use that as an input.
by duckredbeard
Mon May 20, 2019 4:25 pm
Forum: Python
Topic: Use 3.8VAC as input
Replies: 7
Views: 449

Re: Use 3.8VAC as input

I will check AC or DC again tonight. I used a Fluke 87 on the orange wire in the diagram found in the pdf of this link: https://store.geniecompany.com/collections/by-model-h4000-h6000/wiring The opener users this sensor to confirm that the door is running. When I disconnect it, the door only moves 1...
by duckredbeard
Mon May 20, 2019 1:47 pm
Forum: Python
Topic: Use 3.8VAC as input
Replies: 7
Views: 449

Use 3.8VAC as input

My garage door has a rpm sensor that puts out about 3.8VAC when the door is running. I want to capture when that starts and stops. I don't need to know the RPM info, just that it is in a "running" state. When it starts running, do requests.post to URL. When it stops running, do requests.post to URL....
by duckredbeard
Mon May 20, 2019 1:41 pm
Forum: Automation, sensing and robotics
Topic: Detect direction of garage door motor running
Replies: 2
Views: 270

Re: Detect direction of garage door motor running

I can install another switch to detect the fully open state but I don't need that info. I am primarily concerned with the door being closed/not closed. If the door travel stops, it will always move in the opposite of its previous direction when it starts again. I want to detect that it is indeed mov...
by duckredbeard
Sun May 19, 2019 7:16 pm
Forum: Automation, sensing and robotics
Topic: Detect direction of garage door motor running
Replies: 2
Views: 270

Detect direction of garage door motor running

I am looking for a way to detect which way my garage door is running. I could use the built in RPM sensor on the drive motor shaft. During operation, it produces about 3.8 VAC while the motor is running. I could use this in a program. So at start, the door is closed. Every time it sees 3.8VAC, assum...
by duckredbeard
Sat May 18, 2019 1:10 am
Forum: Python
Topic: First attempt at combining two programs
Replies: 1
Views: 178

First attempt at combining two programs

I have two programs that run just fine by themselves. One program monitors two different pins for ground inputs. If the pins get a ground, they do a requests.post and my phone gets a message. These are from door switches. The other program is a single PIR sensor that watches for movement, that movem...
by duckredbeard
Wed May 15, 2019 2:17 am
Forum: Beginners
Topic: Starting over with SSH
Replies: 4
Views: 329

Re: Starting over with SSH

Those can contain authentication subkeys which use RSA encryption. The public (sub-)key could be re-formatted into the key format used by OpenSSH and placed on the Raspberry Pi in the ~/.ssh/authorized_keys file to then allow authentication using the OpenPGP key held by programs in the GnuPG suite,...
by duckredbeard
Tue May 14, 2019 11:10 am
Forum: Beginners
Topic: Starting over with SSH
Replies: 4
Views: 329

Re: Starting over with SSH

The official "help" from Tasker/AutoTools is at https://joaoapps.com/AutoApps/Help/Info/com.joaomgcd.autotools/com.joaomgcd.autotools.activity.ActivityConfigSSH.html and doesn't help a beginner. I'm not even sure that applies to Pi users. How can I " make sure it's in the OpenSSH format"? Do I need ...
by duckredbeard
Tue May 14, 2019 11:05 am
Forum: Beginners
Topic: Starting over with SSH
Replies: 4
Views: 329

Starting over with SSH

I followed the guide at https://www.raspberrypi.org/documentation/remote-access/ssh/passwordless.md , trying to set up SSH for use with Tasker/AutoTools. Nothing is working as far as I can see. Should I delete my entire .ssh folder? Would that put me back to square 1? Since I do see an "authorized k...
by duckredbeard
Mon May 13, 2019 11:39 pm
Forum: Beginners
Topic: Start script on boot
Replies: 4
Views: 303

Re: Start script on boot

I have experienced at least 3 failures with the rc.local way. I am pretty sure they were all from unclean shutdowns. I had been using teamviewer and when I opened Chromium, everything froze. Teamviewer lost connection and never recovered. My pi is headless so TV14 is my only interface. Once it was r...
by duckredbeard
Mon May 13, 2019 12:44 am
Forum: Beginners
Topic: Team viewer
Replies: 3
Views: 178

Re: Team viewer

I am using teamviewer as my primary interface to my 3A+. I get some lag if I try to do too many things you fast. I blame the 512 MB RAM.
by duckredbeard
Fri May 10, 2019 2:13 pm
Forum: Beginners
Topic: Multiple files to run on boot
Replies: 7
Views: 250

Re: Multiple files to run on boot

RaTTuS wrote:
Fri May 10, 2019 1:59 pm
and look at doing this via systemd much better than rc.local
What is the advantage?

Go to advanced search