kinu-garage / hut_10sqft

Computer setup tools for my own environment, and public discussion place holder.
Apache License 2.0
2 stars 1 forks source link

[ros] Get info, status of devices via iot_bridge #148

Open 130s opened 7 years ago

130s commented 7 years ago

Split from #100

Get status of devices in a certain group on openHAB https://github.com/corb555/iot_bridge/issues/5#issuecomment-310937219 (e.g. ROS, but shouldn't be limited to it).

130s commented 7 years ago

From API page, where you can send rest command on a web browser, I was able to send a command (an item yahooweather_weather_berlin_humidity, which is type "Number", with a randomly chosen value 77):

Curl
curl -X PUT --header "Content-Type: text/plain" --header "Accept: application/json" -d "77" "http://130s-rpi2:8080/rest/items/yahooweather_weather_berlin_humidity/state"

Request URL
http://130s-rpi2:8080/rest/items/yahooweather_weather_berlin_humidity/state

Response Body
no content

Response Code
202

Response Headers
{
  "date": "Thu, 06 Jul 2017 03:27:01 GMT",
  "content-type": "application/json",
  "content-length": "0",
  "server": "Jetty(9.2.19.v20160908)"
}

So maybe a Group item cannot be modified.