Hi Mick,
Your are listing the properties of the ds2502 chip who only expose eeprom
memory.
For temperature, you have to alter your script to filter on DS18S20:
I don't know pyowfs, but I guess:
s=root.find(type="DS18S20")[0]
and read the properties specific to the DS18S20 sensor with
print s.get("temperature")

Description of properties exposed for your temperature sensor can be found
here:
http://owfs.org/index.php?page=ds18s20

Pascal

2010/3/28 Mick Sulley <m...@sulley.info>

> Hi,
>
> I now have pyowfs working, thanks to the help from Marcus,  but I now
> realise that I really have no idea how to use it.  I have created a
> script based on the examples on http://priesch.co.at/pyowfs
>
> my script is -
>
> #! /usr/bin/env python
> # my sensor is DS18S20, id = 100D54A9010800DC
> from pyowfs import Connection
> root = Connection ("/dev/ttyD1")
> for s in root.find () : print s
> print '-- disabling the cache is reflected in the %r of the sensor --'
> s.use_cache (0)
> for s in root.find () : print s
> print '---- find sensors of a specific type ----'
> s = root.find (type="DS2502")[0]
> print '--- dump all entries for a sensor ---'
> for e in s.iter_entries () : print e
> print '--- access memory ---'
> s.get ("memory")
> print '-- pages is a directory, so lets see whats beneath it :'
> s.get ("pages")
> for e in s.get ("pages").iter_entries () : print e
> print ' --access to individual pages :'
> s.get ("pages").get ("page.1")
> s.get ("pages").get ("page.2")
>
>
> when I run it I get -
>
> m...@mick-desktop:~/Documents/Controls$ ./pyowfs_test.py
> <Sensor /10.0D54A9010800/ - DS18S20>
> <Sensor /09.2179B9050000/ - DS2502>
> -- disabling the cache is reflected in the %r of the sensor --
> <Sensor /10.0D54A9010800/ - DS18S20>
> <Sensor /09.2179B9050000/ - DS2502>
> ---- find sensors of a specific type ----
> --- dump all entries for a sensor ---
> address
> alias
> crc8
> family
> id
> locator
> memory
> <Dir '/09.2179B9050000/pages/'>
> present
> r_address
> r_id
> r_locator
> type
> --- access memory ---
> -- pages is a directory, so lets see whats beneath it :
> page.ALL
> page.0
> page.1
> page.2
> page.3
>  --access to individual pages :
> m...@mick-desktop:~/Documents/Controls$
>
> I am really not sure how to read the temperature from my sensor, it
> doesn't seem to be included in the data returned by the script.  Is
> there a manual saying what the commands do, what commands are available
> etc?
>
> What I am trying to achieve is to read about 20 DS18S20 sensors so I can
> log the values and use it for controlling pumps and valves.  The system
> needs to be reliable so I also want to log any read failures and how
> long each read takes.
>
> Thanks
>
> Mick
>
>
>
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Owfs-developers mailing list
> Owfs-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/owfs-developers
>



-- 
Pascal
www.brain4home.eu
to subscribe, send a mail to <list-subscr...@brain4home.eu>
------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to