set questions

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

set questions

Neil Cherry
I'm playing with the mht file and I've managed to create some
Insteon objects (IPLCI and IPLCA). I've got sample code to
do a set but now I'd like to be able pass that to my iplcs
interface. How do the 2 get tied together?

--
Linux Home Automation         Neil Cherry       [hidden email]
http://www.linuxha.com/                         Main site
http://linuxha.blogspot.com/                    My HA Blog
http://home.comcast.net/~ncherry/               Backup site


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: set questions

David Norwood-3
I am no expert at this, but I'll give it a try.  Your object should derive
from Serial_Item, then you add all the possible states that object can have.
State is really a misnomer.  It's really what commands can you send to a
device and what information can it pass back back.  Each state has a name
(humanly readable) and an id (the string sent to or received from interface
module).  When a state is set, typically the associated id is sent.
Conversely, when a Serial Item is received that matches an id, that state is
set.

I think you should name your items with more descriptive names like
Insteon_Dimmer and Insteon_Appliance.  You can use the type field in the mht
file to handle devices with different features.

David

----- Original Message -----
From: "Neil Cherry" <[hidden email]>
To: <[hidden email]>
Sent: Friday, January 20, 2006 12:59 PM
Subject: [mh] set questions


> I'm playing with the mht file and I've managed to create some
> Insteon objects (IPLCI and IPLCA). I've got sample code to
> do a set but now I'd like to be able pass that to my iplcs
> interface. How do the 2 get tied together?
>
> --
> Linux Home Automation         Neil Cherry       [hidden email]
> http://www.linuxha.com/                         Main site
> http://linuxha.blogspot.com/                    My HA Blog
> http://home.comcast.net/~ncherry/               Backup site
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log
> files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
> ________________________________________________________
> To unsubscribe from this list, go to:
> http://sourceforge.net/mail/?group_id=1365
>
>



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: set questions

Neil Cherry
David Norwood wrote:
> I am no expert at this, but I'll give it a try.  Your object should
> derive from Serial_Item, then you add all the possible states that
> object can have. State is really a misnomer.  It's really what commands
> can you send to a device and what information can it pass back back.  
> Each state has a name (humanly readable) and an id (the string sent to
> or received from interface module).  When a state is set, typically the
> associated id is sent. Conversely, when a Serial Item is received that
> matches an id, that state is set.

So far I think I've done exactly what you've described. I also found
that I don't need to add code directly to the mh executable. I can
add that to the Insteon_Item.pm file in it's sub startup section.
When I send the code to Bruce I'll take care of that.

For states I have the basic on/off/manual/status for the appliance
module and on/off/bri/bright/dim/manual/status commands. It never
get to my interface (I assigned IPLCS just like the X10 commands
in the mht file). I never see these commands get to my iplcs driver.

> I think you should name your items with more descriptive names like
> Insteon_Dimmer and Insteon_Appliance.  You can use the type field in the
> mht file to handle devices with different features.

I can see you're not an assembly language programmer .... ;-)

I decided to start with IPLC... just because I'm lazy and it's
followed the previous X10 logic. I'll switch that to Insteon_x...
before it goes production. It makes the mht file easier to
understand and clarity is more important that easy of typing.

--
Linux Home Automation         Neil Cherry       [hidden email]
http://www.linuxha.com/                         Main site
http://linuxha.blogspot.com/                    My HA Blog
http://home.comcast.net/~ncherry/               Backup site


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: set questions

Neil Cherry
In reply to this post by David Norwood-3
David Norwood wrote:

> or received from interface module).  When a state is set, typically the
> associated id is sent. Conversely, when a Serial Item is received that
> matches an id, that state is set.

I've got it partially working now. I get the string sent to the iplcs
driver but I didn't use the Serial_Item (that sends to a serial port).
What I needed to do was to use X10_Item. An X10_Item is a Serial_Item
(inheritance). I'm not sure if this is 100% correct but I'm starting
to remember all that C++/Java stuff I learned :-/.

At least I'm making some progress. Now If I can only figure out
where the stupid 'X' is getting prepended to my string (XI010557)
and why nothing is being appended to the Insteon address (015557).

--
Linux Home Automation         Neil Cherry       [hidden email]
http://www.linuxha.com/                         Main site
http://linuxha.blogspot.com/                    My HA Blog
http://home.comcast.net/~ncherry/               Backup site


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: set questions

Neil Cherry
Neil Cherry wrote:
> At least I'm making some progress. Now If I can only figure out
> where the stupid 'X' is getting prepended to my string (XI010557)
> and why nothing is being appended to the Insteon address (015557).

OK, I now understand that I have to write my own set function to
completely override the X10_Item's set command. X10 works by
sending <HC><<UC> and <HC><Cmd>. Insteon sends <Addr><Cmd>
the 2 are incompatible! DOH! I should know that as I just
finished stating that 2 1/2 commands take 1 second.

--
Linux Home Automation         Neil Cherry       [hidden email]
http://www.linuxha.com/                         Main site
http://linuxha.blogspot.com/                    My HA Blog
http://home.comcast.net/~ncherry/               Backup site


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365

Loading...