1 Apr 2011 11:11
Re: Aliases on DS18B20
Vincent Danjean <vdanjean.proj <at> free.fr>
2011-04-01 09:11:17 GMT
2011-04-01 09:11:17 GMT
On 31/03/2011 22:04, Paul Alfille wrote:
> One thing I didn't mention in the 2.8p8 release notes is that there is
> a new "/settings/alias/list" that gives the sn=alias\n list. It should
> be in format suitable for an alias file.
>
> Probably writing a "" (zero length string) would remove an alias and
> writing an alias would add an alias.
>
> Are you sure we need multiple aliases for the same device? It adds
> some complexity.
For myself, I'm questioning the use of alias at the low-level interface.
The advantage is that, if aliases are visible here, all high-level interface
will automatically see them.
However, this means a non-uniform way to access sensors for automatic
scripts. Moreover, current aliases does not hide the topology of the
1-wire network (in case of use of 2409 for example), still requiring that
user know on which branch the sensor in plug-in.
What about setting up one (or two for uncached access) special directory
(/aliases and /uncached/aliases ?) where the content are 'shortcuts' (can be
symlinks on owfs or plain directory for owserver, owhttpd, ...) to sensors
or even to property of sensor. This idea would be that any path under
/aliases would be managed as if the target has been given.
The availability of /settings/alias/list means that the 'alias' property
is not really required (the same info can be got from the new file), so it
can be removed.
And some special /settings/alias/{add,remove,rename} file, write-only,
could be used to manage these aliases.
Future development can allows to have subdirectories under /aliases
(Continue reading)
RSS Feed