Please login or register.

Login with username, password and session length

Author Topic: Bottlerocket with cm19a  (Read 9924 times)

th3j4ckl3

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 5
Bottlerocket with cm19a
« on: June 13, 2012, 07:58:34 PM »

I have a CM19a connected to an ubuntu server. dmesg sees the device just fine running on 12.04 release.  I have tested it with the pycm app and it works in shutting off and turning off lights.  For some reason though I cant seem to get the port right for BottleRocket.  I'd like it works in bottlerocket but it keeps giving an error that the serial port cannot be reached.  How do I tell from dmesg what the right port is that I should be using with BR command --port?  What is the full syntax from dmesg that I should be using in Bottlerocket?  Any help is appreciated as I want to start writing some small scripts to shut off my kids lights upstairs at night automagically. 

Th3j4ckl3
Logged

bbx10node

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 7
Re: Bottlerocket with cm19a
« Reply #1 on: June 14, 2012, 01:41:19 AM »

BR works with the CM17A which is not compatible with the CM19A. I do not know what pycm is. Try mochad which supports the CM19A (and the CM15A as well).

http://sourceforge.net/projects/mochad/


Logged

th3j4ckl3

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 5
Re: Bottlerocket with cm19a
« Reply #2 on: June 14, 2012, 02:01:32 AM »

Thanks, I was really hoping it would be up on apt-get and I wouldnt have to compile.  Really trying to run this off a very minimal resource machine and dont have to put build / make resources it for security reasons.  Be nice if someone built this already for Ubuntu 12.04. -:)
Logged

th3j4ckl3

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 5
Re: Bottlerocket with cm19a
« Reply #3 on: June 14, 2012, 02:22:52 AM »

Ok so I went thru with the make and install and followed the instructions.  A couple of things I don't understand so please bear with my ignorance of some subjects.

1st, the use of the nc command i.e.  nc localhost 1099.

What is its purpose and why does it have to stay running for mochad to work? 
What is the significance of the 1099?  Is that like a default port for the cm19a?

I tried the example of

# echo "pl a all_lights_on" | nc localhost 1099
06/14 01:10:23 Tx PL House: A Func: All lights on

in my other window I see

 nc localhost 1099
06/14 01:10:08 Tx PL House: A Func: All lights off
06/14 01:10:23 Tx PL House: A Func: All lights on


but my lights on A1 never turn on or off?  I know from my remote the device works as well as I stated with another python tool I got it to work on this linux node but I think I am still doing something wrong with mochad.  Any help again is appreciated.

Julez

Logged

bbx10node

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 7
Re: Bottlerocket with cm19a
« Reply #4 on: June 14, 2012, 12:12:42 PM »

nc sends commands to mochad. mochad listens on TCP port 1099 for commands which it then sends to the CM19A.

Try

# echo "rf a1 on" | nc localhost 1099

pl means power line and pl commands will not work on a CM19A because it does not have a power line interface. The pl command is meant for the CM15A. The rf commands will work on the CM19A (as well as the CM15A). The rf command supports on/off/dim/bright but does not support all_lights_on, all_units_off, or extended commands. This is a limitation of the CM19A and the RF protocol.
Logged

th3j4ckl3

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 5
Re: Bottlerocket with cm19a
« Reply #5 on: June 14, 2012, 12:48:38 PM »

Outstanding.  That was it.  I started playing around with the hand remote and noticed a difference between the entries being logged by me using the hand remote and the entries I was trying to log in from the command line in linux.  As soon as I saw that I read your post and it confirmed that I was sending the wrong commands.  Your example worked. 

So in seeing this now, I am still not understanding how I can keep the NC function going, i.e. a power outage, without me having to log in and call the terminal session to keep it running?  I'd like to be able to cron the script to make sure my kids lights are just sent an off signal every day at 8 a.m. after they have gone to school so I know they are not leaving the lights on. 

Still researching but this info has been very helpful.  Thanks.

Julez >!
Logged

th3j4ckl3

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 5
Re: Bottlerocket with cm19a
« Reply #6 on: June 14, 2012, 12:55:10 PM »

Ooh wait, I see now the nc in another terminal isnt needed unless I just want to watch the commands being sent.  Tested it now without it and it works.  Makes sense now.  Although finding a way to get it to redirect to a log file for logging would be even better.  I'm sure I'll figure it out.

THanks again
Julez

 >*<
Logged
 

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