1-wire occasionally stops working

  • I have several temperature sensors connected via 1-wire to Neuron and occasionally all of them stops working. Sometimes they work for one day, sometimes for several months.

    In Mervis in variables in debug mode I see Communication error True and the temperature is zero.

    On the status screen I see:
    Sent packets 2746181
    Received packets 2441053
    Wrong packets 4
    Packet error ration 0.0%
    Don't know why is the difference between sent/received packets that big and how it corresponds with wrong packets and error ratio.
    (Wanted to paste image here, but it doesn't work)

    I tried restarting Raspberry, but not sure whether it could help. Is the 1-wire bus connected directly to PLC or is it connected through Raspberry and then to PLC?

    I also tried setting OW_off_1 to true and then back to false (as found elsewhere on the forum), but it didn't help. Is this switching to true and false the right approach?

    The only thing which helps is powering off and on the whole Neuron and that's really not what I can use in practice.

    I have shielded cables and serial topology, but it's possible there are some communication errors anyway. I think that the controller should be able to recover from that errors and not stuck forever.

    I have found several posts in forum complaining about similar behavior, so it seems it's quite common problem.

    Could you please guide me to some solution? Or is it necessary to make a fix on Unipi side?

  • Hello Pavel

    I have a similar problem. I now made e workaround with a shell script that restart the 1-wire bus after a fixed time. It's not nice but it works for me.

    mbpoll -m tcp -a 0 -t 0 -0 -r 1001 1 && mbpoll -m tcp -a 0 $
    while sleep 120; do
    echo start mpoll 'date' 
    mbpoll -m tcp -a 0 -t 0 -0 -r 1001 1 && mbpoll -m tcp -a 0 $

    Happy newyear

  • OK, seems promising. I'll try it on next failure and will reply back.
    Thanks a lot!

  • So the 1 wire stopped working again. I tried running the mbpoll command from Stefan, but it's not working.

    Not sure whether the $ on the end of the line is some typo, it seems not valid, mbpoll complains about.

    As I understand it, the command tries to set modbus coil 1001, which is named 'Enable/Disable 1Wire Bus' in Neuron documentation.
    It seems the Mervis variable OW_off_1 is mapped to the same modbus coil, so turning it on/off should do the same thing. (UPDATE: confirmed by updating the variable in Mervis and watching by mbpoll)

    Any other ideas?

Log in to reply