LinuxMCE Forums
General => Developers => Topic started by: ddamron 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
-
BuMp
HeLp!!!
PlEaSe!
-
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
-
I'm not talking about the script...
it's the device detection... INSIDE my driver..
I'm trying to report child devices...
-
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..
-
NP, thanks anyway...
-
Ok, I found some mistakes...
I dug into the database, and found I was using wrong values..
Here's my modified test code:
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...
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>
-
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
-
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....
-
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
-
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
-
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?
-
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
-
Thanks Thom! HUGELY appreciated!
-
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
-
Heh, That was it... Now my values are populating into the device.
That help line needs to be changed.. caused me hours of grief..
Light is still not blinking, but maybe I have to set more data, or not set some data I'm setting...
I'm continuing with Trial and error... Ugh!
Dan
-
Ok, I've confirmed all my devicedata is now getting into the device.
I still can't seem to get the light to blink...
the DCE isn't sending me any 776 commands... I'm wondering if I've got the right 'wizard'..
Anyone know how to select the Lighting wizard?
-
BTW, Once I select the room, it installs the device, and tells me it needs to restart router..
If I click OK (Don't restart), and go webadmin, select the light in question, and send it ON/OFF/50% commands from there, they all go through..
So I know I'm handling the commands properly...
-
Ok, I've confirmed all my devicedata is now getting into the device.
I still can't seem to get the light to blink...
the DCE isn't sending me any 776 commands... I'm wondering if I've got the right 'wizard'..
Anyone know how to select the Lighting wizard?
The lighting wizard is triggered when it detects a device of type "Lighting Interface." If you change your interface type in the PLM template to this, it will trigger the lighting wizard when the device is discovered.
-
Ok, I've confirmed all my devicedata is now getting into the device.
I still can't seem to get the light to blink...
the DCE isn't sending me any 776 commands... I'm wondering if I've got the right 'wizard'..
Anyone know how to select the Lighting wizard?
The lighting wizard is triggered when it detects a device of type "Lighting Interface." If you change your interface type in the PLM template to this, it will trigger the lighting wizard when the device is discovered.
That sounds like it's what I need!!!!
Currently, my PLM is a device type Interface/Specialized... I will try that now.
Thanks PeteK!
-
Hmm... it's still not working...
I've changed my PLM's device category to Lighting Interface...
Device Template PLM, device category Lighting Interface, manufacturer Smarthome
I'm firing the wizard, it's firing ok.. but looking at the logs, it seems the device isn't created until the wizard finishes..
I'm wondering if I have to REPORT CHILD DEVICES first...
That said, If I run the wizard, then go in and change the newly created device (remove the room), then run the wizard again, it sees the device already created, allows me to select the room, but again, it's not triggering any commands to the PLM during the lighting wizard...
I'm almost thinking it may be easier to write my own wizard... LOL
I'll keep stabbing at it...
Any other comments, even if they're in left field, would be helpful.. Sometimes, it takes someone else to look at the problem differently...
Thanks guys.
Dan
-
Hmm... it's still not working...
I've changed my PLM's device category to Lighting Interface...
Device Template PLM, device category Lighting Interface, manufacturer Smarthome
I'm firing the wizard, it's firing ok.. but looking at the logs, it seems the device isn't created until the wizard finishes..
I'm wondering if I have to REPORT CHILD DEVICES first...
That said, If I run the wizard, then go in and change the newly created device (remove the room), then run the wizard again, it sees the device already created, allows me to select the room, but again, it's not triggering any commands to the PLM during the lighting wizard...
I'm almost thinking it may be easier to write my own wizard... LOL
I'll keep stabbing at it...
Any other comments, even if they're in left field, would be helpful.. Sometimes, it takes someone else to look at the problem differently...
Thanks guys.
Dan
Dan... I'll see if I can get someone to give you a pointer to get this working today. Most of the Pluto guys are back today but they are snowed under with fixes/changes etc to get the 0710 out the door so I can't promise anything... but I'll see what i can do ;-)
-
Thanks Totallymaxed,
I'm at a bit of a loss on this... I think I have all the steps, and I think I'm doing them in the right order, but can't seem to get the proper outcome.
I'm also in a bit of a pickle... I'd like to categorize my device as an Interface/Specialized rather than Interface/Lighting.. as I also sense non-lighting devices..
EZRain1, EZX10RF, EZIO8SA all sense properly... though I haven't attempted any kind of a wizard with them yet..(Lighting is more important at this time)
I have a headache.
Dan
-
I'm still at a loss on this...
Also, I'm trying to find the zwave source in the web svn.. can't seem to find it..
-
I'm still at a loss on this...
Also, I'm trying to find the zwave source in the web svn.. can't seem to find it..
http://svn.charonmedia.org/trac.cgi/browser/trunk/src/ZWave
the zensys api is in the ZW_*.h files.
maybe also of you interest:
http://svn.charonmedia.org/trac.cgi/browser/trunk/src/Lighting_Plugin
best regards,
Hari
-
I'm still at a loss on this..
If anyone knows how to get the LIGHTING Wizard to fire, I'd really like to know how.
How about if anyone has a 0710 zwave log with the detection inside?
0710 has much more debug output, or possibly a DCERouter log file with the detection..
Regards,
Dan
-
I can supply a ZWave log. I have confirmed that there is no change the 704 ZWave code in 710 yet. However the log is 700K for on e day. (I got Chris to put a fix in, it was going into the GB's.)
I have a problem with the light flashing drill as well on ZWave. It works on some devices and not on others. I could not figure out why. Nothing obvious from the Zniffer.
-
1audio,
Thanks for the offer, but TSCHAK supplied me with a log file from both Zwave and dcerouter. (a couple days ago)
ok, I've gone through the log, I think the main thing I missed was registering a message interceptor...
but, I shouldn't need to register a message interceptor for myself...
After a LOT of playing around, and a step back..
I went into the wizard,
noticed the lighting there...
viola
the lighting wiz works
Lights are sensed.
Lights are turned ON/OFF via 760
I was doing it right, all the time.
the step I missed, (and still want to find) is HOW to FIRE the lighting wizard automagically.
For that matter, How to FIRE *ANY* wizard from a DCE Command/Event.
as I will need to fire different wizards, Lighting, Climate, Irrigation, etc.
-
ok, an update with this Plug and Play...
it seems I'm dealing with TWO different issues here, and the commands/events are mixed up for me.
The first issue is the parent device itself, along with a shell script, what should the parent fire to tell the system 'Hey, I'm a PLM'.
The second issue is the child devices. Ideally, I'd like to be able to 'add' children on the fly, and automagically start the appropriate wizard, whether it be the lighting wizard, or irrigation, or what ever.
I know you can manually run the wizard, and then select Lighting, that works.
but I'd like to see if I can automate the procedure for OTHER devices (ie not just lighting)
Any help on this would be greatly appreciated!
Dan