Author Topic: GSD/Ruby Developers Conferences  (Read 43820 times)

ddamron

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 962
    • View Profile
    • My LinuxMCE User Page
Re: GSD/Ruby Developers Conferences
« Reply #30 on: April 22, 2008, 03:32:11 am »
Just to say, thanks to watching this i was able to get my Rako kit working :) At the moment its really basic code to "just get it to work" but will be going back over it to add checking and anything else i can think of (the blasted off commands issue for one  >:( )

I'll pop a wiki page up sometime this week with my code.

Looking forward to the next conference, i'll try and add something to it this time (got a list of why dont this works :) )



Sp00nhead,

That's GrEaT!  I wanted that first webcast to be a primer, or a basic how-to...  I'm glad it's helped!

Viewing the log is probably the most effective debugging resource, if I didn't mention it in the conference...
just make sure you output to it. :)

and... just do you don't reinvent the wheel, here's a quicky.  Put this in your Private Method Listing:

def log(line)
  $log = File.open("/var/log/pluto/" + device_.devid_.to_s + "_Generic_Serial_Device.log", "a")
  $log.puts "(***):" + line.to_s
  $log.close
end

Now, at any time you have something to log, do this:
log("this will be logged")

Done!

Regards,

Dan
The only intuitive interface is the nipple.  After that it's all learned.
My other computer is your windows box.
I'm out of my mind.  Back in 5 minutes.
Q:  What's Red and smells like blue paint?

A:  Red Paint.

darrenmason

  • Addicted
  • *
  • Posts: 529
    • View Profile
Re: GSD/Ruby Developers Conferences
« Reply #31 on: April 22, 2008, 05:43:19 am »
Dan - since you brought it up....

In the PLC-BUS code you have your logging code outputting its prefix a character at a time. Was there a reason/need for this? Just curious.........

ddamron

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 962
    • View Profile
    • My LinuxMCE User Page
Re: GSD/Ruby Developers Conferences
« Reply #32 on: April 22, 2008, 06:40:42 am »
Darren,

Yes, and No.

heh, I had troubles logging object inspections.. the output never made it to the log because it thought it was xml or other tags...
That was also dealing with a specific bug in the code... I have since fixed that bug, but haven't changed the logging routines back...
Either way, they still work, the code above is more efficient, but in no way will it affect the PLCBUS stuff.

BTW, Good eye!
Now let's see if you can find some of the other hiccups!

My 4th webconference will explain the ThreadedRuby Object model I have created.  PLCBUS is based on that model.

The only intuitive interface is the nipple.  After that it's all learned.
My other computer is your windows box.
I'm out of my mind.  Back in 5 minutes.
Q:  What's Red and smells like blue paint?

A:  Red Paint.

lightshow

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: GSD/Ruby Developers Conferences
« Reply #33 on: April 28, 2008, 10:23:18 pm »
Did you happen to record your Webcast? 

I'd like to watch what happened since I was unable to attend.

brsisr

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: GSD/Ruby Developers Conferences
« Reply #34 on: May 02, 2008, 10:37:43 pm »
Well, the Webcast was a success,

I had set another machine up to record here.  However, we DID have a software crash (webconferencing software DimDIm) and I didn't get a chance to reconnect the recording PC.
This is almost a 2 person job, 1 to record, and 1 to host.


Hi Dan!
where could I find the record of thsi video converence,
thanks in advance

ddamron

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 962
    • View Profile
    • My LinuxMCE User Page
Re: GSD/Ruby Developers Conferences
« Reply #35 on: May 03, 2008, 09:29:12 pm »
as I previously mentioned, the webcast did *NOT* record.
The only intuitive interface is the nipple.  After that it's all learned.
My other computer is your windows box.
I'm out of my mind.  Back in 5 minutes.
Q:  What's Red and smells like blue paint?

A:  Red Paint.

domotiqa.com

  • Guru
  • ****
  • Posts: 206
    • View Profile
    • home automation
Re: GSD/Ruby Developers Conferences
« Reply #36 on: August 06, 2008, 09:22:32 pm »
so sad
http://www.domotiqa.com - home automation

los93sol

  • Guru
  • ****
  • Posts: 396
    • View Profile
Re: GSD/Ruby Developers Conferences
« Reply #37 on: August 10, 2008, 03:31:26 pm »
on the next webcast you wanna play with a vista-15p alarm panel to demo adding support for a device like it :)  Haha, I've been trying to get this panel working/supported for a while now, grasping at hope someone will pick it up

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: GSD/Ruby Developers Conferences
« Reply #38 on: August 10, 2008, 06:10:11 pm »
what is your exact problem with the panel?

best regards,
Hari
rock your home - http://www.agocontrol.com home automation

los93sol

  • Guru
  • ****
  • Posts: 396
    • View Profile
Re: GSD/Ruby Developers Conferences
« Reply #39 on: August 10, 2008, 06:58:32 pm »
The panel does not directly have an ethernet or serial connection, I used a VistaICM to give the panel an ethernet connection and get it on my network.  The problem now is I don't know Ruby at all and have no idea where to start writing a GSD for this panel.  The VistaICM I am using provides a web interface that emulates and is connected to the panel as a keypad.  When you click a number on the keypad it hits a URL that I'm assuming communicates with the panel as if you had just pressed the button on a keypad.  The url's as copied from the VistaICM's web interface use the following formatting

http://192.168.80.113/pda?cmd=7&tick=2139572809&node=1&ctrl=1
http://192.168.80.113/pda?cmd=2&tick=2139572809&node=1&ctrl=1
http://192.168.80.113/pda?cmd=3&tick=2139572809&node=1&ctrl=1
http://192.168.80.113/pda?cmd=Pound&tick=1348042547&node=1&ctrl=1

There are logs on the VistaICM as well and the web interface shows in real time the status of the panel so it should be possible to communicate with sensors hooked to the panel as well somehow, but I have no idea where to even start with being able to arm/disarm the panel...

los93sol

  • Guru
  • ****
  • Posts: 396
    • View Profile
Re: GSD/Ruby Developers Conferences
« Reply #40 on: August 10, 2008, 07:15:11 pm »
I just confirmed that hitting the links in the proper order for my disarm code will disarm the panel so I'm assuming that means the complexity of the panels protocol is now taken out of the equation since the VistaICM apparently has that logic built in, can you confirm if this is correct?

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: GSD/Ruby Developers Conferences
« Reply #41 on: August 10, 2008, 07:38:33 pm »
The panel does not directly have an ethernet or serial connection, I used a VistaICM to give the panel an ethernet connection and get it on my network. 

hu? the ICM does not use a serial connection to the panel?
rock your home - http://www.agocontrol.com home automation

los93sol

  • Guru
  • ****
  • Posts: 396
    • View Profile
Re: GSD/Ruby Developers Conferences
« Reply #42 on: August 10, 2008, 08:00:17 pm »
It is wired to the panel as a keypad and must be configured with a keypad address so it is emulating a keypad through a web interface.  There is a spec. document on this device located here: http://www.in2networks.com/PDFs/VistaICMSpecSheet.pdf

The document calls the connection to the panel an "addressable ECP port".  It is a 4 wire connection, one wire for power, one for ground, one for tx, and one for rx.

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: GSD/Ruby Developers Conferences
« Reply #43 on: August 11, 2008, 12:43:46 pm »
1.) Look at templates using HTTP like the Panasonic or the D-Link webcam. That will give you information how to do http requests

2.) Look at the Apex panel ruby code to see which commands/events are relevant for an alarm panel

3.) Create a new device template and copy and paste the ruby snippets you need

4.) ?

5.) Profit

when you get stuck, drop a line. Ruby is not all that hard in LinuxMCE. If you know any script language you should get the pieces together. If you don't, this is the time to improve :-) Start with little shell scripts.

The setup you use is not available in Germany (afaik), so I won't invest time in this. After I've finished Z-Wave I'll look into alarm panels, but I want direct serial control, reports for every zone and an intelligent (tamper resistant) alarm bus and a EU reseller.

br, Hari
rock your home - http://www.agocontrol.com home automation

Marie.O

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3676
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: GSD/Ruby Developers Conferences
« Reply #44 on: August 18, 2008, 11:44:02 am »
hari,

what is the reason to have a dedicated alarm setup in parallel to LinuxMCE?

rgds
Oliver