Many GET-Requests for openHAB items

For some reason I am seeing a lot of GET-Requests in the access log of my openHAB instance, that appear to be coming from HomeHabit. There are 4 requests for 2 different Number-Items each second. As I have lots of items I am not sure why those 2 items are different. They aren’t even used in any dashboard. I have checked the debug log and there isn’t any indication what might be happening here.

This seems to only happen when those items are updated and I am seeing it on other Number-items now aswell when they are updated. Could you please check what is happening and why there is a GET-Request whenever an item is updated? It appears to be an unneccesary request that could be omited.

@igor I think I know what could be going on, I am using openHABs transformation to turn the number (in seconds) into a readable time (hh:mm:ss) for the openHAB UI. Looks like HomeHabit does not like that at all. The response of the GET-request that openHAB sends back to HomeHabit contains this:
..."state":"26835","transformedState":"7:27:15"...

I think transformedState is not the value HomeHabit should be looking at though, as that is only the value used for openHABs UI after transformation. The value of the item is state, and that should be used in HomeHabit IMO.

@Flole That makes sense. transformedState is used by HomeHabit instead of state in some cases like in Value widget. OH doesn’t provide transformedState when item update notification is sent, so the app pulls item state from the API. This happens for all items, regardless whether or not those are bound to any widget. This won’t be changed until the next-gen dashboard is ready.
Can you provide your item configs for those Number items, so I can reproduce it and see if anything can be optimized there. Also, if there are any rules that update those items every second, please share those too.

The “bad” part is, that I am not using those numbers at all in HomeHabit, so it is requesting them and then probably storing the value in the internal database (the database that really should not be updated for openHAB values in the first place, it causes soo much disk/flash I/O for items that aren’t even used in HomeHabit, while the value could be requested when it’s needed, for example when a new item is used/added). I have more than 2000 items (and I expect to add a few more hundreds soon that are frequently updating), fortunately only a few use the transformedState, otherwise the traffic would be huge and HomeHabit would probably start lagging again…

It is a javascript transformation used to turn seconds into hh:mm:ss, looks like this:

Number OperatingSeconds "Duration [JS(seconds_to_time.js):%s]" {channel="XXXXX"}

and the JS for transformation is this;

(function(seconds) {

  var retval = "";

  var hours = Math.floor(seconds / (60 * 60));

  seconds = seconds % (60 * 60);

  var minutes = Math.floor(seconds / (60));

  seconds = seconds % (60);

  if (hours > 0) {

     retval = hours + ":";

  }

  if (minutes < 10 && retval != "") {

    retval = retval + "0" + minutes + ":";

  }

  else {

    if(retval != "" || minutes > 0) {

      retval = retval + minutes + ":";

    }

  }

  if (seconds < 10 && retval != "") {

    retval = retval + "0" + seconds;

  }

  else {

    if(retval != "") {

      retval = retval + seconds;

    } else {

      retval = retval + seconds + "s";

    }

  }

  return retval;

})(input)