X10 Community Forum

📱🖥️PiX10Hub ( Always Evolving Open Source) => 🧾Wish list => 🧞HomeGenie addons(📝macros/programs) => Topic started by: paizano1 on January 26, 2019, 06:56:23 PM

Title: X-10 ms16 motion sensors added to Home genie
Post by: paizano1 on January 26, 2019, 06:56:23 PM
I am not sure where to post this. Is there a way or is it already done. I would like to add ms16 motion sensors to home genie to use with pix10hub.
I currently have a broadlink, and now a pi and also a smartthings hub running things for me.
I have a sylvania motion senor that when triggered it sends a signal to the hub which triggers the broadlink and sends a rf signal to turn on a light switch the is rf enabled.
I would like the use the 20 plus ms16 sensors i have to do the same thing and not have to keep buying other brands.
Also i am trying to get away from the cm15. Even though for many years it has been dependable I am experiencing more faults.

Thanks in advance for any help
Title: Re: X-10 ms16 motion sensors added to Home genie
Post by: bkenobi on January 27, 2019, 04:32:20 AM
I set mine up as sensors.
Title: Re: X-10 ms16 motion sensors added to Home genie
Post by: Tuicemen on January 28, 2019, 09:08:32 AM
I stopped using ms16 motion sensors years ago and moved to the security ones as I found them more reliable so I'm just guessing here.
HG needs to see the RF from the sensor so it can add it to a list of devices capable of being added to a group.
Title: Re: X-10 ms16 motion sensors added to Home genie
Post by: bkenobi on January 28, 2019, 12:03:03 PM
I'm not sure why this is a problem.  In my setup, I simply add a module for the X10 address that the MS16A is reporting on.  I then change the module type to sensor.  Once they are a module, you can trigger off of them or use them in any other way you choose.  Perhaps you could explain where you are having an issue?
Title: Re: X-10 ms16 motion sensors added to Home genie
Post by: petera on January 28, 2019, 12:48:42 PM
Using MS13 sensors here (similar to MS16). As Bkenobi states just set the HG module as a sensor  using a house code in HG that matches your sensor house code and it reports straight to HG on trigger.

No need for 3rd party intervention like a Broadlink to pass the RF trigger from the sensor to HG either. You'll see the raw rf signal flash up on the HG screen on trigger.

Fairly simple thing to do and you get to exploit all those MS16 sensors you have lying about.
Title: Re: X-10 ms16 motion sensors added to Home genie
Post by: paizano1 on January 29, 2019, 08:57:12 PM
Thanks for all the replies, the reason for the rm pro is because i have some light switches that work on 433mhz. I have the rm pro programmed with those remote signals. So now I would like to use a ms16 to trigger and cause the rm pro to send the command to turnon the light.

Using alexa routines is hard because it doesnt recognize it as a sensor, so it cant be used as a trigger device. And in my smartthings hub it sets it up and looks like it is triggering but nothing ever happens with the light.

I am still trying different things with what has been posted. I am sure there is just something simple that i am missing.

Thank you
Paizano
Title: Re: X-10 ms16 motion sensors added to Home genie
Post by: bkenobi on January 30, 2019, 12:49:43 AM
There are a few RF receivers that can interpret X10 commands. I don't know if the RM Pro works with your X10 modules as it depends on where you are located (US, Europe) and what the module sees.  In the US, X10 RF is 310MHz and most of the RF receiver controllers are 433MHz.
Title: Re: X-10 ms16 motion sensors added to Home genie
Post by: paizano1 on January 30, 2019, 08:35:56 AM
In alexa for motion to be used in a routine it has to be a motion sensor, I can get it to register from the ha bridge as a switch, but that won't allow selection as a trigger in the routine.

In smartthings I am having trouble getting it to pick up the sensor from ha bridge or HG. I did get it to detect A1 on/off as a switch at one point but when i triggered the motion sensor nothing happened to the light i had wanted to be turned on. Now if I triggered it from the app on my phone for smartthings then the light came on. So for some reason getting the rf signal from the motion sensor to go thru the PI and then either the ha bridge or the HG and then to the smartthings hub is where i have the problem .

I live in US and my rm pro records all the mhz just fine. from about 300-500mhz.

bkenobi: I noticed in the post you sent that the second line of the sensor choice it shows mqtt. I enabled that in HG but didnt understand where or how to add my LAN settings and stuff. Any further help or direction where to find it would be fantastic.

Thank you again to everybody taking the time to read and try and help a fellow member make a smart house.

paizano
Title: Re: X-10 ms16 motion sensors added to Home genie
Post by: Tuicemen on January 30, 2019, 09:05:33 AM
I've been able to trigger Broadlink RF sending from events in HG which is what I think your attempting to do with your X10 RF.

The PiX10Hub HG has a program for HA-Bridge this allows HG to trigger things configured in HA-Bridge which HG can't currently control like the Broadlink. Since your Broadlink is already configured in HA-Bridge to trigger the broadlink to send RF you use the device ID asigned in HA-Bridge as the ID in HGs HA-Bridge program. Once you have that working you just create a macro so the MS16 signal sends the HA-Bridge broadlink trigger.

HA-Bridge isn't two way it only recieves on/off/dim info from Alexa it can't (currently) send that info to Alexa. that is the reason you can't use it as a trigger in Alexa routines. Since the HG echo Bridge is based upon HA-Bridge I doubt it can send that info to Alexa either.
Title: Re: X-10 ms16 motion sensors added to Home genie
Post by: paizano1 on January 30, 2019, 09:15:57 AM
That makes total sense, thank you. I did try and enable with a check mark the ha bridge in HG. it then said to go to options and input my settings. I didnt understand that totally. Do I select the program tab and then in the coding change the spots in "myaddress.." " port" to my settings of the RM, or to the HA bridge port :8080

The coding is where i am lost. I am still searching online and the forums so i dont need to bother others but It is a learning process for the elderly.

Paizano
Title: Re: X-10 ms16 motion sensors added to Home genie
Post by: Tuicemen on January 30, 2019, 09:40:29 AM
In the HG HA-Bridge Program settings you need to put in the address and port of HA-Bridge as well if HA-Bridge security is enabled you need to add that. To do that go to configure/settings  and scroll down to HA-Bridge open and click options.
You may have to open and edit the program to allow more devices depending on what ID the broadlink on/off send is set at.
By default it is set only to 5 if your Brodlink id is higher you need to increase to at least that number
Title: Re: X-10 ms16 motion sensors added to Home genie
Post by: bkenobi on January 30, 2019, 10:05:32 AM
bkenobi: I noticed in the post you sent that the second line of the sensor choice it shows mqtt. I enabled that in HG but didnt understand where or how to add my LAN settings and stuff. Any further help or direction where to find it would be fantastic.

HG always shows some extra feature in that drop down.  The default on my setup is the MQTT setup but you can ignore it.  You can see from the picture that it's not enabled.  I think the only thing I might have enabled for that module is a "stuck sensor" script, though it's not necessary (turns off a motion sensor if it is on and hasn't sent anything in some time frame...assumes the OFF command was missed somehow).
Title: Re: X-10 ms16 motion sensors added to Home genie
Post by: petera on January 30, 2019, 12:00:16 PM
bkenobi: I noticed in the post you sent that the second line of the sensor choice it shows mqtt. I enabled that in HG but didnt understand where or how to add my LAN settings and stuff. Any further help or direction where to find it would be fantastic.

HG always shows some extra feature in that drop down.  The default on my setup is the MQTT setup but you can ignore it.  You can see from the picture that it's not enabled.  I think the only thing I might have enabled for that module is a "stuck sensor" script, though it's not necessary (turns off a motion sensor if it is on and hasn't sent anything in some time frame...assumes the OFF command was missed somehow).

Yes just to the right of that Feature Option you can just see a checkbox. If its not checked with a tick that feature is not enabled. It looks like that feature has been selected as default but when you open the drop down you will see that this feature is the first on the list of options.

Most of these options come about by the amount of automation programs you have enabled. For example Smart Lights will appear in that drop down if Smart Lights is enabled.
Title: Re: X-10 ms16 motion sensors added to Home genie
Post by: Tuicemen on January 30, 2019, 04:09:24 PM
@paizano1 I created a simple wizard macro that will turn on a HA-Bridge device with ID #2 from a x10 A1 ON RF signal to show how it will work.
Rename the attached to 1005-Broadlink_sender.hgx then from program security click import program and select the file.
You must have the HA-Bridge program in HG setup before this will work.
Hope that helps!
 >!
Title: Re: X-10 ms16 motion sensors added to Home genie
Post by: bkenobi on January 31, 2019, 01:09:11 PM
Just curious if there is a way to program new protocols for the RM pro?  For instance, could I write something to receive my weather station if it isn't already there?
Title: Re: X-10 ms16 motion sensors added to Home genie
Post by: Tuicemen on January 31, 2019, 01:26:31 PM
The Broadlink RM Pro is basically only a IR/RF sender, it only receives IR and RF during setup mode and the range is very limited for that. :(
I know the newer versions have a wider RF frequency range but I still believe they are still just senders.
 >!
Title: Re: X-10 ms16 motion sensors added to Home genie
Post by: soxfan1966 on April 01, 2019, 06:51:07 PM
I'm not sure why this is a problem.  In my setup, I simply add a module for the X10 address that the MS16A is reporting on.  I then change the module type to sensor.  Once they are a module, you can trigger off of them or use them in any other way you choose.  Perhaps you could explain where you are having an issue?

I was going to try this with the setup I have for some exterior lights, but my options for X10 modules are limited to the devices I do not have defined.

So I already have an X10 module called "Back Deck" on the B5 X10 Module.

I have an X10 sensor that triggers (or is supposed to trigger) this light but works sporadically - so was going to add in the sensor and see if I am getting the trigger from it and its just not reaching the device to turn it on.

But In my list of options to add a new module, because B5 is already in use, it does not show up.

How does one enter in a duplicate of the same X10 address ?
Title: Re: X-10 ms16 motion sensors added to Home genie
Post by: bkenobi on April 02, 2019, 02:25:01 PM
HG must be connected to a X10 controller of some kind (CM15, CM19, etc).  That controller sends/receives X10 commands.  When you set up HG to have a module, HG doesn't really care what type it is other than knowing that it is there.  If you set a light, switch, etc, the only difference is the icon that shows up in the interface.  If you don't like the icon, you can actually change it.

In any case, HG will send a PLC/RF command when you click ON/OFF in the interface through the connected controller and it deals with it from there.  If the controller sees a PLC/RF command for ON/OFF, it will be seen by HG and it will switch the light/switch to the ON/OFF icon and change the status.

IOW, you can't have more than one device on the same HU code because HG doesn't see it that way.  I don't have my motion sensors on the same HU code as my modules and I use HG to interpret the action.  If you set it up like X10 initially envisioned, you don't need HG involved at all (with the motion sensor).  Simply ignore it.  If you want to use the motion sensor in another way, change it to a different HU code and utilize some kind of script to make it do something smarter.  For an example, see the Advanced Smart Lights code.
Title: Re: X-10 ms16 motion sensors added to Home genie
Post by: soxfan1966 on April 05, 2019, 06:45:24 AM
So if my light for my back deck is B5, rather than have the motion sensor on the same module (B5) I would use a different house code, say S for sensors?

My understanding is that the X10 sensors are defined when you set them so they have a house code and a module number to trigger.

So are you saying only in HG the sensors are defined on a separate house code or the actual motion sensor itself is set up to be on a different house code?

Now:
X10 sensor set on house code B and module 5 which triggers the light on my back deck defined as B5

Suggestion:
x10 sensor set on house code S and module 5, HG set up to recognize that sensor as S5 and then HG us used to trigger the light on B5

Is that correct ?
Title: Re: X-10 ms16 motion sensors added to Home genie
Post by: Tuicemen on April 05, 2019, 06:53:39 AM

x10 sensor set on house code S and module 5, HG set up to recognize that sensor as S5 and then HG us used to trigger the light on B5

Is that correct ?

That is the way it should be setup even if using AHP.
The only way to speed up triggering is if the light can accept RF directly or you have a transceiver on the same circuit as the light and close to the sensor.
Title: Re: X-10 ms16 motion sensors added to Home genie
Post by: soxfan1966 on April 05, 2019, 09:47:27 AM
I wonder if that's contributed to their inconsistency.  I'm going to update the 3 I have as suggested and see how that impacts things.

Thanks
Title: Re: X-10 ms16 motion sensors added to Home genie
Post by: soxfan1966 on April 05, 2019, 10:55:38 AM
OK, if someone can confirm this will work or correct where it may be wrong I would appreciate it.

I updated my x10 sensors to be on house code C now, with the unit number the same as they were.

So C5 will be tied to B5 (Back Deck)
     C2 will be tied to A2 (Front Door)

I need a Program now that recognizes the On command from the C5 or C2 and then triggers to turn on the corresponding light.

Here is what I have *I'm not 100% sure on the Trigger value nor the Control.On / Control.Off value in the code.

Pictures attached (I can update the trigger code to have other conditions like time of day, etc after)

Title: Re: X-10 ms16 motion sensors added to Home genie
Post by: soxfan1966 on April 05, 2019, 12:07:59 PM
Ok, not sure why I didn't think of this at first but I got one of my x10 remotes, set it on house code C and then for the Program on the Trigger Page clicked the eye icon to record.

Then I clicked the C5 On button on the report and captured the trigger.

So this is what my program looks like now
Title: Re: X-10 ms16 motion sensors added to Home genie
Post by: soxfan1966 on April 06, 2019, 09:02:05 AM
Update from last night and this morning

I had gone out to dinner last night and we got back around 8ish so I was interested to see if the new approach was going to work.  Unfortunately it did not.
I did a quick check and the house codes for C were not received by HG.

I did some debugging this morning - when I am in my basement where the CM15A is and was testing yesterday with the handheld remote it worked correctly.

When I went outside and tried either the handheld remote or triggeed manually from one of the sensors it did not.  I figured it was because I do not have a TM15 close enough on house code C to receive them.  I switched one over (I have one for house code A and another for house code B - at different ends of the house and on different lines, this works for my devices when I have them set up on either A or B depending on where they are.  Side note - I had one of those dryer vent bridge thingys and it was just not reliable to go across the two lines so this approach has worked for the last few years).

With one of the TM15's on C I was getting HG to see them from the hand held remote but not from the sensor reliably.  I also do not have another TM15 around (granddaugher snapped the attenna off one awhile ago and I was already using my backup).

So I'm back to not having the sensors in HG, and the sensors setup on the same house code and unit as the light they are assigned to.

I did notice that 2 of the sensors (in my attempt to improve reliablility I had 2 in the back for the back deck and 2 in the front for the front door) had sticky buttons and I could not relaibly get them to work when manually triggering the buttons.  So I am back to having a single sensor in each location that I tested manually and each worked.

Back to seeing how things go this evening when its dark.   I'm afraid I may need to just get a motion sensor that attaches directly to the light and see how that works but will see.

Another side note: I installed 2 solar powered lights along the path to the back deck / stairs.  These are the kind that have a motion sensor and can be in low power mode while no motion and then go into full brightness with motion.  They seemed to work OK (better than completely dark stairs),  I had an older type light back there which stopped working - it was OK, but during the winter when there is less sunlight and longer periods of dark it was not meeting our needs.  So I still want the light at the top of the stairs on the deck to be motion sensor powered.
Title: Re: X-10 ms16 motion sensors added to Home genie
Post by: bkenobi on April 08, 2019, 01:11:22 AM
By all means, if you want to reinvent the light bulb, have at it.  However, Gene wrote a Smart Lights app that will do what you need.  I updated it to add some features I needed and it's another option (Advanced Smart Lights).  I think Gene updated Smart Lights in the current release so it does even more.
Title: Re: X-10 ms16 motion sensors added to Home genie
Post by: soxfan1966 on April 08, 2019, 08:07:34 AM
I will take a look at those programs - but at this point I don't think the problem is with HG but rather my setup that is preventing the RF signal from the sensors being recognized.

My CM15A is currently in the basement because that's where my PC is - which used to be attached to it.  With the Pi hub I'm going to move it upstairs and see if that helps.
Title: Re: X-10 ms16 motion sensors added to Home genie
Post by: bkenobi on April 08, 2019, 12:58:35 PM
The CM15 has a terrible antenna stock.  The MS16 (all of the line really) have a terrible antenna.  When combined, you will not get very reliable communication.  If you want to continue using that combination, you should search around for the passive antenna modification for your motion sensors (a wire placed next to the motion sensor) and the external antenna mods for the CM15.  I installed a huge Radio Shack antenna in my attic and an amplifier in-line and it's been working very well for years.  It might be easier to consider a different RF receiver if you haven't invested in the CM15 yet though.  If I were doing it today, I'd get one of the WGL offerings most likely.

http://www.wgldesigns.com/w800.html
Title: Re: X-10 ms16 motion sensors added to Home genie
Post by: dhouston on April 08, 2019, 02:50:55 PM
...you should search around for the passive antenna modification for your motion sensors (a wire placed next to the motion sensor) and the external antenna mods for the CM15.
https://www.laser.com/dhouston/X10_feng_shui.html (https://www.laser.com/dhouston/X10_feng_shui.html)
Title: Re: X-10 ms16 motion sensors added to Home genie
Post by: soxfan1966 on April 08, 2019, 04:16:16 PM
Dave, that link does not seem to work.
Title: Re: X-10 ms16 motion sensors added to Home genie
Post by: dhouston on April 08, 2019, 05:45:56 PM
Dave, that link does not seem to work.
It works for me under Windows 10 with Firefox, Chrome & Edge. There have been sporadic issues with the site over the past few weeks. You might try a different browser.
Title: Re: X-10 ms16 motion sensors added to Home genie
Post by: Brian H on April 08, 2019, 06:15:14 PM
I went to your web site and got there with no error.
Selected the file you linked to. For the antenna improvement.
Got a file not found error.
XPSP3 and Firefox.
Title: Re: X-10 ms16 motion sensors added to Home genie
Post by: brobin on April 08, 2019, 08:20:34 PM
Try switching your browser to "Incognito" or "Private" browsing and it should work.