Imperihome - missing devices
-
-
Careful here.
Vera/MiOS has an appallingly bad trait of using different names for the same thing in different places. It's worthwhile checking the documentation between the action Luup call and the HTTP request. I'm not aware of a significant change in openLuup in this area, but have vivid recollections of the pains that this put me through in the relatively early stages of development.
I might be wrong, it could be a latent error lain undiscovered for years, but you're perhaps in a better position than I to investigate this (I don't use, or even have, Imperihome.)
-
That was it.
/cgi/Imperihome.lua: Changed "newTarget" to "newTargetValue" at line 385, 672 and 675. (i would upload the updated lua file, but im missing priveleges)
This was not an issue before, has there been changes on this in openluup?
@mrFarmer - FYI
@perh said in Imperihome - missing devices:
That was it.
/cgi/Imperihome.lua: Changed "newTarget" to "newTargetValue" at line 385, 672 and 675. (i would upload the updated lua file, but im missing priveleges)
This was not an issue before, has there been changes on this in openluup?
@mrFarmer - FYI
I modified the right lines, it really works now!
At the same time, I can see the icons on the imperihome flashing as if they are constantly reloading ... -
@PerH, haven't you experienced this?
-
EDIT: code improved after strict correction.
Finally got all devices into imperihome.
ran this script in "test code":
local oldparent = 198 for i, d in pairs (luup.devices) do if d.device_num_parent == oldparent then if d.device_type == "urn:schemas-upnp-org:device:BinaryLight:1" then if d.category_num == 0 then print (i, d.name, d.device_type, d.category_num, d.subcategory_num) luup.attr_set("category_num", 3, i) if d.subcategory_num == 0 then luup.attr_set("subcategory_num", 1, i) end print (i, d.name, d.device_type, d.category_num, d.subcategory_num) end end if d.device_type == "urn:schemas-upnp-org:device:DimmableLight:1" then if d.category_num == 0 then print (i, d.name, d.device_type, d.category_num, d.subcategory_num) luup.attr_set("category_num", 2, i) if d.subcategory_num == 0 then luup.attr_set("subcategory_num", 3, i) end print (i, d.name, d.device_type, d.category_num, d.subcategory_num) end end if d.device_type == "urn:schemas-upnp-org:device:HVAC_ZoneThermostat:1" then if d.category_num == 0 then print (i, d.name, d.device_type, d.category_num, d.subcategory_num) luup.attr_set("category_num", 5, i) if d.subcategory_num == 0 then luup.attr_set("subcategory_num", 1, i) end print (i, d.name, d.device_type, d.category_num, d.subcategory_num) end end if d.device_type == "urn:schemas-micasaverde-com:device:SceneController:1" then if d.category_num == 0 then print (i, d.name, d.device_type, d.category_num, d.subcategory_num) luup.attr_set("category_num", 14, i) if d.subcategory_num == 0 then luup.attr_set("subcategory_num", 0, i) end print (i, d.name, d.device_type, d.category_num, d.subcategory_num) end end if d.device_type == "urn:schemas-micasaverde-com:device:DoorSensor:1" then if d.category_num == 0 then print (i, d.name, d.device_type, d.category_num, d.subcategory_num) luup.attr_set("category_num", 4, i) if d.subcategory_num == 0 then luup.attr_set("subcategory_num", 1, i) end print (i, d.name, d.device_type, d.category_num, d.subcategory_num) end end if d.category_num == 0 then print (i, d.name, d.device_type, d.category_num, d.subcategory_num) end end end return true
It took a while before they actually sticked, and survived luup reloads, and they still arent updated in the openluup or altui gui?
anyway, it works! Still have to rerun this script when i add new/other devices though, but thats how it is.
-
EDIT: code improved after strict correction.
Finally got all devices into imperihome.
ran this script in "test code":
local oldparent = 198 for i, d in pairs (luup.devices) do if d.device_num_parent == oldparent then if d.device_type == "urn:schemas-upnp-org:device:BinaryLight:1" then if d.category_num == 0 then print (i, d.name, d.device_type, d.category_num, d.subcategory_num) luup.attr_set("category_num", 3, i) if d.subcategory_num == 0 then luup.attr_set("subcategory_num", 1, i) end print (i, d.name, d.device_type, d.category_num, d.subcategory_num) end end if d.device_type == "urn:schemas-upnp-org:device:DimmableLight:1" then if d.category_num == 0 then print (i, d.name, d.device_type, d.category_num, d.subcategory_num) luup.attr_set("category_num", 2, i) if d.subcategory_num == 0 then luup.attr_set("subcategory_num", 3, i) end print (i, d.name, d.device_type, d.category_num, d.subcategory_num) end end if d.device_type == "urn:schemas-upnp-org:device:HVAC_ZoneThermostat:1" then if d.category_num == 0 then print (i, d.name, d.device_type, d.category_num, d.subcategory_num) luup.attr_set("category_num", 5, i) if d.subcategory_num == 0 then luup.attr_set("subcategory_num", 1, i) end print (i, d.name, d.device_type, d.category_num, d.subcategory_num) end end if d.device_type == "urn:schemas-micasaverde-com:device:SceneController:1" then if d.category_num == 0 then print (i, d.name, d.device_type, d.category_num, d.subcategory_num) luup.attr_set("category_num", 14, i) if d.subcategory_num == 0 then luup.attr_set("subcategory_num", 0, i) end print (i, d.name, d.device_type, d.category_num, d.subcategory_num) end end if d.device_type == "urn:schemas-micasaverde-com:device:DoorSensor:1" then if d.category_num == 0 then print (i, d.name, d.device_type, d.category_num, d.subcategory_num) luup.attr_set("category_num", 4, i) if d.subcategory_num == 0 then luup.attr_set("subcategory_num", 1, i) end print (i, d.name, d.device_type, d.category_num, d.subcategory_num) end end if d.category_num == 0 then print (i, d.name, d.device_type, d.category_num, d.subcategory_num) end end end return true
It took a while before they actually sticked, and survived luup reloads, and they still arent updated in the openluup or altui gui?
anyway, it works! Still have to rerun this script when i add new/other devices though, but thats how it is.
-
The newTargetValue for BinarySwitch is correct and my current code is wrong. I am making updates and expect to publish them one of these days. I never noticed it to be wrong as I control all standard devices on the Veras rather than through openLuup. I might change this so in imperihome I only need the openLuup device setup and no longer the Vera's. The latter loose their connection frequently so I would solve that too.
Cheers Rene
-
Sound good, Any chance of getting it into altAppStore? nice to have the automatic updates.
One thing the code I mentioned does not to is to update categories of the children of combodevices. You can however just rerun the code with the combodeviceID as parent.
-
Hi,
From what I could see is that the z-way devices are not having a category or subcategory number set. These are used to map to an Imperihome device type and thus failing and ignored. Are these numbers being left out intentionally, or is this some bug? (@akbooer ?)
Cheers@mrfarmer said in Imperihome - missing devices:
From what I could see is that the z-way devices are not having a category or subcategory number set.
Latest development release of the ZWay plugin (v20.11.24) sets
category_num
...https://smarthome.community/topic/71/openluup-z-way-bridge-version-log?_=1606232724236
-
@PerH , as this is a CGI file and not a plugin it cannot go into the app store.
AK, nice to hear of your update to set de device types as I am struggling with the last few. If you only look at the device type then you cannot distinguish some devices like HVAC vs Heater. Means I need to do a little more work on it.
Cheers Rene
-
@PerH , as this is a CGI file and not a plugin it cannot go into the app store.
AK, nice to hear of your update to set de device types as I am struggling with the last few. If you only look at the device type then you cannot distinguish some devices like HVAC vs Heater. Means I need to do a little more work on it.
Cheers Rene