Author Topic: Access to X-10 from external process  (Read 6081 times)

archived

  • Hello, I'm new here
  • Posts: 0
    • View Profile
Access to X-10 from external process
« on: September 15, 2005, 07:16:09 am »
This is similiar to the "Will Pluto listen to X10 commands?" topic, but I decided to open up a new one, since that one was getting very long.

Along the same lines as listening to X-10 events, is it possible to send X-10 commands connecting to the DCErouter from so external process? In other words, is it easy enough to construct the message to DCErouter to accomplish this?

archived

  • Hello, I'm new here
  • Posts: 0
    • View Profile
Access to X-10 from external process
« Reply #1 on: September 15, 2005, 07:56:30 am »
I just made a quick change...  Now you send/receive messages in plain text.  When you register your command handler, send "PLAINTEXT" and all your messages will come in plain text.  With the .30 release I'll include some documentation with a sample you can use with just telnet and some messages to copy/paste showing how to send/receive messages.

I should have done this from the beginning...  There was already a Message constructor to build a message from plain text, the only part missing was a method to convert the message back into text.  It took half an hour, and now the Perl/Java programmers can write a DCE Device without any problems.

I also sent Paul from xAP an email and will look into adding a xAP gateway to Pluto as well.

archived

  • Hello, I'm new here
  • Posts: 0
    • View Profile
Access to X-10 from external process
« Reply #2 on: September 15, 2005, 08:04:09 am »
There is a /usr/pluto/bin/MessageSend utility which can be used to send commands to registered DCE devices.
For example to turn some device ON
Code: [Select]
/usr/pluto/bin/MessageSend localhost 0 <device_id> 1 192
To turn it OFF
Code: [Select]
/usr/pluto/bin/MessageSend localhost 0 <device_id> 1 193
So if your device is a X10 device (say lamp A1), the message will be sent to that device, which is a child of CM11A, so CM11A device will take care of the message and will send ON/OFF code into powerline for device A1.

archived

  • Hello, I'm new here
  • Posts: 0
    • View Profile
Access to X-10 from external process
« Reply #3 on: September 15, 2005, 07:24:11 pm »
I uploaded a tutorial explaining how the plain text messages for perl/java works, and tested it today against our daily builds.  If anybody has comments please let me know so I can make changes before the .30 release and before people start using it:

http://plutohome.com/support/index.php?section=document&docID=286

archived

  • Hello, I'm new here
  • Posts: 0
    • View Profile
Access to X-10 from external process
« Reply #4 on: September 15, 2005, 10:26:58 pm »
these are great (both the MessageSend and general access to DCErouter).

For MessageSend, is there a way to send to a scenario? For example, if I have a scenario, say "bed time", where it turns off several different lights, can I send to that scenario, or would I have to manually send to each device?

archived

  • Hello, I'm new here
  • Posts: 0
    • View Profile
Access to X-10 from external process
« Reply #5 on: September 16, 2005, 08:36:38 am »
Yes, all scenarios are internally referred to as "CommandGroups", since they are groups of commands, and, fyi, are stored in the pluto_main database table: CommandGroup.

Send to DCERouter (DEVICEID_DCEROUTER -1000) a message type 10 (MESSAGETYPE_EXEC_COMMAND_GROUP) with the ID = the command group.

We don't show the command group ID on the wizard just because we figured end-users wouldn't care.  To get the ID choose Advanced, Scenarios, and put your mouse over the scenario in the tree on the left.  You'll see in the link it says cgID=X.  Or you could look in the database.  If this is something other users will want, we could add the command group ID to the wizard page.

archived

  • Hello, I'm new here
  • Posts: 0
    • View Profile
Access to X-10 from external process
« Reply #6 on: September 29, 2005, 12:13:30 am »
aaron, what build is the change to have the DCErouter understand plaintext messages? I tried to telnet to port 3450, but it just sat there and did nothing. I am on build 29.

Also, I didn't see a category called "Logic Handlers". Is that in a newer build?

thanks

archived

  • Hello, I'm new here
  • Posts: 0
    • View Profile
Access to X-10 from external process
« Reply #7 on: September 29, 2005, 08:25:51 am »
Yes, it's part of .30 (which we hoped to release a couple weeks ago).  30 is a *huge* upgrade since we're upgrading our Debian mirror to the latest Debian Sarge (stable) and moving to the latest kernel because we need to support new DVB cards for our new VDR module.  Unfortunately we ran into lots and lots of problems....  Bluez Bluetooth modules were broken in the kernel from versions 2.6.12.2 to 2.6.12.6, and we couldn't  use 2.6.11 because it didn't have the DVB cards, the last stable Debian Sarge introduced a bug in update-inetd we needed to workaround, several Sarge packages called init u in the postinst, messing up the console, and, and, and....  We found so far 28 problems that were introduced into the 2.6.12 kernel and latest Debian Sarge, so we've been very busy patching packages and building workarounds for about 2 weeks now.  Sorry for the long delay.

Anyway, the good news is it's finally done--as of yesterday the kernel and all packages in our mirror upgrade without incident, so we expect to release .30 tomorrow.

archived

  • Hello, I'm new here
  • Posts: 0
    • View Profile
Access to X-10 from external process
« Reply #8 on: September 29, 2005, 06:54:21 pm »
Quote from: "aaron.b"


Anyway, the good news is it's finally done--as of yesterday the kernel and all packages in our mirror upgrade without incident, so we expect to release .30 tomorrow.


ahh, good...I hope so...I need this soon :)