Not sure if this will help any but here is how I have it wired up. If you are tired of fooling with this I COMPLETELY understand. I stated at the beginning this is all new to me, but interesting. I have tried running the test script have some issues I will post that info in a minute. Thanks
Okay here is what I have
Not sure if I messed up or not , but I added
now it ran this is what I got
My internet stinks I am uploading GPIO log Attachment but only at 6 %.
Okay here is what I have
Error:============= RESTART: /home/pi/Desktop/buran4-4-test switch.py =============
Traceback (most recent call last):
File "/home/pi/Desktop/buran4-4-test switch.py", line 19, in <module>
MY_PATH = os.path.dirname(sys.argv[0])
NameError: name 'os' is not defined
Not sure if I messed up or not , but I added
import osthen I get sys line 20 not defined so I
imported sys
now it ran this is what I got
Output:============= RESTART: /home/pi/Desktop/buran4-4-test switch.py =============
Start monitoring
Night. Close door
Night. Close door
Night. Close door
Night. Close door
Night. Close door
Night. Close door
Night. Close door
Night. Close door
Night. Close door
Night. Close door
Night. Close door
Night. Close door
Night. Close door
Night. Close door
Night. Close door
Night. Close door
Night. Close door
Night. Close door
Night. Close door
Night. Close door
Night. Close door
Night. Close door
Night. Close door
Night. Close door
Night. Close door
Night. Close door
Night. Close door
Night. Close door
STOP. Door closed. Time is 04 Apr 2018 04:07:46.470615
Day. Open door
Start motor. Time is 04 Apr 2018 04:08:31.712056
STOP. Door open. Time is 04 Apr 2018 04:08:33.181920
Day. Open door
Start motor. Time is 04 Apr 2018 04:08:33.233796
STOP. Door open. Time is 04 Apr 2018 04:08:34.488290
Day. Open door
Start motor. Time is 04 Apr 2018 04:08:34.543608
STOP. Door open. Time is 04 Apr 2018 04:08:35.079982
Day. Open door
Start motor. Time is 04 Apr 2018 04:08:35.137366
STOP. Door open. Time is 04 Apr 2018 04:08:35.937013
Day. Open door
Start motor. Time is 04 Apr 2018 04:08:36.022351
STOP. Door open. Time is 04 Apr 2018 04:08:37.494573
Night. Close door
Night. Close door
Night. Close door
Night. Close door
Night. Close door
Night. Close door
Night. Close door
Night. Close door
Night. Close door
Night. Close door
Night. Close door
Night. Close door
Night. Close door
Night. Close door
Night. Close door
Night. Close door
Night. Close door
Night. Close door
Night. Close door
Night. Close door
Night. Close door
Night. Close door
Night. Close door
Night. Close door
Night. Close door
Night. Close door
Night. Close door
Night. Close door
Night. Close door
Night. Close door
Night. Close door
Night. Close door
Night. Close door
Night. Close door
Night. Close door
Night. Close door
STOP. Door closed. Time is 04 Apr 2018 04:10:46.583543
Day. Open door
Start motor. Time is 04 Apr 2018 04:12:24.263203
STOP. Door open. Time is 04 Apr 2018 04:12:30.724498
I'm going to attach GPIO logMy internet stinks I am uploading GPIO log Attachment but only at 6 %.
Attached Files
Schematics.docx (Size: 145.89 KB / Downloads: 157)