X10 Community Forum

📱🖥️PiX10Hub => 💬General Discussion => 🧞HomeGenie add Wishes => 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.
Title: Re: X-10 ms16 motion sensors added to Home genie
Post by: soxfan1966 on January 25, 2020, 09:05:38 AM
@tuicemen

I am trying to get back to getting this to work again - I tried 3 different X10 sensors that I have - one MS14A and two MS16A.  None of them seem to trigger enough signal so that HG is reading it.   If I trigger the same X10 device from a handheld remote then it does work (it triggers the sensor which triggers a program to turn on the back deck light).

You mentioned way back in this thread that you use the x10 security sensors now.  Would that be the MS10A ?  And can those be used outside?  Os is there a different model you use for this ?

Title: Re: X-10 ms16 motion sensors added to Home genie
Post by: Tuicemen on January 25, 2020, 09:22:56 AM
I use then ms10a sensors. I never had any luck with the MS14A or MS16A ranges.
The security sensors are not rated for outdoor use. However I have one on my front porch which is protected from the elements and has been there working for several years now.
Have you tried the passive antenna trick to boost the RF signal from your sensor?
At the time I played with the ms14 and 16 the RF repeaters had been discontinued but the new RF repeaters may be an option to look at.
Title: Re: X-10 ms16 motion sensors added to Home genie
Post by: soxfan1966 on January 25, 2020, 09:28:15 AM
I have not tried the passive antenna - the sensors I have are quite old now anyway and I suspect not in top working condition to begin with.

Where I need this to work I can put in a spot that's protected from the weather.

I may try one of the MS10A or MS18A, I can probably find one on eBay.

Those seem different than the ones I have in terms of setup though, does it get an address like other x10 devices?  I just need a way for HG to recognize it so I can trigger the light.
Title: Re: X-10 ms16 motion sensors added to Home genie
Post by: Tuicemen on January 25, 2020, 09:43:50 AM
HG sees the signals from security motion sensors you set it up simular to door/window sensors.
I found the signal from these to be stronger but the new RF repeaters will also see and repeat the signals from these so if you still have a range issue it may be worth picking up one.
Title: Re: X-10 ms16 motion sensors added to Home genie
Post by: soxfan1966 on January 25, 2020, 09:52:59 AM
I do not have any door/window sensors set up in HG, nor do I have the Security Program installed.

What do I need as active programs to be able to add a MS10A as a door/window sensor?
Title: Re: X-10 ms16 motion sensors added to Home genie
Post by: Tuicemen on January 25, 2020, 09:56:23 AM
I believe all that needs to be set is the RF-IR program. If HG is now seeing RF signals from a X10 remote it should also see security signals.
Title: Re: X-10 ms16 motion sensors added to Home genie
Post by: petera on January 25, 2020, 10:07:08 AM
I have not tried the passive antenna - the sensors I have are quite old now anyway and I suspect not in top working condition to begin with.

Where I need this to work I can put in a spot that's protected from the weather.

I may try one of the MS10A or MS18A, I can probably find one on eBay.

Those seem different than the ones I have in terms of setup though, does it get an address like other x10 devices?  I just need a way for HG to recognize it so I can trigger the light.

You do realise that you’re not confined to X10 sensors with HG. As long as your CM15 has the receiving bandwidth covered you can use any RF transmitter and HG will process it. I’ve a number of generic motion and smoke sensors working in my setup. I even have a few of those cheap doorbells working.

All you need to do is Google for anything that broadcasts in your CM15 range and you should be good to go. You have the built in RF sniffer in HG to test them.
Title: Re: X-10 ms16 motion sensors added to Home genie
Post by: soxfan1966 on January 25, 2020, 10:07:35 AM
Ok, I just ordered an MS10a from Amazon.  Once it comes in I will give it a whirl.  Thanks
Title: Re: X-10 ms16 motion sensors added to Home genie
Post by: Tuicemen on January 25, 2020, 10:32:59 AM
All you need to do is Google for anything that broadcasts in your CM15 range and you should be good to go. You have the built in RF sniffer in HG to test them.
And it maybe even cheaper. I have a box full of these, I'm sure I wouldn't have missed one. ;)
Title: Re: X-10 ms16 motion sensors added to Home genie
Post by: petera on January 25, 2020, 10:53:12 AM
Way cheaper. That's the beauty of using open source software unlike the proprietary nature of the software that was AHP. I think it's important that the folks here realise that the CM15 is capable of receiving any RF that is thrown at it within its bandwidth so they are not restricted to X10 only hardware when using it in conjunction with HG.
Title: Re: X-10 ms16 motion sensors added to Home genie
Post by: Tuicemen on January 25, 2020, 10:59:59 AM
The problem is the North American CM15A uses 310MHz so the device pool is smaller then for the European version.
Title: Re: X-10 ms16 motion sensors added to Home genie
Post by: soxfan1966 on January 25, 2020, 11:14:18 AM
I will take a look and see what else I can find that is not x10 but works w the 310MHz
Title: Re: X-10 ms16 motion sensors added to Home genie
Post by: petera on January 25, 2020, 11:58:07 AM
The problem is the North American CM15A uses 310MHz so the device pool is smaller then for the European version.

3 smoke sensors purchased online a while back ex China for the equivalent of $5 each that can be set for 310 or 433mhz  NO/NC via jumpers on board. The range is there in both frequencies. You just have to look for them.
Title: Re: X-10 ms16 motion sensors added to Home genie
Post by: dave w on January 25, 2020, 04:13:16 PM
@tuicemen
I am trying to get back to getting this to work again - I tried 3 different X10 sensors that I have - one MS14A and two MS16A. 
I am late to this party, but tuicemens suggestion of a passive radiator is solid.
FWIW
There should be tons of posts on passive radiator or passive antennas for X10 do-bennies, but is just a 18" single strand bare copper wire (maybe 24ga, but wire size isn't a big factor. Coat hangers can be used since Radio Shack is dead. ) hot glued to the left side of the MSxx. Wire can dribble up or down. You can try hot gluing center point of wire to the MSxx left side but you effectively change the antenna from a half wave to a quarter wave, which given the MSxx lously ground plane will reduce range.
Title: Re: X-10 ms16 motion sensors added to Home genie
Post by: Tuicemen on January 25, 2020, 04:25:04 PM

I am late to this party, but tuicemens suggestion of a passive radiator is solid.
FWIW
There should be tons of posts on passive radiator or passive antennas for X10 do-bennies, but is just a 18" single strand bare copper wire (maybe 24ga, but wire size isn't a big factor. Coat hangers can be used since Radio Shack is dead. ) hot glued to the left side of the MSxx. Wire can dribble up or down. You can try hot gluing center point of wire to the MSxx left side but you effectively change the antenna from a half wave to a quarter wave, which given the MSxx lously ground plane will reduce range.
The length of wire determines the wave length  your not limited to the length of wire but I'll not get into the math.
Title: Re: X-10 ms16 motion sensors added to Home genie
Post by: soxfan1966 on January 27, 2020, 05:23:34 PM
My MS10A arrived today and I just installed it.  So far it is triggering the back deck light- seems to be more powerful in terms of the signal.   And since this is a security sensor and triggers all the time I added the Advanced Smart Light program to HG and am using it for this light so it *hopefully* only turns the light on when its dark outside.

I did write a quick program that takes the RF signal from the sensor and uses that to trigger the Back Deck Light.

Will see how it goes.

Thanks
Title: Re: X-10 ms16 motion sensors added to Home genie
Post by: soxfan1966 on January 27, 2020, 06:00:52 PM
Not sure whom may be familiar with the Advanced Smart Lights program, not sure I have it set up correctly or not.

the pics attached are the light set up with the Advanced Smart Lights settings and the Sensor (the MS10A that arrived today)

*** I also do not have the jkutils weather program installed as I am using the OpenWeatherMap one - not sure if that needs to be updated in the program either
Title: Re: X-10 ms16 motion sensors added to Home genie
Post by: Tuicemen on January 28, 2020, 07:42:57 AM
I had played with the smartlight some time ago but had the jkutills program it required for dusk dawn. I nolonger have either installed here in the city and unsure if it is in use at my off grid place.
You may need to either installl the jkutills program (not the open weater one) or edit the smartlight program to point to Openweathermap. I also am not sure if Gene set up the dusk/dawn pulls.
Title: Re: X-10 ms16 motion sensors added to Home genie
Post by: soxfan1966 on January 28, 2020, 08:27:09 AM
Was looking at it again this morning - realized in my original setup for the Advanced Smart Lights I forgot to click the liuttle Enable box (which is impossible to see as it appears to be a black box on a black background).

I then tried updating the Code for the Advanced Smart Lights to use @SolarTimes.Sunset in place of the jk utils code but it would not compile, I do not think I have the formatting for that correct.  I was going to try and update it to use the OpenWeatherMap info (which is must be pulling in as its part of the widget, and also part of tuicemen's Weather Alerter) but the only flaw with that approach is then the light would come on between sunset and sunrise.

For me - I really only want it to trigger between Sunset and 11pm (this avoids it getting triggered and the light coming on while we are sleeping).

So I went back to try and use just a HG Program for this.  Here is what I came up with:
Title: Re: X-10 ms16 motion sensors added to Home genie
Post by: Tuicemen on January 28, 2020, 08:42:53 AM
I didn't think I added dusk/dawn to WeatherAlerter  ??? I guess my memory is worse then I thought. :-[
It is all in how you use the dusk/dawn info in your code, to get it to work the way you wish it to work.
However you have a wizard script setup and if it works for you, Great! :)%
Others may disagree with me here but there is no wrong way to do this, if you get the results you want.
 >!
Title: Re: X-10 ms16 motion sensors added to Home genie
Post by: soxfan1966 on January 28, 2020, 09:01:57 AM
My apologizes, the Weather Alerter is showing the updated date/time and not Sunrise / Sunset.  The OpenWeatherMap widget does display the sunrise / sunset time.  It looks like this is what it is using to get those values (so this would replace the jk utils code in the Advanced Smart Lights program):

** corrected **

Code: [Select]
    //jkUtils
    //time_sunrise = DateTime.ParseExact(Program.WithName("jkUtils - Solar Altitude").Parameter("jkUtils.SolarAltitude.Morning.Sunrise.Start").Value, "H:mm", System.Globalization.CultureInfo.InvariantCulture);
    //time_sunset = DateTime.ParseExact(Program.WithName("jkUtils - Solar Altitude").Parameter("jkUtils.SolarAltitude.Evening.Sunset.End").Value, "H:mm", System.Globalization.CultureInfo.InvariantCulture);
    //OpenWeatherMap
    time_sunrise = DateTime.ParseExact(Program.Parameter("Astronomy.Sunset").Value, "H:mm", System.Globalization.CultureInfo.InvariantCulture);
    time_sunset = DateTime.ParseExact(Program.Parameter("Astronomy.Sunrise").Value, "H:mm", System.Globalization.CultureInfo.InvariantCulture);
Title: Re: X-10 ms16 motion sensors added to Home genie
Post by: Tuicemen on January 28, 2020, 09:24:51 AM
My apologizes, the Weather Alerter is showing the updated date/time and not Sunrise / Sunset.  The OpenWeatherMap widget does display the sunrise / sunset time.
not a problem, you had me a bit worried!  rofl
Quote
It looks like this is what it is using to get those values (so this would replace the jk utils code in the Advanced Smart Lights program):

var sunset = Utility.JavaTimeStampToDateTime(1000D*(int)weatherData.sys.sunset);
var sunrise = Utility.JavaTimeStampToDateTime(1000D*(int)weatherData.sys.sunrise);

Program.Parameter("Astronomy.Sunset").Value = TimeZoneInfo.ConvertTime(sunset, TimeZoneInfo.Local).ToShortTimeString();
Program.Parameter("Astronomy.Sunrise").Value = TimeZoneInfo.ConvertTime(sunrise, TimeZoneInfo.Local).ToShortTimeString();
Someone else will have to comment on that As I don't have the JkUtils installer nor the Advanced Smartlights installed any more. If my memory is still working ::) :' bkenobi created the Advanced Smartlights so he may have an Idea what lines need editing to work with the HG now included OpenWeatherMap.
Title: Re: X-10 ms16 motion sensors added to Home genie
Post by: soxfan1966 on January 29, 2020, 03:22:15 PM
I ended up installing the Jkutils - Solar Altitude and using the Advanced Smart Lights program with that.  As of now, it seems to be working.
Title: Re: X-10 ms16 motion sensors added to Home genie
Post by: bkenobi on January 29, 2020, 08:26:08 PM
I'm not sure what you have that's not working. The ASL code uses the sunrise/sunset from jkUtils but it also has commented out another deprecated option. If you want to source sun from another source, just edit the code and compile.