Author Topic: Move devices from one room to another  (Read 215 times)

Offline simonnet

  • Newbie
  • *
  • Posts: 14
  • Karma: +0/-0
Move devices from one room to another
« on: August 22, 2017, 03:12:50 am »
Can anyone print LUA script which implements next :

Move devices from one room to another by list of ID

Offline RichardTSchaefer

  • Master Member
  • *******
  • Posts: 9738
  • Karma: +737/-136
    • RTS Services Plugins
Re: Move devices from one room to another
« Reply #1 on: August 23, 2017, 01:18:38 am »
It's pretty easy to do this manually.
In the time it took to get the Device ID's for the list ... you could be done.

Offline simonnet

  • Newbie
  • *
  • Posts: 14
  • Karma: +0/-0
Re: Move devices from one room to another
« Reply #2 on: September 01, 2017, 02:04:23 am »
I have about 40 devices in vera, witch i must move to another room, and some times vera lags and don't move device at first time.
So with witch lua command i can change devise's room ?

Offline RichardTSchaefer

  • Master Member
  • *******
  • Posts: 9738
  • Karma: +737/-136
    • RTS Services Plugins
Re: Move devices from one room to another
« Reply #3 on: September 01, 2017, 07:14:34 pm »
You would use luup.attr_set

See:
http://wiki.micasaverde.com/index.php/Luup_Lua_extensions#function:_attr_set

The attribute is "room"
and it's the the room #

To get the correct room #, goto any device in the destination room ... open the Advanced tab on any device in that room. You will find the room # for that device.
Use that room # for the devices you want to move.