Author Topic: CM11A Problems... Setup works, LMCE just can't talk to it.  (Read 7415 times)

Glasswalker

  • Regular Poster
  • **
  • Posts: 20
    • View Profile
CM11A Problems... Setup works, LMCE just can't talk to it.
« on: December 03, 2008, 04:30:40 pm »
Hey, I'm having a bit of trouble with my CM11A... I have the setup working, can control lights via my remote, and I have tested using heyu from the media director (where the CM11A is connected) and it works fine talking to /dev/ttyS0... (I can turn on and off lights using heyu)

When I add the CM11A using the instructions from the CM11 page in the wiki, then add a generic lightswitch on/off light... Set it to A1 address, controlled by CM11A, and set it's room...

(Currently I have lights on A1 - A10)

Anyway, when I do all that, then reload the router, I see the following in my log (/var/log/pluto/65_CM11A.log)
Code: [Select]
========== NEW LOG SECTION ==========
1       12/03/08 10:11:18       65 (spawning-device)    Starting... 1
1       12/03/08 10:11:18       65 (spawning-device)    Found /usr/pluto/bin/CM11A
05      12/03/08 10:11:23.825           Creating child 71 <0xb79846c0>
05      12/03/08 10:11:23.825           Note: Device manager has attached a device of type 37 that this has no custom event handler for.  It will not fire events. <0xb79846c0>
05      12/03/08 10:11:23.826           Note: Device manager has attached a device of type 37 that this has no custom handler for.  This is normal for IR. <0xb79846c0>

Ok so I'm confused by the no custom handler messages, but so far so good... (device 71 is the light I added)

So now I try sending an on or off command to the light... When I do... Nothing. Nothing shows in the CM11 log, and the light doesn't turn on or off...

So I wait about a minute or two... Then suddenly the following pops up in the log file (/var/log/pluto/65_CM11A.log)
Code: [Select]
01      12/03/08 10:12:47.440           No response from CM11A device. <0xb6941b90>
01      12/03/08 10:12:47.540           Failed sending address. <0xb6941b90>
01      12/03/08 10:13:02.565           No response from CM11A device. <0xb6941b90>
01      12/03/08 10:13:33.253           No response from CM11A device. <0xb6941b90>
01      12/03/08 10:13:48.369           No response from CM11A device. <0xb6941b90>
01      12/03/08 10:17:05.452           No response from CM11A device. <0xb6941b90>
01      12/03/08 10:17:50.852           Failed sending address. <0xb6941b90>

So what's going on here? The CM11A is definately set to talk to /dev/ttyS0 which is exactly how I configured heyu running from the media director, and heyu saw the CM11 right away, and fired off lighting commands without a hitch.

any suggestions would be helpful.

Thanks!

golgoj4

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1193
  • hrumpf!
    • View Profile
    • Mah Website
Re: CM11A Problems... Setup works, LMCE just can't talk to it.
« Reply #1 on: December 04, 2008, 05:04:22 pm »
Is it possible that heyu is interfering with the comms port? I know little about how it works inside and out, but the first but looked correct, but the second is very confusing. Have not seen that message before.
Linuxmce - Where everyone is never wrong, but we are always behind xbmc in the media / ui department.

freymann

  • Douchebag
  • Guru
  • *
  • Posts: 380
    • View Profile
Re: CM11A Problems... Setup works, LMCE just can't talk to it.
« Reply #2 on: December 04, 2008, 09:17:43 pm »
Make sure you didn't fiddle with the permissions on /dev/ttyS0 on the MD.

To get heyu to work I had to manually do a chmod on the device on each reboot (when I was using MythBuntu). Perhaps now that you've used heyu under LMCE, you have a permission problem which is causing no response back from the CM11A?

Did you put batteries in the CM11A? (take them out)

Did you upload a schedule to the CM11A with heyu? (erase it!)


koelbl

  • Guest
Re: CM11A Problems... Setup works, LMCE just can't talk to it.
« Reply #3 on: December 05, 2008, 01:24:55 pm »
Hi

I have exactly the same problem with one difference, that in one room it works but in all other's not. I can see nothing in the log (even not the light which is working). Did I miss something? Any Idea? Thanks for helping

Jean Paul

========== NEW LOG SECTION ==========
1       12/05/08 13:07:14       50 (spawning-device)    Starting... 1
1       12/05/08 13:07:14       50 (spawning-device)    Found /usr/pluto/bin/CM11A
05      12/05/08 13:07:17.174           Creating child 51 <0xb78cd6c0>


Glasswalker

  • Regular Poster
  • **
  • Posts: 20
    • View Profile
Re: CM11A Problems... Setup works, LMCE just can't talk to it.
« Reply #4 on: December 05, 2008, 03:28:12 pm »
Ok to answer your questions:

I did install heyu, and I make sure heyu is not running and is fully stopped before touching linuxmce again. But it is possible that Heyu changed permissions on the port during install... I will confirm permissions are ok and see if that helps.

Also there are no batteries in the CM11 and I have not uploaded schedules with heyu (I only used it to turn a light on and off to confirm the CM11 was in fact working).

Also Koelbl: Your problem is likely related to 2 phase power in your home. I have the same problem, certain rooms are on one phase, the rest on the other phase. Without an X10 phase coupler the CM11 can only talk to devices on the same phase as it is. I know that's an issue, (and will be getting a phase coupler installed shortly) but until then I don't really have a problem because the CM11 and the devices it is controlling are all on the same phase right now.

Thanks for your responses so far. I hope the permissions ends up being the issue. I will post back here once I confirm.

golgoj4

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1193
  • hrumpf!
    • View Profile
    • Mah Website
Re: CM11A Problems... Setup works, LMCE just can't talk to it.
« Reply #5 on: December 05, 2008, 06:48:36 pm »
Hi

I have exactly the same problem with one difference, that in one room it works but in all other's not. I can see nothing in the log (even not the light which is working). Did I miss something? Any Idea? Thanks for helping

Jean Paul

========== NEW LOG SECTION ==========
1       12/05/08 13:07:14       50 (spawning-device)    Starting... 1
1       12/05/08 13:07:14       50 (spawning-device)    Found /usr/pluto/bin/CM11A
05      12/05/08 13:07:17.174           Creating child 51 <0xb78cd6c0>



Like Glasswalker said, it sounds like you need a phase coupler. I also had a similar problem until I installed one.
Linuxmce - Where everyone is never wrong, but we are always behind xbmc in the media / ui department.

Glasswalker

  • Regular Poster
  • **
  • Posts: 20
    • View Profile
Re: CM11A Problems... Setup works, LMCE just can't talk to it.
« Reply #6 on: December 05, 2008, 08:28:45 pm »
Ok just checked the permissions. I rebooted the MD that the CM11 is connected to, and confirmed the permissions are all default on all ttySX ports. (specifically ttyS0)

Then I went to the web admin and added the CM11 interface, and added one light with "Light Switch on/off".

Then did quick reload of router, checked logs, they still have that notice about the no custom handler.

Then I sent an "on" command to the light, and checked my security camera (which has view of the light) to see if it turned on (I am at work right now). The light didn't appear to turn on...

Then my wife called me like 5 minutes later and said "did you just play with the lights?"... After I confirmed, apparently it took a full 5 minutes to actually turn the light on...

So then I sent an "off" command (using the on/off buttons in the web admin under "Lights")

Went and checked security camera, no change... Gave it 5 min... No change... So then I called my wife to make sure my camera wasn't just lying to me, she said the light is still on...

Went and checked logs, and I have this now (same as the previous attempts):

Code: [Select]
Fri Dec  5 14:05:23 EST 2008 Restart
========== NEW LOG SECTION ==========
1       12/05/08 14:05:32       72 (spawning-device)    Starting... 1
1       12/05/08 14:05:32       72 (spawning-device)    Found /usr/pluto/bin/CM1
05      12/05/08 14:05:38.742           Creating child 73 <0xb793a6c0>
05      12/05/08 14:05:38.743           Note: Device manager has attached a devi
05      12/05/08 14:05:38.743           Note: Device manager has attached a devi
01      12/05/08 14:09:44.788           No response from CM11A device. <0xb68f7b90>
01      12/05/08 14:09:59.908           No response from CM11A device. <0xb68f7b90>
01      12/05/08 14:10:00.008           Failed sending address. <0xb68f7b90>

So it appears the "On" command went out fine, but then the off command (about 10 min later) failed... What the hell? :)

freymann

  • Douchebag
  • Guru
  • *
  • Posts: 380
    • View Profile
Re: CM11A Problems... Setup works, LMCE just can't talk to it.
« Reply #7 on: December 05, 2008, 08:36:18 pm »
You're likely going to need to upload some screen shots of how you have the CM11A configured, and the light, in LMCE.

The good news is, you know it works fine when you use heyu (I assume at the command line).

That's how I first tested things here with my setup. I also have my CM11A on a MD (which is left on 24/7) and not on the core (also left on 24/7).

When I was using heyu under MythBuntu, I always had to fiddle with the permissions of /dev/ttyS0 when the machine rebooted. Now that I'm using LMCE I've never ever had to fiddle with that.

I do believe I see the message about no custom handler. I don't know what it means as my X10 stuff works. I ignore the message.

I'm wondering if there was an update the CM11A code that jondecker made that you don't have? I can't remember if I had to download something to make my CM11A work. I'd advise you to search the forums and see if jondecker posted anything about updates to the cm11a module.

If there weren't any updates, then I'd say you don't have the CM11A configured properly in LCME and/or the light switch configured properly in LMCE.

On the bright side [hee hee] you're pretty darned close!!

I'll go see if i can't get you a screen shot of my CM11A setup and a light switch setup to compare against.

freymann

  • Douchebag
  • Guru
  • *
  • Posts: 380
    • View Profile
Re: CM11A Problems... Setup works, LMCE just can't talk to it.
« Reply #8 on: December 05, 2008, 09:02:08 pm »
I'm going to upload a couple images of my setup on CM11A and Light Switch On/OFF. Compare them to your setup.

freymann

  • Douchebag
  • Guru
  • *
  • Posts: 380
    • View Profile
Re: CM11A Problems... Setup works, LMCE just can't talk to it.
« Reply #9 on: December 05, 2008, 09:02:39 pm »
the other screen grab

Glasswalker

  • Regular Poster
  • **
  • Posts: 20
    • View Profile
Re: CM11A Problems... Setup works, LMCE just can't talk to it.
« Reply #10 on: December 05, 2008, 09:14:42 pm »
Ok so after some fiddling, I have found a few things...

If I turn it on or off via the web admin... It takes anywhere from 30 seconds, to 5-10 minutes... But it works (sometimes). Sometimes it doesn't seem to do anything at all.

I have now successfully turned on and off the light 3-4 times, but it only works about 30% of the time, and there is always a significant delay when it does.

That and I noticed in the log it spits out many of these:
Code: [Select]
01      12/05/08 15:05:21.697           No response from CM11A device. <0xb68f7b90>
Spaced out mostly, (sometimes it spits out 2 or 3 of them, 30 seconds apart, then it suddenly works...

On the ones where it doesn't work, it spits out 0 or more (sometimes none, sometimes as many as 2) of the above errors, plus a final one of these:
Code: [Select]
01      12/05/08 14:58:21.844           Failed sending address. <0xb68f7b90>OR one of these:
Code: [Select]
01      12/05/08 15:00:39.780           Failed sending function. <0xb68f7b90>
Not sure what the deal is there... If I keep spamming the buttons it eventually works.

Via Heyu it works beautifully, nice and fast, no lag (half second or so) and works reliably...

But the fact that it works sometimes in lmce, means it is at least communicating... so what would make it work halfass like that?

EDIT:
I just managed to get a successful "Off" signal without anything logging at all (none of the failed errors, and none of the no response errors) It took about 30 seconds to respond and turn the light off...

Oh and freymann, I doublechecked against your config screenshots, mine are configured identically in web admin.

The only thing I am doing that I don't know if you did, is I am using the instructions from the wiki in the X10 page about setting up the CM11. (It tells you to modify the template of the CM11 first so it is a "generic" device not just "lighting" so it can work with more devices... I did that change.)
« Last Edit: December 05, 2008, 09:19:59 pm by Glasswalker »

freymann

  • Douchebag
  • Guru
  • *
  • Posts: 380
    • View Profile
Re: CM11A Problems... Setup works, LMCE just can't talk to it.
« Reply #11 on: December 05, 2008, 09:37:18 pm »
Oh and freymann, I doublechecked against your config screenshots, mine are configured identically in web admin.

 Ok, well, that's good.

Quote
The only thing I am doing that I don't know if you did, is I am using the instructions from the wiki in the X10 page about setting up the CM11. (It tells you to modify the template of the CM11 first so it is a "generic" device not just "lighting" so it can work with more devices... I did that change.)

I don't believe I made those changes at all... I'm sure it was pretty basic stuff I did... add the device template, add light templates...

I likely followed these instructions:

http://wiki.linuxmce.org/index.php/CM11

Short and sweet.
« Last Edit: December 05, 2008, 09:39:07 pm by freymann »

golgoj4

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1193
  • hrumpf!
    • View Profile
    • Mah Website
Re: CM11A Problems... Setup works, LMCE just can't talk to it.
« Reply #12 on: December 06, 2008, 01:34:29 am »
i did make those changes and mine is currently working.

Also, the message about no custom event handler is normal in this case. One last thing, ive never really had success turning lights on and off from the lighting page in the webadmin, i find the device in the tree and send commands to it that way.
Linuxmce - Where everyone is never wrong, but we are always behind xbmc in the media / ui department.

Glasswalker

  • Regular Poster
  • **
  • Posts: 20
    • View Profile
Re: CM11A Problems... Setup works, LMCE just can't talk to it.
« Reply #13 on: December 06, 2008, 05:15:33 pm »
Just tried send command via the device tree as well. Sent it an On command, and it didn't seem to recieve it yet (although I haven't waited the full 5 min yet).

It almost looks like a communications problem between LMCE and the CM11A, but the wierd thing is if I remove the device from the tree, quick reload the router, change permissions on the port, and talk to it directly with heyu, it works fine, responds instantly, and all is good.

Any thoughts on why this could be?

Glasswalker

  • Regular Poster
  • **
  • Posts: 20
    • View Profile
Re: CM11A Problems... Setup works, LMCE just can't talk to it.
« Reply #14 on: December 08, 2008, 12:21:37 am »
Ok it works beautifully now...

Of all bloody things, I hadn't actually fully rebooted the Media Director that had the CM11 attached to it...

I had to reboot it for something else, and after the reboot, it just magically works... No delays, no errors, everything works perfectly...

So yeah, thanks for your help everyone, don't know what that reboot did, but apparently it did the trick!