Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retry on read error #12

Open
colinl opened this issue Sep 5, 2016 · 8 comments
Open

Retry on read error #12

colinl opened this issue Sep 5, 2016 · 8 comments

Comments

@colinl
Copy link
Contributor

colinl commented Sep 5, 2016

I have started using this on a Pi with bit-banging 1-wire and I have come across the problem that using bit-banging is not very reliable and I am getting read errors at a rate of a few percent. It occurs to me that the best way to cope with this would be for the node to automatically re-try a couple of times when an error is encountered. Do you think this would be a good idea and if so would it have to be configurable or could it just be automatic?

@colinl
Copy link
Contributor Author

colinl commented Sep 9, 2016

I am working on this and have encountered a problem with async that requires at least [email protected] to work. I am intending to change the dependency to async 1.5.x, is that likely to cause a problem with any existing code?

@njh
Copy link
Owner

njh commented Sep 11, 2016

I don't think there is a problem updating to async 1.5 - the only thing I would be careful of is having a hard dependency on a recent version of node itself.

However I am not sure that retry belongs in the node-red module - it feels like functionality that should be within owfs itself. That way you solve the problem and get the functionality in other interfaces, such as the owget, http etc..

Also, is it an option to use a proper 1-wire adaptor instead? I am using this one:
http://www.sheepwalkelectronics.co.uk/product_info.php?cPath=22&products_id=30

@colinl
Copy link
Contributor Author

colinl commented Sep 12, 2016

Using the Sheepwalk adaptor (while superior electronically) more or less doubles the cost of a Pi Zero based 1-wire server with wifi. Also I occasionally get errors on buses driven by 'proper' adaptors, usually caused by electrical interference, lightning and so on, and retries would be beneficial in that situation.

I think putting retries in owfs would cause problems. It seems beneficial to wait a while after an error before retrying, and if this were implemented in owfs I think it would mean that a problem with one device would prevent access to other devices on the bus whilst waiting to do the retry.

I have coded it and am just completing testing, it involves very limited changes to the code. I have also included code to manage the problem that the DS18B20 returns a value of 85 under some conditions (during reset or after being hit by interference I think). Shall I finish testing and submit a PR for you to look at and decide whether you want to include it.

@njh
Copy link
Owner

njh commented Oct 18, 2016

I am asking if this functionality would be accepted upstream:
njh/node-owfs#16

If it is, then we will only need the code that maps to Node-RED UI to the client configuration in this module.

@njh
Copy link
Owner

njh commented Oct 25, 2016

I have just pushed a change that displays a node status in the editor during a read. I decided to use promises - which makes it easier to run a block when the reads have completed. But this makes it harder to accept your change.

I still think it might be better in a upstream codebase, but no response from benediktarnold.

@colinl
Copy link
Contributor Author

colinl commented Oct 25, 2016

I agree that it would be better upstream. However if there is no reply
there would you accept it in your code? If so I will rework it for your
latest version.

On 25 October 2016 at 12:08, Nicholas Humfrey [email protected]
wrote:

I have just pushed a change that displays a node status in the editor
during a read. I decided to use promises - which makes it easier to run a
block when the reads have completed. But this makes it harder to accept
your change.

I still think it might be better in a upstream codebase, but no response
from benediktarnold.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#12 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AACVo9uJ5MAEPqSsvM4m6PLjIZUPbJuQks5q3eNGgaJpZM4J1UN1
.

@njh
Copy link
Owner

njh commented Dec 11, 2016

Still no response from @benediktarnold.

I am also unable to get writing to work, because there isn't working support for it published to npm.

Very frustrating. Some options:

  1. Ask to take over maintainence of the owfs package
  2. Investigate other owserver/owfs npm packetages
  3. Bundle the modified code into my package (and nobody else benefits for the enhancements)
  4. Create my own fork of owfs package with a different name (seems like the wrong thing to do)

@benediktarnold
Copy link

I added my answer to njh/node-owfs#16

tl;dr
I would love to see someone taking over the owfs package ownership

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants