I’m working on some improvements to the Smartphone web interface, and am looking for a way to query the “pinned” devices. I tried looking at the results from data_request?id=user_data&output_format=xml, and I see a parameter onDashboard=“1” on each device, even if I haven’t pinned it to the dashboard in the Vera desktop web UI.
Is there any way I can get a list of pinned devices from Lua variables? I’m trying to get the smartphone default page to list the same devices as on Vera’s dashboard. This will save me from selecting and waiting on specific rooms to load.
The onDashboard variable is only for UI5. It should not be relied on for devices pinned to the dashboard. As the UI can change over time, you should not be dependent on version specific variables. This has been discussed a few times in other threads and there is no definite way of getting pinned devices with out MCV have a standard variable. You can use that variable but it may break later on down the road.
[quote=“garrettwp, post:3, topic:173413”]The onDashboard variable is only for UI5. It should not be relied on for devices pinned to the dashboard. As the UI can change over time, you should not be dependent on version specific variables.
Garrett[/quote]
Does anyone know why MCV have made these version specific variables? Wouldn’t it be much better to adopt a given set of variables, this set can grow as the product grows and functionality expands, and maintain this list going forward as new firmware releases come out? If a given set of variables are no longer required they can be dropped. This would allow those trying to improve the product to do so without being caught in the scenario Garrett has referred to.
This would be an excellent feature to have especially as I am one to use my iPhone to control devices more than I am going to log into the full UI. Being able to read, and subsequently display, pinned only devices would be a great addition to a smartphone HA app.
They just seem to do everything in a backwards fashion :-/
[quote=“garrettwp, post:5, topic:173413”]Because it is UI5 specific and only for UI use. Not for use with third party software. They stated it was not meant for general use.
Garrett[/quote]
Thanks Garrett but this doesn’t really explain why MCV do this
If this product relies as heavily as it does on other programmers to get that little bit extra and add some additional functionality into an otherwise basic system it seems odd to me that MCV would make their life harder to do this by adding in UI specific variables that are “not for use with third party software”. Isn’t this just making it harder for those users actually prepared to make plugins etc for the rest of the Vera users?
Think of it as a private api. It was never intended for public use. This is pretty normal in the land of software development. Just because it is available doesn’t mean MCV has to allow public use of it.
[quote=“garrettwp, post:7, topic:173413”]Think of it as a private api. It was never intended for public use. This is pretty normal in the land of software development. Just because it is available doesn’t mean MCV has to allow public use of it.
Garrett[/quote]
Point Taken. Cheers :), though still seems odd to me. I have been scrollig through several posts now for over 2 hours and one thing that seems to shine through is that MCV dont seem too keen to modify their priorities / timelines based on user requirements / popularity and insead push ahead with their own desires. Surely this will be to the eventual detriment of the user base / Vera supporters.
I really cant believe how these guys seem to operate ???
The forum is the wrong place to request features and bugs if you expect MCV to take notice. It is meant for the community. They already stated that you will need to file a big or feature request via bug tracker or contact them.
Hmm, I’ll double check onDashboard then. My goal is to improve the existing smartphone UI, rather than develop a 3rd party app. My phones handle javascript well enough that I’m hoping to avoid the whole app signing & install process.
Garrett - regarding the feature requests and bugs, where would I file?
Ah, got it. The onDashboard parameter is either not present (not pinned), or it’s =“1” . For example, doing an XPath query for that attribute would get me the list of pinned devices today.