Please login or register.

Login with username, password and session length

Author Topic: auto turn off of lights  (Read 4571 times)

mike

  • Hero Member
  • *****
  • Helpful Post Rating: 14
  • Posts: 1057
auto turn off of lights
« on: October 27, 2020, 02:27:29 PM »

I am using Tuicemen's 'smart emailer' that uses AddFeature to add his required email choices to each module. I THINK that AddFeature adds that choice to EVERY module?  Seems so. 

So if I want to add one more feature to each module, do I have to add it to the smart-emailer startup list or can I can make a new program and add it there?  If I do new program, then does it add to each module also or erase the smart-email features and replace them with my new one?

I swear I saw a new built in program in one of the last HG updates that added this auto turn off program, but it is not there on my new SD buster install.  But good news is this is an example program in Gene's help section that I can copy and paste into a program myself and try... 

I wonder if there is a source of HG programs already made we can browse?  Seems like that would be a great thing to have!  Rather than reinventing each time.

But my concern is I do not want to break Tuicemen's great smart-email program in the process.
Logged

mike

  • Hero Member
  • *****
  • Helpful Post Rating: 14
  • Posts: 1057
Re: auto turn off of lights
« Reply #1 on: October 27, 2020, 02:56:52 PM »

Hmmm...   I found the github repository with some programs... 

found https://github.com/genielabs/homegenie-packages/tree/master/packages/Smart-Control/EvolSmartLight

looks like it can do the job with added feature of motion resetting timer so it stops turning off before finished in the room... 

It also answered my question above in that it ADDS a 3rd set of parameters to the modules and should not bother my smart-emailer.

Tuicemen, feel free to delete this whole thread if you want?  I am slowly learning...
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10497
  • I don't work for X10, I use it successfuly!
Re: auto turn off of lights
« Reply #2 on: October 27, 2020, 05:03:38 PM »

The smart emailer program can be expanded on to provide more options that is the idea behind open source code.
If you mess something up in a HG addon program while playing with the code simply delete the addon program and reinstall the addon.
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10497
  • I don't work for X10, I use it successfuly!
Re: auto turn off of lights
« Reply #3 on: October 27, 2020, 05:24:41 PM »

I just checked the newest HG bersion and the option to clone a program is still there so you could clone the smart-emailer and work from that just rename the clone to avoid confusion.
« Last Edit: January 22, 2021, 08:53:34 AM by Tuicemen »
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

bkenobi

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 24
  • Posts: 2081
Re: auto turn off of lights
« Reply #4 on: December 27, 2020, 07:09:32 PM »

I have an app that's close called Stuck_Module_Check.hgx but I believe there is a delayed turnoff that I've used in the past.

bkenobi

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 24
  • Posts: 2081
Re: auto turn off of lights
« Reply #5 on: December 27, 2020, 07:11:35 PM »

I found the package in the first 30 seconds of looking.  Not sure why you weren't able to find it:

https://github.com/genielabs/homegenie-packages/tree/master/packages/Scheduling/Turn%20off%20delay

mike

  • Hero Member
  • *****
  • Helpful Post Rating: 14
  • Posts: 1057
Re: auto turn off of lights
« Reply #6 on: December 29, 2020, 03:32:19 PM »

Thanks for link to your github;  looks like you wrote some cool programs! 

Looking at the code for your stuck module, I think it works by being a '3 way' X10 module maybe?  I could not see anything that told me how it would know a module was still on after being told to turn off.  I think x10 had such 3 way modules once so you could interrogate them for their present state?  I have none like that, so I have to rely on brute force to turn off multiple times to be more sure.

I apologize if you put up any descriptions of what each program does as I did not find it.  BTW, I am using the HG built in program #145 called smart lights:  it gives the additional OFF command after a programmed time so if my motion modules 30 sec OFF automatic OFF send does not work, I have this backup.  It seems to help.


Logged

petera

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 27
  • Posts: 1750
Re: auto turn off of lights
« Reply #7 on: December 29, 2020, 09:40:27 PM »

Thanks for link to your github;  looks like you wrote some cool programs! 

Looking at the code for your stuck module, I think it works by being a '3 way' X10 module maybe?  I could not see anything that told me how it would know a module was still on after being told to turn off.  I think x10 had such 3 way modules once so you could interrogate them for their present state?  I have none like that, so I have to rely on brute force to turn off multiple times to be more sure.

I apologize if you put up any descriptions of what each program does as I did not find it.  BTW, I am using the HG built in program #145 called smart lights:  it gives the additional OFF command after a programmed time so if my motion modules 30 sec OFF automatic OFF send does not work, I have this backup.  It seems to help.

If you need to send the same X10 command a number of times for your X10 module to function there's something wrong with either your X10 controller, your X10 module, your power lines or most likely you have something on the power line absorbing the signal.

Jeff Volp has some wonderful troubleshooting guides to eliminate noisy power lines. One of the biggest culprits these days are mobile phone chargers. Permanently left plugged in even when not in use in many cases. Of course the Raspberry Pi power supply can be another culprit particularly the cheaper alternatives.

If I found myself in your situation I'd remove as many of those power supplies as possible from the circuit one by as a process of elimination. I've mentioned it here before but I'll mention it again. Remove any other X10 controller from the circuit too. Having two X10 controllers on the same power line is only asking for trouble particularly if one of them is programmed with timers or macros.

The bottom line is, X10 in HG doesn't need to send multiple instances of the same X10 command to control an X10 module. It may work as a stop gap but there's a bigger problem at play here.
Logged

mike

  • Hero Member
  • *****
  • Helpful Post Rating: 14
  • Posts: 1057
Re: auto turn off of lights
« Reply #8 on: December 30, 2020, 09:56:26 AM »


1) If you need to send the same X10 command a number of times for your X10 module to function there's something wrong with either your X10 controller, your X10 module, your power lines or most likely you have something on the power line absorbing the signal.

2) Jeff Volp has some wonderful troubleshooting guides to eliminate noisy power lines. One of the biggest culprits these days are mobile phone chargers. Permanently left plugged in even when not in use in many cases. Of course the Raspberry Pi power supply can be another culprit particularly the cheaper alternatives.

3) If I found myself in your situation I'd remove as many of those power supplies as possible from the circuit one by as a process of elimination. I've mentioned it here before but I'll mention it again. Remove any other X10 controller from the circuit too. Having two X10 controllers on the same power line is only asking for trouble particularly if one of them is programmed with timers or macros.

4) The bottom line is, X10 in HG doesn't need to send multiple instances of the same X10 command to control an X10 module. It may work as a stop gap but there's a bigger problem at play here.

Let me comment on your 4 points:

1)  As a general assumption, this is correct.  In my case, it is wrong:  I have 4 separate buildings with separate 220V panels.  Located over a 1/2 acre spread.  MY issue for requiring multiple X10 backup OFF commands is weak signal due to distance and enough signal suckers in this many buildings that even with ALL on X10 bandpass filters, still absorb some signal.  But mainly it is a centrally located pi/cm15a that must reliably communicate by both RF and powerline with modules over such a large area.

2) Jeff & I are on firt name basis.  He just sent me a couple firmware update chips for my XTBR - the super high voltage unique model required to get powerline sigs to those remote buildings.  I have various of his other devices also incorporated.  And of course there is not a single phone or pi power supply here NOT on a bandpass filter.  Also required is a v572rf32 with 1/4 wave ground plane antenna on 30' mast to hear those remote RF signals.

3) Another good comment, but bad assumption to make.

4) This assumption is going too far, even to make as a generalization. 

Logged

petera

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 27
  • Posts: 1750
Re: auto turn off of lights
« Reply #9 on: December 30, 2020, 10:33:50 AM »

Mike, way too much information.  rofl

Suffice to say I have a humble two up two down with one central distribution box. I’m not on first name terms with Mr Volp but I have found his troubleshooting papers informative and quite helpful in the past.

All that concerned me here was the fact that there is no need to transmit multiple instances of the same X10 code to control an X10 module in HomeGenie. While my post was made addressing your particular situation I would like others who are reading this to understand that in a typical domestic setup multiple instances of X10 commands to turn on/off an X10 module would not be required.

Now that I am aware your infrastructure is more akin to a commercial installation the word “Home” as in Home Automation and HomeGenie looks a little misplaced.

I merely pointed out the possible hurdles that a standard domestic X10 setup might encounter. Clearly your setup does not fall into this category. I’ve no doubt that Jeff will continue to assist you in your pursuit of a stable X10 setup so I’ll leave you in his capable hands and get back to more pressing matters.
Logged

bkenobi

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 24
  • Posts: 2081
Re: auto turn off of lights
« Reply #10 on: December 30, 2020, 11:35:48 AM »

I have 2 buildings on 5 acres with a total of 3 panels (2 for main home, 1 for detached shop 200' away. I originally had X10 modules throughout and would experience signal problems on a regular basis. I started out forcing AHP to send multiple command repeats to make them work.  After following the various troubleshooting guides and talking to the experts here (especially Jeff Volp, dhouston, Brian H, etc) I was able to systematically locate the issues (of which I had several) and develop a scheme to address each one.  If I had continued down the same path of blindly trying things, buying different modules, changing settings, etc without understanding the problem, I'd have a huge system footprint with no expectation of stability.  As it is now, I've had 1 failure in 2 years and bend rick stable for much longer (2016 or 2017).

There are some very knowledgeable people who frequent this forum and are very happy to help as they can.  I'd encourage you to look for a solution to the source of the signal or module problems over brute force but both will technically work.

The code I posted in my github page were all developed by me (with some framework derived from other projects in a couple cases). They are all documented in the code but I do not write a separate document outside of that.  Each code has a specific goal that I needed filled and may not be useful for anyone else.  The stuck module code was designed to detect a RF sensor being left in the on state which can happen if the RF "OFF" is not received which is not uncommon for MS16 or other X10 RF motion sensors which send a flood of "ON" commands but a single "OFF". The code simply starts a timer when an "ON" is received and if OFF isnt seen before the time is up it turns the sensor off.  My prior comment was suggesting that it might be close to what you were looking for and with a little tweaking could be adapted to your needs.  I do not recommend that approach since I found Gene's code that does exactly what you need.

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10497
  • I don't work for X10, I use it successfuly!
Re: auto turn off of lights
« Reply #11 on: December 30, 2020, 01:26:55 PM »

User Puck posted about maping your circuits several years back. That along with Jeffs XTBM-PRO Signal Analyzer has saved me several days of frustration in the past.  Now if I have a issue with a command not working I can find the culprit in seconds without the  XTBM-PRO. 

At my off grid place I have several things which if running or plugged in will cause a issue. These are things that I seldom use, except for my back up generator.
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

petera

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 27
  • Posts: 1750
Re: auto turn off of lights
« Reply #12 on: December 30, 2020, 10:43:07 PM »

I have 2 buildings on 5 acres with a total of 3 panels (2 for main home, 1 for detached shop 200' away. I originally had X10 modules throughout and would experience signal problems on a regular basis. I started out forcing AHP to send multiple command repeats to make them work.  After following the various troubleshooting guides and talking to the experts here (especially Jeff Volp, dhouston, Brian H, etc) I was able to systematically locate the issues (of which I had several) and develop a scheme to address each one.  If I had continued down the same path of blindly trying things, buying different modules, changing settings, etc without understanding the problem, I'd have a huge system footprint with no expectation of stability.  As it is now, I've had 1 failure in 2 years and bend rick stable for much longer (2016 or 2017).

There are some very knowledgeable people who frequent this forum and are very happy to help as they can.  I'd encourage you to look for a solution to the source of the signal or module problems over brute force but both will technically work.

The code I posted in my github page were all developed by me (with some framework derived from other projects in a couple cases). They are all documented in the code but I do not write a separate document outside of that.  Each code has a specific goal that I needed filled and may not be useful for anyone else.  The stuck module code was designed to detect a RF sensor being left in the on state which can happen if the RF "OFF" is not received which is not uncommon for MS16 or other X10 RF motion sensors which send a flood of "ON" commands but a single "OFF". The code simply starts a timer when an "ON" is received and if OFF isnt seen before the time is up it turns the sensor off.  My prior comment was suggesting that it might be close to what you were looking for and with a little tweaking could be adapted to your needs.  I do not recommend that approach since I found Gene's code that does exactly what you need.

You lucky man  rofl Five acres of real estate where I’m based would cost in the region of €5 million dollars. In fairness I can see both Google and Facebook’s HQ from my dormer. Intel’s manufacturing plant is only a 30 minute drive. Yes completely irrelevant except as a result I’m now enjoying 1 Gb/s full optical connection to the door. I’ll have to upgrade that damn Cat5e cable I installed a number of years back. Such a pita  rofl rofl rofl
Logged

bkenobi

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 24
  • Posts: 2081
Re: auto turn off of lights
« Reply #13 on: December 31, 2020, 11:20:08 AM »

First world problems.   :)%
 

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