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

    UniPi Control Panel does not look for lost value

    Official EVOK API
    2
    2
    1219
    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
        • First post
          Last post