well
some problems....
since this is very interesting (remove some work from final user) it´s a
bit loss of work from owlib, maybe at a client side could be easy...
let´s give a example of what could be usefull to implement...
for example... reading voltage from a ADC give you just a voltage... if
voltage is a termocouple, and you have could junction temperature, you can
give temperature of termocouple
what i´m talking? well from two variables we have a new variable
this type of feature request is interesting, since we have a new
interesting information
check that owfs isn´t a string generator
i don´t know how you will use it, but if you want a filesystem with 'single
outputs' maybe you could see fuse filesystem (owfs use it) and implement a
easy bash script to give a beautiful output
if you use http you could add some javascript, or a php script to get more
than one value and give a beautiful output too
in other words...
what you want is: from a file at owfs, call a script that will generate a
file output, it can be a read from a file (inside owfs server) and a text
concat
for example
file XXXXX
output= "hello it´s " + get_val("sensorxyz/temperature") + " C"
maybe we could implement a string parse and 'pseudo' files at owfs... but i
think it´s a big work, ok it´s nice.. we don´t need bash or anyother script
since i´m a heavy php programer somethin liike: "hello it´s
%sensorxyz/temperature% C" could be a more beautiful 'config' string
at owfs we could allow add and remove files, maybe a script file with this
sintax:
file_number_1 = "hellot it´s %sensorxuyz/temperature% C"
hello_world = "hello guy! :)"
and at owfs we could create a directory (user_files) to get this info
for example
when we read:
/user_files/file_number_1
it will give "hellot it´s 4.5 C"
check that 4.5 isn´t only 4.5 it have a lot of space
maybe a %% could be used for raw string output
$$ could be used for a trimmed string output
well just ideas :) if anyone want to work on it, could be really nice :D
maybe in future we could do CAS math, for example
"hellot it´s @(25+sensorxyz/temperature)*0.5@ X"
and it could give (4.5 temperature value):
"hellot it´s 14,75 X"
just ideas :), CAS could/should be rounded, maybe @123123123@10,5@ could
help allowing a output of a formated number from -999999999,99999 to
9999999999,99999
well i think that´s enought to don´t work with external bash scripts, right?
2011/11/5 Colin Law <[email protected]>
> On 5 November 2011 11:41, Eloy Paris <[email protected]> wrote:
> > Hello developers,
> >
> > I am working on a 1-Wire device that provides multi-sensor data, i.e.
> > temperature, humidity, luminosity. I'd like to be able to have an OWFS
> > file that allows me to do this:
> >
> > $ cat /owfs2/uncached/99.010203040506/environs; echo
> > temp=25.2 RH=48% light=252
> >
> > This would allow for easy parsing of environmental data without having
> > to access different files, i.e. one file for temperature, another for
> > humidity, etc.
>
> I can't see how that is useful. I think it is easier to pick up the
> three values from three locations rather than to parse a string to
> find the values.
>
> Colin
>
>
> ------------------------------------------------------------------------------
> RSA(R) Conference 2012
> Save $700 by Nov 18
> Register now
> http://p.sf.net/sfu/rsa-sfdev2dev1
> _______________________________________________
> Owfs-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/owfs-developers
>
>
--
Roberto Spadim
Spadim Technology / SPAEmpresarial
------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers