Re: [Owfs-developers] python code printing /statistics

2020-08-17 Thread Martin Patzak
Sorry Mick, my notes were not detailed enough. Glad you got your system
back on track.

I cannot confirm that CRC16 goes up by 8 - I used exactly your lines and
got the CRC16 go up by one exactly every time.
First, someone familiar with the code should try to find the source of
the bug.
Maybe we find out why your error goes up by 8 and not 1

On 17.08.20 11:04, Mick Sulley wrote:
> Thanks Stefano, I have removed it and reinstalled the owserver
> raspbian packages and it is back again at 3.2p3
>
> Here is what I see on CRC_errors -
>
> pi@pi4B:~/v12_5 $ python3
> Python 3.7.3 (default, Dec 20 2019, 18:57:59)
> [GCC 8.3.0] on linux
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import pyownet
> >>> owp = pyownet.protocol.proxy(persistent=True)
> >>> owp.read('/statistics/errors/CRC16_errors').decode()
> '  16'
> >>> owp.write('/simultaneous/temperature', b'1')
> >>> owp.read('/statistics/errors/CRC16_errors').decode()
> '  16'
> >>> owp.write('/simultaneous/voltage', b'1')
> >>> owp.read('/statistics/errors/CRC16_errors').decode()
> '  24'
> >>>
>
> So writing to simultaneous/temperature is fine, but
> /simultaneous/voltage increases the CRC error count by 8
>
>
> Mick
>
>
> On 17/08/2020 00:10, Stefano Miccoli via Owfs-developers wrote:
>
>
> ___
> Owfs-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/owfs-developers

___
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] python code printing /statistics

2020-08-17 Thread Mick Sulley
Thanks Stefano, I have removed it and reinstalled the owserver raspbian 
packages and it is back again at 3.2p3


Here is what I see on CRC_errors -

pi@pi4B:~/v12_5 $ python3
Python 3.7.3 (default, Dec 20 2019, 18:57:59)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyownet
>>> owp = pyownet.protocol.proxy(persistent=True)
>>> owp.read('/statistics/errors/CRC16_errors').decode()
'  16'
>>> owp.write('/simultaneous/temperature', b'1')
>>> owp.read('/statistics/errors/CRC16_errors').decode()
'  16'
>>> owp.write('/simultaneous/voltage', b'1')
>>> owp.read('/statistics/errors/CRC16_errors').decode()
'  24'
>>>

So writing to simultaneous/temperature is fine, but 
/simultaneous/voltage increases the CRC error count by 8



Mick


On 17/08/2020 00:10, Stefano Miccoli via Owfs-developers wrote:


___
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] python code printing /statistics

2020-08-16 Thread Stefano Miccoli via Owfs-developers


> On 17 Aug 2020, at 00:23, Mick Sulley  wrote:
> 
> OK I have installed it, I had to use sudo make install as it complained that 
> it didn't have permission to created in /opt, but I think it is installed 
> now, however
> 
> 

`sudo install` is quite dangerous… it should be done only in a controlled 
environment … like fakeroot
I fear that with `sudo install` you have overwritten 
/lib/systemd/system/owserver.service etc.

Maybe it is better to 

- make a backup (just in case)
- run `sudo uninstall` (which should remove all files installed by sudo 
install) 
- reinstall the owserver raspbian packages.
> pi@pi4B:~ $ owdir
> -bash: owdir: command not found
> pi@pi4B:~ $ /opt/owfs/bin/owserver --ver
> /opt/owfs/bin/owserver version:
> 3.2p2
> libow version:
> 3.2p2
> pi@pi4B:~ $ 
> 
> Is 3.2p2 the correct version?  I thought it should be 3.2p4.
> 
> 

It should be 3.2p3 (since 3.2p4 is not yet released)

> Also I cannot get owdir to work
> 
> pi@pi4B:~ $ owdir
> -bash: owdir: command not found
> pi@pi4B:~ $ /opt/owfs/bin/owdir
> pi@pi4B:~ $ 
> 
> I have sensors connected and they were working, have I missed something?  
> 
> I tried starting the service -
> 
> pi@pi4B:~ $ sudo systemctl start owserver
> Failed to start owserver.service: Unit owserver.service is masked.
> pi@pi4B:~ $ sudo service owserver start
> Failed to start owserver.service: Unit owserver.service is masked.
> pi@pi4B:~ $ 
> 
> 

This should be because the systemd files were overwritten… I’m really sorry, 
maybe I should write detailed instructions on how to test a new version without 
`sudo install`.

S.

> On 16/08/2020 21:46, Martin Patzak wrote:
>> My CRC16 value goes only up by one for setting /simultanous/voltage to '1'
>> I only tested with setting this once and read the CRC16 back right away 
>> without delay.
>> 
>> Here is my personal notes for installing owfs from github - I hope it helps 
>> you - if you have the code you can of course skip the git-hub part
>> In this notes I used some special parameters, which you do not have to use 
>> of course, but it illustrates that you have the ability to influence quite a 
>> number of things during configure
>> 
>> additionally, you should not run anything as sudo - especially not untested 
>> patches - so Stefano indicated how to circumvent this easily with setting a 
>> symlink (see last line)
>> 
>>> get owfs
>>> 
>>> git clone git://git.code.sf.net/p/owfs/code owfs-code
>>> 
>>> then cd into owfs-code
>>> 
>>> ./bootstrap# an error appeared and I had to install packages 
>>> # ./bootstrap: 12: ./bootstrap: libtoolize: not found
>>> # aclocal: not found
>>> # pkg-config, libtool, automake
>>> 
>>> ./configure
>>> ./configure --disable-swig --prefix=/home/mnm/owfs/ 
>>> --program-suffix=_test85C --with-systemdsystemunitdir=/home/mnm/owfs/systemd
>>> 
>>> make
>>> 
>>> make install
>>> 
>>> ### no more running with sudo !!! ###
>>> link owserver_ to dir /usr/bin so it can be found when executing it 
>>> with sudo
>>> 
>>> sudo ls -s /home/mnm/owfs/bin/owserver_>> /usr/bin/owserver_
>> 
>> 
>> On 16.08.20 21:59, Mick Sulley wrote:
>>> First, I noticed a typo in my mail, the CRC value increases by 8, not 1, 
>>> when I set /simultaneous/voltage.  My code was setting /temperature then 
>>> /voltage, I wondered if a delay between them may help, tried and it did 
>>> not.  I also tried setting /voltage first then /temperature but it still 
>>> increased CRC on /voltage.
>>> 
>>> Yes I do have a voltage device, a DS2437.  I only have one, so setting 
>>> /simultaneous/voltage is probably not going to save any time, but it seemed 
>>> the right way to do it.
>>> 
>>> I looked at issue 55, don't know if that is related on not.  I am happy to 
>>> test 3.2p4 but don't know how to do it.  
>>> 
>>> If I download from https://sourceforge.net/projects/owfs/ 
>>>   I get 3.2p1 which is what I was 
>>> running anyway.
>>> 
>>> I download the .zip from https://github.com/owfs/owfs 
>>>   unpacked into a new directory and tried to 
>>> follow the instructions in INSTALL, this is what I got -
>>> 
>>> pi@pi4B:~/owfs/owfs-master $ ls
>>> acinclude.m4COPYING Makefile.amRELEASE.md
>>> AUTHORS COPYING.LIB man2md release.pl
>>> autom4te.cache  debian  module src
>>> bootstrap   description-pak NEWS   TODO
>>> ChangeLog   Dockerfile.release  README.DEVELOPERS  update_wiki_manpages
>>> configure.acINSTALL README.md
>>> pi@pi4B:~/owfs/owfs-master $ ./configure
>>> -bash: ./configure: No such file or directory
>>> pi@pi4B:~/owfs/owfs-master $ 
>>> 
>>> I ran out of knowledge at this point.  If you can tell me how to install it 
>>> I will test it out.
>>> 
>>> Thanks
>>> 
>>> Mick
>>> 
>>> 
>>> 
>>> On 16/08/

Re: [Owfs-developers] python code printing /statistics

2020-08-16 Thread Stefano Miccoli via Owfs-developers
Thanks, but I just checked it myself, and I can confirm that it is not related 
to issue #55:

$ echo $(owread /statistics/errors/CRC16_errors)
2
$ owwrite /simultaneous/voltage 1
$ echo $(owread /statistics/errors/CRC16_errors)
3

So writing to /simultaneous/voltage increases the CRC16 error count by one… 
also on the current master branch.

Stefano

PS:
If you download from git, you have to run ./bootstrap before ./configure. 

> On 16 Aug 2020, at 21:59, Mick Sulley  wrote:
> 
> First, I noticed a typo in my mail, the CRC value increases by 8, not 1, when 
> I set /simultaneous/voltage.  My code was setting /temperature then /voltage, 
> I wondered if a delay between them may help, tried and it did not.  I also 
> tried setting /voltage first then /temperature but it still increased CRC on 
> /voltage.
> 
> Yes I do have a voltage device, a DS2437.  I only have one, so setting 
> /simultaneous/voltage is probably not going to save any time, but it seemed 
> the right way to do it.
> 
> I looked at issue 55, don't know if that is related on not.  I am happy to 
> test 3.2p4 but don't know how to do it.  
> 
> If I download from https://sourceforge.net/projects/owfs/ 
>   I get 3.2p1 which is what I was 
> running anyway.
> 
> I download the .zip from https://github.com/owfs/owfs 
>   unpacked into a new directory and tried to 
> follow the instructions in INSTALL, this is what I got -
> 
> pi@pi4B:~/owfs/owfs-master $ ls
> acinclude.m4COPYING Makefile.amRELEASE.md
> AUTHORS COPYING.LIB man2md release.pl
> autom4te.cache  debian  module src
> bootstrap   description-pak NEWS   TODO
> ChangeLog   Dockerfile.release  README.DEVELOPERS  update_wiki_manpages
> configure.acINSTALL README.md
> pi@pi4B:~/owfs/owfs-master $ ./configure
> -bash: ./configure: No such file or directory
> pi@pi4B:~/owfs/owfs-master $ 
> 
> I ran out of knowledge at this point.  If you can tell me how to install it I 
> will test it out.
> 
> Thanks
> 
> Mick
> 
> 
> 
> On 16/08/2020 17:29, Stefano Miccoli via Owfs-developers wrote:
>> The CRC16 error could be related to https://github.com/owfs/owfs/issues/55 
>> 
>> 
>> The version on master is already patched, and will be released in 3.2p4. If 
>> possible check if the current version on master works as expected.
>> 
>> Stefano
>> 
>>> On 16 Aug 2020, at 18:22, Martin Patzak >> > wrote:
>>> 
>>> I tested it and I can confirm that writing to 
>>> /uncached/simultaneous/voltage increases the CRC16_error by one. 
>>> 
>>> Mick, do you have voltage devices on your network? (I hope it is not a 
>>> stupid question)
>>> I don't have such devices, so I cannot test this further...
>>> 
>>> Greetings,
>>> Marty
>>> 
>>> On 13.08.20 01:04, Mick Sulley wrote:
 I have been doing some more testing and have a couple of issues.  My code 
 sets simultaneous/temperature, waits a couple of seconds then reads 
 latesttemp from each sensor.
 
 Reading latesttemp generally takes 0.07 seconds BUT every 120 seconds 
 every sensor takes 0.75 seconds for a single loop, then back to 0.07 
 seconds.  (/settings/timeout/presence is set to 120)
 My understanding is that simultaneous/voltage works in the same way, 
 however when I set it my CRC_errors increases by 8.  Why is this?
 Cheers
 
 Mick
 
 
>>> 
>>> ___
>>> Owfs-developers mailing list
>>> [email protected] 
>>> 
>>> https://lists.sourceforge.net/lists/listinfo/owfs-developers 
>>> 
>> 
>> 
>> 
>> 
>> ___
>> Owfs-developers mailing list
>> [email protected] 
>> 
>> https://lists.sourceforge.net/lists/listinfo/owfs-developers 
>> 
> ___
> Owfs-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/owfs-developers

___
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] python code printing /statistics

2020-08-16 Thread Mick Sulley
OK I have installed it, I had to use sudo make install as it complained 
that it didn't have permission to created in /opt, but I think it is 
installed now, however


pi@pi4B:~ $ owdir
-bash: owdir: command not found
pi@pi4B:~ $ /opt/owfs/bin/owserver --ver
/opt/owfs/bin/owserver version:
    3.2p2
libow version:
    3.2p2
pi@pi4B:~ $

Is 3.2p2 the correct version?  I thought it should be 3.2p4.

Also I cannot get owdir to work

pi@pi4B:~ $ owdir
-bash: owdir: command not found
pi@pi4B:~ $ /opt/owfs/bin/owdir
pi@pi4B:~ $

I have sensors connected and they were working, have I missed something?

I tried starting the service -

pi@pi4B:~ $ sudo systemctl start owserver
Failed to start owserver.service: Unit owserver.service is masked.
pi@pi4B:~ $ sudo service owserver start
Failed to start owserver.service: Unit owserver.service is masked.
pi@pi4B:~ $



On 16/08/2020 21:46, Martin Patzak wrote:

My CRC16 value goes only up by one for setting /simultanous/voltage to '1'
I only tested with setting this once and read the CRC16 back right 
away without delay.


Here is my personal notes for installing owfs from github - I hope it 
helps you - if you have the code you can of course skip the git-hub part
In this notes I used some special parameters, which you do not have to 
use of course, but it illustrates that you have the ability to 
influence quite a number of things during configure


additionally, you should not run anything as sudo - especially not 
untested patches - so Stefano indicated how to circumvent this easily 
with setting a symlink (see last line)



get owfs

    git clone git://git.code.sf.net/p/owfs/code owfs-code

then cd into owfs-code

    ./bootstrap        # an error appeared and I had to install packages
    # ./bootstrap: 12: ./bootstrap: libtoolize: not found
    # aclocal: not found
    # pkg-config, libtool, automake

    ./configure
    ./configure --disable-swig --prefix=/home/mnm/owfs/ 
--program-suffix=_test85C 
--with-systemdsystemunitdir=/home/mnm/owfs/systemd


    make

    make install

### no more running with sudo !!! ###
link owserver_ to dir /usr/bin so it can be found when 
executing it with sudo


    sudo ls -s /home/mnm/owfs/bin/owserver_/usr/bin/owserver_



On 16.08.20 21:59, Mick Sulley wrote:


First, I noticed a typo in my mail, the CRC value increases by 8, not 
1, when I set /simultaneous/voltage.  My code was setting 
/temperature then /voltage, I wondered if a delay between them may 
help, tried and it did not.  I also tried setting /voltage first then 
/temperature but it still increased CRC on /voltage.


Yes I do have a voltage device, a DS2437.  I only have one, so 
setting /simultaneous/voltage is probably not going to save any time, 
but it seemed the right way to do it.


I looked at issue 55, don't know if that is related on not. I am 
happy to test 3.2p4 but don't know how to do it.


If I download from https://sourceforge.net/projects/owfs/ I get 3.2p1 
which is what I was running anyway.


I download the .zip from https://github.com/owfs/owfs unpacked into a 
new directory and tried to follow the instructions in INSTALL, this 
is what I got -


pi@pi4B:~/owfs/owfs-master $ ls
acinclude.m4    COPYING Makefile.am RELEASE.md
AUTHORS COPYING.LIB man2md release.pl
autom4te.cache  debian  module src
bootstrap   description-pak NEWS   TODO
ChangeLog   Dockerfile.release  README.DEVELOPERS 
update_wiki_manpages

configure.ac    INSTALL README.md
pi@pi4B:~/owfs/owfs-master $ ./configure
-bash: ./configure: No such file or directory
pi@pi4B:~/owfs/owfs-master $

I ran out of knowledge at this point.  If you can tell me how to 
install it I will test it out.


Thanks

Mick


On 16/08/2020 17:29, Stefano Miccoli via Owfs-developers wrote:
The CRC16 error could be related to 
https://github.com/owfs/owfs/issues/55


The version on master is already patched, and will be released in 
3.2p4. If possible check if the current version on master works as 
expected.


Stefano

On 16 Aug 2020, at 18:22, Martin Patzak > wrote:


I tested it and I can confirm that writing to 
/uncached/simultaneous/voltage increases the CRC16_error by one.


Mick, do you have voltage devices on your network? (I hope it is 
not a stupid question)

I don't have such devices, so I cannot test this further...

Greetings,
Marty

On 13.08.20 01:04, Mick Sulley wrote:


I have been doing some more testing and have a couple of issues.  
My code sets simultaneous/temperature, waits a couple of seconds 
then reads latesttemp from each sensor.


 1. Reading latesttemp generally takes 0.07 seconds BUT every 120
seconds every sensor takes 0.75 seconds for a single loop,
then back to 0.07 seconds. (/settings/timeout/presence is set
to 120)
 2. My understanding is that simultaneous/voltage works in the
same way, howeve

Re: [Owfs-developers] python code printing /statistics

2020-08-16 Thread Martin Patzak
here is my code to write /simultaneous/voltage which increases CRC16 by
one only
waiting for one or two seconds did not change that. It increases CRC16
only by one.
Should the write not being re-tried automatically? Like any other failed
read or write? Confused...

> from pyownet import protocol
> import time
>
> op = protocol.proxy()
>
> try:
>
>     x = op.read('/statistics/errors/CRC16_errors')
>     print 'CRC16_errors',x
>
>     op.write('/uncached/simultaneous/voltage','1')
>
> #    time.sleep(1)
>
>     x = op.read('/statistics/errors/CRC16_errors')
>     print 'CRC16_errors',x
>
>
> except Exception as e:
>     print str(e)


On 16.08.20 21:59, Mick Sulley wrote:
>
> First, I noticed a typo in my mail, the CRC value increases by 8, not
> 1, when I set /simultaneous/voltage.  My code was setting /temperature
> then /voltage, I wondered if a delay between them may help, tried and
> it did not.  I also tried setting /voltage first then /temperature but
> it still increased CRC on /voltage.
>
> Yes I do have a voltage device, a DS2437.  I only have one, so setting
> /simultaneous/voltage is probably not going to save any time, but it
> seemed the right way to do it.
>
> I looked at issue 55, don't know if that is related on not.  I am
> happy to test 3.2p4 but don't know how to do it. 
>
> If I download from https://sourceforge.net/projects/owfs/  I get 3.2p1
> which is what I was running anyway.
>
> I download the .zip from https://github.com/owfs/owfs  unpacked into a
> new directory and tried to follow the instructions in INSTALL, this is
> what I got -
>
> pi@pi4B:~/owfs/owfs-master $ ls
> acinclude.m4    COPYING Makefile.am    RELEASE.md
> AUTHORS COPYING.LIB man2md release.pl
> autom4te.cache  debian  module src
> bootstrap   description-pak NEWS   TODO
> ChangeLog   Dockerfile.release  README.DEVELOPERS 
> update_wiki_manpages
> configure.ac    INSTALL README.md
> pi@pi4B:~/owfs/owfs-master $ ./configure
> -bash: ./configure: No such file or directory
> pi@pi4B:~/owfs/owfs-master $
>
> I ran out of knowledge at this point.  If you can tell me how to
> install it I will test it out.
>
> Thanks
>
> Mick
>
>
> On 16/08/2020 17:29, Stefano Miccoli via Owfs-developers wrote:
>> The CRC16 error could be related
>> to https://github.com/owfs/owfs/issues/55
>>
>> The version on master is already patched, and will be released in
>> 3.2p4. If possible check if the current version on master works as
>> expected.
>>
>> Stefano
>>
>>> On 16 Aug 2020, at 18:22, Martin Patzak >> > wrote:
>>>
>>> I tested it and I can confirm that writing to
>>> /uncached/simultaneous/voltage increases the CRC16_error by one.
>>>
>>> Mick, do you have voltage devices on your network? (I hope it is not
>>> a stupid question)
>>> I don't have such devices, so I cannot test this further...
>>>
>>> Greetings,
>>> Marty
>>>
>>> On 13.08.20 01:04, Mick Sulley wrote:

 I have been doing some more testing and have a couple of issues. 
 My code sets simultaneous/temperature, waits a couple of seconds
 then reads latesttemp from each sensor.

  1. Reading latesttemp generally takes 0.07 seconds BUT every 120
 seconds every sensor takes 0.75 seconds for a single loop, then
 back to 0.07 seconds.  (/settings/timeout/presence is set to 120)
  2. My understanding is that simultaneous/voltage works in the same
 way, however when I set it my CRC_errors increases by 8.  Why
 is this?

 Cheers

 Mick


>>>
>>> ___
>>> Owfs-developers mailing list
>>> [email protected]
>>> 
>>> https://lists.sourceforge.net/lists/listinfo/owfs-developers
>>
>>
>>
>> ___
>> Owfs-developers mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/owfs-developers
>
>
> ___
> Owfs-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/owfs-developers

___
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] python code printing /statistics

2020-08-16 Thread Martin Patzak
My CRC16 value goes only up by one for setting /simultanous/voltage to '1'
I only tested with setting this once and read the CRC16 back right away
without delay.

Here is my personal notes for installing owfs from github - I hope it
helps you - if you have the code you can of course skip the git-hub part
In this notes I used some special parameters, which you do not have to
use of course, but it illustrates that you have the ability to influence
quite a number of things during configure

additionally, you should not run anything as sudo - especially not
untested patches - so Stefano indicated how to circumvent this easily
with setting a symlink (see last line)

> get owfs
>
>     git clone git://git.code.sf.net/p/owfs/code owfs-code
>
> then cd into owfs-code
>
>     ./bootstrap        # an error appeared and I had to install packages
>     # ./bootstrap: 12: ./bootstrap: libtoolize: not found
>     # aclocal: not found
>     # pkg-config, libtool, automake
>
>     ./configure
>     ./configure --disable-swig --prefix=/home/mnm/owfs/
> --program-suffix=_test85C
> --with-systemdsystemunitdir=/home/mnm/owfs/systemd
>
>     make
>
>     make install
>     
> ### no more running with sudo !!! ###
> link owserver_ to dir /usr/bin so it can be found when
> executing it with sudo
>     
>     sudo ls -s /home/mnm/owfs/bin/owserver_ /usr/bin/owserver_


On 16.08.20 21:59, Mick Sulley wrote:
>
> First, I noticed a typo in my mail, the CRC value increases by 8, not
> 1, when I set /simultaneous/voltage.  My code was setting /temperature
> then /voltage, I wondered if a delay between them may help, tried and
> it did not.  I also tried setting /voltage first then /temperature but
> it still increased CRC on /voltage.
>
> Yes I do have a voltage device, a DS2437.  I only have one, so setting
> /simultaneous/voltage is probably not going to save any time, but it
> seemed the right way to do it.
>
> I looked at issue 55, don't know if that is related on not.  I am
> happy to test 3.2p4 but don't know how to do it. 
>
> If I download from https://sourceforge.net/projects/owfs/  I get 3.2p1
> which is what I was running anyway.
>
> I download the .zip from https://github.com/owfs/owfs  unpacked into a
> new directory and tried to follow the instructions in INSTALL, this is
> what I got -
>
> pi@pi4B:~/owfs/owfs-master $ ls
> acinclude.m4    COPYING Makefile.am    RELEASE.md
> AUTHORS COPYING.LIB man2md release.pl
> autom4te.cache  debian  module src
> bootstrap   description-pak NEWS   TODO
> ChangeLog   Dockerfile.release  README.DEVELOPERS 
> update_wiki_manpages
> configure.ac    INSTALL README.md
> pi@pi4B:~/owfs/owfs-master $ ./configure
> -bash: ./configure: No such file or directory
> pi@pi4B:~/owfs/owfs-master $
>
> I ran out of knowledge at this point.  If you can tell me how to
> install it I will test it out.
>
> Thanks
>
> Mick
>
>
> On 16/08/2020 17:29, Stefano Miccoli via Owfs-developers wrote:
>> The CRC16 error could be related
>> to https://github.com/owfs/owfs/issues/55
>>
>> The version on master is already patched, and will be released in
>> 3.2p4. If possible check if the current version on master works as
>> expected.
>>
>> Stefano
>>
>>> On 16 Aug 2020, at 18:22, Martin Patzak >> > wrote:
>>>
>>> I tested it and I can confirm that writing to
>>> /uncached/simultaneous/voltage increases the CRC16_error by one.
>>>
>>> Mick, do you have voltage devices on your network? (I hope it is not
>>> a stupid question)
>>> I don't have such devices, so I cannot test this further...
>>>
>>> Greetings,
>>> Marty
>>>
>>> On 13.08.20 01:04, Mick Sulley wrote:

 I have been doing some more testing and have a couple of issues. 
 My code sets simultaneous/temperature, waits a couple of seconds
 then reads latesttemp from each sensor.

  1. Reading latesttemp generally takes 0.07 seconds BUT every 120
 seconds every sensor takes 0.75 seconds for a single loop, then
 back to 0.07 seconds.  (/settings/timeout/presence is set to 120)
  2. My understanding is that simultaneous/voltage works in the same
 way, however when I set it my CRC_errors increases by 8.  Why
 is this?

 Cheers

 Mick


>>>
>>> ___
>>> Owfs-developers mailing list
>>> [email protected]
>>> 
>>> https://lists.sourceforge.net/lists/listinfo/owfs-developers
>>
>>
>>
>> ___
>> Owfs-developers mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/owfs-developers
>
>
> ___
> Owfs-developers mailing list
> [email protected]
> https://lis

Re: [Owfs-developers] python code printing /statistics

2020-08-16 Thread Mick Sulley
First, I noticed a typo in my mail, the CRC value increases by 8, not 1, 
when I set /simultaneous/voltage.  My code was setting /temperature then 
/voltage, I wondered if a delay between them may help, tried and it did 
not.  I also tried setting /voltage first then /temperature but it still 
increased CRC on /voltage.


Yes I do have a voltage device, a DS2437.  I only have one, so setting 
/simultaneous/voltage is probably not going to save any time, but it 
seemed the right way to do it.


I looked at issue 55, don't know if that is related on not.  I am happy 
to test 3.2p4 but don't know how to do it.


If I download from https://sourceforge.net/projects/owfs/  I get 3.2p1 
which is what I was running anyway.


I download the .zip from https://github.com/owfs/owfs  unpacked into a 
new directory and tried to follow the instructions in INSTALL, this is 
what I got -


pi@pi4B:~/owfs/owfs-master $ ls
acinclude.m4    COPYING Makefile.am    RELEASE.md
AUTHORS COPYING.LIB man2md release.pl
autom4te.cache  debian  module src
bootstrap   description-pak NEWS   TODO
ChangeLog   Dockerfile.release  README.DEVELOPERS update_wiki_manpages
configure.ac    INSTALL README.md
pi@pi4B:~/owfs/owfs-master $ ./configure
-bash: ./configure: No such file or directory
pi@pi4B:~/owfs/owfs-master $

I ran out of knowledge at this point.  If you can tell me how to install 
it I will test it out.


Thanks

Mick


On 16/08/2020 17:29, Stefano Miccoli via Owfs-developers wrote:
The CRC16 error could be related to 
https://github.com/owfs/owfs/issues/55


The version on master is already patched, and will be released in 
3.2p4. If possible check if the current version on master works as 
expected.


Stefano

On 16 Aug 2020, at 18:22, Martin Patzak > wrote:


I tested it and I can confirm that writing to 
/uncached/simultaneous/voltage increases the CRC16_error by one.


Mick, do you have voltage devices on your network? (I hope it is not 
a stupid question)

I don't have such devices, so I cannot test this further...

Greetings,
Marty

On 13.08.20 01:04, Mick Sulley wrote:


I have been doing some more testing and have a couple of issues.  My 
code sets simultaneous/temperature, waits a couple of seconds then 
reads latesttemp from each sensor.


 1. Reading latesttemp generally takes 0.07 seconds BUT every 120
seconds every sensor takes 0.75 seconds for a single loop, then
back to 0.07 seconds.  (/settings/timeout/presence is set to 120)
 2. My understanding is that simultaneous/voltage works in the same
way, however when I set it my CRC_errors increases by 8.  Why is
this?

Cheers

Mick




___
Owfs-developers mailing list
[email protected] 


https://lists.sourceforge.net/lists/listinfo/owfs-developers




___
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
___
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] python code printing /statistics

2020-08-16 Thread Stefano Miccoli via Owfs-developers
The CRC16 error could be related to https://github.com/owfs/owfs/issues/55 


The version on master is already patched, and will be released in 3.2p4. If 
possible check if the current version on master works as expected.

Stefano

> On 16 Aug 2020, at 18:22, Martin Patzak  wrote:
> 
> I tested it and I can confirm that writing to /uncached/simultaneous/voltage 
> increases the CRC16_error by one. 
> 
> Mick, do you have voltage devices on your network? (I hope it is not a stupid 
> question)
> I don't have such devices, so I cannot test this further...
> 
> Greetings,
> Marty
> 
> On 13.08.20 01:04, Mick Sulley wrote:
>> I have been doing some more testing and have a couple of issues.  My code 
>> sets simultaneous/temperature, waits a couple of seconds then reads 
>> latesttemp from each sensor.
>> 
>> Reading latesttemp generally takes 0.07 seconds BUT every 120 seconds every 
>> sensor takes 0.75 seconds for a single loop, then back to 0.07 seconds.  
>> (/settings/timeout/presence is set to 120)
>> My understanding is that simultaneous/voltage works in the same way, however 
>> when I set it my CRC_errors increases by 8.Why is this?
>> Cheers
>> 
>> Mick
>> 
>> 
> 
> ___
> Owfs-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/owfs-developers

___
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] python code printing /statistics

2020-08-16 Thread Martin Patzak
I tested it and I can confirm that writing to
/uncached/simultaneous/voltage increases the CRC16_error by one.

Mick, do you have voltage devices on your network? (I hope it is not a
stupid question)
I don't have such devices, so I cannot test this further...

Greetings,
Marty

On 13.08.20 01:04, Mick Sulley wrote:
>
> I have been doing some more testing and have a couple of issues.  My
> code sets simultaneous/temperature, waits a couple of seconds then
> reads latesttemp from each sensor.
>
>  1. Reading latesttemp generally takes 0.07 seconds BUT every 120
> seconds every sensor takes 0.75 seconds for a single loop, then
> back to 0.07 seconds.  (/settings/timeout/presence is set to 120)
>  2. My understanding is that simultaneous/voltage works in the same
> way, however when I set it my CRC_errors increases by 8.  Why is this?
>
> Cheers
>
> Mick
>
>

___
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] python code printing /statistics

2020-08-12 Thread Mick Sulley
I have been doing some more testing and have a couple of issues. My code 
sets simultaneous/temperature, waits a couple of seconds then reads 
latesttemp from each sensor.


1. Reading latesttemp generally takes 0.07 seconds BUT every 120
   seconds every sensor takes 0.75 seconds for a single loop, then back
   to 0.07 seconds.  (/settings/timeout/presence is set to 120)
2. My understanding is that simultaneous/voltage works in the same way,
   however when I set it my CRC_errors increases by 8. Why is this?

Cheers

Mick


___
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] python code printing /statistics

2020-08-09 Thread Stefano Miccoli via Owfs-developers
Things I would try, in random order.

- Try an ‘owdir /uncached ’ command before writing to simultaneous, just to 
refresh the owserver view of the devices on the bus. Maybe a single owdir 
command is faster that querying the sensors one at a time.
- Do not use owserver aliases, use only bus addresses (this is just my personal 
dislike, and some troubles in having a stable working setup with aliases in the 
past)
- Nuclear option: enable the owserver verbose output and try to pinpoint what’s 
going on when the loop slows down.

Just for reference, here are some stats form my tiny home owserver, with a 
LinkUSB host adapter and two Link multi sensors.
(I’m using walk.py, which you can find here: 
https://github.com/miccoli/pyownet/blob/dev/examples/walk.py 

)

$ python walk.py /statistics/read/
/statistics/read/bytes   b' 2442834'
/statistics/read/cachebytes  b'   0'
/statistics/read/cachesuccessb'   0'
/statistics/read/calls   b'   99461'
/statistics/read/success b'  198136'
/statistics/read/tries.ALL   b'   99464,   0,   
0'
/statistics/read/tries.0 b'   99465'
/statistics/read/tries.1 b'   0'
/statistics/read/tries.2 b'   0'

$ walk.py /statistics/errors/
/statistics/errors/BUS_bit_errorsb'   0'
/statistics/errors/BUS_byte_errors   b'   0'
/statistics/errors/BUS_detect_errors b'   0'
/statistics/errors/BUS_echo_errors   b'   0'
/statistics/errors/BUS_level_errors  b'   0'
/statistics/errors/BUS_next_alarm_errors b'   0'
/statistics/errors/BUS_next_errors   b'   0'
/statistics/errors/BUS_readin_data_errors b'   0'
/statistics/errors/BUS_status_errors b'   0'
/statistics/errors/BUS_tcsetattr_errors  b'   0'
/statistics/errors/CRC16_errors  b'   0'
/statistics/errors/CRC16_tries   b'   0'
/statistics/errors/CRC8_errors   b'   0'
/statistics/errors/CRC8_triesb'  197398'
/statistics/errors/DS2480_level_docheck_errors b'   0'
/statistics/errors/DS2480_read_fd_isset  b'   0'
/statistics/errors/DS2480_read_null  b'   0'
/statistics/errors/DS2480_read_read  b'   0'
/statistics/errors/NET_accept_errors b'   0'
/statistics/errors/NET_connection_errors b'   0'
/statistics/errors/NET_read_errors   b'   1'
/statistics/errors/max_delay b'   0'



> On 9 Aug 2020, at 11:38, Martin Patzak  wrote:
> 
> 
> 
> On 09.08.20 11:34, Mick Sulley wrote:
>> 
>> CRC16_tries11768
>> CRC16_errors11768
>> 
> you should not have near that amount of CRC errors
> read the errors after every module reading or writing to find out what
> causes those errors
>> 
>> Time to do some reading of the docs...
>> 
> yeah, enjoy and good luck :-)
> 
> 
> 
> ___
> Owfs-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/owfs-developers

___
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] python code printing /statistics

2020-08-09 Thread Martin Patzak


On 09.08.20 11:34, Mick Sulley wrote:
>
> CRC16_tries    11768
> CRC16_errors    11768
>
you should not have near that amount of CRC errors
read the errors after every module reading or writing to find out what
causes those errors
>
> Time to do some reading of the docs...
>
yeah, enjoy and good luck :-)



___
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] python code printing /statistics

2020-08-09 Thread Mick Sulley

Thanks for that, I just ran your code on my test system -

pi@pi4B:~/v12_5 $ python3 read_stats.py
temp is   24.625
success   934310
tries.0   470429
tries.1    0
tries.2    0
CRC16_tries    11768
CRC16_errors    11768
pi@pi4B:~/v12_5 $

Time to do some reading of the docs...

Mick


On 09/08/2020 10:21, Martin Patzak wrote:

here is a quick python code to read some /statistics

and yes, the owserver has been running for a looong time :-D


from pyownet import protocol
import time

op = protocol.proxy()

try:
    #x = op.read('/uncached/29.1CBF0E00/sensed.ALL')
    #print 'sensed is',x
    x = op.read('/uncached/28.CFB92006/latesttemp')
    print 'temp is',x

    x = op.read('/statistics/read/success')
    print 'success',x

    x = op.read('/statistics/read/tries.0')
    print 'tries.0',x

    x = op.read('/statistics/read/tries.1')
    print 'tries.1',x

    x = op.read('/statistics/read/tries.2')
    print 'tries.2',x

    x = op.read('/statistics/errors/CRC16_tries')
    print 'CRC16_tries',x

    x = op.read('/statistics/errors/CRC16_errors')
    print 'CRC16_errors',x


except Exception as e:
    print str(e)




temp is  57.9375
success    219962160        (why is success higher than tries.0? I do 
not know...)

tries.0    139228047
tries.1 1077                (one thousand re-tries in a couple 
of years reading 25 sensors every 30 seconds)
tries.2    6                    (six second re-tries... not 
bad ey? ;-)

CRC16_tries 81858524
CRC16_errors 1351        (some CRC16 errors were cause by 
writes, hence the discrepancy)





On 09.08.20 10:52, Martin Patzak wrote:

here is some documentation about the values in /statistics:

http://owfs.sourceforge.net/statistics.html

I do not know if there is more about that within the owfs project...

there should be more at Maxim's website about the interface protocol 
which owfs is based upon.


On 08.08.20 19:07, Mick Sulley wrote:


I have just run it again, sleep for 3 seconds after the 
simultaneous/temperature write and sleep 25 seconds at the end of 
the loop.  Presence is at 120 and I see a delay every 130 seconds or 
so.  The delay is on reading whichever parameter is first, so if I 
read present first then that is the 0.7 scan, the other parameters 
are < 0.1, but If I read type first then that is 0.7 sec, etc


I am also reading CR16_errors and CR16_tries, these are the same and 
both increase by 8 each loop.  Is that normal?  Is there any 
documentation on this stuff, I can't find anything.


Mick

On 08/08/2020 08:46, Martin Patzak wrote:

Thanks Mick, great summary.

Let me add to 4), that you only see the 0.7 sec delay, because you 
read in a busy loop.

I read only every 30 seconds and I never see a delay.

But timing your reads is a good practice because this way you catch 
retries and maybe bus or sensor problems.

Additionally you can have a look in /statistics for retries and errors

On 08.08.20 01:04, Mick Sulley wrote:
Update on test findings.  Test setup was 19 - DS18B20 temperature, 
2 - DS2413 IO and 1 - DS2437 Voltage, Raspberry Pi4 with Sheepwalk 
RPi3 Adapter


1) /simultaneous/temperature does work, best to read latesttemp.

2) /settings/timeout/presence cannot be set or read via the 
owhttpd web page, you must use owwrite & owread


3) Reading values (after setting simultaneous) normally takes < 
0.1 seconds


4) After the /settings/timeout/presence interval the next read for 
every device will take around 0.7 seconds.  Note if you read 
multiple fields it is only the first one which takes the increased 
time.


5) The increased time after /settings/timeout/presence interval 
applies to all devices, not just temperature



Mick






___
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] python code printing /statistics

2020-08-09 Thread Martin Patzak
here is a quick python code to read some /statistics

and yes, the owserver has been running for a looong time :-D

> from pyownet import protocol
> import time
>
> op = protocol.proxy()
>
> try:
>     #x = op.read('/uncached/29.1CBF0E00/sensed.ALL')
>     #print 'sensed is',x
>     x = op.read('/uncached/28.CFB92006/latesttemp')
>     print 'temp is',x
>
>     x = op.read('/statistics/read/success')
>     print 'success',x
>
>     x = op.read('/statistics/read/tries.0')
>     print 'tries.0',x
>
>     x = op.read('/statistics/read/tries.1')
>     print 'tries.1',x
>
>     x = op.read('/statistics/read/tries.2')
>     print 'tries.2',x
>
>     x = op.read('/statistics/errors/CRC16_tries')
>     print 'CRC16_tries',x
>
>     x = op.read('/statistics/errors/CRC16_errors')
>     print 'CRC16_errors',x
>
>
> except Exception as e:
>     print str(e)
>
>

temp is  57.9375
success    219962160        (why is success higher than tries.0? I do
not know...)
tries.0    139228047 
tries.1 1077                (one thousand re-tries in a couple
of years reading 25 sensors every 30 seconds)
tries.2    6                    (six second re-tries... not bad
ey? ;-)
CRC16_tries 81858524
CRC16_errors 1351        (some CRC16 errors were cause by
writes, hence the discrepancy)




On 09.08.20 10:52, Martin Patzak wrote:
> here is some documentation about the values in /statistics:
>
> http://owfs.sourceforge.net/statistics.html
>
> I do not know if there is more about that within the owfs project...
>
> there should be more at Maxim's website about the interface protocol
> which owfs is based upon.
>
> On 08.08.20 19:07, Mick Sulley wrote:
>>
>> I have just run it again, sleep for 3 seconds after the
>> simultaneous/temperature write and sleep 25 seconds at the end of the
>> loop.  Presence is at 120 and I see a delay every 130 seconds or so. 
>> The delay is on reading whichever parameter is first, so if I read
>> present first then that is the 0.7 scan, the other parameters are <
>> 0.1, but If I read type first then that is 0.7 sec, etc
>>
>> I am also reading CR16_errors and CR16_tries, these are the same and
>> both increase by 8 each loop.  Is that normal?  Is there any
>> documentation on this stuff, I can't find anything.
>>
>> Mick
>>
>> On 08/08/2020 08:46, Martin Patzak wrote:
>>> Thanks Mick, great summary.
>>>
>>> Let me add to 4), that you only see the 0.7 sec delay, because you
>>> read in a busy loop.
>>> I read only every 30 seconds and I never see a delay.
>>>
>>> But timing your reads is a good practice because this way you catch
>>> retries and maybe bus or sensor problems.
>>> Additionally you can have a look in /statistics for retries and errors
>>>
>>> On 08.08.20 01:04, Mick Sulley wrote:
 Update on test findings.  Test setup was 19 - DS18B20 temperature,
 2 - DS2413 IO and 1 - DS2437 Voltage, Raspberry Pi4 with Sheepwalk
 RPi3 Adapter

 1) /simultaneous/temperature does work, best to read latesttemp.

 2) /settings/timeout/presence cannot be set or read via the owhttpd
 web page, you must use owwrite & owread

 3) Reading values (after setting simultaneous) normally takes < 0.1
 seconds

 4) After the /settings/timeout/presence interval the next read for
 every device will take around 0.7 seconds.  Note if you read
 multiple fields it is only the first one which takes the increased
 time.

 5) The increased time after /settings/timeout/presence interval
 applies to all devices, not just temperature


 Mick
>>>
>

___
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers