On Thu, 9 Jun 2011, it would appear that Jim Duda wrote:
> On 06/08/2011 12:34 PM, Karl Suchy wrote:
>> All,
>>
>> I am currently working with a Hobby boards 8-ch I/O that I am controlling some outdoor lights with. I have MH turning them on and off at night using a pl script so I know the system it self works. I am trying to get a web page coded that will allow for the lights to be turned on and off and also have the web page dependent on what the current state of the relay is. However I can not get the page to get the relay state. The code I am using is below. On another note once I get the code working to get the relay sate I want to us Owfs_Item to set the relay state instead of calling the owhttpd address to go it.
>>
>> Any thoughts are appreciated.
>>
>> Karl
>>
>> # Authority: admin
>>
>> # 132 columns max
>> # 3456789112345678921234567893123456789412345678951234567896123456789712345678981234567899123456789012345678911234567892123456789312
>>
>> =begin comment
>> Karl Suchy 6MAY2011
>>
>> =cut
>>
>> use Owfs_Item;
>> use strict;
>>
>> my $html;
>> my $decklights;
>> my $statenow;
>> my $NAME="backyard.pl <http://backyard.pl>";;
>>
>> #Get the arguments.
>>
>> $decklights = new Owfs_Item ( "29.484606000000"); # decklights
>>
>> $statenow = $decklights->get( "PIO.0");
>>
>> print_log ("The Deck Lights are $statenow");
>>
>
> Karl,
>
> If your using the latest SVN, you should be able to do this:
>
> $decklights = new Owfs_DS2408 ( "29.484606000000", "Deck Lights", 0 ); # decklights
>
> $statenow = $decklights->get_sensed( );
>
> This *should* return 1 or 0. If not, let me know and it's easily repaired.
> See lib/Owfs_Item::Owfs_DS2408 package.
>
> Jim
Jim-
Does this work the same way with the DS2413? Thanks.
Joel

On 06/08/2011 12:34 PM, Karl Suchy wrote:
> All,
>
> I am currently working with a Hobby boards 8-ch I/O that I am controlling some outdoor lights with. I have MH turning them on and off at night using a pl script so I know the system it self works. I am trying to get a web page coded that will allow for the lights to be turned on and off and also have the web page dependent on what the current state of the relay is. However I can not get the page to get the relay state. The code I am using is below. On another note once I get the code working to get the relay sate I want to us Owfs_Item to set the relay state instead of calling the owhttpd address to go it.
>
> Any thoughts are appreciated.
>
> Karl
>
> # Authority: admin
>
> # 132 columns max
> # 3456789112345678921234567893123456789412345678951234567896123456789712345678981234567899123456789012345678911234567892123456789312
>
> =begin comment
> Karl Suchy 6MAY2011
>
> =cut
>
> use Owfs_Item;
> use strict;
>
> my $html;
> my $decklights;
> my $statenow;
> my $NAME="backyard.pl <http://backyard.pl>";;
>
> #Get the arguments.
>
> $decklights = new Owfs_Item ( "29.484606000000"); # decklights
>
> $statenow = $decklights->get( "PIO.0");
>
> print_log ("The Deck Lights are $statenow");
>
Karl,
If your using the latest SVN, you should be able to do this:
$decklights = new Owfs_DS2408 ( "29.484606000000", "Deck Lights", 0 ); # decklights
$statenow = $decklights->get_sensed( );
This *should* return 1 or 0. If not, let me know and it's easily repaired.
See lib/Owfs_Item::Owfs_DS2408 package.
Jim

The OP was talking of getting new people to use mh. One of the issues I see
is the lack of documentation/standards. While the list is VERY helpful on
all levels of questions it still leaves a very steep learning curve.
Alternatives to SVN, for example, might be good but from my perspective a
basic framework is a bigger issue. Weather information is a good example.
There seem to be many places people tuck the data. There are some ini
entries to control what variables are populated from what source (at least
for internet data). But some modules seem to use that and some don't. It
seems like the system has largely been abandoned and it isn't clear if this
is intentional, if people just haven't bothered to use it, or if they have
come up with something they think is better. I have thought of trying to
wade through all the different methods and write up something on how to do
it but feel a bit under qualified to do that - I am stuggling just to get
things working myself. Still I might give it a shot with some guidance from
others on the list.
There have been numerous times that I have found a module that seems to do
what I want and then I find out that some details of how to set up the ini
variables or some such isn't documented anywhere. Maybe it was at one time
and got dropped or ?? I end up spending a lot of time going down rabbit
trails that don't have much to do with what I started.
Very frustrating as mh is very flexible and has a lot of code for different
hardware but I haven't gotten very far with it. Not sure exactly how to
improve the situation... Just my 2 cents.
--
View this message in context: http://old.nabble.com/Time-for-a-new-version-of-MisterHouse--tp31800253p31813117.html
Sent from the Misterhouse - User mailing list archive at Nabble.com.

On 6/8/2011 2:48 PM, Johan wrote:
> Hi there,
>
> I'm playing with xPL and I have an "input" which I can control and
> sends xPL messages to Mister House, and also an "output" which
> receives xPL messages from Mister House.
>
> My xPL objects are defined in items.mht, as an input and output.
>
> This works as intended:
>
> set $xpl_output_1 ON if state_now $RF_Control_6 eq ON;
> set $xpl_output_1 OFF if state_now $RF_Control_6 eq OFF;
>
> Whenever Mister House receives xPL messages relating to $RF_Control_6,
> it correctly sends an xPL messages for $xpl_output_1.
>
> So far, so good.
>
> However, I would expect the following should also work, as xPL_Item
> inherits from Generic_Item:
>
> $RF_Control_6->tie_items($xpl_output_1);
>
> But it doesn't :-(
>
> Am I missing something? Or is this a feature? ;-)
Need to see your items.mht file (or at least the portion that defines
the above items) in order to replicate the issue.