Outdoor sensors

Started by soxfan1966, March 05, 2019, 06:15:42 AM

Previous topic - Next topic

soxfan1966

So the cameras have the ability to trigger an action on the camera - alert notification, email a pic, take a video snippet.

What I'd like is for HG to recognize that and turn on anexterior light via x10.

Tuicemen

What you'd have to do is have HG watch your email inbox for one from the camera and if seen trigger a light on.
The issue would be if all cameras send the same email notification. Either the subject or message would need to be unique.
Please Read Topic:
General Forum Etiquette
Before you post!

soxfan1966

Subject is different per camera, so he could I have HG monitor my email for a specific subject line ?  I'd be willing to test, would be curious on the time it would take to have the camera send the email, have HG recognize it, and then trigger the x10 light.

Tuicemen

It certainly would be possible to code such a program, however there may already be something like that created.
You may have to do some digging into the old HG forum and the repository.
I believe bkenobi may have had something to watch emails. If not I think I had something coded in one of my old programs which I may be able to convert to C# for HG
Please Read Topic:
General Forum Etiquette
Before you post!

soxfan1966

All righty - back to this effort now.

So my wife is pretty much annoyed with the results of the x10 sensors outside to trigger the back deck light.

So I am hopping I can get the IP Camera to be used as a trigger.  I did not try the email approach yet because I am worried the time it will take to get the email, have HG process it and then trigger the light to come on will take too long.

So I am trying this - I created a Program using the Sensor in HG tied to my IP Camera as follows:


bkenobi

Unless you have the sensor/IP camera tied directly to your HG script, you will have a delay.  The delay will depend on the method used, but I have found that the quickest way to trigger a motion sensor is to have it hooked up the the RPi GPIO directly.  X10 RF is fairly quick, but it isn't 100% received (which is why it sends several times).  If it misses the transmit, you will have to stand still for a few seconds and then move again for the module to send the motion signal again.  If the IP camera is cloud based, the time it takes for upload to the cloud and then notify HG may be a few seconds too.  If it notifies HG directly, it will probably be fairly quick so long as the code in HG is set up correctly.

soxfan1966

I'm not sure how I would do this:
the quickest way to trigger a motion sensor is to have it hooked up the the RPi GPIO directly.

But you are correct in that a delay makes it not do what I needit to do, so the fastest way to get it to trigger is what I'm trying to achieve.

bkenobi

Hooking into the GPIO would be the absolute fastest way, but that doesn't mean other ways aren't acceptable.  In my case since I use X10 lights activated by the motion sensor, I still have ~0.5s delay no matter what.  I used to utilize a Power Flash module to do the same thing.  Although the delay was then closer to 1s, I found it acceptable.  I have some motion sensor lights on my shop that are very fast (damn near instant most of the time).  However, even these don't detect on the first motion sometimes and therefor are up to 2-5 seconds to trigger when I'm walking right under them.  Basically, even commercial, hard wired motion sensing lights aren't always instantaneous.

soxfan1966

Could you please explain more about "Hooking into the GPIO" - what does that mean, and how do you do it?

bkenobi

HG has an APP for using the GPIO's.  Turn it on and follow the instructions for setting up the desired GPIO.  I don't remember which ones it uses, but I think it's 4, 23-25 or something.  Read the RPi guide on GPIO for a primer.

https://www.raspberrypi.org/documentation/usage/gpio/

Once you have something hooked up to the RPi's GPIO, you will need to set that device up as a sensor.  If you add that module to your dashboard you can see it change states when you toggle the GPIO to ground.  If that works, set up some logic to use it how you want.

soxfan1966

Thank you for the info, I appreciate it.  For what I am trying to accomplish in this case that is outside the scope of what I want to do.  But I read thru the info in the link and at least now I understand what GPIO is :)

soxfan1966

Just an update - since relocating my PiX10Hub upstairs the outdoor sensor for my back deck steps has been better.  I am going to continue to monitor it and go from there.  Thanks

bkenobi

The location of the transmitter (motion sensor) and receiver (CM15A) are critical in performance of the system.  The passive antenna mods do work quite well.  I know they look like one of those magic hoax devices to improve your internet speed on your phone, but there is math behind them and it actually does work.  I added a 1/2 wave passive antenna (18" wire) behind one of my MS16A sensors and went from terrible performance to very good.  It's not perfect, but it triggers 90-95% of the time which is acceptable for my wood shed.  It would not be good enough for my entry lights.  To be fair, the majority of the improvement in my RF was based on the RadioShack antenna installed high in the attic and in-line amplifier I added to my CM15A.  Without it I could use my HR12A in some of the house.  With it, I can be over 100 feet away from the house in the woods and turn on my back yard lighting.  Even the key chain remotes work at very good range.