On 21/03/2011 22:22, nick wrote:
> This interests me greatly. So with my network below, i would have to poll 
> each alarm directory in turn. Indicated by <<<<<<<<<< ?

Yes, because each poll means a specific 1-wire command on the hardware.

> Thus on each ds2409 coupler if both branches are in use (ie contain
> ds1820s on them) this would need each branch's alarm directory polled,
> from the ow uncached directory.

You can also do it from the normal (not uncached) directory (but, in this
case, you cannot be sure that a 1-wire command is executed on the hardware.
On the contrary, you limit the stress on the hardware, even if you poll
often)

> This seems a shame as I would have thought a single top level directory
> with each device in the alarm state contained within would have more
> merit,

This would means that owfs does more than only emitting commands and
providing the results. It is already the case as owfs has a cache and
a rename feature. But, for me, additional features should be provided
in higher interfaces (ie in software built on top of owfs)

> but of course the ow Alarm Search command wouldn't find the other
> branches unless the coupler is switched between branches?.

yes. owfs only expose the result of existing hardware commands.

> But then again couldn't the alarms all be grouped together by
> owfs into a top level directory?...

Do it yourself : each time you read a sub-alarm directory, update
a global state of all the alarm. And reciprocally, if you look into
your global state, you can force a poll (ie read) in each alarm
subdirectory.
  owfs is not triggered when an alarm occurs. It only discovers it
when a read is done in a alarm subdirectory.

> /"If the measured temperature is lower than or equal to TL or
> higher than TH, an alarm condition exists and an alarm flag is
> set inside the DS18S20. This flag is updated after every temperature
> measurement; therefore, if the alarm condition goes away, the flag
> will be turned off after the next temperature conversion."/
> 
> ..as surely this flag is picked up by owfs when it polls the
> ds1820s each time? A new feature maybe? /var/1wire/current_alarms/*

owfs does not do any poll by itself ! And if a poll is triggered by
a read, the software that does a read can cache the result and
regroup all of them in a convenient structure.

> At the moment this leads me to think the ds1820 alarm function (at
> least for me) is not worth the effort as i can code a more responsive
> event monitor at the software end, just by reading the cached values.
> Others may need faster resolution or only need to see alarmed sensors
> (especially if they have 10s/100s of sensors).
> 
> My current setup checks outdoor and greenhouse temp to determine
> whether to turn on a 240VAC power switch to heat up (or cool down)
> the greenhouse. owfs polls every 15 seconds?

owfs never poll on itself !

> so this resolution is
> more than enough, when my monitor polls every 15 minutes.>

  Regards,
    Vincent

------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to