armzilla / amazon-echo-ha-bridge

emulates philips hue api to other home automation gateways
Apache License 2.0
732 stars 168 forks source link

New PUT/POST support not working? #31

Closed maddox closed 9 years ago

maddox commented 9 years ago

I pulled master, ran mvn install, restarted the server, and I don't see any semblance of the new PUT and POST support on the server that was mentioned as being added on #25.

The webview doesn't seem to have fields for METHOD, and when adding a device via the API, it returns an object without any of the new optional fields. The same happens when I query the list of devices.

curl -H "Content-Type: application/json" -X POST -d '{"name": "TV","deviceType": "switch","offUrl": "http://kitchen-pi.home:3000/remotes/vizio/KEY_POWER","onUrl": "http://kitchen-pi.home:3000/remotes/vizio/KEY_POWER","httpVerb":"POST", "contentBody":"{}", "contentType" : "application/json"}' http://media.local:8383/api/devices

=>

{
  "id":"49c54c64-0491-45b7-8911-a8c3b9c971fd",
  "name":"TV",
  "deviceType":"switch",
  "offUrl":"http://kitchen-pi.home:3000/remotes/vizio/KEY_POWER",
  "onUrl":"http://kitchen-pi.home:3000/remotes/vizio/KEY_POWER"
}

I'm also not seeing my devices actually work. What can I do to make sure things are running correctly. And is this feature actually working correctly? Thanks!

maddox commented 9 years ago

Never mind! I was in fact launching with the old 0.2.0 jar file. My dumb fault!

The response to adding a device now shows the actual new fields. And of course, it works now :)

Thanks!