Please login or register.

Login with username, password and session length
Pages: [1] 2 3

Author Topic: Implementing vacancy sensor for X10 wall light switches ?  (Read 7055 times)

madbrain

  • Sr. Member
  • ****
  • Helpful Post Rating: 0
  • Posts: 121
Implementing vacancy sensor for X10 wall light switches ?
« on: November 26, 2021, 10:55:05 PM »

11 years ago, I replaced nearly all the switches in my home with so-called "vacancy switches", which turn off the power in the absence of motion after a set time. The only exception are for the outdoor light switches, which I left as regular switches, and turn on and off manually. The other exception are 4 X10 switches, one in my home office that turns the ceiling light on/off, and 3 in my home theater to control the ceiling cans also.

We have taken the bad habit of rarely turning off the lights manually when we leave a room, since they turn off automatically anyway eventually. But those two rooms are exceptions. I'd like to figure out a way to have the lights stay on when we there is motion, and turn themselves off when no motion is detected for a set time.

Right now, I'm using a very crude solution - a cron job on my Odroid XU4 that runs heyu and turns the lights off in my home theater every 30 minutes. This can be extremely annoying though, when you have just turned them on. Or while working on the HTPC or wires, when the lights turn off suddenly. Is there any kind of motion sensor that can be hooked up to accomplish what's needed here ? The Odroid XU4 device is currently in my home office, not in the home theater. It could be relocated to the home theater if needed, though, but I would prefer not to. 10gig ethernet and Wifi are both available in the home theater.

Are there any off-the-shelf components & software on the market that could be used to do what I want ?
Logged

smatofu

  • Full Member
  • ***
  • Helpful Post Rating: 3
  • Posts: 52
Re: Implementing vacancy sensor for X10 wall light switches ?
« Reply #1 on: December 18, 2021, 02:29:45 PM »

I assume we are talking about X10 stuff. Here is how you can implement it:
You will need CM15A and macros

Motion sensor, light on -> trigger macro on CM15A -> turn light on
Motion sensor, timer, light off -> trigger macro on CM15A -> turn light off

You can make the 2nd macro (turning light off) conditional to a flag. The flag is clear by default. If you set the flag, the macro will not run and your light will not turn off.

I am sure the method is described in details somewhere on this forum.



Logged

madbrain

  • Sr. Member
  • ****
  • Helpful Post Rating: 0
  • Posts: 121
Re: Implementing vacancy sensor for X10 wall light switches ?
« Reply #2 on: December 22, 2021, 11:06:45 PM »

I assume we are talking about X10 stuff. Here is how you can implement it:
You will need CM15A and macros

Thanks for your response. I just saw it somehow. My understanding is that X10 hardware isn't capable of this. At least this is what X10 themselves told me a while back. This could be wrong of course, or have changed. Which X10 motion sensor hardware would you suggest I use ?

Also, as far as I can tell, all the X10 motion sensors are battery powered also, has this changed ? I really don't want to have my home automation depend on batteries. Something either plug-in or ideally hardwired would be much preferred.

What I'm trying to do essentially is replace a Leviton IPP15 hardwired switch. That switch just cuts off the power to what's connected to it when no motion has been detected for a set time, typically 30 minutes (default setting, which I use).

These Leviton switches use very little power, definitely under 1 watt. I'm not able to measure it, but I have nearly a hundred of them in my house. I'm not looking to replace all of them. This is only for two rooms that I have X10 switches in - my home theater and my home office. If I find a good solution, I might add some to my master bedroom.

In my mind, I'd like the motion sensor to send some sort of signal at the expiration of the timer, that a home automation computer could receive and act upon. Preferably something hardwired. It doesn't have to be x10. A home automation computer needs to be able to receive that signal and act on, for example, by sending a few X10 signals through the powerline.

Quote
Motion sensor, light on -> trigger macro on CM15A -> turn light on

With a vacancy sensor, the sensor never turns on the light, so I don't think this is right.
When motion is detected, it means the light is kept on, if it is already on. If it's already off, it stays off.

Quote
Motion sensor, timer, light off -> trigger macro on CM15A -> turn light off
You can make the 2nd macro (turning light off) conditional to a flag. The flag is clear by default. If you set the flag, the macro will not run and your light will not turn off.

Can you explain this a bit better ? Which software allows programming this ?

You said I needed the CM15A, so are you talking about ActiveHome Pro ?
I am currently using a single board computer for my automation, running Linux, with a CM11A. I don't want to use a Windows PC due to power consumption. The whole point of my home automation is to save energy, and keeping a Windows PC on would negate that goal.

Quote
I am sure the method is described in details somewhere on this forum.

I would really appreciate a link. I wasn't able to find it through searches.
Logged

petera

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 27
  • Posts: 1750
Re: Implementing vacancy sensor for X10 wall light switches ?
« Reply #3 on: December 23, 2021, 05:17:56 AM »

If you’re comfortable in the Linux world and familiar with C# or Python install Home Genie on an SD card and run it on your Odroid. It has excellent X10 support and your CM11 will be supported straight out of the box. No need to install Heyu either. All those events you mentioned above can be simply created and will be fully functional. There’s plenty of discussion here on the subject and you can get more background here
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10497
  • I don't work for X10, I use it successfuly!
Re: Implementing vacancy sensor for X10 wall light switches ?
« Reply #4 on: December 23, 2021, 07:48:02 AM »

I second petera's recomendation of HomeGenie.
I ran it on an Odroid C0 briefly until I moved to a Pi. It handles multiple protocols allowing all to be meshed together so you can control one protocol with another's input.
I use several protocols in conjunction with X10 in my setup.
It supports many programing languages besides C#  and you don't need to know any of them but it helps inorder to get the most out of HomeGenie.
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

bkenobi

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 24
  • Posts: 2081
Re: Implementing vacancy sensor for X10 wall light switches ?
« Reply #5 on: December 23, 2021, 11:33:20 AM »

To my knowledge, there is only one native X10 motion sensor that is powered by AC (PR511).  All others are battery powered as you have found.  However, it is an exterior dual flood light with a wired motion sensor so not exactly what you were looking for most likely.

http://kbase.x10.com/wiki/Dual_Floodlight_Motion_Detector

I have one I picked up at some point second hand that I intended to remove from the flood light housing and user as a hard wired motion sensor but didn't follow through.  It appears that the base of the motion sensor should screw into any standard exterior light box.  I used a similar approach with a standard motion sensor for lighting and wired it to my RPi GPIO.  Had that not worked, my backup was to use the PR511.

If you are considering using a different HA software than AHP (such as HG), you have a lot of other options though.  If you go with such a system, you can find any motion sensor from any compatible system and merge them through HG (or whatever).  This is what I would recommend today.  Pick the best components and use an HA software that can combine them into a larger system rather than sticking with just X10.

madbrain

  • Sr. Member
  • ****
  • Helpful Post Rating: 0
  • Posts: 121
Re: Implementing vacancy sensor for X10 wall light switches ?
« Reply #6 on: December 26, 2021, 10:50:15 PM »

Thanks, guys. I setup HomeGenie on my Raspberry Pi 3B+ yesterday. I have 5 single-board computers at my disposal, and I figured the 3B+ was probably the most suitable for this task.

I have setup all my X10 switches, just XPS3 and XPS4.  I also have a couple of appliance modules, and they work also, as well as X10 can be expected to given noise (meaning, not always 100% the first time).

I'm still wondering about what hardware I could use for the motion sensors. I don't want to use the floodlight motion sensor detector as this is for indoor use, and not necessarily for flood lights. I would prefer something that's either plug-in or hardwired, ideally.

The main applications I want to implement are vacancy sensors - automatically turn off the lights when occupants have left in the room.

For another use case, I also want to implement more traditional motion sensor - turn on the circulation pump (controlled by an XPS4) only if someone enters certain areas (bathroom, kitchen), and turn them off when they leave. The circulation pump uses 80W, which is 700 kWh a year. I have two water heaters and want to add a second circulation pump also, but not if it has to run 24/7.

Lastly, I have a couple of TP-Link Kasa Wifi smartplugs. Is there any way to integrate those with HomeGenie ?

Where I can find the full list of hardware supported by Home Genie ?

Logged

bkenobi

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 24
  • Posts: 2081
Re: Implementing vacancy sensor for X10 wall light switches ?
« Reply #7 on: December 27, 2021, 12:28:01 PM »

You can use anything that you want that will work with HG truthfully.  That means anything X10, Insteon, Z-Wave, Philips Hue, UPnP/DLNA, RFXCom, KNX, WiFi, etc.  You can actually use other protocols if you have the know how to write the interface, but lets just assume you are not going to do that since it's fairly involved and relatively unsupported by the dev at this point.

I went a different route than these on my second setup.  I initially used a set of MS16A and hated them.  I went instead to a hardwired 120VAC motion sensor module (this one I think in white https://heath-zenith.com/products/pir-500w-240deg-sen-hd-bz-w-db?taxon_id=42).  I installed a 120VAC relay and had to add a small incandescent bulb (40W I think) as that was the minimum control load for this module.  If you pick something similar with LED compatibility, I suspect you will be able to use something smaller.  I initially ran this to a PowerFlash module, but it got burned out 2x because of wind in a tree right next to it creating thousands of triggers.  I moved on to RPi GPIO by simply running a pair of wires from the relay to the RPi.

If I were to do this again today, I think I'd probably look for a set of outdoor linked carriage lamps with motion sensors.  If nothing off the shelf exists, I'd make my own setup again.

petera

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 27
  • Posts: 1750
Re: Implementing vacancy sensor for X10 wall light switches ?
« Reply #8 on: December 27, 2021, 05:44:15 PM »

This is a link to all the HG documentation and protocols you are likely to need. If I’m not mistaken you’ve already asked a question on the subject of TP Link on the HG forum too. Anyway this link along with the HG forum should help you on your way. https://genielabs.github.io/HomeGenie/
Logged

madbrain

  • Sr. Member
  • ****
  • Helpful Post Rating: 0
  • Posts: 121
Re: Implementing vacancy sensor for X10 wall light switches ?
« Reply #9 on: December 29, 2021, 09:04:05 AM »

You can use anything that you want that will work with HG truthfully.  That means anything X10, Insteon, Z-Wave, Philips Hue, UPnP/DLNA, RFXCom, KNX, WiFi, etc. 

Thanks for your reply. "anything" is just too vague, sorry. Surely there are some devices that are supported, and others that are not. I'm merely trying to ascertain which ones are. A few weeks ago, Costco had Feit Wifi smartplugs for $15 for a set of 3. They had pretty terrible reviews, so I passed. Would those have worked with HG ? Anyway, those are plug-in modules, not hardwired, and they are not motion sensing, so they really aren't applicable to the topic of vacancy sensors.

Quote
You can actually use other protocols if you have the know how to write the interface, but lets just assume you are not going to do that since it's fairly involved and relatively unsupported by the dev at this point.

I probably wouldn't be looking to do that, not at this time at least.

Quote
I went a different route than these on my second setup.  I initially used a set of MS16A and hated them.  I went instead to a hardwired 120VAC motion sensor module (this one I think in white https://heath-zenith.com/products/pir-500w-240deg-sen-hd-bz-w-db?taxon_id=42).  I installed a 120VAC relay and had to add a small incandescent bulb (40W I think) as that was the minimum control load for this module.  If you pick something similar with LED compatibility, I suspect you will be able to use something smaller.  I initially ran this to a PowerFlash module, but it got burned out 2x because of wind in a tree right next to it creating thousands of triggers.  I moved on to RPi GPIO by simply running a pair of wires from the relay to the RPi.

If I were to do this again today, I think I'd probably look for a set of outdoor linked carriage lamps with motion sensors.  If nothing off the shelf exists, I'd make my own setup again.

I feel like we are talking about completely different things. The MS16A, and the Heath Zenith switch you are pointing to, turn on the lights. They are security lights, primarily for outdoor use. They are not vacancy sensors. Vacancy sensors never turn on the lights.

Vacancy sensors are motion sensors that turn off the lights automatically when you leave a room, if you forget to turn them off manually yourself, for example a kitchen or bathroom. These sensors never turn on the lights. The lights have been previously turned on manually by the occupant using a physical switch - local control. The entire point of vacancy sensors is to save energy by never leaving the lights on unnecessarily, so something that would require a 40W minimum load would be automatically disqualified as a vacancy sensor. I can't really imagine using vacancy sensors outdoors, although it would be possible in a patio, maybe.

Ideally, this would be implemented as part of an XPS3/XPS4 switch. There would be a programmable motion sensor integrated to the switch, that would turn the lights off after the occupant leaves. Of course, X10 does not sell such a product. So I'm trying to make do and substitute the missing motion sensor - have the Pi notice that occupants have left, and turn off the lights, in case they were forgotten and left off. This is very easy to do when 97 switches in the house are Leviton motion sensing and always turn them off for you if you forgot, but three XPS3 switches in the home theater , and one XPS3 in the office, don't turn the lights off.

My Leviton IPP15/IPP0R switches already turn the lights off, but they are dumb switches, not smart ones. If I used those switches in my home theater, I couldn't turn the lights on or off from my couch using my IR remote and the IR543, as I have been doing for decades. So, I'm using XPS3/XPS4 switches. But they lack motion sensing ...
Logged

JeffVolp

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 122
  • Posts: 2285
    • XTB Home Page
Re: Implementing vacancy sensor for X10 wall light switches ?
« Reply #10 on: December 29, 2021, 12:57:46 PM »

For another use case, I also want to implement more traditional motion sensor - turn on the circulation pump (controlled by an XPS4) only if someone enters certain areas (bathroom, kitchen), and turn them off when they leave. The circulation pump uses 80W, which is 700 kWh a year. I have two water heaters and want to add a second circulation pump also, but not if it has to run 24/7.

I added a circulation pump for our hot water back when we built this house.  I insulated the run and found that running the pump just 70 seconds every 15 minutes keeps hot water immediately available at all faucets.  (It switches off during the night.)  Using a motion detector could still result in a short delay before hot water reaches a more distant faucet.

Jeff
Logged
X-10 automation since the BSR days

madbrain

  • Sr. Member
  • ****
  • Helpful Post Rating: 0
  • Posts: 121
Re: Implementing vacancy sensor for X10 wall light switches ?
« Reply #11 on: December 29, 2021, 08:40:42 PM »

I added a circulation pump for our hot water back when we built this house.  I insulated the run and found that running the pump just 70 seconds every 15 minutes keeps hot water immediately available at all faucets.  (It switches off during the night.)  Using a motion detector could still result in a short delay before hot water reaches a more distant faucet.

Thanks ! I'm not really sure about the insulation of our plumbing. I live in the SF Bay area, where it hardly ever gets cold. We have freezing temps between 0 - 3 nights a year.  I think we might have just had one this week. I am going to experiment with running the pump at short intervals like you suggested.

One of the reasons I like it off is that it's near a guest bedroom and my home theater, and can be heard through walls. My mother is visiting from France at the moment, and sleeping in the guest bedroom. And we watch a lot of stuff in the home theater. It just bothers me a bit in quiet passages to hear the pump. I got somewhat used to it, but would prefer for it to be off while watching. And of course, there is the power savings aspect too.

I definitely want a motion sensor in the home theater to turn off the lights. And probably want one in the bathroom too to turn on the pump. Maybe a complex program can be devised that takes the state of both into account, as well as time of day.
« Last Edit: December 29, 2021, 08:42:32 PM by madbrain »
Logged

bkenobi

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 24
  • Posts: 2081
Re: Implementing vacancy sensor for X10 wall light switches ?
« Reply #12 on: December 30, 2021, 07:27:21 PM »

I didn't mean to suggest that the motion sensors I use would work directly.  I simply meant to point out that if you can't find a sensor that works exactly how you want it to, you can always get creative and come at the problem from a different direction.  My exterior lights were to show that even though there are motion sensors I could plug in to my setup (battery powered, so "plug in" is not exactly right...), they didn't really get me what I wanted.  I was able to use a similar device in a different way to get what I needed.

As for what specific devices work, I don't know if HG has a list of supported devices.  If the protocol is supported, then it should work but may require tinkering.  If it's explicitly mentioned as supported in the HG forum, HG github, HG homepage, or HG old forum (link on the current HG forum) then you should be good.  In general, I've heard people using X10, Insteon, Amazon compatible devices (anything that they support, but must be linked through a 3rd party software), and Z-Wave stuff are pretty well supported.  I've only used X10 and RPi GPIO, but if I had a need I'd probably find a way to make it work given enough time and reading/asking questions on the HG forum.

The biggest issue at this point is the small community for HG that remains.  A few years ago it was vibrant with lots of old and new users.  The author had some kind of life change (my impression, nothing specifically known) where it took him away from the project almost entirely.  The old forum was shut down in favor of a google user group that was not well accepted and then dropped for use of Github.  A group of users created a second HG forum that still stands today.  But, I would estimate there are around a dozen knowledgeable users left and they don't regularly communicate so getting help may be a bit challenging.

Noam

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 51
  • Posts: 2818
Re: Implementing vacancy sensor for X10 wall light switches ?
« Reply #13 on: January 05, 2022, 10:46:54 AM »

If the battery-powered design of the X10 motion sensors is the only thing holding you back, I'm sure it's easy enough to open them up, and wire in a low-voltage power supply to the battery contacts.
Logged

bkenobi

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 24
  • Posts: 2081
Re: Implementing vacancy sensor for X10 wall light switches ?
« Reply #14 on: January 05, 2022, 01:15:04 PM »

Batteries on the X10 motion sensors are one issue but they are not the only one (weather resistance, light degradation, wireless range, detection range (both distance and view angle), battery longevity, etc).  If used inside, that may be the main one that is difficult to work around though.  I have several including one that is still in use.  However, I don't think I would consider purchasing more at the current price and legacy design "features".  When they were ~$5 each, they were a no brainer because you could double/triple them up on some kind of wonky mount to fix different issues.  Last I checked, they were over $30 each.  There are a lot of options in that range that are likely superior in at least some ways to the limitations list above.
Pages: [1] 2 3
 

X10.com | About X10 | X10 Security Systems | Cameras| Package Deals
© Copyright 2014-2016 X10.com All rights reserved.