HomeGenie Forum

Development => Bug reporting => Topic started by: pim555 on December 27, 2014, 10:55:55 PM

Title: X10 CM15Pro not working properly
Post by: pim555 on December 27, 2014, 10:55:55 PM
I have HG running on a PI since a few weeks now. I have worked with Homeseer and Active Home Pro before but have to say that HG works pretty stable and is relatively easy to use.

My set-up consists of about 20 X10 modules throughout my house (lights, appliances, shutter controls, TM13, CM15pro, etc.). I have a phase coupler to make sure that all outlets are reachable. The CM15Pro is configured with transcoding disabled as I have a separate TM13 with remote control.

The one issue I am still having is that HG sometimes activates multiple appliances/lights when switching a single light in the UI. For example, I switch A8 in the UI but the effect is that A8 and A9 are switched on (in the logs I only see A8). When I switch off A9, only A9 switches off. I have this behavior when running HG server on PI as well as Windows 7.

When I try to reproduce above scenario with ActiveHome Pro running on the same Windows 7 PC, I cannot. ActiveHome Pro is just working ok.

Can it be that the CM15pro driver is not correct? Anything I can do to help debugging?

Regards
Pim.
Title: Re: X10 CM15Pro not working properly
Post by: bkenobi on December 28, 2014, 03:03:45 AM
Your best bet is to look at and/or post your mono log.  In case you don't know how to do this, it depends on if you are on Windows or Raspi.

Windows:  Stop the HG process and run it manually from a command prompt.
Raspi:  Stop HG (sudo service homegenie stop) and start it manually (. /usr/local/bin/homegenie/HomeGenie.exe).

This should show you all X10 traffic as well as HG debug commands.
Title: Re: X10 CM15Pro not working properly
Post by: pim555 on December 28, 2014, 02:20:09 PM
Is the mono log content different from the standard homegenie.log file?

Btw, I have tried to run homegenie from command line but when I do so (sudo mono HomeGenie.exe), homegenie does not recognize my CM15 anymore...?

Regards
Pim.
Title: Re: X10 CM15Pro not working properly
Post by: pim555 on December 28, 2014, 02:27:11 PM
That was a bit too quick...seems to be working now and I see that indeed more detailed X10 logging is shown.
Title: Re: X10 CM15Pro not working properly
Post by: pim555 on December 29, 2014, 09:54:16 PM
Update...after logging X10 traffic on the PI

The issue I am having is that typically two appliances are switched off or on while only one of them is being controlled. For example, I switch A4 on, A4 off and then A5 on causes A4 and A5 to be switched on.

Observations
- the first command after a reboot always times out, the re-send of the command does not have any effect. Only when generating the next command, this has effect. See attached log file.
- in the logging (see attached log file), I can see the X10 commands generated but these (or at least the logging) are not in compliance with the X10 protocol. I typically see one or two times the adress command but not the function code. As the commands are effective (eg a lamp is being switched on/off, I assume this is an error in the logging or monitoring of the CM15pro? Btw. in Active Home Pro, the logging is correct.
- If I generate the same command with an RF remote control, the logging seems to be correct and the issue is not there. However, in this case I see the same command being repeated for 4 times in the logging.

My guess is that the low level writing and reading of the CM15pro is not correct?
Title: Re: X10 CM15Pro not working properly
Post by: pim555 on January 06, 2015, 08:58:41 PM
After some further investigation it looks like the following is happening when controlling devices via CM15pro:

- if I first switch on or off device A
- if I then do the opposite for device B (if device A was switched on, switch B off and vice versa), device A follows as well.

So it looks like the previously controlled device is reacting to the new function code for the adressed device as well.

Could it be that, in some kind of way, the device address of the previously controlled device is also send when the current device is controlled?

Is there a way in which I can debug in more detail what is exactly being written to CM15pro?

Thanks
Pim

Title: Re: X10 CM15Pro not working properly
Post by: bkenobi on January 07, 2015, 05:33:08 PM
I don't have all the information here, so this could be a bug.  However, this could also happen depending on the controller you are using or the type of command that you are sending from code.  This is due to the way X10 sends commands and is not a bug.

When you send a command in X10 PLC, there are actually 2 commands for each module controlled action:
Code: [Select]
A1
A ON
Most controllers only have a single button for the control (e.g., HR12A palm pad, XPT wall transmitter, PMC01 mini controller, etc).  On such a controller, when you press the "A1 ON" button, the controller automatically sends both of the required codes.  However, if you use a controller such as the SC503 maxi controller, things are broken out a little differently.  In that controller, you can send a more complex series of codes.  You can send the above sequence by pressing both buttons, but you can also do something such as:
Code: [Select]
A1
A2
A3
A4
A ON
This would turn all modules A1-A4 on at the same time.

Both modules are on the same house code (A8, A9 are both HC A).  It's possible either the controller (HG in this case I suppose) is sending the command for both devices or something is damaging the signal such that these modules don't see every command that comes in.  It's difficult to say which, but if these modules don't work reliably, then it could be noise on the line. 

Do these modules work reliably 100% of the time?  Do you happen to have a signal debugger such as a XTBM?  I used one of these to debug my reliability issues (mostly signal suckers but there were lots of noise issues as well), but it also works great to see what signals are being sent or where those signals can be seen and how strong they are.

You say that AHP and Homeseer work great, but AHP is Windows only.  You are currently testing on the Raspi.  Have you confirmed the same scenario on the Windows machine where you run AHP from?
Title: Re: X10 CM15Pro not working properly
Post by: pim555 on January 07, 2015, 09:06:49 PM
Thanks for your reply. I'll try to answer your questions below and recap my findings.

- I am using HG running on RPI witn CM15Pro connected to RPI. When I switch on or off a device (for example kitchen light at A4) I do this by pressing the ON or OFF button in HG>control. In this case, I see the issue described above, ie the previous device controlled follows the latest device.
- I can run HG on a Windows PC with CM15Pro connected to PC. I see the same issue in this case as well.
- I can run AHB on the same PC with CM15Pro connected to PC. I cannot reproduce the issue in this case.
- I used to run Homeseer on PC with CM15Pro where I also did not face the issue.
- I also have an X10 remote control (Marmitek EI10RF), with this one, I dont see the issue either.

Unfortunately I have no signal meter so cannot check noise or signal strength. The fact that it is/was working properly with AHB and Homeseer leads me to believe that it is caused by a difference in control software, in this case HomeGenie.

When I look at the mono log when switching on A4, I see below logging. After reading http://www.linuxha.com/USB/cm15a.html, (http://www.linuxha.com/USB/cm15a.html,) I looks like the commands being sent are correct; 04 6A 06 63 => Address A4 Fuction A Off

However, I do not understand the next log lines? They seem to represent what has been received on the PL? These are not representing A4 Off...but mention two times that house code is A and unit is 4 but no function code mentioned. Furthermore, as stated before, the first command after reboot is always non functional (in the logging shows as time out)

In any case I do not see any reference to the previous unit that is also swicthing.

[15:46:21.004044] X10 < 04 6A
[15:46:21.508237] X10 > 55
[15:46:21.508514] X10 > COMMAND SUCCESSFUL
[15:46:21.561701] X10 < 06 63
[15:46:22.060267] X10 > 55
[15:46:22.060547] X10 > COMMAND SUCCESSFUL
2014-12-29T15:46:22.1183840+00:00       HomeAutomation.X10      A4      -       Status.Level    0
[15:46:22.860401] X10 > 5A 02 00 6A
[15:46:22.860727] X10 > PLCRX: 5A 02 00 6A
[15:46:22.860948] X10 > FNMAP: 00
[15:46:22.861183] X10 >  DATA: 6A
[15:46:22.861683] X10 >       0) House code = A
[15:46:22.861888] X10 >       0)  Unit code = 4
[15:46:23.668483] X10 > 5A 02 00 6A
[15:46:23.668816] X10 > PLCRX: 5A 02 00 6A
[15:46:23.669039] X10 > FNMAP: 00
[15:46:23.669273] X10 >  DATA: 6A
[15:46:23.669769] X10 >       0) House code = A
[15:46:23.669978] X10 >       0)  Unit code = 4


If I control A4 via the remote control (X10 RF), I see below logging. I dont know how to exactly interpret this logging but now the received commands do seem to be correct. In this case I switched on A4 and I indeed see in the logging house code A, unit 4, house code A, on.

[15:46:47.144224] X10 > 5D 20 60 9F 18 E7
[15:46:47.145906] X10 > RFCOM: 5D 20 60 9F 18 E7
2014-12-29T15:46:47.1574470+00:00       HomeAutomation.X10      RF      X10 RF Receiver Receiver.RawData        5D 20 60 9F 18 E7
[15:46:47.247398] X10 > 5D 20 60 9F 18 E7
[15:46:47.247761] X10 > RFCOM: 5D 20 60 9F 18 E7
[15:46:47.663371] X10 > 5A 02 00 6A
[15:46:47.663699] X10 > PLCRX: 5A 02 00 6A
[15:46:47.663917] X10 > FNMAP: 00
[15:46:47.664148] X10 >  DATA: 6A
[15:46:47.664608] X10 >       0) House code = A
[15:46:47.664849] X10 >       0)  Unit code = 4
[15:46:48.144321] X10 > 5A 02 01 62
[15:46:48.145816] X10 > PLCRX: 5A 02 01 62
[15:46:48.161613] X10 > FNMAP: 01
[15:46:48.169076] X10 >  DATA: 62
[15:46:48.174007] X10 >       0) House code = A
[15:46:48.179891] X10 >       0)    Command = ON
2014-12-29T15:46:48.1899600+00:00       HomeAutomation.X10      A4      -       Status.Level    1
2014-12-29T15:46:48.1948840+00:00       HomeAutomation.X10      RF      X10 RF Receiver Receiver.RawData

Hope this gives a bit more background info.
Title: Re: X10 CM15Pro not working properly
Post by: bkenobi on January 08, 2015, 12:26:07 AM
That was a very good description of the issue!  From the sounds of it, I would suspect that HG may be implementing things slightly wrong.  When Gene worked on the X10 library last, he and I discussed the proper functioning of multiple unit codes followed by a command.  At that time, everything appeared to work correctly.  Since then, it appears that something has changed in that library as I have noticed one other issue that has been submitted as issue #30 on github.

https://github.com/genielabs/HomeGenie/issues/30

I believe that you have found another variant bug that needs addressing.  I will try to duplicate your procedure to see if I can replicate the issue.  If it turns out to be a HG issue, then we should be able to help Gene diagnose it so the code can be updated.
Title: Re: X10 CM15Pro not working properly
Post by: bkenobi on January 08, 2015, 05:39:17 AM
I tried running your test:
This didn't appear to do anything (as it should).  I then tried the opposite:
Again, nothing happened (as it should).  I tried with them on and off and switching UC's as well, but in every case nothing happened.

Does this happen for only a select set of modules?  If it's only 1 module that functions incorrectly, perhaps that single module is failing.

If you can generate a script that consistently will create the issue for you, I can try running it on my system.  My system has modules on HC A as well, so it should work without being altered.
Title: Re: X10 CM15Pro not working properly
Post by: pim555 on January 08, 2015, 10:04:14 PM
I tried the same scenarios as you described in my set-up and still see the issue appearing. It is a mix of appliance and light switches, both plug-in and micro switches. It does not seem to be specific to particular modules. Hence, I don't think it is due to a malfunctioning module.

What I find peculiar is that it consistently goes wrong for devices controlled one after the other. If it where to be caused by noise, I would expect the symptoms to appear more randomly?

I really appears like an address code is lagging or something like that.

Do you have a clue how to explain that in my logging, the reader function reads two times the address after each other instead of address + function? When I control by RF, which does not show this symptoms, the reader call correctly shows address + function in the logging.

Regards
Pim.
Title: Re: X10 CM15Pro not working properly
Post by: bkenobi on January 09, 2015, 03:29:20 AM
I can't explain the log.  It appears to me that the same house/unit code are being sent without a command.  If that were true and the next command were sent with a command, then by design the first would also actuate based on the command being sent after the second HU code.

First, I'd recommend verifying you are running the most current version as debugging old versions is pointless.

Second, I don't understand what the difference in setup is, since I'm also running a raspi with CM15A (US version).  Are you in Europe since you indicate you use a CM15Pro in your original title?  The fact that you run micro switches suggests that could be the case since those haven't been as popular in the US as elsewhere.
Title: Re: X10 CM15Pro not working properly
Post by: pim555 on January 09, 2015, 09:06:44 AM
I am indeed living in Europe (Netherlands) and that is indeed a difference (CM15a vs CM15Pro). Will upgrade to the latest release as I am currently on 451 but as I can see from the feature logs, no X10 changes have been done in later releases so I don't expect much from that.

I am in the process of getting a second CM15pro which would allow me to monitor X10 traffic via AHB concurrently with HG acting as controller. Will keep you posted.

In the mean time, can you point me to a link that, according to you, has the most complete documentation on the X10 and CM15 protocols?

Regards
Pim.
Title: Re: X10 CM15Pro not working properly
Post by: bkenobi on January 09, 2015, 04:43:37 PM
CM15 documentation is not great.  The link you posted that discusses the protocol is actually a really good resource.  If I have a question about things, I usually go to the X10 forums and ask there.  There are some really experienced users over there that have more time in X10 than I do on the planet!

Other sites that are very useful:
http://www.linuxha.com/USB/cm15a.html (http://www.linuxha.com/USB/cm15a.html)    best CM15A documentation I've seen
http://forums.x10.com (http://forums.x10.com)       forums hosted by X10 but run by enthusiasts
http://davehouston.org (http://davehouston.org)     one of the x10 old timers that knows about everything)
http://jvde.us (http://jvde.us)                    Jeff builds several extremely useful products that solve common x10 issues (repeaters/amplifiers/filters/testers/etc)
http://www.tuicemen.com (http://www.tuicemen.com)  another old timer with several very useful applications available (Windows only though)
http://cocoontech.com (http://cocoontech.com)       a forum that covers everything home tech including automation/security/video/etc
Title: Re: X10 CM15Pro not working properly
Post by: pim555 on January 11, 2015, 12:22:37 AM
Quick update...

I have built mochad for RPI and am running that on the same RPI as where HG is running. I cannot reproduce the issue I see with HG when using mochad. This re-assures me of the fact that HG is doing something different in its X10 driver that causes it to malfunction compared to AHB and Mochad.

Can I file a bug report and if so, how?

Also, I believe, as discussed in the other thread, that it would make sense to use Mochad directly from HG. Unfortunately, I do not have sufficient Linux knowledge to write this code properly...

Cheers
Pim.
Title: Re: X10 CM15Pro not working properly
Post by: bkenobi on January 11, 2015, 03:25:07 AM
Yes, it would be a very good idea to log this on github as an issue.  There are at least 1 or 2 other x10 related issues currently.  I would like to see a bit more attention on X10 to get these resolved, but I know that Gene has a lot of other things he's working on so it's best to at least get all of these issues on his radar.

https://github.com/genielabs/HomeGenie/issues
Title: Re: X10 CM15Pro not working properly
Post by: Gene on January 14, 2015, 12:22:19 AM
Hello I'm replying here instead of github issue tracker because it won't allow me attacching files.
Did run the test as described here

https://github.com/genielabs/HomeGenie/issues/95#issuecomment-69834673

but still was not able to reproduce the issue. Also tried with a combination of 3 units istead of 2. And also tried units with subsequent number (eg. A4,A5 instead of A4, A9).
The only difference I could see by comparing AHP comm with HG comm is that AHP send next command right after receiving the ACK (0x55).
HG instead had a delay of 50ms. So I removed this delay and now both AHP and HG comm i/o are the same.
Perhaps you can try the attached dll with this modification and also the fix about the first command after hg startup not being sent.
Please @bkenobi, try this whenever you can just to ensure not to have any side effect. I'm also running this new XTenLib and didn't notice any issue at the moment (hope the same with CM11 but could not try with it yet).

Cheers,
g.
Title: Re: X10 CM15Pro not working properly
Post by: Gene on January 14, 2015, 12:40:56 AM
I noticed in pim555 message this log:

Code: [Select]
[15:46:21.004044] X10 < 04 6A
[15:46:21.508237] X10 > 55
[15:46:21.508514] X10 > COMMAND SUCCESSFUL
[15:46:21.561701] X10 < 06 63
[15:46:22.060267] X10 > 55
[15:46:22.060547] X10 > COMMAND SUCCESSFUL
2014-12-29T15:46:22.1183840+00:00       HomeAutomation.X10      A4      -       Status.Level    0
[15:46:22.860401] X10 > 5A 02 00 6A
[15:46:22.860727] X10 > PLCRX: 5A 02 00 6A
[15:46:22.860948] X10 > FNMAP: 00
[15:46:22.861183] X10 >  DATA: 6A
[15:46:22.861683] X10 >       0) House code = A
[15:46:22.861888] X10 >       0)  Unit code = 4
[15:46:23.668483] X10 > 5A 02 00 6A
[15:46:23.668816] X10 > PLCRX: 5A 02 00 6A
[15:46:23.669039] X10 > FNMAP: 00
[15:46:23.669273] X10 >  DATA: 6A
[15:46:23.669769] X10 >       0) House code = A
[15:46:23.669978] X10 >       0)  Unit code = 4

The odd thing is that the [15:46:22.860727] X10 > PLCRX: 5A 02 00 6A indicates that the CM15 is receiving command from some other controller.
Infact, when sending a command through CM15, you shouldn't see any PLCRX debug line.
Is there any other X10 controller in the house? If so, the odd thing is... why is this reacting when using HG and not reacting with AHP or mochad? =)
Do you have any automation program active in HG that could also send extra unwanted command over X10?
Can you provide full debug transaction of the A1 on, A2 on, A1 off sequence?

Cheers,
g.
Title: Re: X10 CM15Pro not working properly
Post by: bkenobi on January 14, 2015, 05:01:03 AM
It looks like the new dll is working just as well as the old version.  I still see an issue with commanding multiple HU codes on at the same time as is documented on github.  I'll continue using this library and see if I find any new issues.
Title: Re: X10 CM15Pro not working properly
Post by: Gene on January 14, 2015, 08:43:14 AM
Hi bkenobi,

the new version is 50-100ms faster. I'm attacching here also the fix to the issue #30 for you to test.
@pim555 please keep testing the previous attacched version as this one might contains issues (hope it doesn't).

Cheers,
g.
Title: Re: X10 CM15Pro not working properly
Post by: pim555 on January 14, 2015, 12:49:24 PM
Thanks Gene, will give this one a try later on today.

How do I install? Just copy these files over the existing ones after stopping the HG service and then re-starting?
Title: Re: X10 CM15Pro not working properly
Post by: bkenobi on January 14, 2015, 03:06:13 PM
Yes

Stop HG
move/delete/rename old X10 library files
copy new files
restart HG

just make sure you use sudo on every command since it's a system directory.
Title: Re: X10 CM15Pro not working properly
Post by: bkenobi on January 14, 2015, 03:40:41 PM
I attached my test procedure and individual results since they were too long for this forum.


So, it looks like there is an issue with the storage not getting purged.  It appears that the modules turn on in a different order than when sent (I don't know if this is an issue for anyone, but worth noting).  The first time a series of commands was sent, the first UC was not actuated (did not repeat, but did happen once).  Looks like the code is pretty close!
Title: Re: X10 CM15Pro not working properly
Post by: Gene on January 14, 2015, 09:29:09 PM
Hi bkenobi,

thanks for the detailed report. So UC storage array has to be reset everytime a Function code is sent. I corrected the behaviour in order to respect that.
I have one concern about one optmization when sending commands from HG.
If you now do a eg. A4 ON, XTenLib will send house code and unit, followed by housecode and function (so 2 X10 commands).
But this only the first time. If you keep sending commands on A4, HG will now send only the house code and function command (so just 1 command and so half the time to perform it). You can see this from the console.
Just wondering if this is an accetable optimization, of if this can create issue. In that case I will disable it.
I'm attacching fixed dll, but still with this optmization so you can test.

Cheers,
g.
Title: Re: X10 CM15Pro not working properly
Post by: pim555 on January 14, 2015, 10:12:28 PM
My virus scanner goes haywire on the two files provided for testing. Fake alarm or...?
Title: Re: X10 CM15Pro not working properly
Post by: pim555 on January 14, 2015, 10:20:21 PM
Gene,

I guess it is false alarm but appreciate if you can confirm and maybe have it whitelisted.

http://community.norton.com/en/forums/clarification-wsreputation1-detection (http://community.norton.com/en/forums/clarification-wsreputation1-detection)
Title: Re: X10 CM15Pro not working properly
Post by: Gene on January 14, 2015, 10:57:38 PM
I guess it's false. File was generated in Linux anyway.

g.
Title: Re: X10 CM15Pro not working properly
Post by: bkenobi on January 14, 2015, 11:41:02 PM
Yes, that is the correct way to implement (only send UC if the command is for a different set of UC's).  I'll try this out later today.
Title: Re: X10 CM15Pro not working properly
Post by: Gene on January 15, 2015, 01:56:39 AM
I'm finally implementing decoding of X10 RF commands in XTenLib.... =) perhaps tomorrow it will be ready.

g.
Title: Re: X10 CM15Pro not working properly
Post by: bkenobi on January 15, 2015, 03:54:59 AM
It looks like almost everything is now working.  The only thing I found an issue is that HG missed the first UC on the first test.  This is exactly what happened last time too.  Is HG missing the first UC it sees after startup? 

I performed one more test and believe I have confirmed that HG doesn't accept the first UC and possibly the first X10 string of any kind (don't know how to verify a command works or not).
Title: Re: X10 CM15Pro not working properly
Post by: Gene on January 15, 2015, 03:27:05 PM
Hi bkenobi,

can you provide X10 output when missing the first command?
I just committed the new code to github. This includes major code refactoring to make the XTenLibrary more accessible to contributors (well none till now =)).
And also includes new X10 RF commands decoding capability.
So modules status will be now updated when receving RF commands.
Beside testing RF please repeat the previous tests also.
Can you compile from source? After compiling you will just need to replace XTenLib.dll and MIG.dll in hg folder.
If it's a problem compiling from source I will attach files here. Thanks for helping with this.

Cheers,
g.
Title: Re: X10 CM15Pro not working properly
Post by: bkenobi on January 15, 2015, 07:57:04 PM
I was able to compile some code a few weeks back, but the modifications I made caused issues.  I think the compile was successful.  The real issue is that I have to dl the entire code pack each change, right?  On my connection that takes a while.

I'll update and rerun the tests but probably not until tomorrow evening.  The missed first command doesn't show anything interesting in the mono output, but I'll post the whole log from startup to first command for your review.
Title: Re: X10 CM15Pro not working properly
Post by: bkenobi on January 15, 2015, 08:04:07 PM
I was just pointed to a document that describes the official specification on when modules become "addressed" and "unaddressed".  The specific text of interest is:

Quote
ADDRESS/FUNCTION
If D16 is a "1" the code is a function (command). Otherwise D1-D8 is
an 'address'. Once addressed, a module responds to any command code.
It becomes 'unaddressed' by the first 'address' message after a
command, or by 'All Units Off'.


The full document is:
http://davehouston.org/X10%20xtdcode.pdf (http://davehouston.org/X10%20xtdcode.pdf)
Title: Re: X10 CM15Pro not working properly
Post by: bkenobi on January 16, 2015, 03:44:54 AM
I ran the attached test using the XTenLib you uploaded before.  I started HG, waited until all programs were started, and then attempted the following:
Code: [Select]
A2
A3
A4
A ON
As can be seen in the log, A2 was ignored.  I see that you have a note that this is fixed in the submitted github commit, so perhaps this is already corrected.

I am currently downloading the HG package so I can compile and try the new version.  It is possible for me to compile the XTenLib for sure, but I'm not sure about the rest of the package.  The real issue is that it takes a while to download the 15+MB package for just a few lines of change (slow on my connection for some reason).  If it's not too much trouble, it's certainly much easier for me to get the files here and copy them to the raspi than it is to compile locally.
Title: Re: X10 CM15Pro not working properly
Post by: bkenobi on January 16, 2015, 04:35:30 AM
I compiled the code and copied XTenLib.dll and MIG.dll into the /usr/local/bin/homegenie directory. 

The files are:
mono (full test).log - the full test with full mono output
Test results3.txt - the same test results format as before

I noticed that there is an error that has been introduced in this version.  I could have created it when compiling bit wanted you to see it to be sure.

Code: [Select]
2015-01-15T19:18:36.1366590-08:00 HomeAutomation.HomeGenie.Automation 34 Automation Program Weather Underground Updated.
2015-01-15T19:18:37.7199650-08:00 HomeAutomation.HomeGenie.Automation NetHelper 501 Syntax error in arguments
Exception.StackTrace   at System.Net.Mail.SmtpClient.CheckStatus (SmtpResponse status, Int32 i) [0x00000] in <filename unknown>:0
  at System.Net.Mail.SmtpClient.Authenticate (System.String user, System.String password) [0x00000] in <filename unknown>:0
  at System.Net.Mail.SmtpClient.Authenticate () [0x00000] in <filename unknown>:0
  at System.Net.Mail.SmtpClient.SendCore (System.Net.Mail.MailMessage message) [0x00000] in <filename unknown>:0
  at System.Net.Mail.SmtpClient.SendInternal (System.Net.Mail.MailMessage message) [0x00000] in <filename unknown>:0
  at System.Net.Mail.SmtpClient.Send (System.Net.Mail.MailMessage message) [0x00000] in <filename unknown>:0
Title: Re: X10 CM15Pro not working properly
Post by: Gene on January 16, 2015, 11:14:57 AM
Hi ben,

the SMTP syntax error is a message from the remote server that for some reason did not uderstand some message from the client.
Either .Net SMTP client is using some deprecated command that might not work with all smtp servers:
http://www.wenda.io/questions/1143659/c-sharp-smtp-auth-send-problem-syntax-error-in-parameter-or-arguments.html (http://www.wenda.io/questions/1143659/c-sharp-smtp-auth-send-problem-syntax-error-in-parameter-or-arguments.html)
or wrong characters are used in some parameter:
https://social.msdn.microsoft.com/Forums/windows/en-US/7644d037-bb69-41fb-addc-6c23488b6e13/systemnetmailsmtpclientsend-cannot-send-mail-in-windows-server-2003?forum=winforms (https://social.msdn.microsoft.com/Forums/windows/en-US/7644d037-bb69-41fb-addc-6c23488b6e13/systemnetmailsmtpclientsend-cannot-send-mail-in-windows-server-2003?forum=winforms)

g.
Title: Re: X10 CM15Pro not working properly
Post by: bkenobi on January 16, 2015, 03:34:09 PM
The error appeared after program 34 and before program 1006:
Code: [Select]
2015-01-15T19:18:36.1366590-08:00 HomeAutomation.HomeGenie.Automation 34 Automation Program Weather Underground Updated.
2015-01-15T19:18:37.7199650-08:00 HomeAutomation.HomeGenie.Automation NetHelper 501 Syntax error in arguments
Exception.StackTrace   at System.Net.Mail.SmtpClient.CheckStatus (SmtpResponse status, Int32 i) [0x00000] in <filename unknown>:0
  at System.Net.Mail.SmtpClient.Authenticate (System.String user, System.String password) [0x00000] in <filename unknown>:0
  at System.Net.Mail.SmtpClient.Authenticate () [0x00000] in <filename unknown>:0
  at System.Net.Mail.SmtpClient.SendCore (System.Net.Mail.MailMessage message) [0x00000] in <filename unknown>:0
  at System.Net.Mail.SmtpClient.SendInternal (System.Net.Mail.MailMessage message) [0x00000] in <filename unknown>:0
  at System.Net.Mail.SmtpClient.Send (System.Net.Mail.MailMessage message) [0x00000] in <filename unknown>:0
2015-01-15T19:18:37.7232140-08:00 HomeAutomation.HomeGenie.Automation 1006 Automation Program Ip Information Mail send
I assumed it was an error from program 34 (Weather Underground) which is built in, but if the error were from the next program 1006 (CheckIP), that would make more sense.  That code is very simple, but it does send an email when the system starts up or after seeing the IP change for some reason.  I haven't changed that code in quite some time and all it does is a simple text email:
Code: [Select]
string recipients = Program.InputField("checkip.recipients").Value;
...
              var subject = "Homegenie ip address is changed";
              var messagetext = "The external ip address is changed from '" +
                                  Program.Parameter(IP).Value +
                                  "' to '" + ipdata + "'.";
           
              try
              {
                  Net.SendMessage( recipients, subject, messagetext );

The other thing I noticed about the update is that the RF commands are now being decoded which is good.  But, HG reacts to the RF command and then when the CM15A converts that to PLC and sends it out, HG reacts a second time.  This results in 2 commands for every one press.  When using RF, sending a single command is already difficult, so this could make dimming to specific levels in HG and in reality difficult.  If a dimmer is at 100% and you press the RF 2x, the light will toggle down 2x but HG will set the light to having been toggled 4x.  Perhaps it would be better if there was a way to not have HG interpret the PLC if RF just did the same thing?  Not sure what the spec would suggest but this may not be an issue for X10 itself since only a dual band module would see both and the only dual band devices are transceivers (non-dimmable) and controllers (don't have a module attached).
Code: [Select]
[19:54:11.126291] X10 > 5D 20 60 9F 00 FF
[19:54:11.129449] X10 > RFCOM: 5D 20 60 9F 00 FF
2015-01-15T19:54:11.1329210-08:00 HomeAutomation.X10 RF X10 RF Receiver Receiver.RawData 5D 20 60 9F 00 FF
2015-01-15T19:54:11.1364920-08:00 HomeAutomation.X10 A1 - Status.Level 1
[19:54:11.330564] X10 > 5D 20 60 9F 00 FF
[19:54:11.334171] X10 > RFCOM: 5D 20 60 9F 00 FF
2015-01-15T19:54:11.3380650-08:00 HomeAutomation.X10 A1 - Status.Level 1
[19:54:11.554628] X10 > 5A 02 00 66
[19:54:11.558057] X10 > PLCRX: 5A 02 00 66
[19:54:11.560873] X10 > FNMAP: 00
[19:54:11.563810] X10 >  DATA: 66
[19:54:11.567226] X10 >       0) Address = A1
[19:54:11.957579] X10 > 5A 02 01 62
[19:54:11.960951] X10 > PLCRX: 5A 02 01 62
[19:54:11.963930] X10 > FNMAP: 01
[19:54:11.966737] X10 >  DATA: 62
[19:54:11.970126] X10 >       0) House code = A
[19:54:11.973211] X10 >       0)    Command = ON
2015-01-15T19:54:11.9770180-08:00 HomeAutomation.X10 A1 - Status.Level 1
[19:54:11.982247] X10 > 55
[19:54:12.422649] X10 > 5A 02 00 66
[19:54:12.426087] X10 > PLCRX: 5A 02 00 66
[19:54:12.429004] X10 > FNMAP: 00
[19:54:12.431780] X10 >  DATA: 66
[19:54:12.435090] X10 >       0) Address = A1
2015-01-15T19:54:12.5779340-08:00 HomeAutomation.X10 RF X10 RF Receiver Receiver.RawData
[19:54:12.824679] X10 > 5A 02 01 62
[19:54:12.828137] X10 > PLCRX: 5A 02 01 62
[19:54:12.831025] X10 > FNMAP: 01
[19:54:12.833960] X10 >  DATA: 62
[19:54:12.837274] X10 >       0) House code = A
[19:54:12.840199] X10 >       0)    Command = ON
2015-01-15T19:54:12.8442950-08:00 HomeAutomation.X10 A1 - Status.Level 1
[19:54:12.849626] X10 > 55
[19:54:13.328334] X10 < 04 66
[19:54:13.745770] X10 > 55
[19:54:13.749211] X10 > COMMAND SUCCESSFUL
[19:54:13.753485] X10 < 06 63
[19:54:14.185786] X10 > 55
[19:54:14.189288] X10 > COMMAND SUCCESSFUL
2015-01-15T19:54:14.1943030-08:00 HomeAutomation.X10 A1 - Status.Level 0
[19:54:14.198205] X10 < 04 66
[19:54:14.617853] X10 > 55
[19:54:14.621531] X10 > COMMAND SUCCESSFUL
[19:54:14.625364] X10 < 06 63
[19:54:15.049918] X10 > 55
[19:54:15.053470] X10 > COMMAND SUCCESSFUL
2015-01-15T19:54:15.0585590-08:00 HomeAutomation.X10 A1 - Status.Level 0
[19:54:15.062577] X10 < 04 66
[19:54:15.481941] X10 > 55
[19:54:15.485524] X10 > COMMAND SUCCESSFUL
[19:54:15.489503] X10 < 06 63
[19:54:15.913987] X10 > 55
[19:54:15.917541] X10 > COMMAND SUCCESSFUL
2015-01-15T19:54:15.9222380-08:00 HomeAutomation.X10 A1 - Status.Level 0
[19:54:15.926435] X10 < 04 66
[19:54:16.346043] X10 > 55
[19:54:16.349621] X10 > COMMAND SUCCESSFUL
[19:54:16.353736] X10 < 06 63
[19:54:16.786099] X10 > 55
[19:54:16.789581] X10 > COMMAND SUCCESSFUL
2015-01-15T19:54:16.7944920-08:00 HomeAutomation.X10 A1 - Status.Level 0
Title: Re: X10 CM15Pro not working properly
Post by: Gene on January 16, 2015, 03:46:52 PM
Hi bkenobi,

just wondering why my CM15 does not echoes RF commands with a PLC message.
Is that coming from another controller in your setup or is it something in my CM15?

Cheers,
g.
Title: Re: X10 CM15Pro not working properly
Post by: bkenobi on January 16, 2015, 05:13:04 PM
I only have one CM15A installed and it's the one connected to the Raspi.  Do you have transcoding turned on or off in the CM15A?  If it's off, then it won't echo.  I suppose I could disable it to verify that's the difference.
Title: Re: X10 CM15Pro not working properly
Post by: Gene on January 16, 2015, 05:27:33 PM
Transceive should be set to "Auto" on my cm15pro. HG does automatically configure the interface like this, or at least it is supposed to do so =)

g.
Title: Re: X10 CM15Pro not working properly
Post by: bkenobi on January 16, 2015, 06:20:05 PM
Was just a guess.  I remember that AHP had a setting for which HC to transcode.  If it wasn't selected, that HC would be ignored when incoming RF was transmitted.  Perhaps that's a different capability though.

All I know for sure is what the mono output showed.


Oh, this actually brings up one thing that I believe I mentioned before.  When using AHP, if using a RF push button controller (e.g., HR12A), quickly pressing and releasing a button will send 2 commands.  Both tell the system that the command is for the HC/UC with an action (e.g., A1 ON).  But, they also include some additional data for a button state.  So, the commands actually appear as:
Code: [Select]
A1 ON Button Down
A1 ON Button Up
This might be why HG sees 2 RF ON commands from the sequence I posted yesterday.  Maybe you could try to add the button position to the HG implementation?
Title: Re: X10 CM15Pro not working properly
Post by: Gene on January 16, 2015, 09:36:05 PM
Well perhaps something is wrong with my CM15 transceiving  :), so I disabled the CM15 RF decoding in HG. Anyway that code can be used for W800RF32 driver.
I am not sure to understand what can be done in HG regarding this push button? What is this button position?

Cheers,
g.
Title: Re: X10 CM15Pro not working properly
Post by: pim555 on January 16, 2015, 09:44:33 PM
Tried replacing the XTenLib.dll and .mdb files but after moving back to the original files, I start seeing below error messages in the log. One point to notice is that I accidently moved the .dll/.dll.mdb files away before stopping HG. Any idea how to fix this?

[20:30:30.073180] X10 < 04 6F
[20:30:30.086782] X10 ! The object was used after being disposed.
[20:30:30.098106] X10 !   at System.Runtime.InteropServices.SafeHandle.DangerousGetHandle () [0x00000] in <filename unknown>:0
  at LibUsbDotNet.LudnMonoLibUsb.Internal.MonoUsbTransferContext.Fill (IntPtr buffer, Int32 offset, Int32 count, Int32 timeout) [0x00000] in <filename unknown>:0
  at LibUsbDotNet.Main.UsbTransfer.Fill (System.Object buffer, Int32 offset, Int32 count, Int32 timeout) [0x00000] in <filename unknown>:0
  at LibUsbDotNet.Main.UsbEndpointBase.SubmitAsyncTransfer (System.Object buffer, Int32 offset, Int32 length, Int32 timeout, LibUsbDotNet.Main.UsbTransfer& transferContext) [0x00000] in <filename unknown>:0
  at XTenLib.Drivers.CM15.WriteData (System.Byte[] bytesToSend) [0x00000] in <filename unknown>:0
  at XTenLib.XTenManager.SendMessage (System.Byte[] message) [0x00000] in <filename unknown>:0
Title: Re: X10 CM15Pro not working properly
Post by: pim555 on January 16, 2015, 10:57:29 PM
Pls disregard my previous post, I had udev rules set up to start a Mochad daemon that was giving conflicts.

I think I know why I am seeing address commands repeated on my network. I have and Eaton FKX40 phase coupler that also has a repeater function. See in the manual
http://www.whomedigital.com.au/productfile239 (http://www.whomedigital.com.au/productfile239)

On the marmitek website it says that every x10 command is always transmitted 2x in a row. The FKX40 detects the first command and immediately repeats such that it coincides with the second (in Dutch below)

De CAT4000 / FKX40 zorgt voor geen vertraging van het X-10 signaal. Elk X-10 commando wordt altijd 2 x achter elkaar verstuurd. De CAT4000 / FKX40 zal bij ontvangst van het eerste commando dit commando gelijk herhalen, zodat het gelijk valt met het 2de commando van de bron.

Could this maybe be the reason that I see the PLCRX in my logs when executing commands from HG UI? And furthermore, does HG really send commands twice in a row?

Btw, I noticed that in the .dll files posted in this threat my first issue, ie the first command after reboot not executing has been fixed. Thanks for that.
Title: Re: X10 CM15Pro not working properly
Post by: bkenobi on January 17, 2015, 01:03:50 AM
Quote
I have and Eaton FKX40 phase coupler that also has a repeater function.
...
Could this maybe be the reason that I see the PLCRX in my logs when executing commands from HG UI? And furthermore, does HG really send commands twice in a row?


Short answer: no.  The structure of an X10 command always sends 2 copies of the same sequence when transmitting.  If the second doesn't match, the command is considered invalid.  This is not considered 2 commands, it is the definition of how a single X10 command is structured.  If you want more information about X10 protocol:

http://digilander.libero.it/cvolpato/elettronica/X-10_Transmission_Theory.htm (http://digilander.libero.it/cvolpato/elettronica/X-10_Transmission_Theory.htm)
Title: Re: X10 CM15Pro not working properly
Post by: bkenobi on January 17, 2015, 07:22:33 AM
Gene,

I connected my backup CM15A to my old HA system that still had AHP installed.  I first checked the settings and, as you can see, there is a way to tell the CM15A which HC to transceive.  In my setup, I tell it to work with all HC.  I believe this means that RF signals on A-P will be seen and sent out as PLC.

The second thing I checked was how AHP shows the RF button presses.  You are correct that it doesn't display anything about button position.  But, I then checked what the SDK sees and it does show a code in the commands that must be for button position.
Code: [Select]
2015/01/16 22:15:41 RecvAction: recvrf, a1, On, 0, 1/17/2015 6:15:42 AM,
2015/01/16 22:15:42 RecvAction: recvrf, a1, On, -1, 1/17/2015 6:15:42 AM,
2015/01/16 22:15:42 RecvAction: recvrf, a1, On, 0, 1/17/2015 6:15:42 AM,
2015/01/16 22:15:42 RecvAction: recvrf, a1, On, -1, 1/17/2015 6:15:42 AM,
I don't know how open the SDK code is, but maybe having this output will help a little.
Title: Re: X10 CM15Pro not working properly
Post by: Gene on January 17, 2015, 07:38:58 AM
Hi bkenobi,

if I remember well, I made XTenLib use the "Auto" setting, because it was the only way to make it receive security codes as well (dunno why it was like this). Btw I will check it out again soon. Can you tell if setting transceive to Auto does still perform rf command over plc? If so, then there must be something wrong in my current setup, perhaps the SC9000 security console that I moved in another location (further) and might be the origin of some kind of interference or data loss (eg. rf command being actually executed by the SC9000, but not seen by CM15).
The button state (0, -1) could be contained in the RF message only (not visible on plc message). So can you provide RF debug output? Perhaps we can understand where this flag is hiding.

g.
Title: Re: X10 CM15Pro not working properly
Post by: bkenobi on January 17, 2015, 07:43:43 AM
For one more test, I considered what the difference between having transceiving turned on or off for HC A.

All HC's disabled shows 2 items in the activity monitor that represent button presses.  I pushed the button and immediately released it, but it appears that AHP thinks there were 2 commands.  This is what the SDK shows:
Code: [Select]
2015/01/16 22:32:30 RecvAction: recvrf, a1, On, 0, 1/17/2015 6:32:30 AM,
2015/01/16 22:32:30 RecvAction: recvrf, a1, On, -1, 1/17/2015 6:32:31 AM,
2015/01/16 22:32:30 RecvAction: recvrf, a1, On, 0, 1/17/2015 6:32:31 AM,
2015/01/16 22:32:30 RecvAction: recvrf, a1, On, -1, 1/17/2015 6:32:31 AM,

Next, I turned all HC's on.  This time when I pressed the button, AHP only saw one press.  Either way, you can see from the Activity Monitor that there was an RF command and then 2 PLC commands.  If you look at the SDK output, it makes sense why:
Code: [Select]
2015/01/16 22:35:46 RecvAction: recvrf, a1, On, 0, 1/17/2015 6:35:47 AM,
2015/01/16 22:35:46 RecvAction: recvrf, a1, On, -1, 1/17/2015 6:35:47 AM,
2015/01/16 22:35:47 RecvAction: RecvPlc, a1, On, , ,
2015/01/16 22:35:48 RecvAction: RecvPlc, a1, On, , ,

AHP saw the button down and button up and transceived both into A1 ON commands.  I don't know if HG is working correctly (maybe it is based on AHP's output).  I just wanted to make sure it was consistent at least.
Title: Re: X10 CM15Pro not working properly
Post by: bkenobi on January 17, 2015, 07:56:42 AM
When I set AHP to auto, I do not get the PLC output but I still see the double RF commands for button down/up:
Code: [Select]
2015/01/16 22:54:46 RecvAction: recvrf, a1, On, 0, 1/17/2015 6:54:47 AM,
2015/01/16 22:54:46 RecvAction: recvrf, a1, On, -1, 1/17/2015 6:54:47 AM,
2015/01/16 22:54:46 RecvAction: recvrf, a1, On, 0, 1/17/2015 6:54:47 AM,
2015/01/16 22:54:47 RecvAction: recvrf, a1, On, -1, 1/17/2015 6:54:47 AM,

EDIT:  I remember capturing some USB communication from the CM15A at one point but I don't remember how.  If you give me a reminder, I can capture the communication when it's sending the sequence of RF commands.
Title: Re: X10 CM15Pro not working properly
Post by: pim555 on January 17, 2015, 11:47:31 AM
Thanks for the link.

I struggle to understand how the repeater can work if it only amplifies the second command in the burst of 2. For the repeater to be functional, I assume that an X10 receiver can already accept a command if it only receives the second in the burst of 2.

Otherwise, if you would have a device that is far away from the transmitter, the repeater would only amplify the second transmission (as it reacts to the first one so cannot amplify that anymore). This means that the first transmission is not amplified but the second is. If the receiving device is in a location that does not carry unamplified signals, the device would only capture the second part of the transmission...

ANyway, I will try to experiment with the settings of the phase coupler but am a bit reluctant as apparantly it can only be programmed thru powerline commands and not with the physical button on the coupler (pls correct me if wrong). Commands needed are 2xABright/2xADim, etc. Can I generate those with HG?
Title: Re: X10 CM15Pro not working properly
Post by: bkenobi on January 17, 2015, 04:44:53 PM
i isimplified the reason for 2x the command and got it slightly wrong.  either way, the command is repeated and the repeater will always amplify only the second one since it then knows the command to repeat.  I don't think you can send just the command in HG without the unit portion.    Gene can correct me if I'm wrong.  unless it's ok to send a unit code first, then it is.

you can send the following and it might work for your
Code: [Select]
A1 Bright
A1 Bright
A1 Dim
A1 Dim

This should
Code: [Select]
A1
A Bright
A Bright
A Dim
A Dim
The repeater should ignore the A1 since it sees 4 commands it needs.
Title: Re: X10 CM15Pro not working properly
Post by: codedmind on January 18, 2015, 05:55:08 PM
install hg today in a clean raspbian card and cm15A not working too :/

[17:24:16.049349] X10 < 04 11
[17:24:16.108769] X10 < 06 12
2015-01-18T17:24:16.1739720+00:00   HomeAutomation.X10   E5   -   Status.Level   1

However the shutter don't move..
Title: Re: X10 CM15Pro not working properly
Post by: pim555 on January 19, 2015, 10:37:36 PM
I have tried to program the FKX40 using mochad, which support commands like a dim ("pl a dim") but cannot get it to work. Any help in programming this phase coupler is appreciated.
Title: Re: X10 CM15Pro not working properly
Post by: codedmind on January 24, 2015, 02:36:18 PM
i still can't it work... dmesg identify the cm15 but don't attach it to any port... and gh doesn't work... what i'm missing?

[    3.256836] usb 1-1.2: new low-speed USB device number 4 using dwc_otg
[    3.394208] usb 1-1.2: New USB device found, idVendor=0bc7, idProduct=0001
[    3.402757] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    3.411644] usb 1-1.2: Product: USB ActiveHome Interface
[    3.418486] usb 1-1.2: Manufacturer: X10 Wireless Technology Inc
Title: Re: X10 CM15Pro not working properly
Post by: bkenobi on January 24, 2015, 05:57:05 PM
CM15A has always worked out of the box for me on Raspi.  I don't know enough about linux to help you if it doesn't setup in HG, sorry.
Title: Re: X10 CM15Pro not working properly
Post by: pim555 on January 24, 2015, 10:34:42 PM
One further update in my quest to get my X10 set-up working properly.

I realized that in my logs most commands triggered by RF sensors or my Powermax Pro alarm system (with XM10 X10 interface module), generate 3 commands. For example, if I switch on lamp A8, I see 3x A8 ON in my logs.

In the mean time I have set-up my Powermax Pro system such that it generates an X10 command whenever a motion sensor in the alarm system is triggered. That way, I will be able to use these sensors within HG as well. The commands generated by these sensors also appear 3 times in my log.

I realized that in the Powermax Pro system there is a configuration option to set the number of phases and 50 or 60Hz. This was set to 3 phase (as I have 3 phases in my house). Obviously this is an incorrect setting as I also have an active phase coupler. When I set this setting to single phase, the commands from the Powermax sensor reduce from 3 to 1 occurance and are now as expected.

This leads me to believe that maybe there is a setting in the CM15Pro that allows to do a similar thing?
Title: Re: X10 CM15Pro not working properly
Post by: bkenobi on January 25, 2015, 01:11:25 AM
This leads me to believe that maybe there is a setting in the CM15Pro that allows to do a similar thing?

In a word, no.  The CM15 does not know about your power setup.  It transmits and recieves on the power line it is plugged into.  If you have multiple phases with X10 on more than one, you will need to add a phase coupler (and it sounds like you already did).  The CM15 only transmits what it's asked to send and transcodes what it hears over RF.
Title: Re: X10 CM15Pro not working properly
Post by: pim555 on January 25, 2015, 10:20:37 AM
Hi Bkenobi,

Get your point and I did think along the same way but apparantly the XM10 (the controller attached to my alarm system) can be controlled differently for 1 or 3 phase systems as my alarm system is doing.

http://www.haibrain.com/xm10-ttlcmos-interface-u-stekker-p-682.html?language=en (http://www.haibrain.com/xm10-ttlcmos-interface-u-stekker-p-682.html?language=en)

Furthermore, this difference does result in different output behavior on the power line. Therefore, I was hoping that the CM15 can also be configured in similar ways.
Title: Re: X10 CM15Pro not working properly
Post by: Gene on January 26, 2015, 03:05:32 PM
Hi bkenobi,

I've been doing some tests today about how CM15 behaves when setting transceive on/off.

My configuration is CM15Pro + SC9000

Active Home Pro + CM15 with trasceive set to NONE
- send RF A2 ON
- CM15 receives both the RF command and the PLC one

Active Home Pro + CM15 with trasceive set to A, B
- send RF A2 OFF
- CM15 receives RF but no PLC message

Active Home Pro + CM15 with trasceive set to Auto
- send RF A2 ON
- CM15 receives RF but no PLC message

So I think that since HG sets transceive to Auto on CM15, I should re-enable RF messages decoding.

My guess is that when trasceive is active, since it's the CM15 itself sending the command, there's no reason to see a PLC message after the RF command is received. Just the same as when you perform a PLC command directly, there's no reason to see it echoed back.

So also wondering why you see the message twice and if it's something about differences of CM15A and CM15Pro?

Cheers,
g.
Title: Re: X10 CM15Pro not working properly
Post by: bkenobi on January 26, 2015, 03:14:33 PM
I agree that seeing PLC commands is odd conside ring the CM15 is generating the PLC.  The only thing that might be different in my setup is that I have a XTB-IIR coupler repeater installed.  The repeater only boosts the second half of the command and does not echo after the first is sent, so it shouldn't be related.  I'll try turning it off and repeat your test to see if it makes any difference.
Title: Re: X10 CM15Pro not working properly
Post by: bkenobi on January 26, 2015, 04:09:53 PM
The output was from output sent to the AHP SDK.  I could have performed screen capture, but it seemed messier that way.

AHP + CM15A, transceive set to NONE, XTB-IIR turned off:
Code: [Select]
2015/01/26 06:53:14 RecvAction: recvrf, a1, Off, 0, 1/26/2015 2:53:15 PM,
2015/01/26 06:53:15 RecvAction: recvrf, a1, Off, -1, 1/26/2015 2:53:15 PM,
RF, no PLC


AHP + CM15A, transceive set to AUTO, XTB-IIR turned off:
Code: [Select]
2015/01/26 06:55:49 RecvAction: recvrf, a1, On, 0, 1/26/2015 2:55:50 PM,
2015/01/26 06:55:50 RecvAction: recvrf, a1, On, -1, 1/26/2015 2:55:50 PM,
RF, no PLC


AHP + CM15A, transceive set to A+B, XTB-IIR turned off:
Code: [Select]
2015/01/26 06:57:10 RecvAction: recvrf, a1, Off, 0, 1/26/2015 2:57:10 PM,
2015/01/26 06:57:10 RecvAction: recvrf, a1, Off, -1, 1/26/2015 2:57:10 PM,
2015/01/26 06:57:10 RecvAction: RecvPlc, a1, Off, , ,
2015/01/26 06:57:11 RecvAction: RecvPlc, a1, Off, , ,
RF, double PLC


AHP + CM15A, transceive set to NONE, XTB-IIR turned on:
Code: [Select]
2015/01/26 07:01:43 RecvAction: recvrf, a1, Off, 0, 1/26/2015 3:01:43 PM,
2015/01/26 07:01:43 RecvAction: recvrf, a1, Off, -1, 1/26/2015 3:01:44 PM,
RF, no PLC


AHP + CM15A, transceive set to AUTO, XTB-IIR turned on:
Code: [Select]
2015/01/26 07:00:58 RecvAction: recvrf, a1, On, 0, 1/26/2015 3:00:58 PM,
2015/01/26 07:00:58 RecvAction: recvrf, a1, On, -1, 1/26/2015 3:00:58 PM,
RF, no PLC


AHP + CM15A, transceive set to A+B, XTB-IIR turned on:
Code: [Select]
2015/01/26 06:59:55 RecvAction: recvrf, a1, Off, 0, 1/26/2015 2:59:56 PM,
2015/01/26 06:59:55 RecvAction: recvrf, a1, Off, -1, 1/26/2015 2:59:56 PM,
2015/01/26 06:59:56 RecvAction: RecvPlc, a1, Off, , ,
RF, single PLC


AHP + CM15A, transceive set to A+B, monitored HC B, XTB-IIR turned off:
Code: [Select]
2015/01/26 07:03:58 RecvAction: recvrf, a1, On, 0, 1/26/2015 3:03:58 PM,
2015/01/26 07:03:58 RecvAction: recvrf, a1, On, -1, 1/26/2015 3:03:58 PM,
2015/01/26 07:03:59 RecvAction: RecvPlc, a1, On, , ,
RF, single PLC



The interesting thing is that after playing with settings, I'm now only getting a single PLC on each RF command no matter what I set the monitored code to.  I wonder if the CM15A had something strange going on inside for some reason.  I have a second unit that's installed on the Raspi that may need to be updated too since this unit was a spare for testing.  It looks like the appropriate setting to see RF but not transceive would be either NONE or AUTO.  To transceive the setting should be A+B+C+...
Title: Re: X10 CM15Pro not working properly
Post by: Gene on January 26, 2015, 04:22:30 PM
Hi bkenobi,

can you try to monitor USB at low level? So we see what actually is the real interface I/O. I did use this:

http://www.hhdsoftware.com/usb-monitor (http://www.hhdsoftware.com/usb-monitor)

g.
Title: Re: X10 CM15Pro not working properly
Post by: bkenobi on January 26, 2015, 05:04:16 PM
Sure.  It looks like that software is paid only, so I'll see if I can find a free/demo version.  What commands did you want to see captured?  Setting the mode (monitored HC, transceived HC, etc), or actually receiving commands, or both?
Title: Re: X10 CM15Pro not working properly
Post by: Gene on January 26, 2015, 05:06:50 PM
It's paid but it offers a trial. Download it, it will work for 15 days.
Capture both received and sent data. It can export to text file.

g.
Title: Re: X10 CM15Pro not working properly
Post by: Gene on January 26, 2015, 05:09:33 PM
an alternative software can be this one:

https://sourceforge.net/projects/usbsnoop/


g.
Title: Re: X10 CM15Pro not working properly
Post by: bkenobi on January 26, 2015, 05:13:41 PM
Sounds good.
Title: Re: X10 CM15Pro not working properly
Post by: Gene on January 26, 2015, 05:14:37 PM
or this one :D

http://freeusbanalyzer.com/ (http://freeusbanalyzer.com/)

g.
Title: Re: X10 CM15Pro not working properly
Post by: bkenobi on January 26, 2015, 05:19:43 PM
I like the last one.  Ok, I admit I didn't have a chance to search for any software when I posted before.   ::)
Title: Re: X10 CM15Pro not working properly
Post by: bkenobi on January 29, 2015, 04:23:46 PM
Sorry, other things came up and this slipped my mind.  I'll try to look at this soon (as well as the new RF decoding).
Title: Re: X10 CM15Pro not working properly
Post by: bkenobi on January 30, 2015, 03:36:28 AM
1) AHP + CM15A, transceive set to NONE, XTB-IIR turned off:
Code: [Select]
2015/01/29 18:27:11 RecvAction: recvrf, a1, On, 0, 1/30/2015 2:27:12 AM,
2015/01/29 18:27:12 RecvAction: recvrf, a1, On, -1, 1/30/2015 2:27:13 AM,
RF, no PLC



2) AHP + CM15A, transceive set to AUTO, XTB-IIR turned off:
Code: [Select]
2015/01/29 18:31:13 RecvAction: recvrf, a1, On, 0, 1/30/2015 2:31:14 AM,
2015/01/29 18:31:14 RecvAction: recvrf, a1, On, -1, 1/30/2015 2:31:14 AM,
RF, no PLC


3) AHP + CM15A, transceive set to A+B, XTB-IIR turned off:
Code: [Select]
2015/01/29 18:32:30 RecvAction: recvrf, a1, On, 0, 1/30/2015 2:32:31 AM,
2015/01/29 18:32:30 RecvAction: recvrf, a1, On, -1, 1/30/2015 2:32:31 AM,
2015/01/29 18:32:31 RecvAction: RecvPlc, a1, On, , ,
2015/01/29 18:32:32 RecvAction: RecvPlc, a1, On, , ,
RF, double PLC

I'm not sure why, but I have a double ON received again today.  I tried several times in a row and still see it.  I recorded the data using the 3rd link you provided (Free Device Monitoring Studio) and saved the workspaces.  I was going to just save text files, but that didn't seem to include the raw data.  For the 3rd test, I saved the step where it wrote settings to the CM15A as well in case that was useful.
Title: Re: X10 CM15Pro not working properly
Post by: bkenobi on January 30, 2015, 04:19:35 AM
I just realized that the data packets weren't saved and these are empty files (essentially).  I'm going to see if I can figure out how to save the data and try uploading again.
Title: Re: X10 CM15Pro not working properly
Post by: bkenobi on January 30, 2015, 04:32:57 AM
AHP + CM15A, transceiver set to A+B, XTB-IIR turned off:
Code: [Select]
015/01/29 19:29:14 RecvAction: recvrf, a1, On, 0, 1/30/2015 3:29:14 AM,
2015/01/29 19:29:14 RecvAction: recvrf, a1, On, -1, 1/30/2015 3:29:14 AM,
2015/01/29 19:29:15 RecvAction: RecvPlc, a1, On, , ,
2015/01/29 19:29:15 RecvAction: RecvPlc, a1, On, , ,
RF, double PLC

Title: Re: X10 CM15Pro not working properly
Post by: bkenobi on February 02, 2015, 05:39:09 PM
I asked the question about these 0 and -1 values over at the X10 forum where people have been working with AHP for years (including with the developers directly).  They had some really good feedback.  The answer to these values is basically...the AHP programers are unique people.  :o

Apparently, the extra value is something that they use to determine how long the button has been pressed but it's purely generated by the AHP code and visible via the SDK only.  A 0 means the button is pressed initially.  It then counts 1, 2, 3... as the button remains down.  When the button is released it results in a -1.  As you know, when the button of a remote is held down, you see a stream of RF commands.  Apparently, hardware transceivers require several commands to set the AGC circuitry and then use one instance as the command.  When it sends the command on the PLC it stops listening to the RF.  Once it is done sending, if there are still RF commands being sent, it will send the next command (duplicate if applicable).  The quickest of button presses results in at a minimum 5 RF commands.

http://forums.x10.com/index.php?topic=29059.0 (http://forums.x10.com/index.php?topic=29059.0)
Title: Re: X10 CM15Pro not working properly
Post by: ElenRey on January 24, 2017, 09:17:18 AM
Hi bkenobi,

can you try to monitor USB at low level? So we see what actually is the real interface I/O. I did use this:

[url]http://www.hhdsoftware.com/usb-monitor[/url] ([url]http://www.hhdsoftware.com/usb-monitor[/url])

g.


You can also try  USB Sniffer (http://www.eltima.com/products/usb-sniffer/ (http://www.eltima.com/products/usb-sniffer/)) for monitoring usb data.