Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Eclipse SmartHome » Use URL to manipulate items(Which module handles the request)
Use URL to manipulate items [message #1716749] Mon, 07 December 2015 23:28 Go to next message
Smart Home is currently offline Smart HomeFriend
Messages: 109
Registered: February 2015
Senior Member
Hi,

I see that it is possible to send a item state via http command:

http://<openhab-host>:8080/CMD?<item>=<state>

Which module (bundle) execute this command?

Thx
Re: Use URL to manipulate items [message #1716780 is a reply to message #1716749] Tue, 08 December 2015 08:11 Go to previous messageGo to next message
Kai Kreuzer is currently offline Kai KreuzerFriend
Messages: 673
Registered: December 2011
Senior Member
The CMD servlet is part of the Classic UI (which was implemented before the REST API even existed). It is not meant to be used by anybody else, you should refer to the REST API instead.
Re: Use URL to manipulate items [message #1716797 is a reply to message #1716780] Tue, 08 December 2015 09:36 Go to previous messageGo to next message
Smart Home is currently offline Smart HomeFriend
Messages: 109
Registered: February 2015
Senior Member
Does it means that this option is depreciated or is it supported with the REST API (I didn't find in the REST API this option).

My question is because the amazon echo hab uses this capability ..,
Re: Use URL to manipulate items [message #1717414 is a reply to message #1716797] Sun, 13 December 2015 10:50 Go to previous messageGo to next message
Markus Rathgeb is currently offline Markus RathgebFriend
Messages: 105
Registered: August 2014
Senior Member

That option is part of the Classic UI and so not really part of the core framework.
Have a look here: http://demo.openhab.org:9080/doc/index.html#!/items/postItemCommand
Re: Use URL to manipulate items [message #1717630 is a reply to message #1717414] Tue, 15 December 2015 11:32 Go to previous message
Sascha Wolter is currently offline Sascha WolterFriend
Messages: 6
Registered: December 2015
Junior Member
I would suggest using the REST API. For instance, an easy starting point would be using Postman and starting with a GET request pointing to http://127.0.0.1:8080/rest/ (in case you have activated the according REST bundle and you use the standard configuration). Here you get an overview where you can easily navigate through the REST API up to a single item and its state while clicking the links. Hope that helps, Sascha. P.S.: Most likely you must activate CORS in your git\smarthome\distribution\smarthome\conf\smarthome.cfg file.
Previous Topic:Benefits of XML/XSL rules/templates
Next Topic:Channel states/commands on the event bus
Goto Forum:
  


Current Time: Fri Apr 19 00:56:56 GMT 2024

Powered by FUDForum. Page generated in 0.03932 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top