Author Topic: Does anyone have ANY experience with implementing PnP  (Read 14488 times)

ddamron

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 962
    • View Profile
    • My LinuxMCE User Page
Does anyone have ANY experience with implementing PnP
« on: December 28, 2007, 07:03:59 am »
I can't seem to get it working..  I've documented it in my thread 'current status of Insteon PLM Integration'

Thanks..

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.

ddamron

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 962
    • View Profile
    • My LinuxMCE User Page
Re: Does anyone have ANY experience with implementing PnP
« Reply #1 on: December 28, 2007, 12:47:54 pm »
BuMp

HeLp!!!

PlEaSe!
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.

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: Does anyone have ANY experience with implementing PnP
« Reply #2 on: December 28, 2007, 01:10:26 pm »
BuMp

HeLp!!!

PlEaSe!

have you seen my denon/marantz/... script? That workes fine for a gsd when the pnp type and the script is set correctly in the device template.

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

ddamron

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 962
    • View Profile
    • My LinuxMCE User Page
Re: Does anyone have ANY experience with implementing PnP
« Reply #3 on: December 28, 2007, 01:11:48 pm »
I'm not talking about the script...
it's the device detection... INSIDE my driver..
I'm trying to report child devices...
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.

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: Does anyone have ANY experience with implementing PnP
« Reply #4 on: December 28, 2007, 01:13:33 pm »
I'm not talking about the script...
it's the device detection... INSIDE my driver..
I'm trying to report child devices...

sorry, i got that wrong..
rock your home - http://www.agocontrol.com home automation

ddamron

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 962
    • View Profile
    • My LinuxMCE User Page
Re: Does anyone have ANY experience with implementing PnP
« Reply #5 on: December 28, 2007, 01:16:17 pm »
NP, thanks anyway...

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.

ddamron

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 962
    • View Profile
    • My LinuxMCE User Page
Re: Does anyone have ANY experience with implementing PnP
« Reply #6 on: December 28, 2007, 06:37:07 pm »
Ok, I found some mistakes...
I dug into the database, and found I was using wrong values..
Here's my modified test code:
Code: [Select]
  myDevFrom = device_.devid_
  myDevTo = -1001
  myDevPriority = 1
  myDevType = 2 #event
  myDevID = 65 # Device Detected
  #create command
  cmd = Command.new(myDevFrom, myDevTo, myDevPriority, myDevType, myDevID)
  #Add params...
  cmd.params_[56] = "73" # environment - Lighting Device
  cmd.params_[49] = "38" # Light (dimmable)
  cmd.params_[55] = "12|0A.97.0B\n" # test lamp module
  cmd.params_[13] = "TEST LampLinc V2" # text to display
  cmd.params_[52] = "11"
  cmd.params_[53] = "2"
  cmd.params_[54] = "pnpserialnumber"
  cmd.params_[59] = "Insteon PLM"
  SendCommand(cmd)
  #Now, Fire the Done Detecting event...
  cmd = Command.new(myDevFrom, myDevTo, myDevPriority, myDevType, 74) #Done detecting...
  cmd.params_[59] = "Insteon PLM"
  SendCommand(cmd)
Now, This DID fire into the wizard, but ONLY on the hybrid...
None of the other MD's fired the event...

Here's the log...
Code: [Select]
Event #65 has no handlers <0xb1426b90>
07 12/28/07 10:06:59.051 Received Message from 37 (PLM / Office) to -1001 (unknown / ), type 2 id 65 Event:Device Detected, retry none, parameters: <0xb1426b90>
07 12/28/07 10:06:59.051   Parameter 5(Mac Address):  <0xb1426b90>
07 12/28/07 10:06:59.051   Parameter 13(Text): TEST LampLinc V2 <0xb1426b90>
07 12/28/07 10:06:59.051   Parameter 28(IP Address):  <0xb1426b90>
07 12/28/07 10:06:59.051   Parameter 49(PK_DeviceTemplate): 38 <0xb1426b90>
07 12/28/07 10:06:59.051   Parameter 51(VendorModelID):  <0xb1426b90>
07 12/28/07 10:06:59.051   Parameter 52(PK_CommMethod): 11 <0xb1426b90>
07 12/28/07 10:06:59.051   Parameter 53(PK_PnpProtocol): 2 <0xb1426b90>
07 12/28/07 10:06:59.051   Parameter 54(PNP Serial Number): pnpserialnumber <0xb1426b90>
07 12/28/07 10:06:59.051   Parameter 55(DeviceData): 12|0A.97.0B
 <0xb1426b90>
07 12/28/07 10:06:59.051   Parameter 56(Category): 73 <0xb1426b90>
07 12/28/07 10:06:59.051   Parameter 59(Signature): Insteon PLM <0xb1426b90>
07 12/28/07 10:06:59.083 Event #74 has no handlers <0xb1426b90>
07 12/28/07 10:06:59.083 Received Message from 37 (PLM / Office) to -1001 (unknown / ), type 2 id 74 Event:Done Detecting Devices, retry none, parameters: <0xb1426b90>
07 12/28/07 10:06:59.083   Parameter 59(Signature): Insteon PLM <0xb1426b90>
07 12/28/07 10:06:59.964 Event #65 has no handlers <0x670a4b90>
07 12/28/07 10:06:59.964 Received Message from 1 (CORE / Office) to -1001 (unknown / ), type 2 id 65 Event:Device Detected, retry none, parameters: <0x670a4b90>
07 12/28/07 10:06:59.964   Parameter 5(Mac Address): 00:40:63:EE:37:BC <0x670a4b90>
07 12/28/07 10:06:59.964   Parameter 13(Text):  <0x670a4b90>
07 12/28/07 10:06:59.964   Parameter 28(IP Address): 192.168.80.3 <0x670a4b90>
07 12/28/07 10:06:59.964   Parameter 49(PK_DeviceTemplate): 1837 <0x670a4b90>
07 12/28/07 10:06:59.964   Parameter 51(VendorModelID):  <0x670a4b90>
07 12/28/07 10:06:59.964   Parameter 52(PK_CommMethod): 3 <0x670a4b90>
07 12/28/07 10:06:59.964   Parameter 53(PK_PnpProtocol): 2 <0x670a4b90>
07 12/28/07 10:06:59.964   Parameter 54(PNP Serial Number): \\192.168.80.3 <0x670a4b90>
07 12/28/07 10:06:59.964   Parameter 55(DeviceData): 186|DCEROUTER <0x670a4b90>
07 12/28/07 10:06:59.964   Parameter 56(Category): fileserver <0x670a4b90>
07 12/28/07 10:06:59.964   Parameter 59(Signature):  <0x670a4b90>
05 12/28/07 10:07:00.015 Socket::ReceiveData 0x9497fa00 failed, bytes left 0 start: 900000 1: 0 1b: 0 2: 0 2b: 0 m_Socket: 178 Incoming_Conn Socket 178 127.0.0.1 <0x670a4b90>
05 12/28/07 10:07:00.015 Socket::ReceiveString2 ReceiveData failed m_Socket: -1 Incoming_Conn Socket 178 127.0.0.1 <0x670a4b90>
05 12/28/07 10:07:00.015 TCPIP: Closing connection to -1003 (Router Dev #0) 0x9497fa00 m_Socket: -1 <0x670a4b90>
05 12/28/07 10:07:00.016 Router::RemoveAndDeleteSocket 0x9497fa00 -1003 <0x670a4b90>
08 12/28/07 10:07:00.063 Received Message from 37 (PLM / Office) to OnScreen Orbiter(20), type 1 id  809 Command:Display Alert, retry none, parameters: <0x972edb90>
08 12/28/07 10:07:00.063   Parameter 9(Text): 36857 Confirming 73Light Switch (dimmable) <0x972edb90>
08 12/28/07 10:07:00.063   Parameter 70(Tokens): pnp_36857 <0x972edb90>
08 12/28/07 10:07:00.063   Parameter 182(Timeout): 3 <0x972edb90>
08 12/28/07 10:07:00.063   Parameter 251(Interruption): 2 <0x972edb90>
08 12/28/07 10:07:00.064 Received Message from 14 (Plug And Play Plug-in / Office) to OnScreen Orbiter(20), type 1 id  741 Command:Goto Screen, retry none, parameters: <0x972edb90>
08 12/28/07 10:07:00.064   Parameter 159(PK_Screen): 116 <0x972edb90>
08 12/28/07 10:07:00.064   Parameter 163(Description): Light Switch (dimmable)(Pluto / Lighting Device) <0x972edb90>
08 12/28/07 10:07:00.064   Parameter 224(PK_PnpQueue): 36857 <0x972edb90>
08 12/28/07 10:07:00.064   Parameter 251(Interruption): 3 <0x972edb90>
08 12/28/07 10:07:00.064   Parameter 252(Turn On): 0 <0x972edb90>
08 12/28/07 10:07:00.064   Parameter 253(Queue): 1 <0x972edb90>
08 12/28/07 10:07:00.069 Received Message from 20 (OnScreen Orbiter / Office) to 6 (Datagrid Plug-in / Office), type 1 id 35 Command:Populate Datagrid, retry none, parameters: <0x7a8cbb90>
08 12/28/07 10:07:00.069   Parameter 4(PK_Variable): 0 <0x7a8cbb90>
08 12/28/07 10:07:00.069   Parameter 5(Value To Assign):  <0x7a8cbb90>
08 12/28/07 10:07:00.069   Parameter 10(ID): 1 <0x7a8cbb90>
08 12/28/07 10:07:00.069   Parameter 15(DataGrid ID): pnp_20 <0x7a8cbb90>
08 12/28/07 10:07:00.069   Parameter 38(PK_DataGrid): 44 <0x7a8cbb90>
08 12/28/07 10:07:00.069   Parameter 39(Options): 36857 <0x7a8cbb90>
08 12/28/07 10:07:00.069   Parameter 40(IsSuccessful): 1 <0x7a8cbb90>
08 12/28/07 10:07:00.069   Parameter 44(PK_DeviceTemplate): 0 <0x7a8cbb90>
08 12/28/07 10:07:00.069   Parameter 60(Width): 3 <0x7a8cbb90>
08 12/28/07 10:07:00.069   Parameter 61(Height): 5 <0x7a8cbb90>
08 12/28/07 10:07:00.075 Received Message from 1 (CORE / Office) to OnScreen Orbiter(20),OnScreen Orbiter(59), type 1 id  809 Command:Display Alert, retry none, parameters: <0x972edb90>
08 12/28/07 10:07:00.075   Parameter 9(Text): 36858 Done with new device fileserver Added: Fiire Station 1 <0x972edb90>
08 12/28/07 10:07:00.075   Parameter 70(Tokens): pnp_36858 <0x972edb90>
08 12/28/07 10:07:00.075   Parameter 182(Timeout): 2 <0x972edb90>
08 12/28/07 10:07:00.075   Parameter 251(Interruption): 2 <0x972edb90>
05 12/28/07 10:07:00.083 Plug_And_Play_Plugin::PNPDevices Parms=36857 returning sole device template 38 Light Switch (dimmable) <0x8d8f1b90>
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.

ddamron

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 962
    • View Profile
    • My LinuxMCE User Page
Re: Does anyone have ANY experience with implementing PnP
« Reply #7 on: December 28, 2007, 07:07:38 pm »
AAAARRRRGGHH
Ok, I've got it reporting, but it ONLY reports on the CORE!
It's doing EXACTLY what I want it to do! Just not on ALL Orbiters as explained in the PnP wiki...

I've checked to make sure my orbiters have registered, and they say YES.
I think I'll try a reboot....

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.

ddamron

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 962
    • View Profile
    • My LinuxMCE User Page
Re: Does anyone have ANY experience with implementing PnP
« Reply #8 on: December 28, 2007, 07:24:18 pm »
Ok, I think I know what's happening...
all my MD's and Orbiters are MUNCHED.
Probably from me attempting PnP with bad data...
I have to reinstall... again....
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.

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: Does anyone have ANY experience with implementing PnP
« Reply #9 on: December 28, 2007, 07:53:28 pm »
AAAARRRRGGHH
Ok, I've got it reporting, but it ONLY reports on the CORE!
It's doing EXACTLY what I want it to do! Just not on ALL Orbiters as explained in the PnP wiki...

I've checked to make sure my orbiters have registered, and they say YES.
I think I'll try a reboot....

Dan

iirc the plug and play queue announcements/questions show up on the orbiters in the same room (if known), first. After some timeout they are displayed on all orbiters.

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

ddamron

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 962
    • View Profile
    • My LinuxMCE User Page
Re: Does anyone have ANY experience with implementing PnP
« Reply #10 on: December 28, 2007, 07:59:28 pm »
Thanks Hari,

The Room is the one main question I need the user to answer...
so it SHOULD show up on all orbiters...

I'm pretty sure I munched my system... just reinstalling as we speak...
except, I forgot to save my Detection script :)

That's ok, I posted it here somewhere... LOL


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.

ddamron

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 962
    • View Profile
    • My LinuxMCE User Page
Re: Does anyone have ANY experience with implementing PnP
« Reply #11 on: December 28, 2007, 11:49:42 pm »
Hari, Here's another question:

I have created (used) the Configuration devdata[59] in the lighting devices...
This is not defined in the template, but added in code.

When I send param[55] Set DeviceData in the PnP, can I also send the [59] in that string too?

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.

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: Does anyone have ANY experience with implementing PnP
« Reply #12 on: December 29, 2007, 07:00:12 pm »
to let you know, I'm trying to dig through things so I can try to help. I think we're on our own here.

-Thom

ddamron

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 962
    • View Profile
    • My LinuxMCE User Page
Re: Does anyone have ANY experience with implementing PnP
« Reply #13 on: December 29, 2007, 09:42:35 pm »
Thanks Thom!  HUGELY appreciated!
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.

ddamron

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 962
    • View Profile
    • My LinuxMCE User Page
Re: Does anyone have ANY experience with implementing PnP
« Reply #14 on: January 03, 2008, 05:00:14 am »
Ok, I've got the PnP Wizard firing..
it tells me it's configuring the new device, and I'm to select the room...
no lights blinking..
Further investigation shows that the PK_DeviceData didn't get populated.. (where I specify Port/Channel aka insteon ID)

In params_[55] DeviceData of the event [65]DeviceDetected, it says the format is "PK_DeviceData\tIK_DeviceData\n..."
PK_DeviceData is 12 for Port/Channel
IK_DeviceData is (I assume, the value to set..) 11.11.11

so, I set that string to be: "12\t11.11.11\n"

It doesn't work.

digging even FURTHER, in the database Pluto_main in the PNPQueue table..
looking at params[55] for all the other devices shows something interesting...

They all seem to be separated using a PIPE, not a TAB/NewLine

I'm going to try that next, formatting the string as "12|11.11.11"
wish me luck!

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.