• Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    UniPi Control Panel does not look for lost value

    Scheduled Pinned Locked Moved Official API - Evok
    2 Posts 2 Posters 1.9k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      chuckhinds
      last edited by

      The control panel does not look at "lost" value in message. If the temperature sensor signal is not being received on the 1-wire bus (ex. gets disconnected), the value of "lost:" is set to true and value of "value:" is set to the last known temperature. So if you unplug the sensor or it gets damaged the temperature on the control panel doesn't change. Adding the check for msg.lost on line 3 below will correct:

      else if (dev_type == 'temp') {
          name = "Temperature Sensor " + msg.typ + " - " + circuit;
          if ((msg.value == null) | (msg.lost)) {
              value = "Not connected";
          }
          else {
              value = (msg.value * (9.0 / 5.0) + 32).toFixed(1);
              //        value = msg.value.toFixed(1);
              unit = "°F";
          }
      
      1 Reply Last reply
      Reply Quote 0
      • T
        tomas_hora administrators
        last edited by

        Thansk a lot. Could you create a pull request or a bug report on github?

        1 Reply Last reply
        Reply Quote 0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • First post
          Last post