X10 Community Forum

💬General Category => General Discussion => Topic started by: madbrain on November 26, 2021, 10:55:05 PM

Title: Implementing vacancy sensor for X10 wall light switches ?
Post by: madbrain 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 ?
Title: Re: Implementing vacancy sensor for X10 wall light switches ?
Post by: smatofu 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.



Title: Re: Implementing vacancy sensor for X10 wall light switches ?
Post by: madbrain 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.
Title: Re: Implementing vacancy sensor for X10 wall light switches ?
Post by: petera 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
Title: Re: Implementing vacancy sensor for X10 wall light switches ?
Post by: Tuicemen 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.
Title: Re: Implementing vacancy sensor for X10 wall light switches ?
Post by: bkenobi 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.
Title: Re: Implementing vacancy sensor for X10 wall light switches ?
Post by: madbrain 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 ?

Title: Re: Implementing vacancy sensor for X10 wall light switches ?
Post by: bkenobi 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.
Title: Re: Implementing vacancy sensor for X10 wall light switches ?
Post by: petera 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/
Title: Re: Implementing vacancy sensor for X10 wall light switches ?
Post by: madbrain 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 ...
Title: Re: Implementing vacancy sensor for X10 wall light switches ?
Post by: JeffVolp 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
Title: Re: Implementing vacancy sensor for X10 wall light switches ?
Post by: madbrain 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.
Title: Re: Implementing vacancy sensor for X10 wall light switches ?
Post by: bkenobi 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.
Title: Re: Implementing vacancy sensor for X10 wall light switches ?
Post by: Noam 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.
Title: Re: Implementing vacancy sensor for X10 wall light switches ?
Post by: bkenobi 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.
Title: Re: Implementing vacancy sensor for X10 wall light switches ?
Post by: smatofu on January 05, 2022, 02:40:58 PM
[battery longevity]

I have my outdoor motion sensors powered by rechargeable batteries and small solar panels. Works great!
Title: Re: Implementing vacancy sensor for X10 wall light switches ?
Post by: bkenobi on January 05, 2022, 11:45:07 PM
I'm not a battery expert and have not used rechargeable batteries (either alkaline, ni-cad, or lithium AA/AAA) recently.  Don't these still corrode if used with a solar cell?  I'm assuming so, which means that they would need to be checked periodically for leaking even if they don't discharge completely.  My MS16A's that have failed were due to either weather (unsealed and water intrusion, sealed but lens weathered/cracked resulting in water intrusion) or batteries (corroded the internals sufficiently that repair was not feasible).
Title: Re: Implementing vacancy sensor for X10 wall light switches ?
Post by: madbrain on January 06, 2022, 02:05:32 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.

It's not the only thing. I would ideally like something that fits in the space of a wall mounted switch, like XPS3/XPS4 do. The MS16A is the wrong form factor.
Title: Re: Implementing vacancy sensor for X10 wall light switches ?
Post by: bkenobi on January 08, 2022, 10:40:34 PM
Have you considered just using a motion sensor switch?  They won't communicate, but the ones I've tried are pretty good and once installed, they just work without issue.  I picked up a couple on deep clearance just for the heck of it but haven't needed them yet.  I thought about using them in my laundry room but since the switch is a 3-way that one wouldn't have worked.  Someday...
Title: Re: Implementing vacancy sensor for X10 wall light switches ?
Post by: madbrain on January 09, 2022, 08:35:06 PM
Have you considered just using a motion sensor switch?  They won't communicate, but the ones I've tried are pretty good and once installed, they just work without issue.  I picked up a couple on deep clearance just for the heck of it but haven't needed them yet.  I thought about using them in my laundry room but since the switch is a 3-way that one wouldn't have worked.  Someday...

Leviton motion sensor switches is what I have in most of the house. They work fine in most situations. They are not controllable by X10 protocol, however. And they can only control the load that's directly attached to them.

In my home theater, I want to be able to turn the ceiling lights on/off with my infrared remote. Thus, I replaced the motion sensor switches with the XPS3 a while back. But the lights don't turn themselves off automatically anymore since that time. For my office ceiling light, the situation is similar. The original switch was obstructed by a door. I replaced it with an XPS3. I control it with an X10 RF remote outside the room, along with X10 transceiver. Inside the room, one of the computers has CM17A and I use ActiveHome Vista to turn the lights on/off. But again, the light won't turn itself off automatically, and is often forgotten. In this case, a regular motion sensor wouldn't work due to the location behind the door/furniture. I would need the motion sensor to be in a different area than where the load is. An MS16A on my desk might work, assuming I get the proper software to handle this combo of MS16A/XPS3 and act as a vacancy sensor. I have been exploring HomeGenie as you know, but been very frustrated with it and the many bugs I have run into, and its obscure user interface and fairly limited documentation.
Title: Re: Implementing vacancy sensor for X10 wall light switches ?
Post by: bkenobi on January 09, 2022, 10:44:28 PM
Another thing worth considering is using the Leveton switches you are used to to trigger an X10 command (basically what I did with my Heath/Zenith sensor.  if you install an AC relay inside the box, you can use the output to trigger any dry contact sensor (PowerFlash, RPi GPIO, X10 window/door sensor, etc).  I don't know how you would have to deal with installing low voltage and AC in the same box, but there must be a solution that would pass code (if you care).  If there were some wall switch motion sensor that was connected it would be easier, but I don't see those motion sensors as completely incompatible.  The one issue would be that most motion sensors require some load to work so you may have to have a small bulb or resistor.  Anyway, just some thoughts.
Title: Re: Implementing vacancy sensor for X10 wall light switches ?
Post by: smatofu on January 12, 2022, 10:57:51 AM
... Don't these still corrode if used with a solar cell?  I'm assuming so, which means that they would need to be checked periodically for leaking even if they don't discharge completely.  ...

A good quality rechargeable should last a few years. They don't overheat in this application and they only go through small charges/discharges.
Title: Re: Implementing vacancy sensor for X10 wall light switches ?
Post by: madbrain on February 07, 2022, 09:20:32 PM
Another thing worth considering is using the Leveton switches you are used to to trigger an X10 command (basically what I did with my Heath/Zenith sensor.  if you install an AC relay inside the box, you can use the output to trigger any dry contact sensor (PowerFlash, RPi GPIO, X10 window/door sensor, etc).  I don't know how you would have to deal with installing low voltage and AC in the same box, but there must be a solution that would pass code (if you care).  If there were some wall switch motion sensor that was connected it would be easier, but I don't see those motion sensors as completely incompatible.  The one issue would be that most motion sensors require some load to work so you may have to have a small bulb or resistor.  Anyway, just some thoughts.

Thanks. I don't think I want to mess with adding low voltage wiring. Just too expensive to open and close walls. For some of my use cases, things are not even in the same room. For example, a motion sensor in bathrooms to turn on the circulation pump, and then turn it back off. In that case, that's not on vacancy sensor, it's a more traditional motion sensor that turns things on and off. But the load isn't going to be in the same room still.

I'm really souring on X10 to be honest, given the unreliability of distant signals. It sort of works if you send it 4 - 5 times. But it's a bit of a crap shoot. I don't think I'll be adding much more hardwired X10 gear, if any. I do have a number of existing XPS / XPS4 switches though, and still have a number of X10 plug-in modules, for which a remote motion sensor might be useful.

This may be a bit off-topic here, but what sort of hardware solution would one use in a non-X10 environment ? I see some Kasa light switches for example, that work over Wifi. While I don't love Wifi, it should still be more reliable than X10 in my home. It's much less costly than running Ethernet. Also, a lot of IoT devices only support Wifi, not Ethernet. I don't see a Kasa motion sensor, though. There is a Kasa motion light switch, but that's not what I'm after here for the circulation pump case. Are there other brands/types of IoT motion sensors that could be used as remotes ? Obviously this requires mixing/matching devices of different brands/types, and that gets very tricky for devices that are not open (which is most, sadly). Only open-source software can really help with that case.

I just spent a good chunk of my week-end measuring a few dozen plug-in loads with a Kill-a-watt. Only about 200 loads in the house left to check ! So far, I found one 60W incandescent bulb in a plug-in lamp. Also found 5 subwoofers that consume about 10 watts in idle (auto) mode, ie. 50 watts of vampire power. I wouldn't have thought it would be that much. In my home theater, which has a sub in each corner, I put X10 modules on each of the rear subs. Programmed the ARRX18G remote with RemoteMaster to send the A4 code to the IR543 to turn those on/off in macros. Seems to work OK. The relays in the modules are very loud, though, that can't be good for the sub amps. For the 2 front subs, I plugged them into the IoT relay : https://www.amazon.com/Iot-Relay-Enclosed-High-Power-Raspberry/dp/B00WV7GMA2 . This takes 12V out from my main receiver. I was already using this to turn on the secondary receiver that is needed for Atmos channels 10/11. That relay is much quieter than anything X10 ever made. Really can't hear it. And no need to change any remote control macros. For the 5th sub, the one in my guest room, I haven't found a good solution yet. The Marantz NR1603 receiver in that room doesn't have a 12V trigger out, so can't use an IoT relay there. I could use an X10 plug-in module on the sub, but would have to purchase another IR543 for that room. Looks like they are easy enough to get on Ebay. Would have have to program the ARRX18G in that room too (I have 7 ARRX18G in the house...). Still hate the sound of the X10 plug-in relay, though. The ARRX18G has RF capability also, but not sure if there are any plug-in modules that can accept a signal directly from it. This would be more basic stuff, not IoT. I suppose a TM751 transceiver would probably work, without an IR543, if there is just one load (sub), but there is still the X10 relay sound issue.


Title: Re: Implementing vacancy sensor for X10 wall light switches ?
Post by: bkenobi on February 08, 2022, 10:33:40 AM
Thanks. I don't think I want to mess with adding low voltage wiring. Just too expensive to open and close walls. For some of my use cases, things are not even in the same room. For example, a motion sensor in bathrooms to turn on the circulation pump, and then turn it back off. In that case, that's not on vacancy sensor, it's a more traditional motion sensor that turns things on and off. But the load isn't going to be in the same room still.

The whole point of these modules is that you don't have to wire them to each other.  You have a module here and another there with a HA server that can control the activity.  With X10, you have a sensor in one location that triggers and the HA software decides what to do which then sends a signal to the other module to turn on/off.  If you have a vacancy sensor, it triggers on activity and then your HG would run code to turn things on/off which would send a command to your circulation pump at the right times.  There is no need to run wiring behind all of the walls.  The low voltage wiring I suggested was to connect your motion sensor to something that could transmit the open/closed state of the relay.  You could run a pair of wires all the way back to your RPi or you could use anything else that can send a signal too (PowerFlash module, modified window/door sensor, another brand switch, perhaps some kind of ESP8266/arduino based device, etc).  Some of those will even fit inside the box without modification (thinking something like the shelly).

I'm really souring on X10 to be honest, given the unreliability of distant signals. It sort of works if you send it 4 - 5 times. But it's a bit of a crap shoot. I don't think I'll be adding much more hardwired X10 gear, if any. I do have a number of existing XPS / XPS4 switches though, and still have a number of X10 plug-in modules, for which a remote motion sensor might be useful.

There are lots of options in automation to pick from these days.  Many people who have tried X10 walk away for different reasons.  Many of those are either lack of understanding of the protocol or failure to work on known issues that can/will pop up and can be resolved.  I know you have been directed to the X10 feng shui thread that dave wrote and probably the one that Jeff wrote too.  I'd recommend reviewing it to understand how phases, wire run length, signal suckers/generators, etc can have an affect on your system and how a few simple steps can reduce/eliminate all issues. 

My home is 6000ft2 including a large unfinished basement and I have a detached shop.  When I moved in it had some X10 that was working ok.  Well, it did until I hooked up all of my gear.  Then it was terrible.  After working through the issues, I have a system that has worked very reliably for over a decade with very minimal hardware modification.  After adding noise filters to key circuits/devices and installing an XTB-IIR I've been very happy overall.

It's your choice what you want to roll with, but X10 can be very reliable if you put in the effort to correct the common road blocks.

https://www.laser.com/dhouston/X10_feng_shui.html
https://jvde.us/xtb-iir/
Title: Re: Implementing vacancy sensor for X10 wall light switches ?
Post by: brobin on February 09, 2022, 01:34:38 AM
In a recent thread about IR bridges I mentioned that I've been trying out YoLink products which has a learning IR device.  They also have very small (2.5" diameter) motion detectors, mini-plugs, 5 load powerstrips and dry contact relay devices, among others including one that has a finger that will reach out and press a button!  With motion detectors in bathrooms your circulation pump could be turned on with a mini-plug or dry contact module.  I haven't purchased a mini-plug yet but I can tell you that the relay module click is barely audible.   

The nice thing about YoLink devices, in addition to the low cost, is that regardless of the number of devices, the hub uses just a single IP address from your router.  All the other devices communicate using the very robust LoRa RF protocol which I've found to work everywhere inside and outside my 2 story grouted and rebarred concrete block home, yard and dock. The app enables the automation between the devices and there's also Alexa/GH and IFTTT if you use those.  Through the Alexa app I even have the YoLink skill talking to the Smartenit skill to operate X10 devices.

All of my X10 devices work with 99.9% reliability thanks to Jeff's XTB-IIR+ and a few filters so my only interest is in the sensors at this point.

One question though.  Doesn't turning off the circulation pump defeat the purpose of having instant hot water (if that's what you're using it for)?  When we're out the pump is off - as well as the water for that matter - but otherwise it runs 24/7 if we're home.  If it were on a motion detector wouldn't it  take almost as much time to get hot water as it would without one?  The Grundfos pump we have draws 25 watts which costs less than $30/year to run 24/7 and is so quiet I have to touch it to confirm it's running so I've never thought about turning it off when home.  I also think that running it may use less heating resources since warm water is returned to the tank instead of the cold water water sitting in the line.  All in all I'm not sure there'd be any noticeable cost benefit to not leaving it running.

Title: Re: Implementing vacancy sensor for X10 wall light switches ?
Post by: madbrain on February 09, 2022, 03:12:38 AM
In a recent thread about IR bridges I mentioned that I've been trying out YoLink products which has a learning IR device.  They also have very small (2.5" diameter) motion detectors, mini-plugs, 5 load powerstrips and dry contact relay devices, among others including one that has a finger that will reach out and press a button!  With motion detectors in bathrooms your circulation pump could be turned on with a mini-plug or dry contact module.  I haven't purchased a mini-plug yet but I can tell you that the relay module click is barely audible.   

The nice thing about YoLink devices, in addition to the low cost, is that regardless of the number of devices, the hub uses just a single IP address from your router.  All the other devices communicate using the very robust LoRa RF protocol which I've found to work everywhere inside and outside my 2 story grouted and rebarred concrete block home, yard and dock. The app enables the automation between the devices and there's also Alexa/GH and IFTTT if you use those.  Through the Alexa app I even have the YoLink skill talking to the Smartenit skill to operate X10 devices.

Thanks, I'm definitely going to look into it.

Quote
All of my X10 devices work with 99.9% reliability thanks to Jeff's XTB-IIR+ and a few filters so my only interest is in the sensors at this point.

Curious which software package you use. HomeGenie ? And how many filters is "a few" ?
I haven't counted all the loads in my home yet - I'm in the process of doing so, but I wouldn't be surprised if there are over 300 plug-in devices, and 20 with dedicated breakers. I have far more filters than the number of X10 devices I use. Usually they are in the room where the X10 devices are. But not always.

I'm at nowhere near 99.9% system reliability unfortunately. I couldn't put a number to it. In some rooms, like my office and home theater, they work well enough, probably over 95%, maybe more. But when the controller is far away from the devices, things start to fail. Usually, everything fine the day I test things. But the day I actually need to use them, that's when they fail. For example, earlier tonight, lights on my rear patio and hot tub on the deck. I'm not sure how much is problems with X10 powerline, and how much is browser bugs and/or HomeGenie bugs. I use Firefox on Android with the web interface. Sometimes I press the "On" button, and there is no feedback in the UI, and unsurprisingly, nothing happens. I can press things 5-10 times in a row, and still zero feedback in UI. I thought this might be down to tiny and/or wet fingers, but I was just able to reproduce it right now in my office. Even zooming in on the web UI to make the button very large, things still didn't work.
There was a huge lag, in the order of tens of seconds, or even minutes. It eventually worked. Perhaps a Raspberry Pi 3B+ isn't fast enough to run HomeGenie. Or maybe I need better software. I think it's fair to say there is more than one problem at stake.

Quote
One question though.  Doesn't turning off the circulation pump defeat the purpose of having instant hot water (if that's what you're using it for)?  When we're out the pump is off - as well as the water for that matter - but otherwise it runs 24/7 if we're home.  If it were on a motion detector wouldn't it  take almost as much time to get hot water as it would without one?  The Grundfos pump we have draws 25 watts which costs less than $30/year to run 24/7 and is so quiet I have to touch it to confirm it's running so I've never thought about turning it off when home.  I also think that running it may use less heating resources since warm water is returned to the tank instead of the cold water water sitting in the line.  All in all I'm not sure there'd be any noticeable cost benefit to not leaving it running.

I couldn't care less about instant hot water. I'm running into a very odd plumbing situation where hot water doesn't get to fixtures reliably. Same problem on both water heaters. One of them has a circulation pump, and turning on that pump fixes the problem. Turning it off makes the water drop temperature instantly The second water heater has no pump, and problem is unresolved to this day. I have been pulling my hair out over it.
https://www.reddit.com/r/Plumbing/comments/sn40rc/hot_water_circulation_problem/
Had the nth plumber come earlier tonight who said he has never seen anything like this and has no clue what the problem is.

The pump I have uses 80 watts. It's hardwired to an XPS4, but not on a dedicated breaker. I measured the load with my Rainforest Eagle, that gave me a realtime reading of the whole house meter, with and without the pump. 80 watts is 700 kWh per year. That's a bit over $200/year around here in California. Definitely real money. And I can hear it from nearly every room inside my 4700 sq ft house. But particularly in my home theater which is adjacent to the utility room where the pump is. I would like to rip out the pump altogether, but that would mean no longer being able to take showers, wash clothes, etc.  A second pump might be needed to fix the issue with the second water heater, and I really hate the thought of that. That would mean no longer being able to make decent recordings of my harpsichords - a pump in the garage would be undoubtedly be picked up by my microphones in the music room.

Honestly, we are getting far away from the smarthome discussion here, but if you have any insight on the plumbing situation, I would be most welcome.
Title: Re: Implementing vacancy sensor for X10 wall light switches ?
Post by: brobin on February 09, 2022, 05:28:56 PM
Curious which software package you use. HomeGenie ? And how many filters is "a few" ?

     I'm using a JDS Stargate controller which, sadly, is no longer in production. With the XTB-IIR+ in place I only use filters on the UPS units for the PC's and on the laser printers (4 total). 

I'm at nowhere near 99.9% system reliability unfortunately.

If you don't have an XTB-IIR installed buy one while you still can.  Jeff no longer makes them and has limited remaining stock.


I couldn't care less about instant hot water. I'm running into a very odd plumbing situation where hot water doesn't get to fixtures reliably. Same problem on both water heaters. One of them has a circulation pump, and turning on that pump fixes the problem. Turning it off makes the water drop temperature instantly The second water heater has no pump, and problem is unresolved to this day. I have been pulling my hair out over it.
https://www.reddit.com/r/Plumbing/comments/sn40rc/hot_water_circulation_problem/
Had the nth plumber come earlier tonight who said he has never seen anything like this and has no clue what the problem is.

I read your Reddit post and it appears to me that you may have several issues.  I'm not a plumber but I do have experience building homes and solving plumbing issues.  One thing you mention is that you're trying to fill a 95 gallon tub from a 75 gallon heater and maintain a comfortable temperature.  You can't.  Even if you start with 75 gallons of 130F water as soon as you turn on the tap and start using that water you have cold water rushing in to the heater to replace the hot water.  The cold mixes with the hot and the temperature starts dropping.  The typical recovery rate on a gas heater is 20 minutes or longer.  The math just doesn't work to do what you want to do.  The best (really only) solution is to replace that troublesome heater with a tankless flash heater.  The heater fires up only when you turn on the water and can give you an unlimited supply of 130F water to fill your tub.  The heater only burns gas when the water is running so you're not paying to heat a 75 gallon tank 24/7 which will save you enough on your gas bill to pay for the new heater.  I'd do the same for WH#1 as well. 

As for the issue with the circulation pump, it sounds like you may not have a dedicated return line but may have a sensor valve installed underneath a sink at farthest point from the heater.  If that valve is installed backwards or is malfunctioning you would have the issues you describe. Look for something like this: https://besthotwaterrecirculators.com/how-do-sensor-valves-work/ and
http://waterheatertimer.org/will-recirculation-system-work-with-tankless.html
 


Title: Re: Implementing vacancy sensor for X10 wall light switches ?
Post by: madbrain on February 09, 2022, 10:46:14 PM

If you don't have an XTB-IIR installed buy one while you still can.  Jeff no longer makes them and has limited remaining stock.

I know. I'm still thinking about it. Not sure it's worth it given all the plug-in devices that cause issues. I believe I would still need many plug-in filters.

Quote
I read your Reddit post and it appears to me that you may have several issues.  I'm not a plumber but I do have experience building homes and solving plumbing issues.  One thing you mention is that you're trying to fill a 95 gallon tub from a 75 gallon heater and maintain a comfortable temperature.  You can't.  Even if you start with 75 gallons of 130F water as soon as you turn on the tap and start using that water you have cold water rushing in to the heater to replace the hot water.  The cold mixes with the hot and the temperature starts dropping.  The typical recovery rate on a gas heater is 20 minutes or longer.  The math just doesn't work to do what you want to do.  The best (really only) solution is to replace that troublesome heater with a tankless flash heater.  The heater fires up only when you turn on the water and can give you an unlimited supply of 130F water to fill your tub.  The heater only burns gas when the water is running so you're not paying to heat a 75 gallon tank 24/7 which will save you enough on your gas bill to pay for the new heater.  I'd do the same for WH#1 as well. 

The temperature of the hot water in each tank water heater is 135F. That's much too high for a bath (or shower). I don't actually want to fill the 95 gallon bathtub with 135 degree water. I was merely testing the temperature that comes out of the hot water faucet. A more reasonable target temperature for showering and bathing for me is 100-105. I would normally want to fill up the bathtub with water around 110-115F, ie. a mix of cold and hot water, since the bathtub takes about 20 minutes to fill up, and the temperature of the water will decrease during that time, but I don't want it to decrease below 100-105 by the time it is full.

I'm aware that the cold water mixes into the water heater when you start to draw hot water from it, but there is a dip tube in the water heater, so cold water mixes from the bottom, and hot water rises, thus the temperature at the top outlet shouldn't significantly drop immediately. A few degrees, sure. But not 30 - 50 degrees in minutes. The flow from the hot water faucet in each bathtub is 5gpm. I have seen the temp drop from 130 to 85 in just 3 minutes from WH#1 with the pump off, for example. That's drawing just 15 gallons from WH#1, which is 50 gallons. Cold water around right now is around 55F. Even if the cold water mixed instantly with all the hot water in the entire tank, the temperature would be (15 x 55 + 35 x 135) / 50 = 111F. There is no way it should drop as low as 85F. Unless the dip tube in the water heater was broken, the only explanation for it dropping that low is that cold water supply is getting into the hot water faucet somehow, not coming directly from the water heater.

Certainly, I used to be able to fill up the 95 gallon bathtub hot enough before last october, with the same size (and model) of 75 gallon water heater, and now I can't.
And the problem isn't just with the bathtub. It's with the shower also. The temperature drops significantly very quickly, sometimes within just a couple minutes, even after not using hot water all night. This is not normal. My mother had to get out of the shower within 3 minutes the day I left the pump off because the water became too cold.
None of these were issues during the period 2010-2019, with either water heater, in any of the 4 bathrooms. I still had to issue after water heater #1 as replaced in 2020, and circulation pump was added to it. When WH#2 was replaced in 2021, I started having issues with from the first day.

Quote
As for the issue with the circulation pump, it sounds like you may not have a dedicated return line but may have a sensor valve installed underneath a sink at farthest point from the heater.  If that valve is installed backwards or is malfunctioning you would have the issues you describe. Look for something like this: https://besthotwaterrecirculators.com/how-do-sensor-valves-work/ and
http://waterheatertimer.org/will-recirculation-system-work-with-tankless.html

I believe there is a dedicated return line - please see pics from WH#1 with the pump :
https://i.imgur.com/ZaxHnWK.jpg
https://i.imgur.com/8mn6sUN.jpg

I don't believe I have a sensor valve anywhere else. When the plumber replaced WH#1 in October 2020, he only worked in the utility room where it is located. He didn't modify the plumbing in any other room. All he did was replace the water heater, and put a new circulation pump, because the old one was not working.
Title: Re: Implementing vacancy sensor for X10 wall light switches ?
Post by: JeffVolp on February 09, 2022, 11:18:37 PM
If you don't have an XTB-IIR installed buy one while you still can.  Jeff no longer makes them and has limited remaining stock.

Sorry, they are all gone now, including the refurbished units.  The plug-in XTBR will remain available for now.

I'm aware that the cold water mixes into the water heater when you start to draw hot water from it, but there is a dip tube in the water heater, so cold water mixes from the bottom, and hot water rises, thus the temperature at the top outlet shouldn't significantly drop immediately. A few degrees, sure. But not 30 - 50 degrees in minutes. The flow from the hot water faucet in each bathtub is 5gpm. I have seen the temp drop from 130 to 85 in just 3 minutes from WH#1 with the pump off, for example.

You have a complete loop without a one-way valve.  So without the pump running, you draw water from both the hot and cold return.  That causes the quick drop in temperature as the hot and cold mix at the faucet.  If you don't want to run the pump whenever hot water is being drawn, you need a one-way valve in the return to block the cold water from mixing with the hot at the faucet.

Jeff
Title: Re: Implementing vacancy sensor for X10 wall light switches ?
Post by: brobin on February 10, 2022, 12:52:05 AM


I believe there is a dedicated return line - please see pics from WH#1 with the pump :
https://i.imgur.com/ZaxHnWK.jpg
https://i.imgur.com/8mn6sUN.jpg

I don't believe I have a sensor valve anywhere else. When the plumber replaced WH#1 in October 2020, he only worked in the utility room where it is located. He didn't modify the plumbing in any other room. All he did was replace the water heater, and put a new circulation pump, because the old one was not working.

Looking at those photos I think Jeff is right.  I also think the recirc pump is plumbed in wrong but the photos don't reveal what's behind the exhaust stack.  I don't see what's below which is what I'd expect with the recirc line being pumped to the cold water input rather than to the hot:

Title: Re: Implementing vacancy sensor for X10 wall light switches ?
Post by: madbrain on February 11, 2022, 08:33:52 PM
Sorry, they are all gone now, including the refurbished units.  The plug-in XTBR will remain available for now.

OK.

You have a complete loop without a one-way valve.  So without the pump running, you draw water from both the hot and cold return.  That causes the quick drop in temperature as the hot and cold mix at the faucet.  If you don't want to run the pump whenever hot water is being drawn, you need a one-way valve in the return to block the cold water from mixing with the hot at the faucet.

Thanks. I can't really tell where the valve should be. But I'll certainly tell a plumber. If that turns out to be the issue for WH#1, where do I Paypal you to thank you ?
Title: Re: Implementing vacancy sensor for X10 wall light switches ?
Post by: madbrain on February 11, 2022, 08:36:13 PM
Looking at those photos I think Jeff is right.  I also think the recirc pump is plumbed in wrong but the photos don't reveal what's behind the exhaust stack.  I don't see what's below which is what I'd expect with the recirc line being pumped to the cold water input rather than to the hot:

Here is a video that hopefully shows all the relevant connections.
https://drive.google.com/file/d/1qA7g1c8-Uj8HDyKJuiD5SBP18vLp3dhe/view?usp=sharing
Title: Re: Implementing vacancy sensor for X10 wall light switches ?
Post by: brobin on February 11, 2022, 09:09:25 PM
That video is helpful, thanks.  If you turn off the pump and turn off the valve on the line in the foreground do you still get hot water out of the taps?  I ask this to verify that the line in the foreground is indeed the recirc line.
Title: Re: Implementing vacancy sensor for X10 wall light switches ?
Post by: madbrain on February 12, 2022, 01:04:34 AM
That video is helpful, thanks.  If you turn off the pump and turn off the valve on the line in the foreground do you still get hot water out of the taps?  I ask this to verify that the line in the foreground is indeed the recirc line.

Which valve do you mean ? The blue flat valve on the right side ? The red circular valve on the left ? Or something else ?

There is another copper piece on the pipe just underneath that red valve. You can see it near the very end of the video. It goes to a pipe that's plumbed to the pump on the right side. I'm not sure it's a valve, or how to operate it.

Yes, I'm quite useless with plumbing unfortunately. Never had to deal with something like this in 25 years as a homeowner. Only my second home, though.
Title: Re: Implementing vacancy sensor for X10 wall light switches ?
Post by: brobin on February 12, 2022, 08:32:22 AM
The flat blue one.
Title: Re: Implementing vacancy sensor for X10 wall light switches ?
Post by: madbrain on February 12, 2022, 07:35:02 PM
The flat blue one.

Thanks. I just turned off the pump first, but left the valve open.

Tested at the bathtub in the downstairs bathroom. Open the hot water faucet (separate handle). Got hot water around 115F after 30 seconds. at t = 4 minutes, it had dropped to 98F, which I consider too cold. Problem reproduced. I closed the faucet. I then closed the blue valve and went back to the bathttub. Opened hot water faucet again. Temperature slowly crept back up. It got to 135F at t = 6.5 minutes . I left it open for a while. At t = 12 minutes, it had dropped to 131.5F, which I believe is normal since cold water is mixing in to the water heater while drawing from it.

I then checked the sink in that same bathroom, using the separate hot water handle. I got a very very slow stream of warm water. Not a big enough flow to wash one's hands. It seems like there is almost no hot water pressure. My guess is the blue valve being closed is causing a problem there. I didn't get hot water above about 100F, but it was hard to measure as the stream was so small.

I also checked the shower in the same bathroom. Everything seemed normal there as far as both pressure and hot water temperature. Didn't get hot water temperature above about 115F. I assume the shower valve has an anti-scalding feature.

I went to check all the other other faucets and shower valves that are also served by this same water heater.
Bar downstairs sink, single-handle : got about 120F. Pressure was normal.
Main kitchen sink upstairs, single-handle : about 115F. Pressure normal.
Island kitchen sink upstairs, single-handle : about 115F. Pressure normal.
Half bathroom sink upstairs, separate handle : about 115F. Pressure normal.
Laundry room upstairs sink, single handle : about 115F. Pressure normal.
Guest bathroom #1 upstairs sink, separate handle : no water on either hot or cold sides. Both valves were open.
Guest bathroom #1 upstairs,  shower valve : about 115F. Pressure seemed normal.
Guest bathroom #2 upstairs sink, separate handle : 115F. Pressure seemed low.
Guest bathroom #2 upstairs,  shower valve : about 115F. Pressure seemed low.
We seldom use the 2 guest bathroom upstairs, so it's hard for me to be more accurate about the pressure.
It was about t = 45 minutes when I finished testing everything.

So, closing the blue valve with the circulation pump off seems to have resolved the issue for the bathtub and shower in the downstairs bathroom. Hot temperature is no longer massively dropping quickly at either of them. However, it is causing pressure issue with the sink hot water faucet in the same bathroom. And it seems to be causing issues with the two upstairs guest bathrooms as well. The reason I wrote "seems" for my observations is that guest bathroom #2 hasn't been used in years, probably 7 years, either the faucet or shower. Guest bathroom #1 was last used around Xmas time, and no issue was reported by the guest at either the sink or shower, but the circulation pump was on during that time, and of course the blue valve was left open.

I think in the course of the experiment above, more than 50 gallons of water were drawn from the 50 gallon water heater, so it was in the process of regenerating, and this may explain the lower temperature readings of 115F upstairs, but I'm not certain if that's the only reasons. Some of the single-handle faucets at the bar, kitchen and laundry might have anti-scalding features. The shower valves probably all do. I'll wait for the water heater to stop regenerating. It's know = 1 hr 10 minutes and the water heater has fully regenerated - I just went to look and it was silent, so I'll take a few more temperature readings without emptying it this time.

115F would be hot enough for any shower or bath, so the above results look good, as far as temperature goes, but of course, not for the pressure issues. 115F might not be hot enough for laundry in the hot cycle, but the washer will heat the water up, using more electricity, though, and taking longer.

Edit: so, I repeated it after WH had regenerated. Got the same results for pressure.

But I was able to get temperature above 130F at all sinks and showers that had pressure. I even hit 141F in one case. I guess none of these fixtures must have anti-scald. A bit surprising. None of the shower valves were replaced by me. But the 2 single-handle faucets in the kitchen and the single-faucet faucet in the bar were, and not with low-end stuff. I guess it's less important to have anti-scald for kitchen faucets than shower valves since that feature is not in my kitchen faucets.

I'm going to turn the blue valve and pump back on now to see if the pressure issues are resolved. Edit 2:

Quote
Downstairs bathroom sink : got a very small stream of hot water.

Pressure definitely improved with the pump on / valve open for this case.

Quote
Guest bathroom #1 upstairs sink, separate handle : no water on either hot or cold sides. Both valves were open.

No difference with pump on and valve open. So, must be a faucet gone bad.

Quote
Guest bathroom #2 upstairs sink. Pressure seemed low.

No difference in pressure with pump on and valve open.

Quote
Guest bathroom #2 upstairs,  shower valve : pressure seemed low.

I believe the pressure was higher in this case with the pump on/valve open, but didn't do a scientific measurement to be able to conclude one way or the other. It was enough pressure to take a shower in either case.
Title: Re: Implementing vacancy sensor for X10 wall light switches ?
Post by: brobin on February 12, 2022, 09:19:35 PM
Just to be sure which is which, close the round red handled valve near the ceiling and turn off the pump.  You shouldn't get any hot water.