Raspberry Pi Coop Automation

@jthornton
I'm still stuck at

"File "/home/rob/bin/coop3", line 33, in <module>
from rpi_utilities import ledfade
ImportError: cannot import name 'ledfade' from 'rpi_utilities' (/home/rob/bin/rpi_utilities.py)"

what did I miss?
 
Do you have the following files in your bin directory?

Screenshot at 2020-11-11 05-50-59.png

Note the __pycache__ directory is created automagicly when you run a Python program.

Notice that the file coop3 is green which means it's executable.

The only other thing is do you have the latest rpi_utilities.py file with the ledfade class in it?

JT
 
@jthornton Yes, I have those files... they are not the same size as yours, so I would assume they need to be updated... (my file coop3 is also green/executible)

I have done
"sudo apt update
sudo apt dist-upgrade"

How do I update other files... getting closer..
 
Download the zip file and copy them to the Rpi. If you installed FileZilla on your PC the copy process is simple.

Just a note that apt is only for debian packages that you install with sudo apt install.

JT
 
@jthornton Well, I had to go in to work today... I had installed VNC at work PC.
for some dumb reason, when I was putting my Rpi address, it would not connect today.
solution... fire up "Teamviewer" (basically the same as VNC for PC's)
I access PC (at home) from PC (at work) to access VNC (at home) to get connected to Rpi.
(what a crazy daisy chain of computers!)

I managed to install your files on the Rpi via Filezilla, edited my location as
"PBTZ = pytz.timezone('US/Eastern')
#PBMO = LocationInfo("Your City", "Your Area", "Time Zone", Latitude, Longitude)
PBMO = LocationInfo("Cutler Bay", "Southeast", "US/Eastern", 25.584416, -80.349980)
HM = '%I:%M %p' "

I hope that is correct...
When I execute coop3, I do get
"rob@coop:~ $ coop3
libEGL warning: DRI2: failed to authenticate
qt5ct: using qt5ct plugin
qt5ct: D-Bus global menu: no"
(within a second later)
I then get a another window to pop open and the title of the window is "chicken coop tres"
the Sun times seem accurate for my location, so I do believe the location stuff is correct.
So I do think I have made progress..

What is next?
I would assume hooking up stuff (wires) to Rpi... lol
I do have this 5V relay board.

Does @Mouthpear's wiring diagram with the relay board look good?
Just not sure which pin is which, etc...
If yes... I have read over your code
DOOR_UP =17
DOOR_DOWN =18

what confuses me, is probably a stupid question,
is it GPIO 17/pin 11?
GPIO 18/pin12?
The GPIO/pin numbering is confusing, but I'm sure the Rpi guys have their reason
I don't want to let out the "magic smoke" out of my Rpi... (everything worked until they let the magic smoke out, lol) ...electronic joke.

I also ordered the window switches he referenced... where would I install them

Yes that relay board should do. Having the HI / Low feature might come in handy. You never know.

Active 12V PoE Splitter Power Over Ethernet Adapter
DC 2.1 5.5 MM 1 to 2 Power Adapter Splitter
12V 5.5mm x 2.1mm DC Power Connector Adapter
DC-DC 12V to 5V 3A Micro USB Converter Voltage Step Down Regulator

I had already made the diagram with the original board and could not find a straight head on view to make a good diagram with the preferred red board.

View attachment 2374835

I went ahead and did the Motor Shield also just in case.

View attachment 2374836


Side note... I ordered this webcam which does have a very good image...few questions.
1) how do I get the Rpi csi camera (for the coop) AND the webcam (for the run) both working.
2) how do I get the webcam microphone working (its all on one USB plug)
3) I have viewed the webcam images at 192.xxx.x.xx:8081
4) Can I install MotioneyeOS (I know its an operating system on its own) and run your coop3 program. I do think that would be the golden ticket.

Right now I'm tinkering with all of this on a coffee table... I still have to run the network cables, switches, hub, mount stuff to the coop door etc... and eventually get time to install my security cameras...
( I have so many coals in the fire)
 
What is next?
I would assume hooking up stuff (wires) to Rpi... lol
I do have this 5V relay board.

A 5v relay board sometimes works fine with a 3.3v RPi output, I have fried the I/O on a Rpi before so I try and use 3v relays. Having said that I still have a 5v active low relay board in Coop Uno.

The very first thing I would do is connect a double throw single pole switch to the up and down prox inputs that way you can simulate the door opening and closing until you get your mechanics working.

I'm using BCM or Broadcom pin numbering, so google that and get familar with the physical pin numbers and Broadcom pin numbering vs Board pin numbering... dunno why they made it so confusing but they did. Take a look at line 71 in coop3.

JT
 
what confuses me, is probably a stupid question,
is it GPIO 17/pin 11?
GPIO 18/pin12?
The GPIO/pin numbering is confusing, but I'm sure the Rpi guys have their reason

No stupid question, it's cornfusing at best. Yes GPIO 17 is physical pin 11 and GPIO 18 is pin 12.
pi3_gpio.png

So a wire from a 3.3v DC Power like physical pin 01 to the center tap on the switch and the outer taps to physical pins 11 and 12.

JT
 
Great, as long as I'm not the only one..

Learned something else a few minutes ago.. just put in "pinout" at command line and an image of the exact Rpi in question displays an image listing the GPIO.BCM pins... pretty cool!

Now that I know the GPIO.BCM pins, can you divulge the rest of the diagram... other end of the wire connecting to the relay board, etc...?
is @Mouthpear relay board diagram good?

Any comment on running coop3 on MotioneyeOS? OR any other ideas about the CSI & USB cameras?
 

New posts New threads Active threads

Back
Top Bottom