I’m trying to read the data section for IP, model, port and username from a LAN Hue Bridge" instance.
getDeviceNetworkId() returns perfectly the device ID, however I would need to read the username value visible in the “Data” section of the device page.
Uhm…that’s settings.username in the DTH. Is there a reason you can’t use that? Or are you trying to get this from an app? You can’t read device settings in an app because they’re not published.
I am assuming Super LAN connect sets those up when a Hue Bridge is connected, I am trying to interact with that bridge, however I can not read the IP-address nor the paired username for the bridge, which is visible.
For some reason Super LAN connects Hue bridge does not publish the information anymore for device.currentValue().
This is the reasoning for the idea if it possible to read the data section of the device from an 3rd party SmartApp such as @verbem’s Hue Sensor (connect), which has recently stopped working since the information can not be accessed.
Device Network ID is not just a part of data…that’s a special case. If you read the whole post, the OP is trying to pull “username” which is stored in data into another app. And according to the Devcie API, there is no way to pull out device data that is not published as an attribute except for the DNID, the display name, the capabilities, the Hub, the Id the label, and the driver in use.
So in essence, what ever Super LAN Connect does with Philips Hue Bridge (LAN Hue Bridge) it does no more publish the required information to be used by SmartApps. Something has changed in it and the question is then, that if it should be fixed? I could not really find any practical information on the behaviour of SLC with Hue Bridges.
As I said before, trying to use "Hue Sensor (connect) SmartApp to enable the use of Hue Sensors behind the LAN Hue Bridge. Since it is already connected and the code already exists, it would make sense to it. Sure I could build all new code.
The benefit of this SmartApp is, that it has support for Hue Motions sensors, Hue Tap and Hue Switches. So far I have not seen support for all of those devices in any other place.
Wait…I’m not understanding what your smartapp is trying to do. If this other app is already connecting and bringing over your hue devices, what is your app trying to do?
If it’s a third party app, you should have the code for it…which means you should be able to modify it however you want. Why do you have to pull the username out by an app call. Just pull it out by hand for goodness sake and enter it in your app in an input. This is ridiculous.
And if you’re saying this other app is no longer connecting to you bridge, then it just has to be re-authorized. All this bs about username is pointless because the hue bridge username is set up when you request access through the hue api.
The problem here is that I do not have access to LAN Hue Bridge (DTH from Super LAN Connect) source code. Seems that SmartThings developers have removed the access to the needed values (IP and username). At this time it is impossible to get even the IP of a Super LAN connect discovered Hue Bridge.
It would be easy to iterate all connected Hue Bridges with manual configurations. Thats what SLC is there for, right? It is true that the code for @verbem’s Hue Sensor (connect) could be written with static configurations, but would be need quite a bit of rework as currently it would be capable to connect to any LAN Hue Bridge.