openhab / openhab-android

openHAB client for Android
https://play.google.com/store/apps/details?id=org.openhab.habdroid
Eclipse Public License 2.0
606 stars 314 forks source link

How to activate an multiple selected items with a single button in openhab android application? #187

Closed amarpulli1994 closed 8 years ago

amarpulli1994 commented 8 years ago

Hello, I am trying to do activate multiple selected items with a single button in openhab android application.In openhab android application button name is called profiles.That profile button is created by user. This sounds of task ,it should be done in openhab android application.Profile button is means just a name indication.Whenever user clicks the profile button,at that time open a sitemap page,then user select the multiple items and save under the user creating profile button.During the selected items not activate a at that time,when user clicks ON button at that time only activated.Profile layout page having a 3 buttons are there 1. user creating profile button. 2.save button ,3.ON or OFF button.Here when user clicks the profile button and it will open a sitemap page and select the multiple items,the user came back clicks the save button and what are the selected items save along with profiles.When user clicks the ON button at that time activate the what are selected items.This kind of task how to do in openab android application? Thanks & Regards Amar.

digitaldan commented 8 years ago

Amar, this type of configuration is handled by the server and not the clients (android, ios, web). If you want to have multiple items triggered on or off by a single button then you can create a new Item and then have a rule which triggers other items. Alternatively, if you are trying to "group" items to turn on or off together with a single click, you can associate items to GroupItems, where sending a command to a GroupItem will send the command to all child items. The forums is a better place to ask about his. Does this not cover what you are trying to accomplish?

amarpulli1994 commented 8 years ago

No, We are providing a customization option to client.The option has been successfully created in your android application.But only thing is how to access a sitemap and items when user click the profile button in openhab android application.The user selecting the items and saving along with their profiles. Thanks & Regards, Amar.

digitaldan commented 8 years ago

The functionality you require does not exist in our client , so u must write this, I don't have a simple answer , my suggestion is to look at how we load site maps in the code and see if you can reuse that functionality .

amarpulli1994 commented 8 years ago

Hello, In openhab android application loading the sitemaps has done,when user clicking the profile button .This kind of task doing like In Profile.java class just calling to the Main Activity.java,when user click the profile button it will open a Main Activity layout fields.But the thing is when user select the items like fan off or on it will reflect to Main Activity layout fields.In our source code where to write a sitemap code and where to store the sitemaps.I need to access sitemaps and items only in your source code.No need to load the entire default sitemaps like voice option and settings options ,etc,when user clicking the profile button. Thanks & Regards, Amar.

digitaldan commented 8 years ago

I'm sorry, but I don't know how else to help you,

amarpulli1994 commented 8 years ago

Hello, In openHAB android application how to run sitemaps in demo mode?Please give me explanation about sitemaps running in demo mode. Thanks & Regards, Amar.