HomeGenie Forum

General Category => Troubleshooting and Support => Topic started by: kevinvinv on January 05, 2016, 05:29:23 AM

Title: How to send X10 All On or All Off
Post by: kevinvinv on January 05, 2016, 05:29:23 AM
Hello,  noob here.

I'd like to send an X10 ALL OFF command every night at 11:50pm

Can someone point me to the simplest way to do such a thing?

Thanks so much!!!
Title: Re: How to send X10 All On or All Off
Post by: bkenobi on January 05, 2016, 05:51:40 AM
I don't believe the All Off or All Lights On commands are available right now.  I don't use them, but it would be good to have them available.  Could you post this as a request in the features request sub forum so it gets in Gene's to do list?
Title: Re: How to send X10 All On or All Off
Post by: emerich on January 05, 2016, 11:31:36 AM
Hi,
for my X.10 Devices the "All Lights On" and "All Lights Off" scenario works fine. This currently works for Dimmers and Lights but can be extended to Switches also.

br. Christian
Title: Re: How to send X10 All On or All Off
Post by: kevin1 on January 05, 2016, 11:39:28 AM
is there a related webapi to turn all lights off (x10 and zwave)?
Title: Re: How to send X10 All On or All Off
Post by: emerich on January 05, 2016, 11:43:49 AM
Hi,
with a short glimpse to the documentation you'll find:


Control.AllLightsOn

Turn on all lights with the house code <house_code>.

Syntax

/api/HomeAutomation.X10/<house_code>/Control.AllLightsOn

GET /api/HomeAutomation.X10/B/Control.AllLightsOn
Control.AllLightsOff

Turn off all lights with the house code <house_code>.

Syntax

/api/HomeAutomation.X10/<house_code>/Control.AllLightsOff

GET /api/HomeAutomation.X10/B/Control.AllLightsOff

br. Christian
Title: Re: How to send X10 All On or All Off
Post by: kevinvinv on January 05, 2016, 02:07:29 PM
Thanks.

Would you kindly point me to the documentation you mention?  I am struggling greatly to find documentation that is useful.  Thanks!!!
Title: Re: How to send X10 All On or All Off
Post by: emerich on January 05, 2016, 02:49:01 PM
http://genielabs.github.io/HomeGenie/api/mig/mig_api_x10.html (http://genielabs.github.io/HomeGenie/api/mig/mig_api_x10.html)

You can reach it also via www.homegenie.it (http://www.homegenie.it) -->  click Docs & Support and go to Developers' Docs.

br. Christian
Title: Re: How to send X10 All On or All Off
Post by: bkenobi on January 05, 2016, 03:34:49 PM
Ahhh, I thought you wanted to perform the All lights ON/All OFF from the GUI.  You can turn them ON/OFF as described by emerich through a script.  I suppose if you want to access the command from the GUI you could simply create a Wizard script with the one command and add that script to the GUI where you'd like to use it.
Title: Re: How to send X10 All On or All Off
Post by: kevinvinv on January 06, 2016, 05:12:24 AM
OK I think I created a Wizard Script in the Customize | Programs area.   

I'd like to see an example of a Wizard Script maybe so I knew the syntax.  Is this documented somewhere?

Once I create the script,  how does one get it to run say every day at 11pm?

Thanks!
Title: Re: How to send X10 All On or All Off
Post by: bkenobi on January 06, 2016, 04:45:17 PM
There is a lot of documentation (though maybe not complete for what you need) linked from the main site (www.homegenie.it (http://www.homegenie.it)).  If you click on the "DOCS & SUPPORT" link at the top and go to either "USER'S GUIDE" or "DEVELOPERS' DOCS" you will see a lot of information about setting up HG and coding for it.  A lot of the info on the dev side is for C#, but Wizard, JS, Python, etc. should all be referenced.

I just looked around and did not locate a specific page showing how to develop a Wizard script, but I suppose that makes sense.  The Wizard script is so simple it really doesn't require much documentation.  Basically just add commands one at a time and they will execute in that order.  You can't do much if any logic which is why it's pretty self explanatory.  Do you need help constructing a Wizard script?

Running the script at a certain time is easy too.  In a Wizard script, switch to the trigger tab.  Follow the guide under the events scheduler and it should work for you right away.

http://www.homegenie.it/docs/scheduler.php (http://www.homegenie.it/docs/scheduler.php)
Title: Re: How to send X10 All On or All Off
Post by: kevinvinv on January 06, 2016, 04:59:51 PM
OK I'll give it a shot .  Thanks.

So do you envision I would enter both these lines (as mentioned above) in my new wizard script?

/api/HomeAutomation.X10/<house_code>/Control.AllLightsOff
GET /api/HomeAutomation.X10/B/Control.AllLightsOff
Title: Re: How to send X10 All On or All Off
Post by: bkenobi on January 06, 2016, 07:57:44 PM
Not exactly.  The code you posted is for the API which is accessed through a web connection.  You would call that with a command like:
Code: [Select]
<HG IP address>/api/HomeAutomation.X10/<house_code>/Control.AllLightsOn
The Wizard scripting language doesn't work like normal code.  You click something like
Code: [Select]
X10->All Llights->Control.On
I'm still not sure if there's a way to send the "ALL ON" or "ALL OFF" directly from a C# script.  I know you could do it with the following, but it won't send the same command as you are asking for.
Code: [Select]
Modules.OfDeviceType("Light,Dimmer,Switch").On();
Title: Re: How to send X10 All On or All Off
Post by: kevinvinv on January 07, 2016, 04:55:53 AM
ok thanks for all the advice so far.

I cant find any way to do AllOn or AllOff from the wizard. 

I have two questions:

1)  Does HG have any way to send commands via the Unix command line? 
2)  If anyone could share some info or an example on a basic C# or Python script that would be helpful

Thanks again!
Title: Re: How to send X10 All On or All Off
Post by: kevin1 on January 07, 2016, 12:41:17 PM
For question #1, this worked from cygwin (unix command line tools for windows):
Code: [Select]
wget http://<ip>/api/HomeAutomation.ZWave/16/Control.On
For #2, look in Config menu, Programs, there are several in there.  Or you can search the forum for .hgx files to find the ones posted here which you can import (or open in text editor to study).  Or were you looking for something specific?
Title: Re: How to send X10 All On or All Off
Post by: kevinvinv on January 07, 2016, 02:49:45 PM
Thanks,  I'll check what your pointers.

I have had a horrible time ramping up on this thing b/c the introductory documentation is nearly non-existent and there seems to be a lot of pitfalls... and oh yeah... I have only a few minutes a day to work on this thing   :)

Thanks again!!
Title: Re: How to send X10 All On or All Off
Post by: bkenobi on January 07, 2016, 04:16:51 PM
The learning curve is pretty steep which is a little daunting.  On the up side, that means that if you can get up the slope, you will learn a lot in a short time.

I found that AHP had a very shallow learning curve so it was very easy to get started with but you couldn't do much with it in the long run (other than turning lights on/off at times and sunrise/sunset).  Complex logic was either convoluted or required the SDK which was a whole other set of problems (and zero documentation).
Title: Re: How to send X10 All On or All Off
Post by: kevinvinv on January 07, 2016, 04:40:04 PM
Agreed,  I am happy to NOT be using AHP at the moment!  I only wish I wasnt using the CM15A as my modem to boot!   I am nervous about that thing screwing up.

BTW, what are you using for your power line interface with HG?

And on a side note... for the FIRST TIME since we started this... my lights went off at SUNRISE!!! Big day!!  Happy Day!!
Title: Re: How to send X10 All On or All Off
Post by: bkenobi on January 07, 2016, 04:45:16 PM
I'm using an antenna modded CM15A.  I have the controller plugged into the boost port on my XTB-IIR.  When I moved from AHP to HG, I purged all timers and functions from the CM15A and removed the batteries.  When I was testing HG initially, I picked up a backup CM15A to use on a different system so I could watch what HG was actually sending to verify that everything was working as expected.  That CM15A was hooked up to AHP initially and then moved to HG.  I don't currently keep it hooked up as I'm happy with HG and don't need a monitor most of the time.

I did just pull the monitor out of the closet to track down a strange issue where one light is supposed to turn on and one or more different lights also turn on.  But, that's a different thread.   :o
Title: Re: How to send X10 All On or All Off
Post by: kevinvinv on January 07, 2016, 04:53:21 PM

Cool.

Similar setup with the CM15 and XTBIIR Boost port here.   I have disabled RF on the CM15A though and am using the WGL RF receiver which I love.

Thanks again!
Title: Re: How to send X10 All On or All Off
Post by: bkenobi on January 07, 2016, 07:54:50 PM
Sounds like you have the ultimate setup then.  Are you connecting the WGL adapter to the XTB-IIR port or do you have it connected via USB or something?  I've thought about upgrading my RF but with the antenna mod set up as it is, I'm not sure that the WGL would significantly improve my range/reliability.  If I was convinced that it would make my edge of range motion sensors work 100% reliably, I'd get one in a heartbeat!
Title: Re: How to send X10 All On or All Off
Post by: kevinvinv on January 07, 2016, 09:07:00 PM
I have it hooked up to the little phone jack in the bottom of the XTBIIR.

I have incredible  wireless range IMO.  At least one house away (standard subdivision).

The WGL comes with a nice external antennae that you could even mount in the attic if you wanted.

YMMV but I have never had a problem I associated with RF range since I got the WGL....  I've had PLENTY of other problems though...   although as you know, the secret to X10 reliability is the XTB.
Title: Re: How to send X10 All On or All Off
Post by: bkenobi on January 07, 2016, 11:38:15 PM
I currently have a Radio Shack antenna in the attic and 2 amplifiers in the line between it and the CM15A.  I get pretty decent range overall.  Outside the house I can use my HR12A from the woods (300+ feet away) or from the street (150+ feet).  From inside I generally only need to quickly press the remote from anywhere in the living space.  The issue is outside close to the house.  I have a couple dead spots next to the exterior walls that I mount the sensors to.  I think RF doesn't like my heat pump, chimney, or number of walls.
Title: Re: How to send X10 All On or All Off
Post by: kevinvinv on January 08, 2016, 12:10:20 AM
WoW!   That is intense!
Title: Re: How to send X10 All On or All Off
Post by: kevinvinv on January 25, 2016, 05:30:54 AM
Well, I hate to say this but I STILL have no freaking idea how to send an X10 AllOn or AllOff command from C#.   I see the web api has commands for this but it is seemingly impossible to understand how to do it from C#.

Anyone know exactly how to do it?
Title: Re: How to send X10 All On or All Off
Post by: Gene on January 25, 2016, 12:01:37 PM
With r514 you can do:

Code: [Select]
Program.ApiCall("HomeAutomation.X10/A/Control.AllLightsOn");
Program.ApiCall("HomeAutomation.X10/A/Control.AllLightsOff");

g.
Title: Re: How to send X10 All On or All Off
Post by: kevinvinv on January 25, 2016, 02:33:20 PM
thank you thank you thank you!!!!
Title: Re: How to send X10 All On or All Off
Post by: kevinvinv on January 31, 2016, 08:22:33 PM
Hello!  Gene referred me to r514 above.

I looked in the update section and it looks like only up to 512 is available....    is 514 out yet ?  A forum search indicated that some were using it but I don't see how to get it.

Thanks!
Title: Re: How to send X10 All On or All Off
Post by: enterprised on January 31, 2016, 09:11:45 PM
It is an manual update, this will overwrite your existing HG install.

You must make a back-up of your existing install first, so you can restore your customization and personal apps after the upgrade. Not making a back-up means losing it all!!!!!

You can download from here http://sourceforge.net/projects/homegenie/files/ (http://sourceforge.net/projects/homegenie/files/)

Install update instructions are here http://genielabs.github.io/HomeGenie/install.html (http://genielabs.github.io/HomeGenie/install.html)
Title: Re: How to send X10 All On or All Off
Post by: kevinvinv on January 31, 2016, 11:02:02 PM
OK-- upon further searching I see some issues with Mono etc...   Would you consider this a risky upgrade?  I am at a time right now where I cant have a bunch of issues to resolve....   my wife is already about ready to chuck the whole system!  :)
Title: Re: How to send X10 All On or All Off
Post by: enterprised on January 31, 2016, 11:50:37 PM
If you follow the correct procedure - Download Upgrade - Make back-up (inside HG: Configure - Maintenance - Configuration and Data) - Install Upgrade - Restore (inside HG: Configure - Maintenance - Configuration and Data), then this upgrade carries little risk.

You may have to recompile some of the apps you created your self to be sure they run correctly.

I've been successfully running this upgrade. The wife never noticed that I made this change, everything runs absolutely flawless.

My setup: http://www.homegenie.it/forum/index.php?topic=705.0 (http://www.homegenie.it/forum/index.php?topic=705.0)

Title: Re: How to send X10 All On or All Off
Post by: kevinvinv on February 04, 2016, 05:04:56 AM
Thanks for the info on the manual update... and for future info,  are some updates manual like this and some make it into the gui as updates available there?

Just curious.

Thanks!
Title: Re: How to send X10 All On or All Off
Post by: bkenobi on February 04, 2016, 04:42:05 PM
GUI updates won't give every single version that Gene numbers.  Many releases are considered testing versions so they won't have a GUI notification.  If you want to be on the bleeding edge, you will have to install manual updates when they are announced in the TESTING RELEASE thread:
http://www.homegenie.it/forum/index.php?topic=129.0 (http://www.homegenie.it/forum/index.php?topic=129.0)

Since you are fairly new to HG, you might not want to start using those quite yet as they sometimes cause bugs.  If you want to at least know what's coming up, watch that thread and it will describe many of the releases that don't propagate into the GUI update.

Simply put, there are 3 types of updates I can think of:
Title: Re: How to send X10 All On or All Off
Post by: kevinvinv on February 05, 2016, 04:37:55 AM
Well, against better judgement I took a leap and updated to 514 so I could get the Program.APICall() function and do X10  All On / All Off.

IT WORKS!!!!!     THANKS EVERYONE!!!
Title: Re: How to send X10 All On or All Off
Post by: petediscrete on February 05, 2016, 10:21:44 AM
Kevinv a little suggestion. Make an image of a stable working version of HG on a seperate SD card. Back up that HG config version and name it accordingly. On a seperate SD card you can then test whatever version of HG you wish and experiment any way you wish if it breaks you just revert back to your first SD card. Takes the update fear factor out of the equation. Also remember that SD cards are notoriously unreliable too. This of course only applies to the RPI. Windows or Linux could use their relevant backup/restore version to achieve the same result.
Title: Re: How to send X10 All On or All Off
Post by: bkenobi on February 05, 2016, 04:42:58 PM
I second the backup suggestion.  I had my installation break on me (SD card corruption) and I had to start over.  I recommend the rpi-clone utility with a micro-sd in a usb adapter.

rpi-clone discussion:
http://www.homegenie.it/forum/index.php?topic=76.msg4567#msg4567 (http://www.homegenie.it/forum/index.php?topic=76.msg4567#msg4567)

micro-sd to usb adapter example:
http://www.amazon.com/Kingfansion-5Gbps-Super-Reader-Adapter/dp/B00X932YNG (http://www.amazon.com/Kingfansion-5Gbps-Super-Reader-Adapter/dp/B00X932YNG)

The adapter can be found all over for ~$5 shipped and they are so small you won't break them in your RPi.  I intended to set a regular backup cron task, but since I have a RPi B v1, I only have 2 USB which are used by my UPS and CM15A.  If you have a v2,  you can leave it installed and never have to worry about your backup!
Title: Re: How to send X10 All On or All Off
Post by: kevinvinv on February 27, 2016, 03:58:32 AM
Back on this topic again   8)

According to the log file,  when I execute a call to X10 / AllLightsOn  ...  it looks like the code loops through and sends individual ON commands to all the modules.  Can anyone confirm this?

I was hoping that HG would send the actual X10 AllOn PLC command instead..
Title: Re: How to send X10 All On or All Off
Post by: bkenobi on February 29, 2016, 04:49:19 PM
I can't confirm, but that wouldn't surprise me.  I would expect all functions to be available via C# directly.  The fact that you have to use the web API in order to send the command seems odd, so if it's actually looping through all modules then that would make more sense as that would mean it's an API function rather than a direct call that C# doesn't have access to.  I'll take a look this evening if I remember.
Title: Re: How to send X10 All On or All Off
Post by: bkenobi on March 02, 2016, 08:16:41 AM
I spent 2 minutes trying this and on r514 the C# script compiled but did not run.  I didn't have time to do any more testing.  If you could post a very simple sketch that sends the all lights on command as you are using it, I could try the same code and see if my install gives the same results.
Title: Re: How to send X10 All On or All Off
Post by: kevinvinv on March 02, 2016, 02:50:21 PM
Ill see what I can do but right now due to the bug we discovered....  I cant make a new program  :(
Essentially this is what I am running though:


if (module.Is("Panic")  && parameter.Statistics.Last.Value==0)  // Panic ON
     { 
        Program.Notify("hello","PANIC");
        Program.ApiCall("HomeAutomation.X10/A/Control.AllLightsOn");
        Program.ApiCall("HomeAutomation.X10/B/Control.AllLightsOn");
        Program.ApiCall("HomeAutomation.X10/E/Control.AllLightsOn");
       

   
     }
 
 
  //break; don't check any more items
  return true;
});

Program.GoBackground();
Title: Re: How to send X10 All On or All Off
Post by: bkenobi on March 02, 2016, 03:50:46 PM
I issued the command from the web API:

Code: [Select]
http://192.168.0.200/api/HomeAutomation.X10/A/Control.AllLightsOn
This is the response:
Code: [Select]
{"ResponseValue":"OK"}
This is the output:
Code: [Select]
2016-03-02 06:47:19.5584 Info WebServiceGateway 192.168.0.5 HTTP GET 200 /api/HomeAutomation.X10/A/Control.AllLightsOn [OPEN]
2016-03-02 06:47:19.5650 Debug 04-60
2016-03-02 06:47:19.8004 Info WebServiceGateway 192.168.0.5 HTTP GET 200 /events [CLOSED AFTER 77.227 seconds]
2016-03-02 06:47:19.9828 Debug 55
2016-03-02 06:47:19.9828 Debug Command succesfull
2016-03-02 06:47:19.9855 Debug 06-61
2016-03-02 06:47:20.4020 Info HomeAutomation.HomeGenie.Automation 1017 - Program.UiRefresh Data updated
2016-03-02 06:47:20.4412 Debug 55
2016-03-02 06:47:20.4481 Debug Command succesfull
2016-03-02 06:47:20.4571 Info HomeAutomation.X10 A1 - Status.Level 1
2016-03-02 06:47:20.4687 Info HomeAutomation.X10 A2 - Status.Level 1
2016-03-02 06:47:20.4878 Info HomeAutomation.X10 A3 - Status.Level 1
2016-03-02 06:47:20.4931 Info HomeAutomation.X10 A4 - Status.Level 1
2016-03-02 06:47:20.5082 Info HomeAutomation.X10 A5 - Status.Level 1
2016-03-02 06:47:20.5116 Info HomeAutomation.X10 A6 - Status.Level 1
2016-03-02 06:47:20.5301 Info HomeAutomation.X10 A7 - Status.Level 1
2016-03-02 06:47:20.5338 Info HomeAutomation.X10 A8 - Status.Level 1
2016-03-02 06:47:20.5482 Info HomeAutomation.X10 A9 - Status.Level 1
2016-03-02 06:47:20.5518 Info HomeAutomation.X10 A10 - Status.Level 1
2016-03-02 06:47:20.5582 Info HomeAutomation.X10 A11 - Status.Level 1
2016-03-02 06:47:20.5887 Info HomeAutomation.X10 A12 - Status.Level 1
2016-03-02 06:47:20.5981 Info WebServiceGateway 192.168.0.5 HTTP GET 200 /events [OPEN]
2016-03-02 06:47:20.6038 Info HomeAutomation.X10 A13 - Status.Level 1
2016-03-02 06:47:20.6160 Info HomeAutomation.X10 A14 - Status.Level 1
2016-03-02 06:47:20.6215 Info HomeAutomation.X10 A15 - Status.Level 1
2016-03-02 06:47:20.6510 Info HomeAutomation.X10 A16 - Status.Level 1
2016-03-02 06:47:20.7642 Info WebServiceGateway 192.168.0.5 HTTP GET 200 /api/HomeAutomation.X10/A/Control.AllLightsOn [CLOSED AFTER 1.206 seconds]
2016-03-02 06:47:21.1315 Info WebServiceGateway 192.168.0.5 HTTP GET 200 /events [ERROR: Write failure]
2016-03-02 06:47:21.2379 Info WebServiceGateway 192.168.0.5 HTTP GET 200 /events [CLOSED AFTER 0.64 seconds]
2016-03-02 06:47:24.1193 Debug 04-6D
2016-03-02 06:47:24.5403 Debug 55
2016-03-02 06:47:24.5411 Debug Command succesfull
2016-03-02 06:47:24.5432 Debug 06-62
2016-03-02 06:47:24.9801 Debug 55
2016-03-02 06:47:24.9809 Debug Command succesfull

I will check the command later to verify that this is the correct hex, but this looks correct to me.  That said, no lights actually turned on so it looks like it thinks it worked but didn't.
Title: Re: How to send X10 All On or All Off
Post by: bkenobi on March 02, 2016, 03:54:40 PM
Code: [Select]
2016-03-02 06:47:19.5584 Info WebServiceGateway 192.168.0.5 HTTP GET 200 /api/HomeAutomation.X10/A/Control.AllLightsOn [OPEN]
2016-03-02 06:47:19.5650 Debug 04-60
2016-03-02 06:47:19.8004 Info WebServiceGateway 192.168.0.5 HTTP GET 200 /events [CLOSED AFTER 77.227 seconds]
2016-03-02 06:47:19.9828 Debug 55
2016-03-02 06:47:19.9828 Debug Command succesfull
2016-03-02 06:47:19.9855 Debug 06-61
2016-03-02 06:47:20.4020 Info HomeAutomation.HomeGenie.Automation 1017 - Program.UiRefresh Data updated
2016-03-02 06:47:20.4412 Debug 55
2016-03-02 06:47:20.4481 Debug Command succesfull
2016-03-02 06:47:20.4571 Info HomeAutomation.X10 A1 - Status.Level 1
2016-03-02 06:47:20.4687 Info HomeAutomation.X10 A2 - Status.Level 1
2016-03-02 06:47:20.4878 Info HomeAutomation.X10 A3 - Status.Level 1
2016-03-02 06:47:20.4931 Info HomeAutomation.X10 A4 - Status.Level 1
2016-03-02 06:47:20.5082 Info HomeAutomation.X10 A5 - Status.Level 1
2016-03-02 06:47:20.5116 Info HomeAutomation.X10 A6 - Status.Level 1
2016-03-02 06:47:20.5301 Info HomeAutomation.X10 A7 - Status.Level 1
2016-03-02 06:47:20.5338 Info HomeAutomation.X10 A8 - Status.Level 1
2016-03-02 06:47:20.5482 Info HomeAutomation.X10 A9 - Status.Level 1
2016-03-02 06:47:20.5518 Info HomeAutomation.X10 A10 - Status.Level 1
2016-03-02 06:47:20.5582 Info HomeAutomation.X10 A11 - Status.Level 1
2016-03-02 06:47:20.5887 Info HomeAutomation.X10 A12 - Status.Level 1
2016-03-02 06:47:20.5981 Info WebServiceGateway 192.168.0.5 HTTP GET 200 /events [OPEN]
2016-03-02 06:47:20.6038 Info HomeAutomation.X10 A13 - Status.Level 1
2016-03-02 06:47:20.6160 Info HomeAutomation.X10 A14 - Status.Level 1
2016-03-02 06:47:20.6215 Info HomeAutomation.X10 A15 - Status.Level 1
2016-03-02 06:47:20.6510 Info HomeAutomation.X10 A16 - Status.Level 1
2016-03-02 06:47:20.7642 Info WebServiceGateway 192.168.0.5 HTTP GET 200 /api/HomeAutomation.X10/A/Control.AllLightsOn [CLOSED AFTER 1.206 seconds]
2016-03-02 06:47:21.1315 Info WebServiceGateway 192.168.0.5 HTTP GET 200 /events [ERROR: Write failure]
2016-03-02 06:47:21.2379 Info WebServiceGateway 192.168.0.5 HTTP GET 200 /events [CLOSED AFTER 0.64 seconds]
2016-03-02 06:47:24.1193 Debug 04-6D
2016-03-02 06:47:24.5403 Debug 55
2016-03-02 06:47:24.5411 Debug Command succesfull
2016-03-02 06:47:24.5432 Debug 06-62
2016-03-02 06:47:24.9801 Debug 55
2016-03-02 06:47:24.9809 Debug Command succesfull
2016-03-02 06:47:51.0805 Info HomeAutomation.HomeGenie.Automation 1017 - Program.UiRefresh Data updated
2016-03-02 06:47:57.2902 Info MQTT:Sensors blueline :nopopup:Meter.Watts Meter.Watts 263.0
2016-03-02 06:48:09.0399 Info HomeAutomation.SystemChecker 1 Update :nopopup:Sensor.Disk Sensor.Disk 44.17
2016-03-02 06:48:09.0484 Info HomeAutomation.SystemChecker 1 Update :nopopup:Sensor.CPU Sensor.CPU 31.37
2016-03-02 06:48:09.0776 Info HomeAutomation.SystemChecker 1 Update :nopopup:Sensor.Memory Sensor.Memory 36.2625608944975
2016-03-02 06:48:21.3361 Info HomeAutomation.HomeGenie.Automation 1017 - Program.UiRefresh Data updated
2016-03-02 06:48:27.3975 Info MQTT:Sensors blueline :nopopup:Meter.Watts Meter.Watts 273.0
2016-03-02 06:48:27.4071 Info MQTT:Sensors blueline :nopopup:Sensor.Temperature Sensor.Temperature 6.1
2016-03-02 06:48:51.5278 Info HomeAutomation.HomeGenie.Automation 1017 - Program.UiRefresh Data updated
2016-03-02 06:48:57.5217 Info MQTT:Sensors blueline :nopopup:Sensor.WattHours Sensor.WattHours 27212.0
2016-03-02 06:48:57.5606 Info MQTT:Sensors blueline :nopopup:Meter.Watts Meter.Watts 270.0
2016-03-02 06:49:01.2115 Info HomeAutomation.HomeGenie.Automation 35 Automation Program Program.Notification {"Title":"Scheduled Control","Message":"BBQ light OFF"}
2016-03-02 06:49:01.2150 Debug 04-6E
2016-03-02 06:49:01.6309 Debug 55
2016-03-02 06:49:01.6316 Debug Command succesfull
2016-03-02 06:49:01.6341 Debug 06-63
2016-03-02 06:49:02.0629 Debug 55
2016-03-02 06:49:02.0629 Debug Command succesfull
2016-03-02 06:49:02.0656 Info HomeAutomation.X10 A2 - Status.Level 0
2016-03-02 06:49:02.0721 Info HomeAutomation.HomeGenie.Automation 35 Automation Program Program.Notification {"Title":"Scheduled Control","Message":"NW light OFF"}
2016-03-02 06:49:02.0892 Debug 04-62
2016-03-02 06:49:02.5109 Debug 55
2016-03-02 06:49:02.5109 Debug Command succesfull
2016-03-02 06:49:02.5129 Debug 06-63
2016-03-02 06:49:02.9430 Debug 55
2016-03-02 06:49:02.9437 Debug Command succesfull
2016-03-02 06:49:02.9455 Info HomeAutomation.X10 A3 - Status.Level 0
2016-03-02 06:49:02.9702 Info HomeAutomation.HomeGenie.Automation 35 Automation Program Program.Notification {"Title":"Scheduled Control","Message":"Kennel light OFF"}
2016-03-02 06:49:02.9794 Debug 04-6A
2016-03-02 06:49:03.1384 Debug Event propagation halted - parameter manipulated by automation program 'Advanced Smart Lights' (1016) (Name=Program.Notification, OldValue={"Title":"Scheduled Control","Message":"NW light OFF"}, NewValue={"Title":"Scheduled Control","Message":"Kennel light OFF"})
2016-03-02 06:49:03.3991 Debug 55
2016-03-02 06:49:03.3998 Debug Command succesfull
2016-03-02 06:49:03.4010 Debug 06-63
2016-03-02 06:49:03.8311 Debug 55
2016-03-02 06:49:03.8318 Debug Command succesfull
2016-03-02 06:49:03.8336 Info HomeAutomation.X10 A4 - Status.Level 0
2016-03-02 06:49:03.8507 Info HomeAutomation.HomeGenie.Automation 35 Automation Program Program.Notification {"Title":"Scheduled Control","Message":"Shop light OFF"}
2016-03-02 06:49:03.8556 Debug 04-61
2016-03-02 06:49:04.2712 Debug 55
2016-03-02 06:49:04.2724 Debug Command succesfull
2016-03-02 06:49:04.2736 Debug 06-63
2016-03-02 06:49:04.6485 Debug Event propagation halted - parameter manipulated by automation program 'Advanced Smart Lights' (1016) (Name=Program.Notification, OldValue={"Title":"Scheduled Control","Message":"Kennel light OFF"}, NewValue={"Title":"Scheduled Control","Message":"Shop light OFF"})
2016-03-02 06:49:04.7112 Debug 55
2016-03-02 06:49:04.7119 Debug Command succesfull
2016-03-02 06:49:04.7137 Info HomeAutomation.X10 A5 - Status.Level 0
2016-03-02 06:49:04.7302 Info HomeAutomation.HomeGenie.Automation 35 Automation Program Program.Notification {"Title":"Scheduled Control","Message":"Entry Lights OFF"}
2016-03-02 06:49:04.7352 Debug 04-69
2016-03-02 06:49:05.1593 Debug 55
2016-03-02 06:49:05.1600 Debug Command succesfull
2016-03-02 06:49:05.1612 Debug 06-63
2016-03-02 06:49:05.2146 Debug Event propagation halted - parameter manipulated by automation program 'Advanced Smart Lights' (1016) (Name=Program.Notification, OldValue={"Title":"Scheduled Control","Message":"Shop light OFF"}, NewValue={"Title":"Scheduled Control","Message":"Entry Lights OFF"})
2016-03-02 06:49:05.5912 Debug 55
2016-03-02 06:49:05.5919 Debug Command succesfull
2016-03-02 06:49:05.5937 Info HomeAutomation.X10 A6 - Status.Level 0
2016-03-02 06:49:05.6231 Info HomeAutomation.HomeGenie.Automation 35 Automation Program Program.Notification {"Title":"Scheduled Control","Message":"Cabinet lights OFF"}
2016-03-02 06:49:05.6392 Debug 04-65
2016-03-02 06:49:06.0554 Debug 55
2016-03-02 06:49:06.0561 Debug Command succesfull
2016-03-02 06:49:06.0574 Debug 06-63
2016-03-02 06:49:06.4954 Debug 55
2016-03-02 06:49:06.4961 Debug Command succesfull
2016-03-02 06:49:06.4989 Info HomeAutomation.X10 A7 - Status.Level 0
2016-03-02 06:49:06.5106 Info HomeAutomation.HomeGenie.Automation 35 Automation Program Program.Notification {"Title":"Scheduled Control","Message":"South lights OFF"}
2016-03-02 06:49:06.5172 Debug 04-6D
2016-03-02 06:49:06.9354 Debug 55
2016-03-02 06:49:06.9396 Debug Command succesfull
2016-03-02 06:49:06.9396 Debug 06-63
2016-03-02 06:49:07.3677 Debug 55
2016-03-02 06:49:07.3689 Debug Command succesfull
2016-03-02 06:49:07.3706 Info HomeAutomation.X10 A8 - Status.Level 0
2016-03-02 06:49:07.3858 Info HomeAutomation.HomeGenie.Automation 35 Automation Program Program.Notification {"Title":"Scheduled Control","Message":"Pigeon loft light OFF"}
2016-03-02 06:49:07.4006 Debug 04-67
2016-03-02 06:49:07.5408 Debug Event propagation halted - parameter manipulated by automation program 'Advanced Smart Lights' (1016) (Name=Program.Notification, OldValue={"Title":"Scheduled Control","Message":"Entry Lights OFF"}, NewValue={"Title":"Scheduled Control","Message":"Pigeon loft light OFF"})
2016-03-02 06:49:07.8236 Debug 55
2016-03-02 06:49:07.8248 Debug Command succesfull
2016-03-02 06:49:07.8259 Debug 06-63
2016-03-02 06:49:08.2556 Debug 55
2016-03-02 06:49:08.2556 Debug Command succesfull
2016-03-02 06:49:08.2585 Info HomeAutomation.X10 A9 - Status.Level 0
2016-03-02 06:49:08.2665 Info HomeAutomation.HomeGenie.Automation 35 Automation Program Program.Notification {"Title":"Scheduled Control","Message":"Hot tub lights OFF"}
2016-03-02 06:49:08.2812 Debug 04-6F
2016-03-02 06:49:08.5441 Debug Event propagation halted - parameter manipulated by automation program 'Advanced Smart Lights' (1016) (Name=Program.Notification, OldValue={"Title":"Scheduled Control","Message":"Cabinet lights OFF"}, NewValue={"Title":"Scheduled Control","Message":"Hot tub lights OFF"})
2016-03-02 06:49:08.7036 Debug 55
2016-03-02 06:49:08.7524 Debug Command succesfull
2016-03-02 06:49:08.7538 Debug 06-63
2016-03-02 06:49:09.1709 Info HomeAutomation.SystemChecker 1 Update :nopopup:Sensor.Disk Sensor.Disk 44.18
2016-03-02 06:49:09.1747 Debug 55
2016-03-02 06:49:09.1747 Debug Command succesfull
2016-03-02 06:49:09.1772 Info HomeAutomation.X10 A10 - Status.Level 0
2016-03-02 06:49:09.1941 Info HomeAutomation.HomeGenie.Automation 35 Automation Program Program.Notification {"Title":"Scheduled Control","Message":"Wood shed light OFF"}
2016-03-02 06:49:09.2057 Debug 04-63
2016-03-02 06:49:09.2218 Info HomeAutomation.SystemChecker 1 Update :nopopup:Sensor.CPU Sensor.CPU 25.9
2016-03-02 06:49:09.2418 Info HomeAutomation.SystemChecker 1 Update :nopopup:Sensor.Memory Sensor.Memory 36.2625608944975
2016-03-02 06:49:09.6307 Debug 55
2016-03-02 06:49:09.6307 Debug Command succesfull
2016-03-02 06:49:09.6325 Debug 06-63
2016-03-02 06:49:10.0709 Debug 55
2016-03-02 06:49:10.1058 Debug Event propagation halted - parameter manipulated by automation program 'Advanced Smart Lights' (1016) (Name=Program.Notification, OldValue={"Title":"Scheduled Control","Message":"South lights OFF"}, NewValue={"Title":"Scheduled Control","Message":"Wood shed light OFF"})
2016-03-02 06:49:10.1221 Debug Command succesfull
2016-03-02 06:49:10.1249 Info HomeAutomation.X10 A11 - Status.Level 0
2016-03-02 06:49:10.1426 Info HomeAutomation.HomeGenie.Automation 35 Automation Program Program.Notification {"Title":"Scheduled Control","Message":"Garage entry light OFF"}
2016-03-02 06:49:10.1480 Debug 04-6B
2016-03-02 06:49:10.5658 Debug 55
2016-03-02 06:49:10.5658 Debug Command succesfull
2016-03-02 06:49:10.5677 Debug 06-63
2016-03-02 06:49:10.9980 Debug 55
2016-03-02 06:49:11.0452 Debug Command succesfull
2016-03-02 06:49:11.0487 Info HomeAutomation.X10 A12 - Status.Level 0
2016-03-02 06:49:11.0619 Info HomeAutomation.HomeGenie.Automation 35 Automation Program Program.Notification {"Title":"Scheduled Control","Message":" OFF"}
2016-03-02 06:49:11.0670 Debug 04-60
2016-03-02 06:49:11.4899 Debug 55
2016-03-02 06:49:11.4899 Debug Command succesfull
2016-03-02 06:49:11.4921 Debug 06-63
2016-03-02 06:49:11.9220 Debug 55
2016-03-02 06:49:11.9227 Debug Command succesfull
2016-03-02 06:49:11.9265 Info HomeAutomation.X10 A13 - Status.Level 0
2016-03-02 06:49:11.9729 Info HomeAutomation.HomeGenie.Automation 35 Automation Program Program.Notification {"Title":"Scheduled Control","Message":"Torch lamp OFF"}
2016-03-02 06:49:11.9796 Debug 04-68
2016-03-02 06:49:12.4020 Debug 55
2016-03-02 06:49:12.4027 Debug Command succesfull
2016-03-02 06:49:12.4039 Debug 06-63
2016-03-02 06:49:12.8340 Debug 55
2016-03-02 06:49:12.8817 Debug Command succesfull
2016-03-02 06:49:12.8845 Info HomeAutomation.X10 A14 - Status.Level 0
2016-03-02 06:49:13.0390 Debug Event propagation halted - parameter manipulated by automation program 'Advanced Smart Lights' (1016) (Name=Program.Notification, OldValue={"Title":"Scheduled Control","Message":"Pigeon loft light OFF"}, NewValue={"Title":"Scheduled Control","Message":"Torch lamp OFF"})
2016-03-02 06:49:15.4851 Debug 04-6D
2016-03-02 06:49:15.6989 Debug Event propagation halted - parameter manipulated by automation program 'Advanced Smart Lights' (1016) (Name=Program.Notification, OldValue={"Title":"Scheduled Control","Message":"Garage entry light OFF"}, NewValue={"Title":"Scheduled Control","Message":"Torch lamp OFF"})
2016-03-02 06:49:15.8886 Debug Event propagation halted - parameter manipulated by automation program 'Advanced Smart Lights' (1016) (Name=Program.Notification, OldValue={"Title":"Scheduled Control","Message":"Wood shed light OFF"}, NewValue={"Title":"Scheduled Control","Message":"Torch lamp OFF"})
2016-03-02 06:49:16.3646 Debug Event propagation halted - parameter manipulated by automation program 'Advanced Smart Lights' (1016) (Name=Program.Notification, OldValue={"Title":"Scheduled Control","Message":"Hot tub lights OFF"}, NewValue={"Title":"Scheduled Control","Message":"Torch lamp OFF"})
2016-03-02 06:49:16.8383 Debug Event propagation halted - parameter manipulated by automation program 'Advanced Smart Lights' (1016) (Name=Program.Notification, OldValue={"Title":"Scheduled Control","Message":" OFF"}, NewValue={"Title":"Scheduled Control","Message":"Torch lamp OFF"})
2016-03-02 06:49:16.9207 Debug 55
2016-03-02 06:49:16.9207 Debug Command succesfull
2016-03-02 06:49:16.9228 Debug 06-63
2016-03-02 06:49:17.3526 Debug 55
2016-03-02 06:49:17.3596 Debug Command succesfull
2016-03-02 06:49:17.3621 Info HomeAutomation.X10 A8 - Status.Level 0

On second review, this is why the lights were all off...  I don't know what's wrong, but HG didn't like the command and turned everything off for some reason.
Title: Re: How to send X10 All On or All Off
Post by: kevinvinv on March 02, 2016, 04:31:16 PM
What are you referring to when you said correct hex?   Are you referring to the "Debug" entries?   I understand hexadecimal but not sure where you are seeing it in the log file.

Thanks!
Title: Re: How to send X10 All On or All Off
Post by: bkenobi on March 02, 2016, 06:14:29 PM
Yes, the "04-60" and "06-61" commands tell the CM15A what to do.  I need to look at my reference spreadsheet to determine what commands those are.
Title: Re: How to send X10 All On or All Off
Post by: kevinvinv on March 02, 2016, 06:38:32 PM
oooohh..   I would love to have that info too!   Can I have a copy of the CM15 commands?  :)
Title: Re: How to send X10 All On or All Off
Post by: bkenobi on March 02, 2016, 06:46:20 PM
http://www.linuxha.com/USB/cm15a.html (http://www.linuxha.com/USB/cm15a.html)

Excellent resource!
Title: Re: How to send X10 All On or All Off
Post by: kevinvinv on March 30, 2016, 05:05:03 AM
I hate to bring this one up again but I cant believe I am the only one who wants an AllOn or AllOff X10 command that works well.  The API command in 514 seems to individually send ON and OFF to each address... and of course that takes a long time to complete.

The best thing I can think of, is to add a low level command function for the CM15 as was posted earlier so that we can send the precise data packet necessary for whatever command we want to send. 

I am not sure I want to embark on that project... but it really is holding me back from where I want to go with my automation setup...

Anyone have any thoughts on this?
Title: Re: How to send X10 All On or All Off
Post by: bkenobi on March 30, 2016, 04:41:15 PM
This might not be as difficult as you think.  All X10 commands take place in a single module that you can view on github.  If you check out the xtenlib file there, you can see all the functions.  It would be possible to code in your own and submit a pull request for Gene to consider.  There's nothing wrong with coding in your own function and just running that version locally if it solves your problem.  I've run custom versions in the past to resolve temporary issues while Gene was working on the main branch in the past.  Once you get set up to compile, making changes is pretty easy.

This is where the compiled dll is on github.
https://github.com/genielabs/HomeGenie/tree/master/Externals/g-labs

I haven't messed with things since it's been moved to an external library.  But, this can be compiled separately and tested on its own supposedly.
https://github.com/genielabs/x10-lib-dotnet
Title: Re: How to send X10 All On or All Off
Post by: kevinvinv on March 30, 2016, 08:16:32 PM
Mr Kenobi,  have you compiled it on Linux?    I might want to go that route...
Title: Re: How to send X10 All On or All Off
Post by: bkenobi on March 31, 2016, 06:37:12 AM
I have not.  I compiled with VS2013 as I recall, but I know there are a couple people here that have used Linux to compile.
Title: Re: How to send X10 All On or All Off
Post by: kevinvinv on March 31, 2016, 04:38:02 PM
Thank you.   The funny thing is that now that I am back on 512 it appears some of my x10 issues have gone away (so far)...   so maybe I'd have to compile my own fork of 512...    I dont know... I'll have to think it over.  I didnt want this to be another engineering project  :)

All I want is a stinkin "panic button" routine that turns all the lights on quick...   maybe I need to re-think things a bit. 

As always,  thanks!
Title: Re: How to send X10 All On or All Off
Post by: bkenobi on March 31, 2016, 04:58:08 PM
If things work in 512 but not 514/515, you could look at the history between those versions and see if anything sticks out.  Github offers that capability if you can figure out how to use it.  I have used it a couple times but have to relearn each time.

Alternately, if you have an IDE with a compare feature (most do), you could download the X10 related files for both versions and do a diff on them.  For something that simple, Notepad++ would work well.
Title: Re: How to send X10 All On or All Off
Post by: petediscrete on March 31, 2016, 09:27:04 PM
Kevinv, I've also noticed strange behaviour with x10 in rc514. Just updated to rc515 so I'm keeping a close eye on it. I wonder what changes were made from rc512 to rc514 to cause this.

I'm also puzzled as to why the AllLightsOn/Off wasn't implemented in HG. It's present in Active Home Pro and works fine.
Title: Re: How to send X10 All On or All Off
Post by: kevinvinv on March 31, 2016, 10:10:49 PM
Hi Pete,  thanks for the information and confirmation.

It seems to me that there is an API call for  AllLightsOn  and in 514 can be accessed from C# but the thing I didnt like there is that it seems to just cycle through all the addresses turning each one on as opposed to sending the actual X10 All On command which would turn the entire house code on at once.

I'd love to hear your experience with 515 ...   I cant make the move back up there real soon b/c it seems to take too long to deal with whatever bugs show up. 

I wish I had time to be a developer and help fix and add features but alas-  cant seem to fit it all in.

I actually contemplated implementing my AllOn functionality WITHIN AHP and the CM15 but that sounds to cobbled together... I was trying to get a reasonably reliable and hack-free system  :)
Title: Re: How to send X10 All On or All Off
Post by: bkenobi on April 01, 2016, 04:54:28 PM
I wouldn't use AHP for that personally.  If I were going to cobble something together, I'd try to call a mochad command.  But, it would be much cleaner to implement the X10 command in the HG libraries rather than cobbling anyway.

BTW, if you guys could briefly summarize the X10 abnormalities that you've seen I'd appreciate.  I'd like to have a list of what people are seeing so we can verify that it's not a setup fluke vs a real bug.  I've seen some strange behavior as well that I've documented in a thread here as well as an issue on github.  So far, my issue has only been captured 2x and I still don't know the source (though I'm certain it's HG related as I've isolated other causes).
Title: Re: How to send X10 All On or All Off
Post by: kevinvinv on April 01, 2016, 04:59:17 PM
Thanks obi-wan,  Your input is always valuable.

The strange stuff I saw with 514 was basically mis-decoded commands.   Now... I havent tested it THOROUGHLY back on 512 but what I saw was that when I would send a command like A2,   HG would report A6 or something like that.

Seems strange I know.   I'll test more on 512 and see if that behavior truly is gone.
Title: Re: How to send X10 All On or All Off
Post by: bkenobi on April 04, 2016, 05:20:31 PM
Are these RF or PLC?  That's very peculiar.  A2 and A6 are very different hex codes, so those shouldn't get confused.  PLC for A is (0110 or 6) which is apparently not getting confused.  But UC 2 = 1110 or E while UC 6 = 1001 or 9.  The binary is so different that if those are good examples, HG must be doing something strange.  I've heard that M13 is a bad code to assign to a module since it's just zero (M=0000, 13=0000) and can be triggered by noise.

On the other hand, if this is RF, then there is more similarity between commands.  Looking at:
http://www.micheldalal.com/sw/java/x10/docs/docs/cm17a_protocol.html (http://www.micheldalal.com/sw/java/x10/docs/docs/cm17a_protocol.html)

A2 ON           01100000   00010000
A6 ON           01100000   01010000

A2 OFF          01100000   00110000
A6 OFF          01100000   01110000

The only difference is a bit switch in the second word.  Since RF commands are sent several times in a row and the controller will repeat each onto PLC, if one command gets slightly messed up, it could turn the wrong module on/off potentially.  I have never seen this, but I see no reason why it couldn't happen.
Title: Re: How to send X10 All On or All Off
Post by: petediscrete on April 06, 2016, 02:16:42 AM
I can't nail exactly what my difficulties were with rc514 Bkenobi as the problems were intermittent. Delays in x10 commands being performed and in some cases not at all. Problems using Generic IP Camera module, feeds intermittent or failing altogether. Email notification in some cases not being sent.

So far I've not encountered these problems using rc515 and it definitely feels a lot more stable. Gene mentioned sorting some issues with the latest version of Mono. Maybe this has resolved some issues.

Speaking of Gene I wonder is he away in sunnier climes. Hope all is well with him.
Title: Re: How to send X10 All On or All Off
Post by: bkenobi on April 06, 2016, 05:16:23 PM
Gene has been posting in the last week or two, so he's back from his time off it seems.