lu_sdata returns different (old) data than user_data

Hello, I’m a new user here. I was searching the forum and manuals for the solution of my problem but I didn’t succeed. I’m sorry if there is a topic with a simiral problem but I didn’t find one.

I’m trying to develop my own UI but I got stuck while trying to develop the part of the inferface responsible for reassigning a device to another room. I send a request like this to set a new value for the “room” variable for a specific device:

[b]http://VeraIP:3480/data_request?id=variableset&DeviceNum=DevID&Variable=room&Value=RoomID[/b]

And then I want to check if the changes were applied using the user_data request:

[b]http://VeraIP:3480/data_request?id=user_data&output_format=xml[/b]

Everything seems to be ok until now, the device is reassigned to a new room. But when I check the lu_sdata:

[b]http://VeraIP:3480/data_request?id=lu_sdata&output_format=xml[/b]

There is still an old value in the “room” attribute. It looks like the lu_sdata doesn’t return the up-to-date informations. I’m sure it’s not a matter of caching because I was clearing my browser’s cache and it didn’t help. Maybe it’s related somehow to the timeouts or something?

I’ll be very grateful for any suggestions :slight_smile:

Hi Tom,

“room” is not a variable, it’s an attribute, meaning that you can’t change it with variableset. What you are doing now is creating a “room” variable, which is ignored by MiOS.

The correct way to move a device to a room is this:
http://wiki.micasaverde.com/index.php/Luup_Requests#device

Thank you very much, mcvflorin! Problem solved :slight_smile: