> On 06 Dec 2016, at 11:04, Sven Giermann <sven.gierm...@gmail.com> wrote:
> 
> I have no idea of what pyownet does or how it is implemented...
> But I know from another project, that DS1820 reports 85.0 deg C when it 
> encounters errors. Unfortunately without any other error flag! That's why I 
> implemented a way to accept a temperature of 85.0 only, if the previously 
> read temp was in that range (82-88), otherwise I just skip this reading and 
> try once again.
> 
> Maybe pyownet knows of this behaviour (it's by design and described in DS1820 
> datasheet) and therefore throws an error, when it reads exactly 85 deg C?!

No, the pyownet.protocol module is low level, and makes no assumptions on the 
owserver protocol message semantics.

In particular the pyownet.protocol.OwnetError exception is raised only when the 
owserver returns an error code in the reply message: see
http://owfs.org/index.php?page=owserver-protocol 
<http://owfs.org/index.php?page=owserver-protocol> and 
http://pyownet.readthedocs.io/en/latest/protocol.html#pyownet.protocol.OwnetError
 
<http://pyownet.readthedocs.io/en/latest/protocol.html#pyownet.protocol.OwnetError>

In this case the error condition should be totally server side, and independent 
from a particular client implementation.

BTW: in module/owlib/src/c/ow_1820.c

static ZERO_OR_ERROR FS_10latesttemp(struct one_wire_query *owq)
{
        return GB_to_Z_OR_E(OW_10latesttemp(&OWQ_F(owq), 1, PN(owq)));
}

static ZERO_OR_ERROR FS_22latesttemp(struct one_wire_query *owq)
{
        return GB_to_Z_OR_E(OW_22latesttemp(&OWQ_F(owq), 1, PN(owq)));
}

These lines should be responsible to throw an exception when reading 85 °C.

S.

> 
> 
> 2016-12-06 9:42 GMT+01:00 Martin Patzak (GMX) <martin.pat...@gmx.de 
> <mailto:martin.pat...@gmx.de>>:
> 
> 
> On 12/06/2016 01:41 AM, Jan Kandziora wrote:
> > Am 05.12.2016 um 09:35 schrieb Martin Patzak (GMX):
> >>> The new node works fine too, but unfortunately I get an error, when a
> >>> sensor is right at 85 deg C:
> >>>
> >>>
> >>> /Traceback (most recent call last)://
> >>> //  File "read_a_temp.py", line 15, in <module>//
> >>> //    sensed = op.read('/28.676A20060000/latesttemp')//
> >>> //  File "/home/mnm/pyownet/src/pyownet/protocol.py", line 545, in read//
> >>> //    raise OwnetError(-ret, self.errmess[-ret], path)//
> >>> //pyownet.protocol.OwnetError: [Errno 22] legacy - Invalid
> >>> transaction: '/28.676A20060000/latesttemp'
> >>> /
> >> hold on, my test was done in a rush, so I forgot to stop the task
> >> reading the temps from the temperature node.
> >> Could that have anything to do with error message?
> >>
> >> I cant test more today, because that was the last sensor over 85 deg C,
> >> so I have to wait until tomorrow morning...
> >>
> > Please confirm that you can repeat the error condition first.
> yes, I could repeat it today. This time I stopped first the other task
> reading the temperature nodes.
> I cannot read a straight value of 85 degC, instead I get this
> transaction error. The values I can read are just above or just below 85
> degC.
> 
> I can provide debug from owserver if it would help you figuring out
> whats going on. Please advise.
> 
> You mentionened the manuals recieved an update regarding the new
> latesttemp node. I am sorry to ask this, but where do I find this. I did
> update owfs-doc to 3.1p4 but cannot find latesttemp anywhere. Is it
> somewhere else I should be looking?
> 
> Martin
> 
> 
> ------------------------------------------------------------------------------
> Developer Access Program for Intel Xeon Phi Processors
> Access to Intel Xeon Phi processor-based developer platforms.
> With one year of Intel Parallel Studio XE.
> Training and support from Colfax.
> Order your platform today.http://sdm.link/xeonphi <http://sdm.link/xeonphi>
> _______________________________________________
> Owfs-developers mailing list
> Owfs-developers@lists.sourceforge.net 
> <mailto:Owfs-developers@lists.sourceforge.net>
> https://lists.sourceforge.net/lists/listinfo/owfs-developers 
> <https://lists.sourceforge.net/lists/listinfo/owfs-developers>
> 
> ------------------------------------------------------------------------------
> Developer Access Program for Intel Xeon Phi Processors
> Access to Intel Xeon Phi processor-based developer platforms.
> With one year of Intel Parallel Studio XE.
> Training and support from Colfax.
> Order your platform 
> today.http://sdm.link/xeonphi_______________________________________________
> Owfs-developers mailing list
> Owfs-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/owfs-developers

------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to