Uncategorized

MotionEye discussion notes

Discussion on question by Bonzo: Relay keep on question – probably a bash problem now

Imported from a comment discussion on raspberrypi.stackexchange.com/questions/106614/…

 

 

Feeds

Feeds
yst 23:22
0

Q: Relay keep on question – probably a bash problem now

BonzoI have a pi 3B and a relay board – “5V relay module is active LOW, meaning that LOW level will activate the relay on and HIGH level will deactivate it.” . I have connected 5V to Vcc on the relay, ground to gnd and another pin and Pin 12 to ch1. This setup works as the relay will turn on with …

<img src="data:;base64,.cls-1{fill:none;}.cls-2{isolation:isolate;}.cls-11″ width=”9″ height=”11″ />
tlfong01
tlfong01
Ah, I don’t know nothing of MotionEye. Let me google and see if I can help: “How does MotionEye work?” raspberrypi.org/forums/viewtopic.php?t=238708#p1458704
Bonzo

Bonzo
Thank you for your anonymous down votes and passive aggressive reply. I do have Motioneye working and have spent quite few hours trying to get the next step working. Believe me my last resort was asking a question here as I was half expecting this sort of thing.
<img src="data:;base64,.cls-1{fill:none;}.cls-2{isolation:isolate;}.cls-11″ width=”18″ height=”22″ />
tlfong01

tlfong01
2387
Hi @Bonzo, I am sorry to have misled you thinking that I have downvoted your question. To clarifyl, I did NOT downvote your question. Actually I have not downvoted any question or answer for the last couple of months. I think my down vote or upvote ratio in this forum is perhaps 1 to 95. Just now I upvoted your question, to convenience you that I did not downvoted you. Comments welcome.
Now coming to the “passive aggressive reply”. I am not sure if my words “I don’t know nothing …” is impolite or rude. I am using these words because I know they are used by those who do not speak proper English. Actually I was an ex-refugee and only started learning alphabets A, B, C when I was eight years old. One thing I think I might have misled you may be I said I might google and see if I can help later. Unfortunately I did not carry on and because I got tied up in other answers I already started and need to spend more time to complete. / to continue,
Actually my first comment is only stating a fact that I have not heard of MonionEye, and that I would google to learn more. Let me see if I can remember what I thought after reading the thread of posts I referred. My first impression is that it is a new thing worth looking deeper. I did watch the youtube video referred in the first or second post and found it interesting. Actually I noted the web link but did not recommend it in time, therefore causing the misunderstanding.
One other reason that I did not answer right away is that your question is actually in two parts, the first part is on low trigger relay, second part on MotionEye. Actually low trigger relay is my favourite subject. As usual, didn’t know nothing about Arduino/Rpi relay when I joined this and another forum last year. If you search relay KY019 in this and other forums, you might find that my posted started with my fist thread is over 1,000.
Ah, now I remember what I think about the MotionEye video. (1) The video is by a popular guy who made many other videos, and I rank him top 5% of all the educational video I watched.
(2) I have been playing with object detection for a long while, using AI, NN, PIR etc. MotionEye is different in that it does NOT detect object, but note the difference between two frames. In a way it is much easier to implement. One last thing I notice the guy gave the MotionEye demo. I thought he was a very smart teacher because he did the following in the last few minutes. From standing position, he squashed down. It took me a couple of seconds to appreciate why he did not keep standing up earlier, … You might like to tell me why he did so, before I move on, …
Sorry for all the typos, actually I was hopping among different newspaper and forums on different topics. So I might have confused you because I mixed you topic with others.:)
I search my penzu diary to refresh my memory. Now I remember the funny guy making very professional video is called Christ Barnatt. I am a huge fan of him. I only recommend his video yesterday. raspberrypi.stackexchange.com/questions/106559/….
This is one of the perhaps more than 100, yes 100 answers I gave to explain the problem of low level trigger relays: raspberrypi.stackexchange.com/questions/99988/…
And this is the first of my 500+ posts on KY019 relay and related topics, mainly on home automation, and follow up questions: raspberrypi.org/forums/viewtopic.php?f=37&t=77158#p1323061
I am not sure if my down/up votes ratio I mention is precise, so I check my record. This is a summary: DownVote 7 Votes cast. Upvote 2,394 Votes cast. A more accurate ration is 7/2394 == 0.3%!
BTW, your relay problem is related to “Rpi low not low enough” This is one of perhaps 20+ answers I gave for the very same question which appears from time to time: raspberrypi.stackexchange.com/questions/83494/…
Question: Are you following any of the below installation guides, wikis, and tutorials? Are there any better ones? (1) github.com/ccrisan/motioneye/wiki/Install-On-Raspbian (2) raspberrypi.org/forums/viewtopic.php?t=238708#p1458810 (3) github.com/ccrisan/motioneyeos/wiki (4) billw2.github.io/pikrellcam/pikrellcam.html.
I actually was about to suggest the MotionEye docker installation. This way you don’t need to spend time to install python in the Rpi SD image which you mention that you wish to have more space in you SD card. I agree that SD card is a potential problem. I read that Rpi guys recommend not to use 32GB SD cards because they might cause trouble. One other reason I could not give an answer immediately is because I don’t know nothing about Bash scripts. I never write any programs in bas scripts. Almost all my programs in Rpi apps are python. So cards because they might cause trouble.
One other reason I hesitate to give an answer is because I don’t know nothing about Bash scripts. I NEVER write any programs in Bash scripts. Almost all my programs in Rpi apps are in python. So if you install MotionEye docker in Rpi4B buster and translate your bash script to python, I can try to help almost immediately! ;). This reminds me another reason that I hesitate to answer is because the GitHub doc say only up to Rpi3 stretch is supported. I have been using Rpi4B buster for over 6 months and got addicted to it. I am very reluctant to go back to Rpii3B+ stretch just for MotionEye.
I would rather wait for MotionEye to upgrade to support Rpi4B buster. I am not fluent in docker. You might like to give me docker related proj blogs and I am interested to try them out.
Hi @Bonzo, Thank you for your clarification about the down vote confusion. As you said, you got two down votes before I commented. I agreed with you that it would be nice if the downvoter could explain first before downloading. Actually this is the downvote protocol for almost all the 7 down votes I gave in this forum. More details later.
Because I only gave a handful of down votes, I still remember what I did. For one answer which is obviously rubbish, I first gave a comment somehting like: “I don’t think you are answering the question”. And I did not receive any objection, so I gave a downvote. I still remember the fake/cheating answer’s name which I won’t mention. Another occasion was that I found an answer which from my experience is wrong. So I first commented the answerer that his answer is “incorrect and misleading”, He tried to explain why it was not wrong. / to continue..
The topic is about I2C. I told him I have over 500 hours practical trials and errors experience in I2C, and if I think he is wrong very likely his is wrong. I gave him a link of the perhaps my 100 posts on my I2C experiments and ask him to refer my explanation to the StackExchange EE/ENC site for the EE guys to moderate or judge. As you may expect, the argument stopped at that point.
A quick comment on your suggestion of using latch relays. Firstly I usually strongly object getting around before finding our the root cause, because it it like not looking at a ticking time bomb. I did make a couple of answers on latch relays in this forum, and my quick and dirty advice to newbies is not to use it, because you are experienced in non latch relays.
One of the common newbie causes of “relay on but off straight away” or similarly LED on then off is the following: Rpi GPIO default/safety first state is that during initiation all GPIO pins is in input mode. If your app inits a GPIO pin to output mode and happily do something correctly, but when your program exits. Rpi is considerate enough to protect herself and your 1000VAC switch circuit from melting down or blowing up by careless, absent minded professors by SWITCHING BACK TO INPUT MODE BEFORE EXIT.
Bonzo

Bonzo
4582
Thank you for the information @tlfong01 and your last comment explains my problem. I was expecting the GPIO pin to maintain its value until I changed it. My changing the write value from 0 to 1 and adding the loop to prevent the program from exiting seems to have fixed the problem. I will stick with the relay I have and if you want to add the last two comments into an answer I will accept it.
<img src="data:;base64,.cls-1{fill:none;}.cls-2{isolation:isolate;}.cls-11″ width=”9″ height=”11″ />
tlfong01
tlfong01
Thank you for your kindness. So I will compile an answer, BUT not just my last two comments, perhaps 20 more comments.Have a nice weekend. Cheers.
The last message was posted 10 hours ago.
.END

Categories: Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.