Re: [Owfs-developers] Write data with Python3 and pyownet

2020-10-14 Thread Stefano Miccoli via Owfs-developers
A more succinct way would be: str(x).encode() In fact the outer call to ‘bytes’ in 'bytes(str.encode(str(x)))' is a no-op, and python strings are objects which have an ‘encode' method, so no need call the class method ’str.encode’. Another possible way is f"{x:d}".encode() or "{:d}".forma

Re: [Owfs-developers] Writing to DS2413 Device with Python 3

2020-08-27 Thread Stefano Miccoli via Owfs-developers
.to_bytes(1,byteorder=sys.byteorder)) >>>> >>>> That statement gives me the following error: >>>> >>>> pyownet.protocol.OwnetError: [Errno 22] legacy - Invalid transaction: >>>> '/3A.0BE14D00/PIO.BYTE' >>>> >

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

2020-08-16 Thread Stefano Miccoli via Owfs-developers
wfs> 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.

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

2020-08-16 Thread Stefano Miccoli via Owfs-developers
ile 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 CRC

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,

[Owfs-developers] Release 3.2p4

2020-08-12 Thread Stefano Miccoli via Owfs-developers
Hi all, Having some spare time in may staycation, I’m drafting owfs release 3.2p4. After some testing I implemented GitHub Actions > and dropped MacOs fro

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 addres

Re: [Owfs-developers] Simultaneous not working

2020-08-07 Thread Stefano Miccoli via Owfs-developers
> On 6 Aug 2020, at 21:42, Mick Sulley wrote: > > I did change to persistent and I didn't see a difference. > > Just a quick background. The persistent=True option is useful to shave a few milliseconds from each owserver query by not having to create and pull down a TCP socket and for limi

Re: [Owfs-developers] Simultaneous not working

2020-08-06 Thread Stefano Miccoli via Owfs-developers
Did you check if persistent=True makes any difference? > On 6 Aug 2020, at 16:21, Mick Sulley wrote: > > Well this gets more curious. I am now measuring the time for each read, > reading type, power and latesttemp. Time for all is generally < 0.1 seconds, > but then when I hit the slow loop

Re: [Owfs-developers] Simultaneous not working

2020-08-06 Thread Stefano Miccoli via Owfs-developers
I agree that using the “persistent” network object for the present use case could speed up things, see

Re: [Owfs-developers] Bugfixed release not the one for download?

2020-06-22 Thread Stefano Miccoli via Owfs-developers
There are a number of open pull requests and issues; I think we should first sort these out before thinking abut releasing a new version. Stefano > On 22 Jun 2020, at 22:10, Jan Kandziora wrote: > > Am 22.06.20 um 18:27 schrieb Gregg Levine: >> >> I decided to check to see if the project page

Re: [Owfs-developers] Balena.io & OWFS

2020-05-16 Thread Stefano Miccoli via Owfs-developers
> On 16 May 2020, at 12:49, Stefano Miccoli via Owfs-developers > wrote: > > The python code could also be improved a little bit, shortly I will post a > gist with some corrections. > Please, see at https://gist.github.com/miccoli/5a6fcb400e13a22873863df6d3b48c02 <ht

Re: [Owfs-developers] Balena.io & OWFS

2020-05-16 Thread Stefano Miccoli via Owfs-developers
I don’t think that the problem is in pyownet, but of course, since I’m the author of that package I’m biased. (In Neapolitan language there is a saying: "Ogne scarrafone è bello a mamma soja”) 'pyownet.protocol.ConnError: [Errno 111] Connection refused’ usually means that there is no ‘owserver

Re: [Owfs-developers] pyownet question

2019-11-10 Thread Stefano Miccoli via Owfs-developers
Strange situation: pyownet is talking to an owserver, all the handshakes go well, but owserver replies with error code 5. A few handy commands to debug the problem. 1) identify the process with which pyownet is speaking from python: >>> from pyownet.protocol import proxy >>> owp = proxy(host="l

Re: [Owfs-developers] Installing pyownet

2019-10-28 Thread Stefano Miccoli via Owfs-developers
There is little bit of confusion. The official OWFS bindings are - OW.py, based on SWIG wrapping the C API of libow - ownet.py, pure python owserver client you will find both in debian packages - python-ow, https://packages.debian.org/buster/python-ow

Re: [Owfs-developers] Installing pyownet

2019-10-27 Thread Stefano Miccoli via Owfs-developers
pyownet is only on pypi, not on debian: you have to use the virtualenv method. S. > On 27 Oct 2019, at 01:01, Mick Sulley wrote: > > I have a problem with that. I removed pyownet with > > sudo pip3 uninstall pyownet > > then I reinstalled with > > sudo apt install pyownet > > but t

Re: [Owfs-developers] Installing pyownet

2019-10-26 Thread Stefano Miccoli via Owfs-developers
Best practice is to isolate packages downloaded from pypi in a virtual environment, and do not mess with the system wide python installation. As a general rule always avoid “sudo pip install”, and only install system wide python packages via the distribution package manager (a

Re: [Owfs-developers] Python2.7 to 3

2019-10-14 Thread Stefano Miccoli via Owfs-developers
27; to any string when writing? > > Mick > > > > On 13/10/2019 21:25, Stefano Miccoli via Owfs-developers wrote: >> I had no time to stress test my installation, but let me add some thoughts >> here. >> >> The fact that failures are sporadic, and that

Re: [Owfs-developers] Python2.7 to 3

2019-10-13 Thread Stefano Miccoli via Owfs-developers
addr = '267E9C3E026E/alias' #voltage > print('read returns %s' %owp.read(addr).decode()) > newa = bytes(('V' + str(x)), 'utf-8') > owp.write(addr, newa) > now = owp.read(addr).decode() > print(

Re: [Owfs-developers] Python2.7 to 3

2019-10-10 Thread Stefano Miccoli via Owfs-developers
t;> >>> addr = '28.E3377A02/alias' >> >>> owp.read(addr).decode() >> 'xx' >> >>> owp.write(addr, 'T0'.encode()) >> >>> owp.read(addr).decode() >> 'xx' >> >>> owp.write(addr, '

Re: [Owfs-developers] Python2.7 to 3

2019-10-10 Thread Stefano Miccoli via Owfs-developers
I think that this is the correct place to ask, so I'll give a brief answer. In python2 you had "strings" and "unicode strings". Python2 "strings" were 1-byte sequences, so it was impossibile to represent UNICODE code points beyond the few ASCII ones; therefore the "unicode string" was introduced

Re: [Owfs-developers] owfs on Raspberry Buster

2019-09-17 Thread Stefano Miccoli via Owfs-developers
> On 17 Sep 2019, at 14:35, Robert Lagus wrote: > > I tried to start the ofserver with: > sudo systemctl restart owserver > Job for owserver.service failed because the service did not take the steps > required by its unit configuration. > See "systemctl status owserver.service" and "journalct

Re: [Owfs-developers] 1-wire hubs

2019-07-21 Thread Stefano Miccoli via Owfs-developers
I assume that by “1-wire hub” you are referring to a device that allows you to access several distinct physical 1-wire busses as a single logical bus. I think the hub as a point in which a single 1-wire bus “transparently” branches out into several physical distinct busses. In some cases you do

Re: [Owfs-developers] I just downloaded the OWFS source code from the new GIT location...

2019-07-21 Thread Stefano Miccoli via Owfs-developers
ne gregg.drw...@gmail.com > "This signature fought the Time Wars, time and again." > > On Wed, Jul 17, 2019 at 1:22 PM Stefano Miccoli via Owfs-developers > wrote: >> >> Can you please open an issue at https://github.com/owfs/owfs/issues with >> more details

Re: [Owfs-developers] I just downloaded the OWFS source code from the new GIT location...

2019-07-17 Thread Stefano Miccoli via Owfs-developers
Can you please open an issue at https://github.com/owfs/owfs/issues with more details? SM > On 16 Jul 2019, at 01:34, Gregg Levine wrote: > > Hello! > Okay I found and downloaded the OWS source code from the new GIT > location. But during the process of d

Re: [Owfs-developers] bus interface statistics

2019-07-14 Thread Stefano Miccoli via Owfs-developers
old reboot the RPi host. But maybe I’m mistaken here. S. > > On 13/07/2019 19:58, Stefano Miccoli via Owfs-developers wrote: >> >> >>> On 11 Jul 2019, at 23:10, Mick Sulley >> <mailto:m...@sulley.info>> wrote: >>> >>> The reason for the

Re: [Owfs-developers] bus interface statistics

2019-07-13 Thread Stefano Miccoli via Owfs-developers
> On 11 Jul 2019, at 23:10, Mick Sulley wrote: > > The reason for the question is that I still have random bus lockups and I am > considering creating something to power cycle the system, either on a time > basis, e.g. 3am each day, or based on some early warning detection from the > data in

Re: [Owfs-developers] python ow

2019-05-21 Thread Stefano Miccoli via Owfs-developers
Some time ago I wrote pyownet https://pyownet.readthedocs.io/en/latest/index.html to overcome some limitations of the official packages. The code is quite “stable” now, and does not have some of the fancy new features of trio-owfs (namely a

[Owfs-developers] owfs.org is down

2019-04-08 Thread Stefano Miccoli via Owfs-developers
Hi all: owfs.org is down, as reported in https://github.com/owfs/owfs/issues/35 Stefano___ Owfs-developers mailing list Owfs-developers@lists.sourceforge.net https://lists.sourceforge.net/list

Re: [Owfs-developers] Suggestions of Microcontrollers for 1-wire use.

2019-02-21 Thread Stefano Miccoli via Owfs-developers
Quite an interesting discussion, please forgive me if I throw in my 1cent. We should not forget that normal RPis are educational boards, not meant for professional use. OS on a SD is a terrible idea, with regard to card corruption, but at least it is *impossible* to brick your board. Something

Re: [Owfs-developers] Many-port bus master

2018-11-15 Thread Stefano Miccoli via Owfs-developers
> On 15 Nov 2018, at 08:27, Alastair D'Silva wrote: > > > One question, my code has C99isms, which are fine for modern compilers as > they default to C99. Older compilers default to C90. > > I can fix this in 2 ways: > Easy way: add std=c99 to CFLAGS to force C99 mode > Hard(er) way: Remove

Re: [Owfs-developers] OWFS 3.2p3 released

2018-10-04 Thread Stefano Miccoli via Owfs-developers
🎉 thanks to Johan for the new release! The docker container is for sure useful, but much more would be a write-up of the release procedure itself, something like RELEASE.md in the project root. Stefano > On 3 Oct 2018, at 23:05, Johan Ström wrote: > > Hi everyone, > > it has been a while si

Re: [Owfs-developers] DS1921 time linux vs windows

2018-08-22 Thread Stefano Miccoli via Owfs-developers
Docs at page 7 of https://datasheets.maximintegrated.com/en/ds/DS1921H-DS1921Z.pdf are not very clear, but I would bet that 1 = Jan 2 = Feb … so that conversions at https://github.com/owfs/owfs/blob/ba66022f115909396a4b939f37e8

Re: [Owfs-developers] git pull returns 502 error message

2018-03-05 Thread Stefano Miccoli
In my opinion it should be time to migrate the principal OWFS repo from SF to GH. Stefano > On 5 Mar 2018, at 07:26, Johan Ström wrote: > > On 02/03/18 01:48, Gregg Levine wrote: >> Hello! >> I have the most recent numbered release on a Pi3 (now on a Pi Zero W) >> running and working. However

Re: [Owfs-developers] Running owfs unter systemd makes /run/owfs mount inaccessible.

2018-01-07 Thread Stefano Miccoli
> On 7 Jan 2018, at 14:38, Christian Vogel wrote: > > Please change the mount to somewhere outside of /run, I propose > /dev/bus/owfs. See attached file. As a rule of thumb everything controlling a node in /dev should run in kernel-space, not user-space. Owfs is entirely user-space, so no do

Re: [Owfs-developers] python-ow failure with new Raspbian Stretch

2017-12-16 Thread Stefano Miccoli
Unfortunately owpython (the swig bindings) is not under active development. The current best practice is to *always* run owserver on the host with the one-wire bus master, and have all clients access the one-wire bus via the owserver protocol. My personal suggestion is to take the time to try o

Re: [Owfs-developers] BAE0910 and Python

2017-09-14 Thread Stefano Miccoli
AFAIK it is not possible in OW-Python to access “subdirectories”. You can try pyownet, http://pyownet.readthedocs.io/en/latest/ which I wrote to overcome this limitation: #! /usr/bin/env python2 from pyownet import protocol owp = protocol.proxy('localhost', 4304) for sensor in owp.dir():

Re: [Owfs-developers] DS2438 memory access with python-ow library

2017-08-14 Thread Stefano Miccoli
As far as I understand this is a limitation of the python OW module. In OWFS, “pages" is not a “file” but a “directory”: $ owdir /Alias2438/pages /Alias2438/pages/page.ALL /Alias2438/pages/page.0 /Alias2438/pages/page.1 /Alias2438/pages/page.2 /Alias2438/pages/page.3 /Alias2438/pages/page.4 /Alia

Re: [Owfs-developers] Arduino yun as wifi 1wire master

2017-07-22 Thread Stefano Miccoli
> On 22 Jul 2017, at 12:24, Dr. Trigon wrote: > > I don't want to run another instance of owfs on those devices as they should > act as master and not owfs servers. What you need is an IP protocol that allows you to access a remote 1-wire network: owserver (the protocol) was designed exactly

Re: [Owfs-developers] owserver protocol

2017-03-05 Thread Stefano Miccoli
:34, Colin Law wrote: >> Can I just check there I not a confusion here, I am talking about comms >> between client and owserver, not between server and sensor. >> >> On 5 Mar 2017 6:43 p.m., "Stefano Miccoli" wrote: >>> >>> What you describe

Re: [Owfs-developers] owserver protocol

2017-03-05 Thread Stefano Miccoli
What you describe (0-size payload message followed by another valid message) cannot happen. May be what you really mean is a -1 size payload message? This is a “ping” which owserver sends every 1 second or so when it is still gathering data or under heavy payload. This is an aspect of the owse

Re: [Owfs-developers] FTDI problem on pi

2017-03-03 Thread Stefano Miccoli
Just for info, I run a similar system, but I do not have any problem. My setup is: Raspberry Pi Model B Rev 2 LinkUSB, HW rev. E3 Raspbian GNU/Linux 8.0 (jessie) Linux 4.4.38+ #938 Thu Dec 15 15:17:54 GMT 2016 owserver 2.9p8-6 I would suggest to check the power supply. Stefano > On 3 Mar 2017

Re: [Owfs-developers] issues building owfs from github source

2016-12-08 Thread Stefano Miccoli
In owfs, as per co the default prefix is /opt /owfs configure.ac:63:AC_PREFIX_DEFAULT(/opt/owfs)dnl of cours you need a $ make install to have files in /opt/owfs. (BTW: I hate the idea of "$ sudo make install”: one should always first set up the /opt/owfs and then issue “make install” from a

Re: [Owfs-developers] Problem reading temperatures of 85 degree Celsius

2016-12-06 Thread Stefano Miccoli
maybe we should simply patch --- a/module/owlib/src/c/ow_1820.c +++ b/module/owlib/src/c/ow_1820.c @@ -384,7 +384,7 @@ static ZERO_OR_ERROR FS_10temp(struct one_wire_query *owq) static ZERO_OR_ERROR FS_10latesttemp(struct one_wire_query *owq) { - return GB_to_Z_OR_E(OW_10latesttemp(&OWQ

Re: [Owfs-developers] Problem reading temperatures of 85 degree Celsius

2016-12-06 Thread Stefano Miccoli
> On 06 Dec 2016, at 11:04, Sven Giermann 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 ac

Re: [Owfs-developers] Problem reading temperatures of 85 degree Celsius

2016-12-05 Thread Stefano Miccoli
> On 05 Dec 2016, at 18:11, Martin Patzak (GMX) wrote: > > [Errno 1] Startup - command line parameters invalid: > '28.CF791502/temperature' > > but this is rare, so I thought I better not mention it right now - but hey, > now I did ;-) this error, despite it’s misleading description, occ

Re: [Owfs-developers] Problem reading temperatures of 85 degree Celsius

2016-12-05 Thread Stefano Miccoli
> On 05 Dec 2016, at 09:35, Martin Patzak (GMX) wrote: > > >> 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 >> sensed = op.read('/28.676A2006/l

Re: [Owfs-developers] owfs - bug in ow_w1_send.c

2016-11-13 Thread Stefano Miccoli
Sorry for flooding the list short snippets: I have to correct myself: obviously 0x are 16bits, two bytes (not four). My mistake. S. > On 13 Nov 2016, at 12:28, Stefano Miccoli wrote: > > I don’t get the point. > > Netlink sequence numbers are opaque and are needed on

Re: [Owfs-developers] owfs - bug in ow_w1_send.c

2016-11-13 Thread Stefano Miccoli
This line looks suspicious: module/owlib/src/c/ow_w1_parse.c:235: if ( NL_SEQ(nlp.nlm->nlmsg_seq) != (unsigned int) seq ) { Hope this helps. S. > On 13 Nov 2016, at 12:28, Stefano Miccoli wrote: > > I don’t get the point. > > Netlink sequence numbers are opa

Re: [Owfs-developers] owfs - bug in ow_w1_send.c

2016-11-13 Thread Stefano Miccoli
I don’t get the point. Netlink sequence numbers are opaque and are needed only to correlate request/response. Netlink sequence numbers are build by this macro (module/owlib/src/include/ow_w1.h): #define MAKE_NL_SEQ( bus, seq ) ((uint32_t)(( ((bus) & 0x) << 16 ) | ((seq) & 0x))) This

Re: [Owfs-developers] Problem with owserver not starting at boot on raspbian jessie

2016-11-08 Thread Stefano Miccoli
> On 07 Nov 2016, at 20:56, Nigel Titley wrote: > > Yes, that was what we decided was probably the issue, but what we never > managed to work out was why, having failed to start at bootup, it was > necessary to stop the service and then start it, even though it wasn't > running. This should be

Re: [Owfs-developers] OWNet perl write/read and a lost byte

2016-10-15 Thread Stefano Miccoli
> On 15 Oct 2016, at 15:23, Henry Pootel wrote: > > root@CONSTANT:~> owwrite -s 172.19.19.10 /relay_setting/RELAY_SET `cat ee` I see a couple of problems here. First, owwrite seems to have problems with nul characters in his arguments, but please wait for confirmation by Jan. Second, assum

Re: [Owfs-developers] owserver is not working correctly

2016-10-14 Thread Stefano Miccoli
> On 14 Oct 2016, at 18:35, Tomasz Torcz wrote: > > No need to google, udev already ships such rule: > $ tree /dev/serial/ > /dev/serial/ > ├── by-id > │ └── usb-FTDI_FT232R_USB_UART_A6XJSOX5-if00-port0 -> ../../ttyUSB0 > └── by-path >└── pci-:00:1d.0-usb-0:1.3:1.0-port0 -> ../../ttyUS

Re: [Owfs-developers] owserver is not working correctly

2016-10-14 Thread Stefano Miccoli
/dev/ttyUSBx names are NOT persistent, and typically when you unplug an USB-to-serial adapter and reconnect it you get a new /dev/ttyUSBy device. On the contrary owserver needs a persistent device name to work properly: try googling "udev rules ttyusb” for some recipes on how to write a udev ru

Re: [Owfs-developers] Changing Alias with pyownet

2016-09-08 Thread Stefano Miccoli
From the python point of view it’s OK… I think it’s an owserver bug (or feature, I do not know ;-) since I have your very same behaviour. S > On 08 Sep 2016, at 00:03, Mick Sulley wrote: > > Stefano, > I took your ex.py and modified it slightly to use a variable as the base > device name -

Re: [Owfs-developers] New site

2016-09-08 Thread Stefano Miccoli
> On 08 Sep 2016, at 10:20, Jan Kandziora wrote: > > Face it, simple markup alone will not give you any contributors. Hell, > non-developer documentation contributors don't want to bother with > markup at all! > > What we need is an interface that makes it easy for *anyone* to > contribute to t

Re: [Owfs-developers] Couple of Questions - another one

2016-09-03 Thread Stefano Miccoli
My 1cent advice: do not insert a delay before your script, instead catch the pyownet.protocol.ConnError exception and retry if the alias file is dynamic (otherwise why copy it at every reboot?) you can also define/redefine aliases using owshell/ownet. Please check this gist for an example of bo

Re: [Owfs-developers] Couple of Questions

2016-09-01 Thread Stefano Miccoli
> On 31 Aug 2016, at 22:28, Mick Sulley wrote: > > $ owserver > does nothing > $ owserver -d /dev/i2c-1 > starts the server > $ service owserver restart > returns "Failed to restart owserver.service: Access denied" > $ sudo service owserver restart > stops the server > $ owserver -c /etc/owfs.co

Re: [Owfs-developers] Couple of Questions

2016-08-31 Thread Stefano Miccoli
> On 30 Aug 2016, at 23:31, Mick Sulley wrote: > > Still trying to transition from using owfs to ow-shell and I have a > couple of questions - > > When owserver is installed from the repository it should start > automatically at boot and will read /etc/owfs.conf to configure it, but > if I r

Re: [Owfs-developers] MacOS build problems. Developers with MacOS machine wanted.

2016-08-12 Thread Stefano Miccoli
Just for info: swig+php is broken also on raspberrypi and Arch Linux. The compilation of ow_wrap.c miserably fails with tens of errors and uncountable warnings. My current configuration is $ lsb_release -a LSB Version:1.4 Distributor ID: Arch Description:Arch Linux Release:rolli

Re: [Owfs-developers] Python Access to ow-shell - problem!

2016-08-04 Thread Stefano Miccoli
ib/python2.7/dist-packages/pyownet/protocol.py", > line 729, in proxy > raise ConnError(*lasterr) > pyownet.protocol.ConnError: [Errno 111] Connection refused >>>> > > > It happened after I restarted the server with > > sudo service owserver rest

Re: [Owfs-developers] Python Access to ow-shell

2016-07-28 Thread Stefano Miccoli
Shameless self-promotion: you should use pyownet, which is documented at http://pyownet.readthedocs.io/en/latest/ If you already have an owserver running on your localhost you can start with $ pip install pyownet $ python >>> from pyownet.protocol import proxy >>> owp = proxy(host='localhost') >

Re: [Owfs-developers] Turning OWFS website into a Wiki. Was: owfs is DISABLED

2016-07-26 Thread Stefano Miccoli
> On 26 Jul 2016, at 10:18, Jan Kandziora wrote: > > If I had to decide, I would take all the content of the web site, throw > out all the out-of-date information and feed the rest into a Mediawiki, > where you and others can maintain it yourself. Then shutdown the old > website. MediaWiki is

Re: [Owfs-developers] owfs and python3

2016-07-04 Thread Stefano Miccoli
You mean the code under 'module/swig/python’? It is very old and unmaintained: I would guess that it should be quite difficult to port it under python3. If an ownet interface is sufficient, my own pyownet is fully tested and maintained from python 3.2 to python 3.5, see http://pyownet.readthedo

Re: [Owfs-developers] Concurrency issues?

2016-07-01 Thread Stefano Miccoli
> Hello, > I'm back. > I have been testing for 18 days now. And IT IS OK! Nice news! > -2 I still hesitate to totaly give up with "owfs /mnt/1wire fuse file system" > and use owread instead. I think I'll do it for the reading values > (temperatures, humidities) but I'll keep fuse file system

Re: [Owfs-developers] Concurrency issues?

2016-05-31 Thread Stefano Miccoli
> On 30 May 2016, at 17:27, Guy COLIN wrote: > > Also I think that monitoring the directories isn't the best method. > I'm going to use new script to read the devices and check if some are > missing. > It will take sometime, no problem I'm patient ;-) > I'll keep updating here. My 1cent of adv

Re: [Owfs-developers] Raspberry Pi Jessie owfs-3.1.p1 w1-driver = 85c (119:11)

2016-05-02 Thread Stefano Miccoli
> On 01 May 2016, at 22:12, Loren Amelang wrote: > > And... I just noticed my test readings aren't quite the same! How can it be > that w1 shows "59 01 4b 46 7f ff 07 10 a2 t=21562" when the ownet proxy > returns "21.625"? And where does the proxy get "21.0625" if the raw data > returned by

Re: [Owfs-developers] Unittests

2016-03-25 Thread Stefano Miccoli
Reviewing tha last commits I read a comment on the clean target in Makefile.am > commit ce7d5e6ed7e4a033b5e59c681e0dcd7382ba6727 > Author: Johan Strm > Date: Thu Mar 24 15:39:38 2016 +0100 > > clean target: do not try to remove my home dir please (*~) > > rm -f wont delete my dire

Re: [Owfs-developers] Louis Swart LCD issues

2016-03-19 Thread Stefano Miccoli
Just a simple point: with owwrite you are writing ‘/FF.xxx’ but with perl 'uncached/FF.xx’, so your test are not 100% equivalent. Please check if this is the reason for the different behaviour (which could give a clue on the bug). S. > On 17 Mar 2016, at 12:17, Andy Carter wrote: > > On We

Re: [Owfs-developers] Louis Swart LCD issues

2016-03-19 Thread Stefano Miccoli
t-side or server-side, and only then proceed to patch owserver or OWNet.pm, should this be the problem Stefano > On 18 Mar 2016, at 08:55, Andy Carter wrote: > > On Friday 18 Mar 2016 08:27:51 Stefano Miccoli wrote: >> Just a simple point: >> >> with owwrite you ar

Re: [Owfs-developers] libftdi support: take 2

2016-03-04 Thread Stefano Miccoli
4 million bytes...:) > > Johan > > On 01/03/16 22:24, Johan Ström wrote: >> >> >> On 01/03/16 14:11, Stefano Miccoli wrote: >>> >>>> Really weird, since it should just use semi-low-level USB messages to tell >>>> the device to se

Re: [Owfs-developers] libftdi support: take 2

2016-03-01 Thread Stefano Miccoli
> On 29 Feb 2016, at 23:35, Johan Ström wrote: > > Stefano's ARMv7l device, running Linux 4.1.17 It’s a RaspberryPi I have for testing. > Really weird, since it should just use semi-low-level USB messages to tell > the device to send a Break; the OS should not interfere? > > If this cannot b

Re: [Owfs-developers] libftdi support: take 2

2016-02-15 Thread Stefano Miccoli
/16 08:25, Stefano Miccoli wrote: >> >>> On 10 Feb 2016, at 07:55, Johan Ström < >>> <mailto:jo...@stromnet.se>jo...@stromnet.se <mailto:jo...@stromnet.se>> >>> wrote: >>> >>>> >>>> Basic functionality seems

Re: [Owfs-developers] libftdi support: take 2

2016-02-09 Thread Stefano Miccoli
> On 10 Feb 2016, at 07:55, Johan Ström wrote: > >> >> Basic functionality seems OK, but there is a sequence that breaks the server. >> >> $ owserver --link ftdi:i:0x0403:0x6001 --foreground >> ^C >> $ owserver -d ftdi:i:0x0403:0x6001 --debug >> > > Interesting. When you shut down owsserver

Re: [Owfs-developers] libftdi support: take 2

2016-02-09 Thread Stefano Miccoli
Hi, I was able to perform some very preliminary testing with a raspberry pi 2, a LinkUSB and a single MS-TH. Here my environment: LSB Version:1.4 Distributor ID: Arch Description:Arch Linux Release:rolling Codename: n/a Linux 4.1.17-1-ARCH #1 SMP Mon Feb 1 18:55:49 MST 201

Re: [Owfs-developers] libftdi support: take 2

2016-02-05 Thread Stefano Miccoli
Sorry: I’m decomissioning a computer room, were the LinkUSB is installed plus a couple of sensors. I will have the LinkUSB available next week, I hope, when all servers are off. S. > On 04 Feb 2016, at 20:33, Johan Ström wrote: > > > On 27/01/16 18:40, Stefano Miccoli wrote:

Re: [Owfs-developers] OWFS and OSX...

2016-02-05 Thread Stefano Miccoli
> On 05 Feb 2016, at 07:36, Dean Waldow wrote: > > $ brew install pkg-config > Sorry my fault: I have a bunch of brew packages installed and was not able to track down all dependencies…: I read the thread to late to give advice. Just a few comments. Fuse is really not necessary: it is hand

Re: [Owfs-developers] OWFS and OSX...

2016-02-04 Thread Stefano Miccoli
Here is my recipe that worked with yosemite+homebrew $ brew install libusb $ tar xvzf owfs-3.1p1.tar.gz $ cd owfs-3.1p1 $ ./configure --prefix $HOME/owfs-install --disable-owtcl $ make -j4 $ make install $ $HOME/owfs-install/bin/owserver -u -—foreground from another terminal: $ $HOME/owfs-instal

Re: [Owfs-developers] Introducing a new "latesttemp" node on the DS18B20, DS18S20, DS1822, DS1825, and DS28AE00.

2016-02-03 Thread Stefano Miccoli
> On 03 Feb 2016, at 16:29, Jan Kandziora wrote: > > Ah, yes, documentation is sparse. But I don't think manpages help much, > being scattered is their nature. I suggested a man page because it is the only documentation that is bundled with the SW itself. > I'm up to write a recipe book with

Re: [Owfs-developers] Introducing a new "latesttemp" node on the DS18B20, DS18S20, DS1822, DS1825, and DS28AE00.

2016-02-03 Thread Stefano Miccoli
easily accessible. (Sorry I do not volunteer for writing this manpage, because my understanding of the inner working of owfs is a little weak, as my posts demonstrate.) Stefano > On 03 Feb 2016, at 02:07, Jan Kandziora wrote: > > Am 03.02.2016 um 01:06 schrieb Stefano Miccoli: >

Re: [Owfs-developers] Introducing a new "latesttemp" node on the DS18B20, DS18S20, DS1822, DS1825, and DS28AE00.

2016-02-02 Thread Stefano Miccoli
I do not like the /simultaneous/temperature interface. As a general rule, owserver operations are synchronous: if you read say /uncached/10.AE9C54020800/temperature, you get a reply when the requested data is available. On the contrary a write to /simultaneous/temperature is asynchronous, sin

[Owfs-developers] owexist.1 missing

2016-02-02 Thread Stefano Miccoli
Jan: something went wrong with commit 924a1ba17cf5e8bc46ccabecb2318f62c9af3a0c: owexist.1 does not exist in the source tree, so that build fails with: make[3]: *** No rule to make target 'owexist.1', needed by 'all-am'. Stop. Probably you forgot to add 'src/man/man1/owexist.1’ to the git repo

Re: [Owfs-developers] libftdi support: take 2

2016-01-27 Thread Stefano Miccoli
Ström <jo...@stromnet.se> wrote: Hi, thanks for your input! On 27/01/16 18:40, Stefano Miccoli wrote: Good news. In a few days I will have an old LinkUSB available for testing, although with a limited num

Re: [Owfs-developers] libftdi support: take 2

2016-01-27 Thread Stefano Miccoli
Good news. In a few days I will have an old LinkUSB available for testing, although with a limited number of sensors only: I will try-out your implementation. Let me just add a few remarks. Auto-detection (or plug and play). I’m an old Unix guy and configuration and tuning is just part of the

Re: [Owfs-developers] Getting simultaneous to work (and other)

2016-01-07 Thread Stefano Miccoli
> On 07 Jan 2016, at 14:45, Martin Patzak (GMX) wrote: > > I am using the pyownet library to communicate to a local owserver. > I have 25 temp-sensors and 2 io 2408 modules on one powered bus with an > usb-link as master. > > I do use simultaneous to read all 25 sensors every 30 seconds as wel

Re: [Owfs-developers] Compiling OWFS for Ubuntu

2015-12-29 Thread Stefano Miccoli
My personal policy is that everything that goes under /usr /bin /sbin etc. should by installed by the OS package manager, while direct installation (“make install”) under /opt is fine, provided that a non privileged user account is used. So I would suggest to create a system user account (say o

Re: [Owfs-developers] 3.1p1 release, anyone?

2015-11-25 Thread Stefano Miccoli
> On 25 Nov 2015, at 14:56, Jan Kandziora wrote: > >> I understand that ow_get cannot be scrapped right now, but >> it should at least be deprecated. > Well, please suggest a mechanism which does not break existing ownet > language bindings. Or you have to clean up the mess all on your own. I

Re: [Owfs-developers] 3.1p1 release, anyone?

2015-11-25 Thread Stefano Miccoli
. > On 25 Nov 2015, at 01:35, Jan Kandziora wrote: > > Am 25.11.2015 um 01:13 schrieb Stefano Miccoli: >> I have a bug on my RPi: (no time to investigate right now, but reporting, >> just in case it can be reproduced). >> >> start owserver as >> &g

Re: [Owfs-developers] 3.1p1 release, anyone?

2015-11-24 Thread Stefano Miccoli
I have a bug on my RPi: (no time to investigate right now, but reporting, just in case it can be reproduced). start owserver as owserver --tester=DS18S20 —debug and run (in another terminal) owread /10.10EF and owserver segfaults: CALL: data.c:(144) Read message DEBUG: read.c:(5

Re: [Owfs-developers] 3.1p1 release, anyone?

2015-11-24 Thread Stefano Miccoli
> On 24 Nov 2015, at 20:03, Matthias Urlichs wrote: > > Not reliably. Killing it (systemctl stop), running it manually under > strace, killing *that* (assuming it doesn't segfault then, which it > sometimes does) and then restarting it (via systemctl start) always > works. I've tried gdb, but th

[Owfs-developers] libusb problem

2015-11-22 Thread Stefano Miccoli
Sorry if I repeat myself, but this problem is still unsolved as of branch master 0ea833c.$ git grep -n '#include <[a-z]*usb\.h>'module/owlib/src/include/ow.h:305:#include module/owlib/src/include/ow_usb_cycle.h:58:#include If I got it right, current OWFS uses libusb-1.0, which requires to include .

Re: [Owfs-developers] DS2409 vs. LinkUSB: ??

2015-11-16 Thread Stefano Miccoli
I’m using a LinkUSB interface… no idea what’s wrong with your setup, but let me share my configuration. Here is my owfs.conf: server: LINK = /dev/linkUSB0 server: port = 4304 server: readonly server: error_level = 2 server: error_print = 1 /dev/linkUSB0 is a symlink to the actual device. The Li

Re: [Owfs-developers] 'strange' value reading /sensed.BYTE of a DS2408 (Stefano Miccoli)

2015-11-10 Thread Stefano Miccoli
> On 10 Nov 2015, at 06:34, Loren Amelang wrote: > > Netstat showed owserver as 127.0.0.1:4304, and I could not access it from > other machines out on the network. After I changed to > ! server: server = 10.1.1.4:4304 > and > server: port = 4304 > netstat showed it as 0.0.0.0:4304, and I coul

Re: [Owfs-developers] 'strange' value reading /sensed.BYTE of a DS2408 (Stefano Miccoli)

2015-11-09 Thread Stefano Miccoli
be the default.) S. > On 09 Nov 2015, at 22:21, Loren Amelang wrote: > > On Mon, 09 Nov 2015 15:46:48 +0100 > Stefano Miccoli mo...@icloud.com wrote: > >> Curiously I ran in a similar situation as the BBB: > ... >> ** non persistent : 39.96 ms, 39.99 ms, 40.00 ms

Re: [Owfs-developers] 'strange' value reading /sensed.BYTE of a DS2408 (Martin Patzak (GMX))

2015-11-09 Thread Stefano Miccoli
Curiously I ran in a similar situation as the BBB: $ python -m test.timing //10.48.74.119/ pyownet: ver. 0.8.2 proxy_obj: ownet server at ('10.48.74.119', 4304) server info: pid 2443, ver. unknown timeit: statement: proxy_obj.dir("/") number: 20 repetitions: 5 ** non persistent : 39.96 ms, 39

Re: [Owfs-developers] 'strange' value reading /sensed.BYTE of a DS2408 (Stefano Miccoli)

2015-11-06 Thread Stefano Miccoli
> p = protocol.proxy(‘myowserver', persistent=False) > > there is a typo: the first ' after ( is not a ' but a ‘ - it's hard to see > here, but with syntax highlighting it is easy to spot ;o) > > Martin > > > On 11/06/2015 11:20 AM, Stefano

Re: [Owfs-developers] 'strange' value reading /sensed.BYTE of a DS2408 (Stefano Miccoli)

2015-11-06 Thread Stefano Miccoli
#x27;t assign requested address so it is possible to run out of sockets, although this is a rather edgy situation, that I’ve never analysed in detail. S. > On 06 Nov 2015, at 02:26, Loren Amelang <mailto:lo...@pacific.net>> wrote: > > On Thu, 05 Nov 2015 13:02:13 +0100, >

Re: [Owfs-developers] 'strange' value reading /sensed.BYTE of a DS2408

2015-11-05 Thread Stefano Miccoli
> On 04 Nov 2015, at 17:38, Martin Patzak (GMX) wrote: > > Stefano, > > thanks for bringing pyownet to my attention. I definitely will try it out. > > > > On 11/04/2015 03:56 PM, Stefano Miccoli wrote: >> Minimal instruction for use are >> >>

Re: [Owfs-developers] 'strange' value reading /sensed.BYTE of a DS2408

2015-11-04 Thread Stefano Miccoli
I would not blame python, nor owfs, but fuse. IMHO: owfs+fuse is very handy for debugging, but it makes really no sense in a production environment. The way to go is owserver with its protocol, and the appropriate client libraries. Shell clients can access 1-wire data with owshell (owdir, owrea

Re: [Owfs-developers] owexternal FIXED

2015-09-26 Thread Stefano Miccoli
hierarchy of include files is very hard to follow. A very welcome code refactoring effort could be to simplify the include tree. Stefano > On 25 Sep 2015, at 23:36, Jan Kandziora wrote: > > Am 25.09.2015 um 22:45 schrieb Stefano Miccoli: >> I’m unable to compile on

  1   2   >