HTTP Get Stream -- ESPEasy Plugin Advice Needed

Moderators: grovkillen, Stuntteam, TD-er

Message
Author
User avatar
ThomasB
Normal user
Posts: 1064
Joined: 17 Jun 2018, 20:41
Location: USA

HTTP Get Stream -- ESPEasy Plugin Advice Needed

#1 Post by ThomasB » 17 Sep 2021, 01:13

I need a bit of advice for a custom plugin that will be used to query the motion detection status from an IP security camera (Dahua or Amcrest brand). Here's the basic details:

The security camera's API accepts HTTP get commands for its various functions. I want to use its query command to read the motion and intrusion events. The common HTTP Get method will work, but the camera's API docs highly recommend using a HTTP Get Stream instead. That is to say, open a streamed http connection, then patiently wait for the event messages to arrive, while leaving the connection open forever.

Some Info:
I have some experience building ESPEasy plugins. I would prefer to use ESP8266 (NodeMCU) rather than ESP32. Video images will NOT be sent to ESPEasy. Just occasional string messages, perhaps less than 50 bytes at a time.

Questions for the devs:
1. Would adding a streamed http plugin demand too much overhead from ESPEasy? Or invite any other issues? I didn't find any device plugins that do this, so I don't know what the impact would be.

2. If I use the common HTTP get method the custom code would be developed as a ESPEasy "Device" plugin. But if a HTTP streamed connection is used, should it be written as a "Controller" plugin instead?

3. Can you suggest any existing ESPEasy plugins to act as a reference/inspiration for this project?

What is this for?
A roving gang of wild turkeys are making a mess of my gardens. These little hoodlums stop by every day. They have no fear of humans or pets, but are easily herded off the property by waving arms and other forms of harmless harassment.

We chase them away when spotted, but they are sneaky and often come and go under our noses. I've decided to install another IP camera on my security system that monitors one of their favorite garden locations. Besides recording them, I will get emails of their arrival too.

But I need an immediate alert. So I would like to create an ESPeasy plugin that converts the IP camera intrusion events to MQTT messages. The MQTT and Openhab2 will be used to trigger Alexa text-to-speech voice alerts when the turkeys step into camera view; "Warning Will Robinson, Feathered Intruders are in the Area."

- Thomas
Turkey Gang.
Turkey Gang.
turkey1.PNG (2.83 MiB) Viewed 25210 times

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: HTTP Get Stream -- ESPEasy Plugin Advice Needed

#2 Post by TD-er » 17 Sep 2021, 01:57

Hmm keeping a HTTP connection open is a bit tricky.
The reason why, is that it may take forever to "read" a byte, so you can only poll the buffer frequently and read a byte as soon as it is available.
So far so good, but what if the connection is lost without knowing?
And the other way around, what if you suddenly got lots of data right when you were not looking for a while. Then buffers tend to overflow.

Also it may now be fixed (read: less of an issue), but concurrent http connections were not really something the ESP was really good at.

Doesn't such a camera support a trap interface?
For example, sending an SNMP trap is often possible with such cameras.
(not that we support SNMP right now, but I guess that's easier to add than permanent open connections)
And maybe also the camera can support to write something to some port?

One other thing, I'm not sure if you would like to use Dahua camera's.
Well at least there is a chance someone else may be helping you to take a look after your garden :) (doesn't have to be someone far away as they have been known to be a bit more open than desired, or even open your network)
Better to put such camera in a separate VLAN, not connected to da interwebz.

Just when you're curious, look for "Dahua backdoor" or "Dahua exploit".
This is one of the better known ones: https://github.com/mcw0/PoC/blob/master ... ckdoor.txt

User avatar
ThomasB
Normal user
Posts: 1064
Joined: 17 Jun 2018, 20:41
Location: USA

Re: HTTP Get Stream -- ESPEasy Plugin Advice Needed

#3 Post by ThomasB » 17 Sep 2021, 02:20

Thanks for the advice. I'll avoid the stream connection method and use common HTTP Get for the status queries.

I am aware of Dahua's security issues. The network does not have any open ports to the interwebz, router does not permit UPNP, etc. If Chairman Mao does any video spying I doubt the turkeys will complain.

- Thomas

User avatar
ThomasB
Normal user
Posts: 1064
Joined: 17 Jun 2018, 20:41
Location: USA

Re: HTTP Get Stream -- ESPEasy Plugin Advice Needed

#4 Post by ThomasB » 17 Sep 2021, 19:33

I did a bit more digging and found that Openhab 2.5 has a binding for IP cameras. It supports motion/intrusion events, which is just what I need. So rather than create an ESPEasy plugin I'll upgrade my Openhab 2.4 to the 2.5 branch.

- Thomas

User avatar
ThomasB
Normal user
Posts: 1064
Joined: 17 Jun 2018, 20:41
Location: USA

Re: HTTP Get Stream -- ESPEasy Plugin Advice Needed

#5 Post by ThomasB » 22 Sep 2021, 00:25

Things did not go as planned. But every adventure needs an ending. So with that in mind, here's the conclusion to my journey.

I spent a couple days attempting to upgrade my OpenHab2 installation from V2.4 to V2.5. This would allow it to support IP Camera motion detection. Alas, no joy; Too many functions were broken and I called defeat. The OH2 upgrade effort is on hold for now.

So instead of using an IP camera to detect the gang of Turkeys, I've switched to a microwave based motion sensor. They are very sensitive and have stable behavior in outdoor temperatures.

Hardware and software is complete. ESPEasy rules send MQTT motion events to my OpenHab2 home controller. It's configured to announce alerts only during daytime hours. Works well: Amazon Alexa says "Front Yard Motion Alert, Check for Turkeys!"

The hardware is a Wemos D1 Mini Pro and RCWL-0516 microwave motion sensor. I installed a 680K ohm resistor on the sensor's R-GN pads to reduce its sensitivity (less range). BTW, total cost is well under $15 USD.
.
ESPEasy with Microwave motion sensor.
ESPEasy with Microwave motion sensor.
TurkeyDetector1.jpg (177.46 KiB) Viewed 25062 times
.
It's going in a 3D printed ABS plastic enclosure. The boxed sensor will mount near the ground at the base of a lamp post that has an AC outlet.
.
3D printed enclosure, ABS
3D printed enclosure, ABS
TurkeyDetector2.jpg (113.35 KiB) Viewed 25030 times
.

Untested in the wild; Hopefully it works well in real world situations. That is to say, I'd like it to detect the roaming turkeys without too many false alerts.

- Thomas

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: HTTP Get Stream -- ESPEasy Plugin Advice Needed

#6 Post by TD-er » 22 Sep 2021, 12:05

You need to keep in mind that those RCWL-0516 modules react to changes in the resonance frequency of water.
Thus the large walking bags of water (read: humans) will be detected fine, as will pets and turkeys.
However dew (or rain) water on tree leaves waving in the wind may also trigger the sensor.
You can make the sensor a bit more directional by adding metal "behind" it, but it must not be too close or else it may prevent the oscillator from running stable.
I tried it using metal cans, pringled tubes etc. but it is a bit tricky to get it right.

It is possible to get the analog reading of the signal, but that requires some soldering (only 1 wire to 1 pin of the chip and 1 resistor).
The analog signal is a bit tricky to process as it has a moving DC-offset, so you must look at the derived values.
But then you can even make it to show you wiggling your toes under the desk :)

I made a "presence detector" prototype of it almost 3 years ago, using a small Arduino board. One that can emulate an USB HID device, so it would press windows-key + L when no movement was detected in a while.
But it was really hard to get it right as you may easily detect motion from a floor down.

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: HTTP Get Stream -- ESPEasy Plugin Advice Needed

#7 Post by TD-er » 22 Sep 2021, 12:07

You need to keep in mind that those RCWL-0516 modules react to changes in the resonance frequency of water.
Thus the large walking bags of water (read: humans) will be detected fine, as will pets and turkeys.
However dew (or rain) water on tree leaves waving in the wind may also trigger the sensor.
You can make the sensor a bit more directional by adding metal "behind" it, but it must not be too close or else it may prevent the oscillator from running stable.
I tried it using metal cans, pringled tubes etc. but it is a bit tricky to get it right.

It is possible to get the analog reading of the signal, but that requires some soldering (only 1 wire to 1 pin of the chip and 1 resistor).
The analog signal is a bit tricky to process as it has a moving DC-offset, so you must look at the derived values.
But then you can even make it to show you wiggling your toes under the desk :)

I made a "presence detector" prototype of it almost 3 years ago, using a small Arduino board. One that can emulate an USB HID device, so it would press windows-key + L when no movement was detected in a while.
But it was really hard to get it right as you may easily detect motion from a floor down.

See: https://photos.app.goo.gl/Syf72n77nMNDqXix5

User avatar
ThomasB
Normal user
Posts: 1064
Joined: 17 Jun 2018, 20:41
Location: USA

Re: HTTP Get Stream -- ESPEasy Plugin Advice Needed

#8 Post by ThomasB » 22 Sep 2021, 18:29

Thanks for the information.

I'll be installing it today, so I'll soon experience the shortcomings. I don't need perfection, but I'm hoping the false alert issues are not going to kill the deal. Otherwise I'll have to go back to the IP camera concept.

- Thomas

User avatar
ThomasB
Normal user
Posts: 1064
Joined: 17 Jun 2018, 20:41
Location: USA

Re: HTTP Get Stream -- ESPEasy Plugin Advice Needed

#9 Post by ThomasB » 23 Sep 2021, 00:16

Preliminary outdoor testing is complete. Results = No Joy.

The RCWL-0516 microwave sensor is extremely sensitive indoors. In my lab I can trigger it from five meters by waving a hand. But outdoors the range is horrible; It ignores me unless I'm next to it.

Apparently short range has been experienced by other users that have tested it outdoors. Some discussions can found here: https://www.rogerclark.net/investigatin ... r-modules/

TLDR; The sensor works best in confined spaces which typically have RF reflective surfaces. Unfortunately my installation is outdoors away from such things.

- Thomas

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: HTTP Get Stream -- ESPEasy Plugin Advice Needed

#10 Post by TD-er » 23 Sep 2021, 08:41

Maybe you can add a metal surface a few cm away from it, in the direction where it does not need to "see"?
It does need some base level of reflections to "see" a change.

Other solution is to poor some small RFid tags in the grass and put a sign in your yard stating the turkeys should register first at the RFid reader.

User avatar
ThomasB
Normal user
Posts: 1064
Joined: 17 Jun 2018, 20:41
Location: USA

Re: HTTP Get Stream -- ESPEasy Plugin Advice Needed

#11 Post by ThomasB » 23 Sep 2021, 19:06

Other solution is to poor some small RFid tags in the grass and put a sign in your yard stating the turkeys should register first at the RFid reader.
These turkeys are extreme anti-taggers. Their feathered body, their choice.

Alexa announced a few "turkey warnings" early this morning (between 6:30A - 7:45A). They occurred randomly and all were false alarms. Dead air, mild temperatures, dry conditions, zero people/cars/animal activity. I studied the security cameras and there's no explanation for the motion triggers.

The uWave motion sensor concept seemed like a good idea. How wrong I was. I need to find another solution or just accept the mess my bird friends make.

- Thomas

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: HTTP Get Stream -- ESPEasy Plugin Advice Needed

#12 Post by TD-er » 23 Sep 2021, 21:50

Could the alarm be triggered by literally hitting dew point in the morning?

Too bad you have to deal with those anti-taggers.
"Take a pill, get (a) shot" didn't appeal to them?

User avatar
ThomasB
Normal user
Posts: 1064
Joined: 17 Jun 2018, 20:41
Location: USA

Re: HTTP Get Stream -- ESPEasy Plugin Advice Needed

#13 Post by ThomasB » 23 Sep 2021, 22:10

Could the alarm be triggered by literally hitting dew point in the morning?
Could be something like that. During the false Turkey alerts my weather station reported the temperature was 62F and online weather data reported a 52F dew point.

To add insult to injury, the turkeys visited an hour ago. Alexa said nothing. They walked within 2 meters of the sensor.
"Take a pill, get (a) shot" didn't appeal to them?
Maybe a cranberry sauce or gravy flavored pill will be to their liking.

- Thomas

Wookbert
Normal user
Posts: 132
Joined: 06 Nov 2020, 03:17

Re: HTTP Get Stream -- ESPEasy Plugin Advice Needed

#14 Post by Wookbert » 27 Sep 2021, 11:38

Silly question: How about simply installing an ultrasonic animal repeller, like this one?

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: HTTP Get Stream -- ESPEasy Plugin Advice Needed

#15 Post by TD-er » 27 Sep 2021, 11:51

Not sure if turkeys may be scared away by ultrasonic noise. I know snakes will not and those are mentioned in the description.
They can be detected by PIR I guess.

Wookbert
Normal user
Posts: 132
Joined: 06 Nov 2020, 03:17

Re: HTTP Get Stream -- ESPEasy Plugin Advice Needed

#16 Post by Wookbert » 27 Sep 2021, 12:06

Well, they advertise with raccoons, skunks, cats, dogs, deers and swans ... so I'd simply give it a try. My car sits in a big, dry, warm and cozy parking garage where they have a couple of these installed in order to keep the marters away. Seems to work.

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: HTTP Get Stream -- ESPEasy Plugin Advice Needed

#17 Post by TD-er » 27 Sep 2021, 12:27

Marters do indeed react to ultrasonic sounds.
Well... the definition of "ultrasonic" is a bit stretched here, as I can hear the unit installed in my brother's car very well, from several tens of meters away.

At least it seems to work, since his car apparently had very tasty wiring and tubes, according to marters taste.
Since he has this unit installed, the damages are reduced a lot.

User avatar
ThomasB
Normal user
Posts: 1064
Joined: 17 Jun 2018, 20:41
Location: USA

Re: HTTP Get Stream -- ESPEasy Plugin Advice Needed

#18 Post by ThomasB » 27 Sep 2021, 17:51

How about simply installing an ultrasonic animal repeller
Thanks for the suggestion. I installed ultrasonic repellers a couple years ago. Similar looking to your Amazon link. Despite the advertised claims, these little battery operated devices did not scare away birds and other animals. I watched all types of creatures (dogs, cats, birds, etc) completely ignore them.

TLDR; I put them in the location the turkeys like to visit. Same number of visits, same mess.

- Thomas

Wookbert
Normal user
Posts: 132
Joined: 06 Nov 2020, 03:17

Re: HTTP Get Stream -- ESPEasy Plugin Advice Needed

#19 Post by Wookbert » 27 Sep 2021, 20:40

The problem with the microwave radar in my opinion is that reacts to any motion, which could be in worst case a piece of paper or a plastic bag flying by (think of „American Beauty“). Pretty good choice for indoor scenarios, but problematic outdoors with „nature“ according to my experience with „Off the shelf“ Microwave Radar switches.

No idea how skilled you are or which motion detection Sw OpenHAB is using, but have you looked into OpenCV yet? Requires of course something a bit more powerful, like a Pi AFAIK. Or how about TensorFlow? The ultimate solution would be the spatial recognition of the turkeys and an automated cherry pit canon which hits the „poultry target“ with 100% accuracy. Make sure to post a video once it works! :D

Or plan B: Catch one once in a while and deep freeze it. The next Thanksgiving comes for sure and perhaps it's a warning for the rest of the gang. :lol:

Plan C: A dog named and looking like „Biff“ with a 6 meter leech attached to that little tree. :twisted:
Last edited by Wookbert on 27 Sep 2021, 23:11, edited 1 time in total.

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: HTTP Get Stream -- ESPEasy Plugin Advice Needed

#20 Post by TD-er » 27 Sep 2021, 22:40

This dog named Biff can also have a double task as mail notification (see "Origin and name section")

User avatar
ThomasB
Normal user
Posts: 1064
Joined: 17 Jun 2018, 20:41
Location: USA

Re: HTTP Get Stream -- ESPEasy Plugin Advice Needed

#21 Post by ThomasB » 27 Sep 2021, 23:02

I prefer your plans B - C. And if Biff could get my mail then that's nearly a deal maker. But something tells me that I would become the neighborhood villain if any feathers were harmed.

The reason I'm interested in using a Dahua IP camera is because their AI motion detection greatly reduce false motion events. It's possible to define not only the motion area, but also object size constraints. There's also line crossing events and other magic. All built into the camera, no external resources needed.

And the good news is that I was able to get an older version of OpenHab's IP Camera binding to work on OH2. Successfully installed today.

Now OH2 can detect motion events from my IP cameras. Currently experimenting with an existing Amcrest camera (without AI) that is aimed towards Turkey Central.

Must post photos or it didn't happen -- Snapshot of OH2 log below, which shows a couple motion detection events:
.
OpenHab2 Event Log. Motion Detected from IP Camera.
OpenHab2 Event Log. Motion Detected from IP Camera.
ipCamLog.jpg (90.91 KiB) Viewed 24472 times
.
Now I need to purchase an AI featured camera and dedicate it to turkey detection. I'll install it low and downward, so normal activity does not trigger motion events. I like the footprint of doorbell cameras (stealth installation on the nearby lamp post) but they don't have the AI features I want.

I'll probably have to find a way to disguise a turret camera. Maybe a garish bird house or garden gnome. Both of which would probably trigger the WAF alarm.

I'm still interested in experimenting with the microwave sensors. So a couple more modules are coming from China.

- Thomas

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: HTTP Get Stream -- ESPEasy Plugin Advice Needed

#22 Post by TD-er » 27 Sep 2021, 23:19

What about building a camera into a turkey garden planter?
Maybe that's not such a trigger on the WAF alarm and it may fool the neighbors into thinking you're not likely to harm any feathers or feather carriers.

Wookbert
Normal user
Posts: 132
Joined: 06 Nov 2020, 03:17

Re: HTTP Get Stream -- ESPEasy Plugin Advice Needed

#23 Post by Wookbert » 27 Sep 2021, 23:29

How about hiding the camera and microwave sensor in an animatronic wolf, which howls and growls on detection. All problems solved. Also available: Lion or T-Rex. :mrgreen:

https://www.alibaba.com/product-detail/ ... 33706.html

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: HTTP Get Stream -- ESPEasy Plugin Advice Needed

#24 Post by TD-er » 27 Sep 2021, 23:44

Also with a fair bulk discount, so it seems.

User avatar
ThomasB
Normal user
Posts: 1064
Joined: 17 Jun 2018, 20:41
Location: USA

Re: HTTP Get Stream -- ESPEasy Plugin Advice Needed

#25 Post by ThomasB » 27 Sep 2021, 23:45

What about building a camera into a turkey garden planter?
Do you mean a garden planter that looks like a turkey? If Amazon has one then I'm in.

Several years ago our next door neighbor placed a two meter long garden planter on their driveway. It was filled with yummy bird seed and nuts. Besides attracting squirrels and birds, the rat population increased a lot. The turkeys travel through my yard to get to it, digging up my gardens as they move along.

The neighbors recently removed the All-You-Can-Eat planter box. But the damage is done. The chance of a free meal is enough to keep the feathered rodents coming back. Old habits are hard to break, even for turkeys.
Also available: Lion or T-Rex.
Those things are awesome! I'll post a go-fund-me page soon.

- Thomas

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: HTTP Get Stream -- ESPEasy Plugin Advice Needed

#26 Post by TD-er » 27 Sep 2021, 23:50

ThomasB wrote: 27 Sep 2021, 23:45
What about building a camera into a turkey garden planter?
Do you mean a garden planter that looks like a turkey? If Amazon has one then I'm in.
[...]
Amazon garden turkey planter
The eye already seems to be prepared for electronics.

Maybe you need something a bit bigger, but this was the Google "I feel lucky" option

Wookbert
Normal user
Posts: 132
Joined: 06 Nov 2020, 03:17

Re: HTTP Get Stream -- ESPEasy Plugin Advice Needed

#27 Post by Wookbert » 28 Sep 2021, 00:07

In the end the turkey garden planter attracts even more turkeys, while the males might try to mate... :D


User avatar
ThomasB
Normal user
Posts: 1064
Joined: 17 Jun 2018, 20:41
Location: USA

Re: HTTP Get Stream -- ESPEasy Plugin Advice Needed

#29 Post by ThomasB » 28 Sep 2021, 00:25

Amazon has it all. Even turkey planters. Unfortunately there's the WAF issue. Too bad this good idea will go to waste.

A motion activated water sprayer *that works well* would probably chase away the turkeys. But human visitors might complain.

BTW, I installed a cheap ($40 USD) motion activated hose sprayer at our pond to stop the Blue Herons from eating the fish. Its PIR was triggered every few minutes by the wind. So everything was constantly wet. Reducing the sensitivity resulted in birds getting their lunch. So I returned it.

- Thomas

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: HTTP Get Stream -- ESPEasy Plugin Advice Needed

#30 Post by TD-er » 28 Sep 2021, 00:41

OK, maybe this will pass the WAF criteria? https://www.youtube.com/watch?v=3_YPpcCQZGY

User avatar
ThomasB
Normal user
Posts: 1064
Joined: 17 Jun 2018, 20:41
Location: USA

Re: HTTP Get Stream -- ESPEasy Plugin Advice Needed

#31 Post by ThomasB » 28 Sep 2021, 01:11

The Animal Bird Cannon is fantastic. I want it.

But my wife (and neighbors) won't enjoy wearing the mandatory ear plug protection. And the noise might cause PTSD in the neighborhood kids.

Seems I'm a very tough customer. Great ideas, all going to waste because of my unreasonably high expectations.

- Thomas

Wookbert
Normal user
Posts: 132
Joined: 06 Nov 2020, 03:17

Re: HTTP Get Stream -- ESPEasy Plugin Advice Needed

#32 Post by Wookbert » 28 Sep 2021, 01:18

Give the wife a pair of nuraphones. She can enjoy her favorite tunes, while the bird canon blasts and won't hear a bit. Perfect insulation (combined in-ear and overear) + awesome, if not to say mind-blowing sound quality when needed + ANC + built-in mic with Social Mode on tap of the capacitive side button, so she can communicate with you without even having to take them off.

Satisfaction guaranteed. I bought them back then through Kickstarter (despite the lack of turkeys in my non-existing yard) and put them on – even without music – whenever I need to focus.

User avatar
ThomasB
Normal user
Posts: 1064
Joined: 17 Jun 2018, 20:41
Location: USA

Re: HTTP Get Stream -- ESPEasy Plugin Advice Needed

#33 Post by ThomasB » 28 Sep 2021, 02:02

Buying Nuraphones for my wife and neighbors is a budget buster. Yet another fine idea going to waste.

The feathered monsters were a no-show today. No doubt they sense that I'm closely watching for their arrival.

The Dahau WiFi camera I ordered last week was delivered today. I'm still thinking about how to blend it into the front yard and remain WAF compliant. In the meantime I'll do more testing to see if my IP Camera idea is a practical way to solve the problem.

- Thomas

Wookbert
Normal user
Posts: 132
Joined: 06 Nov 2020, 03:17

Re: HTTP Get Stream -- ESPEasy Plugin Advice Needed

#34 Post by Wookbert » 28 Sep 2021, 02:12

Planting something the monsters can’t stand, smell- or taste-wise? Difficult issue, not to be solved with an ESPEasy firmware update...

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: HTTP Get Stream -- ESPEasy Plugin Advice Needed

#35 Post by TD-er » 28 Sep 2021, 10:07

Maybe if you pour some seeds in your garage to get the turkeys at a managable position may help you getting back to the idea of the cheap radar module as you're inside then.
Is probably also easier when wiring things.

Wookbert
Normal user
Posts: 132
Joined: 06 Nov 2020, 03:17

Re: HTTP Get Stream -- ESPEasy Plugin Advice Needed

#36 Post by Wookbert » 28 Sep 2021, 12:10

With the garage door closing after three minutes after the first motion detection inside the garage. A giant living mouse, uh … turkey trap. Awesome.
Last edited by Wookbert on 28 Sep 2021, 14:58, edited 1 time in total.

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: HTTP Get Stream -- ESPEasy Plugin Advice Needed

#37 Post by TD-er » 28 Sep 2021, 13:39

Yesterday when I tried to search for "garden turkey..." Google autocompleted it and those images looked quite tasty :) ("garden turkey burger")

Wookbert
Normal user
Posts: 132
Joined: 06 Nov 2020, 03:17

Re: HTTP Get Stream -- ESPEasy Plugin Advice Needed

#38 Post by Wookbert » 28 Sep 2021, 15:00

This discussion is drifting off a bit... :D

Image

User avatar
ThomasB
Normal user
Posts: 1064
Joined: 17 Jun 2018, 20:41
Location: USA

Re: HTTP Get Stream -- ESPEasy Plugin Advice Needed

#39 Post by ThomasB » 28 Sep 2021, 22:20

It's lunch time and a turkey burger sounds good.

I temporarily setup the new Dahua IP Camera at the intended outdoor location. This camera reports video motion, tripwire, and intrusion alarm events. The latter two "IVS" features are what make this camera special.

As expected, the video motion feature created too many false hits. All because of raindrops, flying bugs, and passing car headlights. But I don't plan on using the video motion function.

The tripwire and intrusion IVS functions did great. The turkeys did not visit, but the camera sent one intrusion alert at 5AM when a little skunk walked by. No false hits, just what I want.

Unfortunately, OpenHab's IP Camera binding isn't recognizing the IVS events sent from the camera. Video motion events work, but IVS events are missing. It appears to be a software bug that was recently fixed. But the working release is not compatible with my OpenHab version. I'm on OH2 and the working release requires OH3.

So I'm investigating a solution. In the meantime, I'll see what I can do to encourage the turkeys to rest between two pieces of toasted bread.

Sep-29-2021 Update:

Good news: The camera successfully detects the turkeys. And without any false alert issues. So the Dahua IVS camera is a reliable solution for what I have in mind.

Bad news: Using the camera to voice announce turkey alerts (via Amazon Alexa) means I have to upgrade my OpenHab home automation system to the latest release (OH3). I'm a bit dazed by amount of work this would entail.

Perhaps a coin toss will be the deciding factor towards the next step. Or maybe I just need to accept my feathered visitors and tolerate their bad behavior. But that means they win ... and I'm too stubborn to give up.

- Thomas

User avatar
ThomasB
Normal user
Posts: 1064
Joined: 17 Jun 2018, 20:41
Location: USA

Re: HTTP Get Stream -- ESPEasy Plugin Advice Needed

#40 Post by ThomasB » 01 Oct 2021, 19:44

I got it working! Alexa is now telling me when the turkey invaders are in the garden. Works better than expected, so far zero false alerts.

The solution was crazy simple. I used a different IP camera (Amcrest brand re-flashed with Dahua firmware). It works perfectly with my OpenHab 2.4 installation; No need to upgrade to OH3.

I intended this to be a ESPEasy project. But sometimes life leads us on a different path. No worries, the abandoned ESPEasy device will soon find use in another project.

- Thomas

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: HTTP Get Stream -- ESPEasy Plugin Advice Needed

#41 Post by TD-er » 01 Oct 2021, 21:52

You still need something to scare them.
So still use for the ESPeasy node :)

User avatar
ThomasB
Normal user
Posts: 1064
Joined: 17 Jun 2018, 20:41
Location: USA

Re: HTTP Get Stream -- ESPEasy Plugin Advice Needed

#42 Post by ThomasB » 01 Oct 2021, 22:19

TD-er wrote: 01 Oct 2021, 21:52 You still need something to scare them.
So still use for the ESPeasy node :)
Good point. I have to think about this.

These feathered critters can be early risers. For example, they visited today at sunrise. And they ignore me when I yell at them; I practically have to hold their hand to escort them off the property. So I need an ESPEasy controlled scare tactic that does not disturb sleeping neighbors or damage property. Plus satisfy the WAF issues.

I definitely have to avoid explosive charges and trebuchet machines.

- Thomas

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: HTTP Get Stream -- ESPEasy Plugin Advice Needed

#43 Post by TD-er » 01 Oct 2021, 22:49

Sprinklers?
They seem innocent to the uninformed, but well timed they can be very effective in a number of ways :)

User avatar
ThomasB
Normal user
Posts: 1064
Joined: 17 Jun 2018, 20:41
Location: USA

Re: HTTP Get Stream -- ESPEasy Plugin Advice Needed

#44 Post by ThomasB » 01 Oct 2021, 23:13

Sprinklers?
That's probably the best option. Now that I have intelligent camera detection a sprinkler is safe to use. It will avoid the water waste I experienced with a PIR activated sprinkler.
.
High Tech Turkey Weapon
High Tech Turkey Weapon
sprinkler.jpg (51.87 KiB) Viewed 23890 times
.

I might have a donor sprinkler in the shed. And/or I can visit Mr. Bezos' shop. He usually has everything I need.

- Thomas

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: HTTP Get Stream -- ESPEasy Plugin Advice Needed

#45 Post by TD-er » 01 Oct 2021, 23:34

Maybe more something like this? https://www.youtube.com/watch?v=ByxsbradSVM
There's no such thing as overkill ;)

User avatar
ThomasB
Normal user
Posts: 1064
Joined: 17 Jun 2018, 20:41
Location: USA

Re: HTTP Get Stream -- ESPEasy Plugin Advice Needed

#46 Post by ThomasB » 02 Oct 2021, 00:09

Maybe more something like this? https://www.youtube.com/watch?v=ByxsbradSVM
Nice find. I'll put it on the shopping list for a future upgrade.

Mr. Bezos sells a 4.5VDC 3-wire sprinkler valve intended for a battery operated timer. Just need to add transistor drivers to the ESPEasy for operating its latching solenoids.
https://www.amazon.com/gp/product/B003LY4I2I/

- Thomas

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: HTTP Get Stream -- ESPEasy Plugin Advice Needed

#47 Post by TD-er » 02 Oct 2021, 00:55

Don't forget the diode, or else the turkeys will last longer than the electronics.

User avatar
ThomasB
Normal user
Posts: 1064
Joined: 17 Jun 2018, 20:41
Location: USA

Re: HTTP Get Stream -- ESPEasy Plugin Advice Needed

#48 Post by ThomasB » 02 Oct 2021, 02:39

Don't forget the diode
That's an important public service announcement.

BTW, I did a bit more reading and it's unclear what voltage the valve requires. It's suppose to plug into a timer that operates on three AA cells. So I assumed 4.5V valve operation.

Reading through the reviews I learned that an older timer model had a 24V DC-DC step up converter in it. But this new valve is for an updated timer that supplies an unspecified voltage. Previously a 3-wire connection, now only 2-wires. So it's a mystery until I get my hands on one. I suspect I'll need to use a bridge driver.

- Thomas

User avatar
ThomasB
Normal user
Posts: 1064
Joined: 17 Jun 2018, 20:41
Location: USA

Re: HTTP Get Stream -- ESPEasy Plugin Advice Needed

#49 Post by ThomasB » 06 Oct 2021, 20:50

The camera detection continues to be a winner. Alexa announces each Turkey attack and I do the dirty work. But chasing the feathered raiders out of the garden is getting old and seriously needs automation. So a WiFi controlled (ESPEasy) water cannon is under construction.

FWIW, there are inexpensive (<$50 USD) WiFi and/or Bluetooth battery operated sprinkler timers on the market. But I found none that are MQTT or http compatible (all require API access). So I will put that unused ESPEasy device to work.

I now have the Orbit 58874 valve. And I found an online project that discussed how to use it. All the mysteries have been answered.
https://www.amazon.com/dp/B003LY4I2I
http://rayshobby.blogspot.com/2010/06/m ... oller.html

The valve has a single 24VDC 5 ohm coil that actuates the on/off operation. The official controller is a 2-cell AA battery powered device. When triggered, its DC-DC boost converter charges a 2200uF cap. The stored current is then dumped into the coil to operate it. The polarity determines the On or Off operation.

So my WiFi solution will emulate the coil driving circuit. ESPEasy will run on a D1 Mini Pro (ESP8266). Rather than use a DC-DC boost converter, I intend to power everything with a 24VDC wall wart. A 5V DC-DC VReg will run the DI Mini Pro. A BTS7960 H-Bridge Module will be used to drive the valve solenoid.

Here's the board layout (under construction). All the bits are mounted on a scrap piece of Perfboard. I didn't have a 2200uF/35V cap so I used a bank of 470uF/50V caps wired in parallel.
.
PCB Under Construction
PCB Under Construction
PCB2.jpg (186.1 KiB) Viewed 23291 times
.
I have the perfect sprinkler for the job. Just need the Super Soaker controller to automatically flush out the birds. <evilScientist> Woo haa haa. </evilScientist>

If time allows, I hope to have it running by the end of the week.

- Thomas

Wookbert
Normal user
Posts: 132
Joined: 06 Nov 2020, 03:17

Re: HTTP Get Stream -- ESPEasy Plugin Advice Needed

#50 Post by Wookbert » 06 Oct 2021, 21:47

Plenty of electric valves, also with 12V and some shipping from the US, on AliExpress.

Most important of all: Don't forget to post a video with the sprinkler automatically shooting the raiders!

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 11 guests