Skip to content

Instantly share code, notes, and snippets.

@GOROman
Created September 18, 2017 09:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save GOROman/bd2af0f08f76aa5ae5de38d022e23769 to your computer and use it in GitHub Desktop.
Save GOROman/bd2af0f08f76aa5ae5de38d022e23769 to your computer and use it in GitHub Desktop.
Ruby で THETA Vを制御したいのだけどコケるので死にたい
#RICOH THETA V を制御したいけどコケる
require 'net/http'
require 'json'
require 'pp'
HOST = '192.168.1.1' # THETA VのWIFI接続時のアドレス
PORT = 80 # THETA Vの制御ポート
http = Net::HTTP.new(HOST, PORT)
info = JSON.parse(http.get("/osc/info").body)
pp info
state = JSON.parse(http.post("/osc/state","").body)
pp state
json = {
name: "camera.startSession",
parameters: {}
}
r = http.post('/osc/commands/execute', json.to_json) # <============== これがコケる
pp r
pp r.body
@GOROman
Copy link
Author

GOROman commented Sep 18, 2017

誰か氏~

@GOROman
Copy link
Author

GOROman commented Sep 18, 2017

API v2でめちゃくちゃ変わっていた。。。
https://developers.google.com/streetview/open-spherical-camera/v2changes

@GOROman
Copy link
Author

GOROman commented Sep 18, 2017

死のう

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment