Difference between revisions of "Insteon - Setting Up PLM Template"

From LinuxMCE
Jump to: navigation, search
(Making the Driver Plug & Play)
 
(20 intermediate revisions by 8 users not shown)
Line 1: Line 1:
[[Category:Tutorials]]
+
{{Versioninfo|810Status=Q/A|810UpdatedDate=29 JUNE 2010|810UpdatedBy=langstonius|710Status=N/A|710UpdatedDate=29JUNE 2010|710UpdatedBy=langstonius}}
 +
[[category: Insteon]]
 
[[Category:Power Line Control]]
 
[[Category:Power Line Control]]
 
[[Category:GSD| ]]
 
[[Category:GSD| ]]
Line 11: Line 12:
 
:--ddamron
 
:--ddamron
  
Here are the steps to create an Insteon PLM Template.  This driver is written entirely in Ruby.  Please consider this driver complete, and is in Release Candidate 1.  I'm sure there are still a few bugs (although we've ironed most of them out now). The more people testing this code, the more bugs we can find, and get this to a release state.  Once it's in release state, it will be added to sqlcvs and offered via a 'quick' update.
+
:''' UPDATED: 7-FEB-12 Remove instructions on setting up template, use Template 1932
 +
'''
 +
:--Aviator
  
==Supported Devices==
+
:''' UPDATED: Adding Info for 2412n template In addition to posting plm code changes to enable Venstar Thermostat''' --[[User:Trippleg|Trippleg]] 00:06, 25 February 2012 (CET)
This driver supports ONLY the Powerlinc Modem model (PLM)#2412S. The code will NOT work for a model #2414 also known as a Powerlinc CONTROLLER (PLC).
+
  
NOTE:  I am expecting a PLC to arrive in the mail in the next few days.  Support for that device will be sooner than later.
 
  
  
Simplehomenet's EZBridge/EZServ products will be added once this code is stableThese products are a 'wrapper' for the PLM, and hence, use the same codeIntegration will be a matter of adding the 'wrapper' code. (which is done)
+
Here are the steps to create an Insteon PLM Template.  This driver is written entirely in Ruby.  Please consider this driver complete, and is in Release Candidate 1I'm sure there are still a few bugs (although we've ironed most of them out now). The more people testing this code, the more bugs we can find, and get this to a release stateOnce it's in release state, it will be added to sqlcvs and offered via a 'quick' update.
  
 +
{{p}}
  
==Setting up the Template==
+
==Supported Devices==
* Goto [[LinuxMCE Admin Website]]-->Wizard-->Devices-->Interfaces
+
This driver supports ONLY the Powerlinc Modem model (PLM)#2412S, #2413S, #2412U and #2413U. The code will NOT work for a model #2414 also known as a Powerlinc CONTROLLER (PLC).
* Add device-->Add Manufacturer
+
* type 'Smarthome' (and click Add)
+
*Click Close
+
  
===Adding a New Template===
+
NOTE:  I am expecting a PLC to arrive in the mail in the next few days. Support for that device will be sooner than later.
:*Press F5 to refresh the page.
+
:*In the Manufacturer field, select 'Smarthome'.
+
:*Under Device Category, select 'Lighting Interface <-- Interfaces'.
+
:*Add device Template
+
:* select the LAST option:
+
  
<nowiki>"It's a simple, generic serial device controlled by RS232, Ethernet or USB, which you'll control with Pluto's GSD and embedded Ruby snippets (very easy). Examples: Lighting control, alarm panels, surveillance cameras, thermostats, weather stations, a/v equipment with RS232 ports, etc"</nowiki>
+
*Febuary 2, 2012 - PLC support will NOT be added to this driver -Aviator
  
:* Type in 'Insteon PLM' in the name or model#.
+
*Febuary 3, 2012 - Thanks to the work of trippleg, we now have support for the 2412N as well. -Aviator
:* Click Add
+
There will not be a confirmation screen, instead the page will be blank
+
:* Close the Add device Template window.
+
  
===modifying the new Template===
+
This driver now supports  the  Smartlinc 2412N as well. Please use template 2197
* In Webadmin, Select Advanced, Configuration, Device Templates (from the top menu)
+
* In the Device Template field, select 'Insteon PLM'
+
* click 'Pick Device Template' (loads Edit Device Template Popup)
+
:* NOTE the Template Number! write this down. (it will be needed for Plug N Play)
+
:* Make sure 'Implements DCE' is checked (should be)
+
:* In the Comm Method, select RS232
+
===Adding a Code Group===
+
:* Click 'Edit Ruby Codes' ( loads Edit Ruby Codes Popup)
+
::* In the field to the LEFT of 'Create new group', type in 'Insteon PLM'
+
::* click 'Create new group'
+
  
----
+
Simplehomenet's EZBridge/EZServ products will be added once this code is stable. These products are a 'wrapper' for the PLM, and hence, use the same code.  Integration will be a matter of adding the 'wrapper' code. (which is done)
b4 is broken have to run sql manually to add new group
+
close 'Edit Ruby codes' page. Look at 'Edit Device Template' popup page and
+
note '''Device_Category''' and '''Manufacturer''' you will need to set them in sql code below
+
  
''INSERT INTO InfraredGroup (FK_DeviceCategory,FK_Manufacturer,Description,FK_CommMethod,psc_id,psc_batch,psc_user,psc_frozen,psc_mod,psc_restrict) VALUES ('''Device_Category''','''Manufacturer''',"Insteon PLM",2,NULL,NULL,NULL,NULL,NULL,NULL);''
+
{{p}}
+
run this sql and reload 'Edit Ruby codes' page and you should see 'Insteon PLM' in 'Uses Group/Codeset'
+
----
+
  
::* If the 'Uses Group/Codeset' does not change to 'Insteon PLM', repeat the previous 2 steps again.
+
==Setting up the Template==
::* Once the 'Uses Group/Codeset' says 'Insteon PLM' Check 'Discoverable Interfaces'
+
* The template is Plug and Play, configuration should have been taken care of for you.
::* Check 'Ruby Internal Commands'
+
::* click Update
+
  
===Adding Ruby Code===
+
* Goto [[LinuxMCE Admin Website]]-->Wizard-->Devices-->Interfaces
::* In the #756 Report Child Devices field (the big one) copy and paste this code:
+
* Add device-->Template Id 1932 Insteon PLM
:::[[Insteon PLM Ruby Code 756]]
+
For 2412N
::* In the #776 Reset field, copy and paste this code:
+
* Add device -->Template Id 2197 Smartlinc
:::[[Insteon PLM Ruby Code 776]]
+
::* In the #760 Send Command to Child field, copy and paste this code:
+
:::[[Insteon PLM Ruby Code 760]]
+
::* In the #788 StatusReport field, copy and paste this code:
+
:::[[Insteon PLM Ruby Code 788]]
+
::* In the #373 Private Method Listing field, copy and paste this code:
+
:::[[Insteon PLM Ruby Code 373]]
+
::* In the #351 Process IDLE field, copy and paste this code:
+
:::[[Insteon PLM Ruby Code 351]]
+
::* In the #350 Process Incoming Data field, copy and paste this code:
+
:::[[Insteon PLM Ruby Code 350]]
+
::* In the #355 Process Initialize field, copy and paste this code:
+
:::[[Insteon PLM Ruby Code 355]]
+
::* In the #384 Process Receive Command for Child field, copy and paste this code:
+
:::[[Insteon PLM Ruby Code 384]]
+
::* In the #356 Process Release, leave it blank. (no code for now)
+
::* Click Update
+
::* Click Close
+
'''UPDATE''' I had to remove the ruby code from 141 & 161. The PLM wouldn't start due to errors from these two. 8/9/08 williammanda
+
  
===Adding Device Data===
 
:* Press F5 for refresh the 'Edit Device Template' popup
 
:* In the 'Device data' section, in 'Add a New Parameter' select 'COM Port on PC' and click Add.
 
:* in the Comments Field, type
 
COM Port
 
:* in the Default Value field, type
 
/dev/ttyS0
 
:* check the 'Required' and 'Allowed to Modify' boxes
 
:* In the 'Device data' section, in 'Add a New Parameter' select 'COM Port BaudRate' and click Add.
 
:* in the Comments Field, type
 
Baud Rate
 
:* in the Default Value field, type
 
19200
 
:* check the 'Required' and 'Use Master Device List Defaults' boxes
 
:* In the 'Device data' section, in 'Add a New Parameter' select 'Only One Per PC' and click Add.
 
:* in the Comments Field, type
 
Only One Per PC
 
:* in the Default Value field, type
 
1
 
:* In the 'Device data' section, in 'Add a New Parameter' select 'Auto-assign to parents room' and click Add.
 
:* in the Comments Field, type
 
Assign to Parents Room
 
:* in the Default Value field, type
 
1
 
  
===Making the Driver Plug & Play===
+
:* Now, in the COM PORT ON PC, you can select the com port it's on. '''UPDATE''' I didn't see any "COM PORT ON PC" field. You wil need to reload the router first, then you see the "COM PORT ON PC" field. 8/9/08 Williammanda
:* Scroll down to the 'Plug & Play' Section
+
:* Enter These values:
+
::From =
+
0
+
::To =
+
0
+
::Vendor Model ID =
+
2412S
+
::PNP protocol =
+
Proprietary
+
::Serial Number =
+
Insteon PLM
+
::Parms is blank
+
::PNP detection script is
+
88_InsteonPLM.sh
+
::Comment is
+
Insteon PLM
+
  
:* Scroll down to the bottom of the popup window and click Save
 
:* Click Close
 
:* Modify the SECOND LAST LINE of this script (88_InsteonPLM.sh) and change the LAST number to your Template ID.
 
:* add this script file to /usr/pluto/pnp (88_InsteonPLM.sh)
 
User Notes:
 
'''UPDATE 8/9/08''' Use this format to execute the command '''Kate /usr/pluto/pnp/88_InsteonPLM.sh''' missing "/" after pnp. Williammanda
 
'''UPDATE 9/13/08''' If there is a little confusion, hopefully this will clear it up a little bit. 
 
:* You must create the new script, 88_InsteonPLM.sh, in the /usr/pluto/pnp/ directory. 
 
:* Depending on who you have logged in as, you may need super user priviledges to complete the task of creating this file, editing it and changing the ownership.  All 3 of these tasks can be accomplished by prefixing your command with 'sudo' and entering the appropriate super user password.
 
<pre>
 
#!/bin/bash
 
  
echo "Insteon Powerline Modem Detection Script queue $2"
 
/usr/pluto/bin/TestSerialPort -p $3 -P N81 -b 19200 -t "\02\60"  -i 1 -s "\03\05"
 
if [[ "$?" -ne 0 ]]; then
 
echo "It's not an Insteon Powerline Modem"
 
/usr/pluto/bin/MessageSend dcerouter -r 0 $1 1 806 224 $2 13 "$4" 44 0
 
else
 
echo "It is an Insteon Powerline Modem"
 
/usr/pluto/bin/MessageSend dcerouter -r 0 $1 1 806 224 $2 13 "$4" 44 1901
 
fi
 
</pre>
 
:* chmod 755 /usr/pluto/pnp/88_InsteonPLM.sh (make it executable)
 
  
=== Setting up the Generic Serial Device ===
+
'''TODO''' Other than looking on the motherboard for the com port label and guess and check methods, what else can be done to identify the correct com port?
:* on the top, select Wizard, Devices, Generic Serial Devices.  You should now see the InsteonPLM device.
+
:* select the room it's in.
+
:* in the Controlled By box, select CORE
+
:* select Update (at the bottom)
+
:* Now, in the COM PORT ON PC, you can select the com port it's on. '''UPDATE''' I didn't see any "COM PORT ON PC" field. You wil need to reload the router first, then you see the "COM PORT ON PC" field. 8/9/08 Williammanda
+
 
:* select Update (at the bottom)
 
:* select Update (at the bottom)
  
 +
You are Done!
  
 
+
{{p}}
 
+
You are Done!
+
  
 
==Next Steps==
 
==Next Steps==
 
go to [[Running the Insteon PLM Driver for the First Time]]
 
go to [[Running the Insteon PLM Driver for the First Time]]

Latest revision as of 03:41, 20 October 2012

Version Status Date Updated Updated By
710 N/A 29JUNE 2010 langstonius
810 Q/A 29 JUNE 2010 langstonius
1004 Unknown N/A N/A
1204 Unknown N/A N/A
1404 Unknown N/A N/A
Usage Information
UPDATED: 11-MAR-08 Many bugs fixed, X10 fixes...
UPDATED: 13-FEB-08 X10 Support fixed!

--ddamron
UPDATED: 7-FEB-12 Remove instructions on setting up template, use Template 1932

--Aviator
UPDATED: Adding Info for 2412n template In addition to posting plm code changes to enable Venstar Thermostat --Trippleg 00:06, 25 February 2012 (CET)


Here are the steps to create an Insteon PLM Template. This driver is written entirely in Ruby. Please consider this driver complete, and is in Release Candidate 1. I'm sure there are still a few bugs (although we've ironed most of them out now). The more people testing this code, the more bugs we can find, and get this to a release state. Once it's in release state, it will be added to sqlcvs and offered via a 'quick' update.



Supported Devices

This driver supports ONLY the Powerlinc Modem model (PLM)#2412S, #2413S, #2412U and #2413U. The code will NOT work for a model #2414 also known as a Powerlinc CONTROLLER (PLC).

NOTE: I am expecting a PLC to arrive in the mail in the next few days. Support for that device will be sooner than later.

  • Febuary 2, 2012 - PLC support will NOT be added to this driver -Aviator
  • Febuary 3, 2012 - Thanks to the work of trippleg, we now have support for the 2412N as well. -Aviator

This driver now supports the Smartlinc 2412N as well. Please use template 2197

Simplehomenet's EZBridge/EZServ products will be added once this code is stable. These products are a 'wrapper' for the PLM, and hence, use the same code. Integration will be a matter of adding the 'wrapper' code. (which is done)



Setting up the Template

  • The template is Plug and Play, configuration should have been taken care of for you.

For 2412N

  • Add device -->Template Id 2197 Smartlinc


  • Now, in the COM PORT ON PC, you can select the com port it's on. UPDATE I didn't see any "COM PORT ON PC" field. You wil need to reload the router first, then you see the "COM PORT ON PC" field. 8/9/08 Williammanda


TODO Other than looking on the motherboard for the com port label and guess and check methods, what else can be done to identify the correct com port?

  • select Update (at the bottom)

You are Done!



Next Steps

go to Running the Insteon PLM Driver for the First Time