Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - ddamron

Pages: [1] 2 3 ... 6
1
Developers / Sample code from the GSD/Ruby Webcast
« on: April 19, 2008, 09:56:24 pm »
Code: [Select]
#373 Private Method Listing
# Send a message out
def sndgsd(message)
  conn_.send(message)
end

#Process Response message
def response(message)
  #Message format: From, To, Priority, Type, Command [Param1 Param1Value]..

  #Our Format: To Type Command [Param Value] ...

  #split the messages up into chunks
  messages = message.split(" ")
  if messages.length < 3 then
error
  else
    to = messages[0].to_i
    type = messages[1].to_i
    cmd = messages[2].to_i

  #we now have enough information to create a command object
    cmd = Command.new(device_.devid_, to, 1, type, cmd)

  #now to populate parameters of the command
    pointer = 3

    while (messages.length > pointer)
      cmd.params_[messages[pointer].to_i] = messages[pointer + 1]
      pointer += 2
    end
    SendCommand(cmd)
  end
end

def error
  msg = 'Syntax Error'
  sndgsd(msg)
end

def prompt
  msg = 'TO TYPE CMD Param1 Param1value ...'
  sndgsd(msg)
end
#373 Private Method Listing END


#350 Process Incoming Data
while(true)
    buff=conn_.RecvDelimited(0x13.chr,50)
    if(buff.length() == 0)
        break
    end
    recv = recv + buff
    if recv[-1] == 13.chr then
      response(recv)
      recv = ''
    end
end
#350 Process Incoming Data END


2
Compatible Products & Services / MOVED: IR over cat 5
« on: April 16, 2008, 10:22:22 pm »

3
Developers / Who's bringing What to LinuxTAG
« on: April 07, 2008, 06:55:13 pm »
This thread is for everyone who is attending LinuxTAG (in Berlin, Germany)

UNRELATED POSTS WILL BE DELETED

I will keep this first message updated with who's doing / bringing what.


Dan Damron:
Quote
Insteon KeypadLinc
Insteon SwitchLinc
Insteon LampLinc (with lamp)
Insteon ApplianceLinc
Insteon Access Points
Insteon PLM
Insteon AP
Insteon RemoteLinc (Compliments of Insteon)
Insteon RF Thermostat (Compliments of Insteon)
2000W Inverter TESTED and does NOT WORK with Powerline Communications outputs a square wave...
Fiire Station 1"
Fiire Chief x 2
Fiire Dongles x 4,
USBUIRT

Thom Cherryhomes: 
Quote
Nokia N770,
Nokia N70,
WIIMote,
Panasonic IP CAM (us)
misc stuff
Daniel Kristianson: 
Quote
2 Z-Wave dimmable lighting modules, ZCU101, ZCS101, ZCU201,
Hauppauge PVR cards, 
USBUIRT
LinuxMCE Capable Laptop
Hari:
Quote
Flat Screen TV,
Denon Reciever,
speakers,
Zwave Light,
2x Thermostats,
ZWave Dongle,
n800,
IPAQ 5555

CISCO: (thanks to Hari)
2x 7970 IP Phones
Posde:
Quote
CM11A X10 Interface
MS15 Motion Sensor (X10)
Micro Switches
ZyXEL WiFi Access Point/Router/Switch thingy
ATI RF X10 Remote Wonder inkl. dongle
17" LCD Monitor
Pioneer plasma
Yamaha receiver
2 loudspeakers
Compaq EVO n400

Here's a list of what we need:
Quote
Cat5 Cabling(of course, and lots!)
power cables for 240V
NA 120V Lamps for demo
another NA device for ON/OFF demo
Here's a list of what we CANNOT bring
Quote
HA22 - different frequencies in europe
Act X10

4
Developers / GSD/Ruby Developers Conferences
« on: April 05, 2008, 07:06:31 pm »
I'd like to host a GSD/Ruby Developer's conference.  Some topics I'd like to cover are:

1.  How Ruby is embedded
2.  The cmd object
3.  The device_ hash
4.  Sending/Receiving Commands
5.  Sending/Receiving Events
6.  Commands/Events of interest
7.  How and WHY to send a command to yourself
8.  cmd.Param_[120] Retransmit
9.  Command Types (Command/Event/etc)
10.  Command Interceptors and how to use them in Ruby
11.  Sending User Feedback
12.  Asking the User a Question

This may be a bit much, but we'll try to focus on the basics first, then move on to the more advanced items.

I'd like to do this via teleconference and webcast (so people can see how I do it)

If you are interested in this, please reply here.  If there's enough interest, I'll set a date, and we'll go with it.

All the best,

Dan Damron

5
Users / MOVED: CM11A - adding new lights...
« on: February 24, 2008, 07:51:14 pm »
This topic has been moved to Developers.
Getting too technical for the USERS section.
http://forum.linuxmce.org/index.php?topic=4234.0

6
Developers / attempting to get the Fiire Stations working uner 0710
« on: February 17, 2008, 09:57:07 am »
ok, this is Day #2, on 0710.
I have 2 Fiire Stations, both still down, but not out by a long shot.

Once we get the Fiire Station working, I'll wiki it.

Danielk, TSCHAK, and myself are working together on this, we SHOULD be able to get SOMETHING working..

Will keep in touch.

All the best,

Dan

7
Users / Insteon PLM Updates for X10 Bidi Support
« on: February 13, 2008, 11:39:50 pm »
I've created a topic in the developers thread.  Please see http://forum.linuxmce.org/index.php?topic=4290.0

8
Developers / Insteon PLM Updates for X10 Bidi Support
« on: February 13, 2008, 11:37:46 pm »
I found a few bugs in the X10 support of the PLM Ruby code.

My opologies to everyone out there trying to use a PLM to control X10.

I have fixed the problem, but before I update the wiki with the new code, I'm going to implement dimming capability to X10.

The X10 Dimming capability will only be 1-way, as the devices do not report status.

However, any transmitted X10 signals on the powerline ARE sensed and reported back to lmce.

In a nutshell:

What will NOT work:  local control of a device cannot be sensed.
What WILL work:  If you use a REMOTE controller, or a motion sensor, etc, that TRANSMITS commands, they will be received.

HTH, I'll keep you posted.

Best regards,

Dan

9
Compatible Products & Services / MOVED: DVB-C Card on 771 Mainboard?
« on: February 13, 2008, 07:13:13 am »

10
Help Wanted / MOVED: Just a black screen when I boot up...
« on: February 02, 2008, 07:08:58 pm »

11
Developers / Threaded GSDRuby Beta Ready! (c/w PLCBUS bidi support)
« on: January 27, 2008, 07:01:31 am »
I think I'm pretty much ready to release this into the wild.
I've completely rewritten this code to be FULLY threaded and bidirectional.

This Beta version has a PLCBUS class which is being tested now. (all thumbs up so far!)

The PLCBUS class contains all the specific protocol conversions.  It can be re-coded for support of another protocol while still maintaining threading and bidirectional support.

The bulk of the code is in #373 Private Method Listing and can be Copy/Pasted in from here: http://rafb.net/p/f80h1p14.html

The rest of the code is so small, I'm posting it here.
#351 Process IDLE
Code: [Select]
errorHandler()
#350 Process Incoming Data
Code: [Select]
### #350

while(true)
  @buff = conn_.RecvDelimited(0x02.chr,100) #stx
  if(@buff.length() == 0)
    break
  end
  @buff2 = conn_.Recv(1,10) #Length of message
  @buff +=@buff2
  @length = @buff2[0]
  @buff += conn_.Recv(@length + 1, 100)
  debugin(@buff)
  dataIn(@buff)
end


# this routine needs to be handled better.
# possibly with regular expressions.

#355 Process Initialize
Code: [Select]
#########################
# Written by Dan Damron #
#########################

initDevices()

#384 Process Receive Command for Child
Code: [Select]
### #484 Process Receive Command for Child
log('DCE Command Received')

dataIn(cmd)

Some of you sharper characters out there MAY notice that I treat
Process Receive Command for Child AND Process Incoming Data the same.
They BOTH call datain()

Maybe that might pique your interest a bit.. Maybe not..

For all the guts and glory, (and about 200 hours hard work) look at #373 http://rafb.net/p/f80h1p14.html

P.S.

The PLCBUS class has a TON of instructions on how to use it.

Regards,

Dan

12
The PLCBUS is coming along nicely.

I have a question to pose to the community.  A scenario exists where I need to send myself a command.
I would like to serialize the command.  Now, Because I'm sending the command to ME, it really doesn't mattter what devdata I stick the serial number in (as long as it's not used by the command itself)

Question is:  Any preference on a devdata ID I should use for my serial number?

Here's the command, with example shown:

Ruby:
mycmd = Command.new(self, self, 1, 1, 184) #184 is the command in question - SetLevel
mycmd.params_[76] = '50' # Level = 50
mycmd.params_[999] = serialnumber  # 999 is arbitrary number

Then when I receive the command, I can check params_[999] for serialnumber.

Here's the example in MessageSend:

./MessageSend dcerouter 117 117 1 184 76 20 999 12345
where 117 is my device ID

Any thoughts?

Thanks,

Dan

13
Compatible Products & Services / MOVED: Home automation in Europe?
« on: January 21, 2008, 08:18:00 am »

14
Compatible Products & Services / MOVED: Looking for some advice
« on: January 21, 2008, 08:16:27 am »

Pages: [1] 2 3 ... 6