Author Topic: Marmitek X10 devices  (Read 6007 times)

archived

  • Hello, I'm new here
  • Posts: 0
    • View Profile
Marmitek X10 devices
« on: October 31, 2005, 05:16:02 pm »
Hi,

I've bought an X10 marmitek kit with typical devices. I've a control unit (CM11F) and I simply try to switch on/off some lamps.
I don't know if :

A. I have to define a new interface; in this case what is controller (controlled via menu) should I choose, or or should I write some ruby code to get control of light.

B. Create interface specifying using standard CM11A controller.

Regards,

Antoine

archived

  • Hello, I'm new here
  • Posts: 0
    • View Profile
Marmitek X10 devices
« Reply #1 on: October 31, 2005, 06:46:30 pm »
Ok,

CM11a modules works good with marmitek one (CM11F).

After several tests, I realized the the cm11a module wans't installed.

Furthermore, the shell batches in charge of updating/installing modules on demand (I think is this was happened when new interface is installed)  fail to download module from remote servers (apt fail).

The same thing happens during reboot process, the Update_Packages.sh
fail to check repositories. I didn't change anything.

Does anybody have some suggestions ?

Regards

archived

  • Hello, I'm new here
  • Posts: 0
    • View Profile
x10 usb
« Reply #2 on: October 31, 2005, 10:03:45 pm »
It depends on whether the CM11F provides a serial interface on the operating system you are using. If it does then setting the CM11A device up in pluto-admin might work.

archived

  • Hello, I'm new here
  • Posts: 0
    • View Profile
Marmitek X10 devices
« Reply #3 on: November 01, 2005, 08:50:23 am »
Try to add in pluto-admin webpage a CM11A device and specify as port the port in which CM11F is plugged. Then add some lights, a lightning scenario and see if they work.
Right now CM11A is using plain old X10 commands (no extended commands supported), so it should work with practically any X10 device.
If this doesn't work...we'll have to implement it as GSD device, but we'll need some documentation to do this (and also some time, implementation takes only a few days but we have a lot of requests and very few people)

archived

  • Hello, I'm new here
  • Posts: 0
    • View Profile
x10
« Reply #4 on: November 01, 2005, 09:19:34 am »
Thanks,

basic X10 commands work fine with CM11F http://www.marmitek.com/en/catalogus/product.php?product=34.

I had some problems with automatic download (this is another problem).

anyway it would be fine to have some docs about GSD... but I know you are very busy man.
About this I will invest more and more time in pluto internals and I could be in support soon !

Regards

archived

  • Hello, I'm new here
  • Posts: 0
    • View Profile
Marmitek X10 devices
« Reply #5 on: November 01, 2005, 09:29:33 am »
Try to search the forums for terms "GSD" and "Generic_Serial_Device".

Try to add some GSD devices to your system (as dummy, no need for real equipment), then go to wizard->devices->generic_serial_devices and take a look at Ruby code that already exists.

Hopefully that examples and our explanation in the forums will help you.

archived

  • Hello, I'm new here
  • Posts: 0
    • View Profile
GSD & ruby
« Reply #6 on: November 02, 2005, 09:22:15 pm »
Hi,

I've tried to add one dummy device based on the axis IP camera example.
Upon your advice I have searched the forum and found those posts :

http://plutohome.com/support/phpbb2/viewtopic.php?p=1243
and more recently :

http://plutohome.com/support/phpbb2/viewtopic.php?t=419&highlight=gsd+ruby

I've also installed the required packages and dependencies for GSD (I think).

I' maybe a newbe but I would like to understand the following :

1. do the ruby interface accepts all ruby syntax & statements
2. can I use GSD to act as a IP client to get/set informations from remote devices, i.e. if I want to get new mail from an SMTP server and put some warnings on a orbiter ?
3. If I want to use C++ language instead to implement a plugin, can you give me some examples I can study (I thought about CMA11 classes to begin)  ?


Thanks,

Antoine

archived

  • Hello, I'm new here
  • Posts: 0
    • View Profile
Marmitek X10 devices
« Reply #7 on: November 04, 2005, 01:18:27 pm »
Generic_Serial_Device is an interface between DCE C++ framework and Ruby.
On the webpage (wizard->devices->generic serial devices) you will add Ruby code which will be executed when a specific command arrives. Initially it has only 5 or 6 commands (initialize, release, idle, command for child, process incoming data and so on)
To that commands you can add more commands which match your device capabilities (on, off,  set level and so on)

So when you send a command from orbiter(or MessageSend or whatever else) the code you put in there will be executed.

So this are short answers on your questions:

1. Yes it does accept ruby syntax because it IS ruby

2. It's ruby man, you can use it the way you like, connect to some server to read mail or spam your neighbor or whatever else your computer and its peripherals can do  (the only thing you must be carefull is do not create another classes, because you are already in one and be sure you know what you are doing)

3. You can always get sources from svn and look into them. But we encourage users to use GSD because this is the EASIEST way to create new device which will actually work (don't need to care about memory alocation, thread synchronisation, deadlocks and over minor problems)

archived

  • Hello, I'm new here
  • Posts: 0
    • View Profile
GSD
« Reply #8 on: November 07, 2005, 02:33:19 pm »
If I understand clearly, first I have to create or pick a template file from the right category, I think that the right one is "Generic Serial Devices #119".
Afterwards when the device has been created there are two questions :

1. what is the "controlled via" I have to specify ? (there are no childs for the moments cause it's just a test)

2. I noticed that the GSG daemon is not started, i've downloaded and installed all required packages. I can start it manually (ruby works) but I would prefer the automatic way. This let me suppose that there is something wrong in the above steps.

Regards

archived

  • Hello, I'm new here
  • Posts: 0
    • View Profile
GSD
« Reply #9 on: November 07, 2005, 03:49:23 pm »
Ok, I found the problem. The package name was not specified in device template. I've put some code snippets juste to check for ruby interpreter and everything looks fine. Neverthless there are some questions that call for an answer..

1. why do the Generic Serial Module look for IDLE function every 2 seconds ?  The message I get is : "Device_XXX handleNoMessage sending IDLE command". What is the pourpose of this command ? Is there a way not to pollute log ?

2. Should  I implement all internal commands ? (I think yes but I need confirmation). What is the meaning and usage of each ?

Thanks in advance.

Regards

Antoine

archived

  • Hello, I'm new here
  • Posts: 0
    • View Profile
Marmitek X10 devices
« Reply #10 on: November 07, 2005, 04:10:50 pm »
The message in log was just for debug purpose (somehow it managed to get into .31 release), it's already out for couple of days so after an upgrade to .32, everything should be fine.

No you don't need to implement ALL comands. Implement only what you need.
Private Method Listing - define here any functions you may need like send_and_receive_confirmation, and call it every time you need instead of Send() and Recv() and verify if the response is the one you expect
Process IDLE - function which will be called once in few seconds (do whatever you want)
Process Incoming Data - called when device has something to say(you probably need to read it)
Process Initialize - called when pluto device is starting (initialize connection parameters here, say hello to device, whatever)
Process Receive Command For Child - called when you you receive a command addressed to one of your children
Process Release - called when pluto device is finishing (for example on router quick reload), maybe you need to say goodbye to the device (if needed by protocol)

The GSD device is usually controlled via CORE, or whatever computer which has the physical device, and it's children are controlled via GSD device.