|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
Attempting to get owfs running with Owfs_ItemI've finally wired up my hobby-boards.com 1wire hardware and am trying
to get MH to chat with it. I'm wanting to read some inputs from my doorbell button, garage door sensors, a temp sensor or two, and open/close the garage door. I have the 6 port master hub (2480b, 3x2409P), 8 relay IO board (2408), and a temp board (18s20) I've got owserver working and owhttpd chatting with it. Using owfs-2.7p38. I've put owfs_port in mh.private And my code dir in owfs.pl use Owfs_Item; use Owfs_Thermostat; # Fetch a new temperature value once a minute my $therm1 = new Owfs_Item ( "10.0C7694010800", "Sewing Room" ); my $temp; if (new_minute) { $temp = $therm1->get( "temperature"); # $temp = (($temp*9)/5)+32; print_log "The temperature in the Sewing Room is now $temp degree Fahrenheit"; } Don't seem to get anything useful back out of $temp but don't seem to have any errors either even with debug owfs Am I missing something? Greg ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first ________________________________________________________ To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365 |
|
|
Re: Attempting to get owfs running with Owfs_ItemOn Mon, 05 Jul 2010 21:19:51 -0500, Greg Moeller wrote:
> I've finally wired up my hobby-boards.com 1wire hardware and am trying > to get MH to chat with it. > I'm wanting to read some inputs from my doorbell button, garage door > sensors, a temp sensor or two, and open/close the garage door. I have > the 6 port master hub (2480b, 3x2409P), 8 relay IO board (2408), and a > temp board (18s20) > I've got owserver working and owhttpd chatting with it. Using > owfs-2.7p38. I've put owfs_port in mh.private > And my code dir in owfs.pl > > use Owfs_Item; > use Owfs_Thermostat; > > # Fetch a new temperature value once a minute my $therm1 = new > Owfs_Item ( "10.0C7694010800", "Sewing Room" ); my $temp; > if (new_minute) { > $temp = $therm1->get( "temperature"); > # $temp = (($temp*9)/5)+32; > print_log "The temperature in the Sewing Room is now $temp degree > Fahrenheit"; > } > > Don't seem to get anything useful back out of $temp but don't seem to > have any errors either even with debug owfs > > Am I missing something? Greg, What do you set owfs_port to in your mh.private.ini? The library code defaults to port 3030. I have this: owfs_port = 3030 I start my owfs_server using port 3030 like this: /usr/local/bin/owfs -F -s 3030 -m /mnt/owfs --nozero If you are using something other than port 3030 for your server, then you need to change owfs_port in your mh.private.ini file to match. If you get this working, you can try this next: my $therm1 = new Owfs_DS18S20 ( "10.0C7694010800", "Sewing Room" ); Then you can do $term1->get_temperature( ) anytime you want. The Owfs_DS18S20 has it's own timer to avoid banging on the OWFS bus too often. Regards, Jim ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first ________________________________________________________ To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365 |
|
|
Re: Attempting to get owfs running with Owfs_ItemOn Wed, Jul 07, 2010 at 12:42:17AM +0000, Jim Duda wrote:
> If you are using something other than port 3030 for your server, then you > need to change owfs_port in your mh.private.ini file to match. > > If you get this working, you can try this next: > my $therm1 = new Owfs_DS18S20 ( "10.0C7694010800", "Sewing Room" ); > > Then you can do $term1->get_temperature( ) anytime you want. The > Owfs_DS18S20 has it's own timer to avoid banging on the OWFS bus too > often. Hi Jim, So I had meant to ask you. For now I'm using owfs through XPL since it does out of band querying and caching so that mh never hangs when getting owfs values. Since I had issues getting the owfs perl library working, I never was able to try your code, but I'm curious: does your code prefetch all owfs values and return them from the cache, or it will hit the owfs tree and possibly hang for a bit if the owfs cache is out of date? Marc -- "A mouse is a device used to point at the xterm you want to type in" - A.S.R. Microsoft is to operating systems & security .... .... what McDonalds is to gourmet cooking Home page: http://marc.merlins.org/ ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first ________________________________________________________ To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365 |
|
|
Re: Attempting to get owfs running with Owfs_ItemOn Wed, 07 Jul 2010 22:35:16 -0700, Marc MERLIN wrote:
> On Wed, Jul 07, 2010 at 12:42:17AM +0000, Jim Duda wrote: >> If you are using something other than port 3030 for your server, then >> you need to change owfs_port in your mh.private.ini file to match. >> >> If you get this working, you can try this next: my $therm1 = new >> Owfs_DS18S20 ( "10.0C7694010800", "Sewing Room" ); >> >> Then you can do $term1->get_temperature( ) anytime you want. The >> Owfs_DS18S20 has it's own timer to avoid banging on the OWFS bus too >> often. > > Hi Jim, > > So I had meant to ask you. For now I'm using owfs through XPL since it > does out of band querying and caching so that mh never hangs when > getting owfs values. Marc, If you use the Owfs_DS18S20 or Owfs_DS2450 you'll get what you are looking for (no stalls). What they do is use the "simultaneous" mechanism in order to update the cache. A timer is used to go back and read the value from the cache. The similiar mechanism is used in Owfs_Thermostat which I use to control all of my Heat and AC in my house. I personally don't experience any stalls in my environment, however, I wrote Owfs_Item (and friends) and therefore know how they work. Personally, I think using xAP or xPL is the proper way to handle this sort of thing. I would like to use a backend processor of OWFS like that as well, however, what I have is working for me. Jim ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first ________________________________________________________ To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365 |
| Free embeddable forum powered by Nabble | Forum Help |