Author Topic: Missing devices in UI7 firmware 1.7.3015  (Read 326 times)

Offline gengen

  • Full Member
  • ***
  • Posts: 223
  • Karma: +18/-5
Missing devices in UI7 firmware 1.7.3015
« on: September 23, 2017, 11:02:25 pm »
I was having a hard time finding some of my devices with the latest VeraPlue UI7 firmware 1.7.3015. After some sleuthing in the Vera JavaScript code. I found the culprit.

There is a bug in the UI7 firmware 1.7.3015 JavaScript code which can prevent some devices from displaying in the web interface. In particular, if the device's category number (ex. 2 for dimmers, 3 for switches) matches any of the digits of the device number (ex. a dimmer with device 12 or a switch with device 13) then that device will not appear in the web UI. There is a simple fix in /www/cmh/js/interface.js Change the getFilteredDevicesList function from:

Interface.prototype.getFilteredDevicesList = function(options, showOnlyFailed) {
    var that = this
      , filteredDevices = [];
    return showOnlyFailed ? filteredDevices = application.getListOfDeviceIdsByStatuses([2, 3]) : that.interfaceDevices.forEach(function(deviceId) {
        var $deviceContainer = $(View.idForDeviceContainer(deviceId));
        if ("undefined" != typeof $deviceContainer) {
            var categoryNum = $deviceContainer.prop("categoryNum");
            Utils.inArray(categoryNum, arguments[0]) || 0 !== Utils["int"]($deviceContainer.prop("invisible")) || filteredDevices.push(deviceId)
        }
    }),
    filteredDevices
}

to:

Interface.prototype.getFilteredDevicesList = function(options, showOnlyFailed) {
    var that = this
      , filteredDevices = [];
    return showOnlyFailed ? filteredDevices = application.getListOfDeviceIdsByStatuses([2, 3]) : that.interfaceDevices.forEach(function(deviceId) {
        var $deviceContainer = $(View.idForDeviceContainer(deviceId));
        if ("undefined" != typeof $deviceContainer) {
            var categoryNum = $deviceContainer.prop("categoryNum");
            Utils.inArray(categoryNum, options) || 0 !== Utils["int"]($deviceContainer.prop("invisible")) || filteredDevices.push(deviceId)
        }
    }),
    filteredDevices
}

Attached is the updated version of interface.js. To install it you need first unzip the attached file and then use tools such as scp and putty to replace the /www/cmh/js/interface.js with the unzipped contents. Note that the original version is a small symbolic link. You can delete this link or rename it and place this file in its place. After installation, you should clear the cache of your web browser. If you don't know how to make these changes in the Linux shell, then it is best to wait for the next firmware update which will hopefully fix this bug.
« Last Edit: September 25, 2017, 07:52:16 am by John M. »

Offline rafale77

  • Hero Member
  • *****
  • Posts: 696
  • Karma: +35/-20
Re: Missing devices in UI7 firmware 1.7.3015
« Reply #1 on: September 24, 2017, 11:35:42 am »
Have to applaud you for finding this. The question to mcv now is, how is it that the 3015 has not been pulled from being the latest release? Between this gross bug and the 2 persistant undesirable plugins...
127 zwave nodes, 8 zigbee nodes, 256 devices, 17 apps, 128 scenes on a Vera Plus linked with Echo and HomeKit through bridges

Offline gengen

  • Full Member
  • ***
  • Posts: 223
  • Karma: +18/-5
Re: Missing devices in UI7 firmware 1.7.3015
« Reply #2 on: September 24, 2017, 03:18:03 pm »
This bug is now fixed in the latest 7.0.23b beta firmware.

https://goo.gl/yTZNBa

Offline John M.

  • Administrator
  • Hero Member
  • *****
  • Posts: 506
  • Karma: +39/-3
    • getvera.com
Re: Missing devices in UI7 firmware 1.7.3015
« Reply #3 on: September 25, 2017, 07:55:59 am »
Not that we would not trust and appreciate gengen's contribution and the fact that he is a legacy customer. But I had to remove the js file attachment for obvious security reasons.  ;)  Thank you for the understanding.


As mentioned, this has been resolved in 7.23b and soon to come 7.23 final.
John.M. ▾ Senior Customer Care Advocate
Vera Control, Ltd. ▾ Smarter Home Control  ▾ support@getvera.com ▾www.getvera.com ▾ +1 (866) 966-2272

HOURS OF OPERATION (Pacific Time Zone, UTC -8 )
Monday - Friday   12:00 am ? 06:00 pm
Saturday - Sunday   04:00 am ? 06:00 pm

Offline gengen

  • Full Member
  • ***
  • Posts: 223
  • Karma: +18/-5
Re: Missing devices in UI7 firmware 1.7.3015
« Reply #4 on: September 25, 2017, 10:39:11 am »
@John M

No offense taken. I had not realized that there was already a public firmware available when I posted the patch and I should have removed the attachment myself as soon as I saw it.

That said, I did see at least one instance with the beta firmware where a bunch of devices in one of my rooms was missing from the web UI. Pressing the Reload button on my browser solved the problem, but nevertheless, this bug may not yet be completely resolved in the beta firmware. (Note that the update completely wiped out my patch as it should so we cannot blame that.)