SimpleUI HTTP interface bugs

The interface described at http://wiki.micasaverde.com/index.php/UI_Simple doesn’t quite seem to be as described - the biggest problem I have is that the minimumdelay and timeout parameters aren’t being respected on the lu_sdata request; it always returns immediately.

The timeout and minimumdelay are really useful for polling while still maintaining the instantaneous response required; if I just poll on a 10 second timeout it’ll be 10 seconds until I get an update, while the blocking on the Vera from these parameters would knock it down to 1 second, which is fine.

My Vera2 reports that it’s running the latest firmware, and I have the same problem from my interface or using Chrome to drive the HTTP interface described there.

I’m using the URL

/data_request?id=lu_sdata&DataVersion=DATAVERSION&MinimumDelay=1000&Timeout=60&LoadTime=LOADTIME where DATAVERSION and LOADTIME are obviously replaced with the correct values.

Using port 3480; I’ve also tried it on port 80 with /port_3480 at the front of the above URL (which seems to be how the built in web server does it) with no difference.

Any thoughts on this? I’m sure I’m doing something wrong, but I’m not sure what, and wireshark isn’t being hugely helpful yet.

OK, so looking through the docs some more there’s another document that says to use lu_status to run the poll after you’ve used the lu_sdata to get the initial setup information. I guess you should also use lu_sdata every few minutes or so to just check that there’s no change to the setup of the MiOS system?

Try running Wireshark whilst using one of the existing Control Points. That’ll give you the best idea of how to make it all hang together.

Note that value changes on Vera can often occur very quickly (depending upon what plugins/devices you have) so you may “look” like you’re dropping out of the timeout constantly.

Discovered that the values are case sensitive and that the timeout/minimumdelay values aren’t respected unless you use the most recent loadtime and dataversion that you get.

Fixed that and problem resolved :slight_smile: