X10 Community Forum

📱🖥️PiX10Hub => 💬General Discussion => Topic started by: soxfan1966 on May 15, 2020, 12:07:27 PM

Title: Disabling an X10 Security Sensor temporarily
Post by: soxfan1966 on May 15, 2020, 12:07:27 PM
Good afternoon,

I currently have an X10 security sensor that I use for a back porch light.  It works good (and much better than the outdoor motion sensors).  One issue however is that even during the day the sensor is getting triggered and while the action that happens as a result (i.e. turning on a light) is suppressed using the Advanced Smart Lights, I would still like to be able to suppress HG receiving the RF info.

With HG up and running, I can see notifications that the sensor has some activity (the notifications in the upper right hand corner).  It would ne nice to be able to suppress that during the day or even at times I want more control over it (one thing I was looking into was if it was windy outside after a certain time even at night).

Anyone have any ideas ?
Title: Re: Disabling an X10 Security Sensor temporarily
Post by: petera on May 15, 2020, 12:35:56 PM
A simple logic automation along the lines

If time between sunrise and sunset and porch light is on, turn off porch light.

To be honest you'll find all the logic you need for this in the Advanced Smart Lights program. Just install the program, select the Advanced Smart Light option on your porch light widget and the program will do the rest. You could of course examine the ASL code and reuse any section you need for your own purposes. Here's a link to @bkenobi ASL program or you could download it directly from here http://old.homegenie.club:8080/www.homegenie.it/forum/indexfab0.html?topic=241.0
Title: Re: Disabling an X10 Security Sensor temporarily
Post by: soxfan1966 on May 15, 2020, 12:56:30 PM
I'm not trying to turn the light off (I do use Advanced Smart Lights for that).  I am trying to essentially deactivate a sensor during a period of time or when some criteria is met.
Title: Re: Disabling an X10 Security Sensor temporarily
Post by: petera on May 15, 2020, 01:40:05 PM
The key here is security. The only adjustment to those sensors as you probably know is sensitivity. If you could block the RF transmission so could others. Effectively it needs to be in an always on state. Don't forget those sensors are checking in with the panel on a regular basis but you probably know that too. It's either something along the lines I suggested or revert to your standard motion sensor.
Title: Re: Disabling an X10 Security Sensor temporarily
Post by: Tuicemen on May 16, 2020, 10:17:40 AM
As petera stated the key is security. These send a heartbeat  signal every so often to tell a consile they are still working these heart beats HG sees as well there is no way to stop HG from seeing these signals short of pulling the batteries from the sensor as even covering the sensor the heartbeat signal will still be sent.
Title: Re: Disabling an X10 Security Sensor temporarily
Post by: dave w on May 16, 2020, 05:49:02 PM
Can't this be done with "conditionals" in HG?
Title: Re: Disabling an X10 Security Sensor temporarily
Post by: petera on May 16, 2020, 08:09:02 PM
Can't this be done with "conditionals" in HG?

Of course as I suggested with the above conditions but the OP wanted to completely disable the security motion sensor between a certain time range which would cause a fault report on the security console as the sensor would be prevented from reporting its status to the security console. It is achievable if the security console is not deployed in the setup but as this option was never mentioned in the OP I didn't include it in my suggestion.
Title: Re: Disabling an X10 Security Sensor temporarily
Post by: soxfan1966 on May 16, 2020, 08:39:38 PM
I do not have the security module / system, so it not reporting that would not be an issue for me.
Title: Re: Disabling an X10 Security Sensor temporarily
Post by: beelocks on May 16, 2020, 08:43:36 PM
How about powering the sensor with a 9v battery eliminator plugged into an X10 appliance module.
Set a schedule for active/inactive hours.
Title: Re: Disabling an X10 Security Sensor temporarily
Post by: petera on May 17, 2020, 07:20:14 AM
Now that I know the motion sensor is NOT part of a security console the simplest solution is to intercept the RF signal and pass it to an intermediatary device that can determine if it should be passed to the X10 light to switch it on.

I suggest creating a virtual device or an additional switch (a middle man so to speak) and divert the RF signal to it. Once that additional device is created a simple Wizard Script can be created and it can determine if the porch light should be switched on and how long it should remain on and send the the correct RF signal to the porch light to switch on/off when a particular set of conditions are met.

Assuming the correct RF signal has been grabbed for the security motion sensor this should be the easiest solution. I see no reason why you would want to physically disable the security motion sensor to achieve this.
Title: Re: Disabling an X10 Security Sensor temporarily
Post by: Tuicemen on May 17, 2020, 07:23:32 AM
Security sensors will not keep the same RF code if power is removed. When re powered it transmits a new code.
Title: Re: Disabling an X10 Security Sensor temporarily
Post by: soxfan1966 on May 18, 2020, 06:57:29 AM
Now that I know the motion sensor is NOT part of a security console the simplest solution is to intercept the RF signal and pass it to an intermediatary device that can determine if it should be passed to the X10 light to switch it on.

I suggest creating a virtual device or an additional switch (a middle man so to speak) and divert the RF signal to it. Once that additional device is created a simple Wizard Script can be created and it can determine if the porch light should be switched on and how long it should remain on and send the the correct RF signal to the porch light to switch on/off when a particular set of conditions are met.

Assuming the correct RF signal has been grabbed for the security motion sensor this should be the easiest solution. I see no reason why you would want to physically disable the security motion sensor to achieve this.

I do not want to physically alter the sensor at all - that would be counterproductive.   I was hoping there was a way within HG to recognize an x10 signal / trigger (RF) and then simply ignore it under certain conditions (i.e. during the day or due to some weather related abnormalities). 

If I understand what petra is suggestions (and I may not), it would be to create a virtual device in HG and using a script to "filter" out the x10 signals / triggers -either ignore them under my criteria or pass them along to control the light.

So the virtual device would replace the current Sensor module that I now have set up ?
Title: Re: Disabling an X10 Security Sensor temporarily
Post by: petera on May 18, 2020, 08:08:48 AM
Now that I know the motion sensor is NOT part of a security console the simplest solution is to intercept the RF signal and pass it to an intermediatary device that can determine if it should be passed to the X10 light to switch it on.

I suggest creating a virtual device or an additional switch (a middle man so to speak) and divert the RF signal to it. Once that additional device is created a simple Wizard Script can be created and it can determine if the porch light should be switched on and how long it should remain on and send the the correct RF signal to the porch light to switch on/off when a particular set of conditions are met.

Assuming the correct RF signal has been grabbed for the security motion sensor this should be the easiest solution. I see no reason why you would want to physically disable the security motion sensor to achieve this.

I do not want to physically alter the sensor at all - that would be counterproductive.   I was hoping there was a way within HG to recognize an x10 signal / trigger (RF) and then simply ignore it under certain conditions (i.e. during the day or due to some weather related abnormalities). 

If I understand what petra is suggestions (and I may not), it would be to create a virtual device in HG and using a script to "filter" out the x10 signals / triggers -either ignore them under my criteria or pass them along to control the light.

So the virtual device would replace the current Sensor module that I now have set up ?

Exactly. The secondary device will perform the logic and depending on the conditions being met will pass the the RF signal to the porch light. A virtual device or a physical device can be defined to do this. Once the device is defined the logic can be created simply from a Wizard Script to do all this.
Title: Re: Disabling an X10 Security Sensor temporarily
Post by: soxfan1966 on May 21, 2020, 12:08:52 PM
OK, dumb follow up question for the day:

"How does one go about creating a virtual device in HG? "
Title: Re: Disabling an X10 Security Sensor temporarily
Post by: dave w on May 21, 2020, 04:39:36 PM
I am following this thread with some interest on the X10 security sensors. Anywho, I use Homesser, not HG, but assume the process pretty identical. In HG create an Appliance Module since all you want is an OFF-ON function. Use any unused X10 HCUC in your system. Then control this virtual device with the security sensor output. Then apply your conditionals to the Appliance Modules address. Basically you are using a X10 address as a logic flag.
Title: Re: Disabling an X10 Security Sensor temporarily
Post by: Tuicemen on May 21, 2020, 07:00:13 PM
Have a look at the fun with flags thread in the user created HG addons section. I created a addon which adds 16 virtual devices you could ise as flags.
Title: Re: Disabling an X10 Security Sensor temporarily
Post by: petera on May 21, 2020, 08:07:43 PM
OK, dumb follow up question for the day:

"How does one go about creating a virtual device in HG? "

If you installed HG from the HG site your virtual devices are already created for you. All you need to do is edit them to suit your own needs.
Title: Re: Disabling an X10 Security Sensor temporarily
Post by: petera on May 21, 2020, 08:15:25 PM
I am following this thread with some interest on the X10 security sensors. Anywho, I use Homesser, not HG, but assume the process pretty identical. In HG create an Appliance Module since all you want is an OFF-ON function. Use any unused X10 HCUC in your system. Then control this virtual device with the security sensor output. Then apply your conditionals to the Appliance Modules address. Basically you are using a X10 address as a logic flag.

I’m familiar with HomeSeer too and the process is not quite the same. As I mentioned in a previous post a standard HG installation factory install presents you with predefined virtual devices which can be easily edited and reused as needed.

The flag concept doesn’t really apply here. From what I can gather flags were used in AHP to make up for its shortcomings in handling logic. Not being a user of AHP but looking at its constructs I can see why.
Title: Re: Disabling an X10 Security Sensor temporarily
Post by: Tuicemen on May 22, 2020, 06:10:58 AM
Actualy a flag and virtual device are very much the same they do nothing but show status in ones setup. However virtual devices in HG can be dresses up to show more then on/off status.

Before X10TWI programers added flags users like myself were using dummy (phantom, virtual) modules to act as virtual devices or flags but due to AHPs design these had to have a X10 address. Virtual devices in HG are not limited to 16.
Title: Re: Disabling an X10 Security Sensor temporarily
Post by: soxfan1966 on May 22, 2020, 06:13:41 AM
So....   Once I got HG up and running I went thru and deleted programs, widgets and modules I thought I was never going to use.  The Virtual Modules were among those.  I can try and get them back (someone could export them and share them and I could import them), or I can try tuicemen's suggestion of the flags (not sure if I need the same virtual modules for that or not).  Was going to try and play around with that today.
Title: Re: Disabling an X10 Security Sensor temporarily
Post by: Tuicemen on May 22, 2020, 08:22:23 AM
The fun with flags program is virtual modules same code is used.
Title: Re: Disabling an X10 Security Sensor temporarily
Post by: soxfan1966 on May 22, 2020, 08:25:28 AM
OK, thanks.  I just downloaded that form your forum and will give it a try.
Title: Re: Disabling an X10 Security Sensor temporarily
Post by: petera on May 22, 2020, 10:36:56 AM
So....   Once I got HG up and running I went thru and deleted programs, widgets and modules I thought I was never going to use.  The Virtual Modules were among those.  I can try and get them back (someone could export them and share them and I could import them), or I can try tuicemen's suggestion of the flags (not sure if I need the same virtual modules for that or not).  Was going to try and play around with that today.

Just to get you started import the hgx file at the end of this link http://old.homegenie.club:8080/www.homegenie.it/forum/index8390-3.html?topic=670.0
Title: Re: Disabling an X10 Security Sensor temporarily
Post by: soxfan1966 on May 28, 2020, 06:14:01 AM
I played around with this and after a bit determined it wasn't worth it.  The Advanced Smart Lights already controls the light from the sensor, I was just trying to suppress what was "noise" being reported as X10 RF activity from the sensor (it would pop up in the upper right corner of the screen when on the main Dashboard and also show up as activity in the Event Log).

When I was working on the updated weather widget, I was using the Activity Log to help debug some of my work (using Program.Notify calls) and the X10 RF reports from the security sensor were more annoying in that regard than anything else.  I've turned off the Activity Log again (since my debugging for the time has finished) so I'm not as annoyed by the "noise" - and since it works, I decided to leave it alone :)
Title: Re: Disabling an X10 Security Sensor temporarily
Post by: petera on May 28, 2020, 08:32:45 AM
I played around with this and after a bit determined it wasn't worth it.  The Advanced Smart Lights already controls the light from the sensor, I was just trying to suppress what was "noise" being reported as X10 RF activity from the sensor (it would pop up in the upper right corner of the screen when on the main Dashboard and also show up as activity in the Event Log).

When I was working on the updated weather widget, I was using the Activity Log to help debug some of my work (using Program.Notify calls) and the X10 RF reports from the security sensor were more annoying in that regard than anything else.  I've turned off the Activity Log again (since my debugging for the time has finished) so I'm not as annoyed by the "noise" - and since it works, I decided to leave it alone :)

Did you track the source of your "noise". I've just completed a HG setup on the Raspberry Pi Zero W using a CM19 and a combination of standard and security sensors and the everything is fine. Did you examine the output of the noise ie the RF hex codes that were popping up.

I'm not sure what you are referring to when you said you "played around with it and it wasn't worth it". Was it the Virtual Module you were referring to. I did mention previoisly that ASL covered nearly all of your lighting requirements particularly the sensor based logic. A lot of its code is reusable and can be tailored to suit your own needs.

Glad to see you were able to use the Program.Notify feature to interrogate the system. Some other powerful tools available at your disposal too. Once you get fully immersed in C# you'll really see the true power of HG.
Title: Re: Disabling an X10 Security Sensor temporarily
Post by: soxfan1966 on May 28, 2020, 08:57:25 AM
What I am referring to as "noise" are valid X10 RF signals coming from the security sensor, to me they are noise because I am not using them as part of the security system and I do not need their intermittent validation signal (not sure if that is the proper term or not) and I was trying to ignore them in general for a time range (or weather condition).  When I say ignore, I just didn't want to see them popping up on the Dashboard and in the Activity Log.  They work just fine and control my light as I want using the Advanced Smart Lights.
Title: Re: Disabling an X10 Security Sensor temporarily
Post by: petera on May 28, 2020, 09:15:06 AM
What I am referring to as "noise" are valid X10 RF signals coming from the security sensor, to me they are noise because I am not using them as part of the security system and I do not need their intermittent validation signal (not sure if that is the proper term or not) and I was trying to ignore them in general for a time range (or weather condition).  When I say ignore, I just didn't want to see them popping up on the Dashboard and in the Activity Log.  They work just fine and control my light as I want using the Advanced Smart Lights.

Are the popups appearing as a result of genuine activity ie trips and/or status reports back to your non existent, in your case security console.
Title: Re: Disabling an X10 Security Sensor temporarily
Post by: soxfan1966 on May 28, 2020, 09:18:19 AM
Yes, that is correct
Title: Re: Disabling an X10 Security Sensor temporarily
Post by: petera on May 28, 2020, 09:37:28 AM
Yes, that is correct

That's why I'm using standard X10 sensors for that job. That and the fact that you have other features that the security sensors don't have. Granted the Status.Level report from the security sensor is reported as 0 when it is reporting its current status back to HG but could have an effect on other automations if they are not carefully coded.

You could modify the CM15 driver to prevent this and recompile it for your own purposes. Alternatively this could be achieved in the core code. Either way those events are fairly infrequent and may not be worth the effort.

The Virtual Device really is the backbone of automation creation so if that's what you were referring to as not being bothered pursuing I'd have a look again.
Title: Re: Disabling an X10 Security Sensor temporarily
Post by: soxfan1966 on May 28, 2020, 09:39:53 AM
I was originally using the X10 motion sensor but it was unreliable and the signal was crappy - the security sensor works much better, so at least for me its a better fit.   I may pick this back up again later but for now I'm not looking to make any more changes with it.
Title: Re: Disabling an X10 Security Sensor temporarily
Post by: petera on May 28, 2020, 01:55:19 PM
I was originally using the X10 motion sensor but it was unreliable and the signal was crappy - the security sensor works much better, so at least for me its a better fit.   I may pick this back up again later but for now I'm not looking to make any more changes with it.

Fortunately the 433mhz sensors and the CM19E don't pose the same problem. TX/RX signal is excellent here. Assuming you are using a CM15a I've seen a few mods here that could improve your TX/RX range on your setup. They might be worth trying.