I want to have my photon sense when an outdoor light motion sensor is on, and then send API commands to my HUE hub. I struggle with the electrical theory side of things… Starting with the hardware side of things… I had 2 ideas:
Run the switched load wire of the outdoor sensor to a relay that then the photon is connected to, either normally open or closed. Would this work, and would I need a mechanical relay because of the voltage leak of a solid state relay, using such low voltage (had that issue with my ecobee and my air handler, had to have all mechanical relays)?
Some how using a small AC to DC Power Module Supply to send a signal to one of the input ports on the photon. The light sensor activating would power the power module and send a signal to the photon.
-OR- is there a better way to do this? It needs to be simple, reliable, and cost effective. If I can just sense when AC voltage is present, I can do all sorts of things with the photon. I don’t want a current sensor, because the motion sensor will not be hooked to anything.
Any link to a similar effort would be most helpful.
Both methods you suggest would work as well as the method @ScruffR suggests. Your statements about motion sensor not hooked to anything and this is an outdoor light are confusing. That bit aside… Thinking out of the box (and unobtrusively) here are other ideas:
Use a photosensor to sense when the light is on. Very cheap and you can adjust sensitivity in code or analog (using potentiometers).
Use a thermistor (or other temperature sensor) to detect heat from the light when it is on (assuming incandescent flood… if LED or even CFL, it might not work).
Sorry for the confusion in my question… Let me try to explain more clearly the goal. I want to use Philips HUE Par38 bulbs in my outdoor light fixture. We use HUE lights all around the house and want to incorporate the outside lights in with the rest of our automation. But one issue with the HUE lights is they do not have an outdoor motion sensor. Now we have been using RAB outdoor motion sensors for a couple years and they work great! So I want to continue to use the RAB motion sensor, but with the new HUE Par38 bulbs. The HUE bulbs need to be powered all the time in order for them to work with automation. So I can not have the motion sensor powering them, but rather have to power them continuously. I now want to use the RAB motion sensor to detect motion, and send a signal to the Photon, in which I will then send a call to the HUE hub to turn on the lights. If I can get this working, I can then use multiple RAB motion sensors around our property to turn on lights in groups, and do other things like start recording on a CAM.
So, I don’t want to monitor the status of the lights, but rather the status of the RAB motion sensor.
You say that either of my suggestions will work… could you weigh in on which is the best and why you think so?
Do you have any thoughts on my 2 proposed options? Is it possible to send a 3v signal into the Photon from a power source other then the one the Photon is running on? How would something like that be grounded, or would I just run the positive 3v wire into one of the analog ports?
Have you ever used a solid state relay with the IO pins on the Photon?
If using a typical USB A/microB charger or cable, cut the microB-USB end off the cable. You will see 4 wires; 2 for data, one for +5V and one for Ground (GND). Attach the charger GND to the Photon GND, then attach the charger +5V wire to any 5v-tolerant Photon input pin. You will need wire cutters, a wire stripper and depending on how you want to attach to the photon, perhaps some solder.
You have a few options for powering a photon… but I’m not sure of you whole intent now. Will you have one Photon per motion sensor? If yes, then you could use the phone charger unmodified and attach it to your Photon’s USB in. When motion is detected, power will be supplied to the Photon and then Photon can start sending “Motion detected messaged”. When the motion sensor times out, the Photon will loose power and you know that motion is no longer detected when the messages stop. It’s not elegant and you probably won’t be able to send “Motion not detected” or “motion stopped” messages.
If you want the Photon powered at all times, you will need 2 chargers. One on the switched mains voltage to power the Photon (via USB or Vin… it’s all the same and depends on how you want to package your Photon). The other phone charger would be on the switched motion detection circuit. The switched charger would attach to the same ground reference as the always-on supply. The switched +5V wire can be attached to any 5v-tolerant input pin.