Anyone Integrated With ST/Webcore?

@smckdwn989 With the new 2.9.0 iOS app and v2.6.32 firmware, I was able to successfully integrate a Minka Aire fan into SmartThings using webcore. I started simple, created a virtual switch and then created a piston to respond to that switch turning on or off. Here is what the piston looks like:

I masked my token, IP address, and device-ID for obvious reasons. This piston works perfectly and the latency is dramatically lower than the silly IFTTT way of integrating Bond with SmartThings.

2 Likes

when I try and run:

curl -i http://192.xxx.x.xx/v2/devices -d ‘{"_token":"xxx}’

I get:

HTTP/1.1 400 Bad Request
Content-Length: 50
Content-Type: application/json; charset=utf-8

{"_error_id":23,"_error_msg":“json parse error”}

Looks like you are missing the closing quotation mark around the token id, also you need a space after the “_token”:

Also, make sure you specify -X GET as part of the curl command. The recent API doc from Bond shows the proper curl commands to use.

-jason

Try:

curl -i http://ipadress/v2/devices -X GET -d ‘{“_token”: “your-token”}’

-jason

1 Like

curl -i http://192.xxx.x.xx/v2/devices -X GET -d ‘{"_token": “xxx”}’

HTTP/1.1 400 Bad Request
Content-Length: 50
Content-Type: application/json; charset=utf-8

{"_error_id":23,"_error_msg":“json parse error”}
curl: (3) [globbing] unmatched close brace/bracket in column 18

Try this:

curl -i http://192.xxx.x.xx/v2/devices -X GET -d '{"_token": "xxx"}'

If you look closely, you’ll see the difference. This forum often prints quotes in a way that is rejected by curl, it can be annoying but I haven’t found a way to disable it. Typing inside a code block can prevent this.

i tried it and it’s still resulting in the same error, this is so weird

Okay, and none of the quotation marks are “curved”? (‘ or “ = curl parse error, ' and " is what curl wants)

And you are sure you are on the latest firmware?

-jason

yeah I am on the latest firmware, i’m going to try executing this from my rasp pi

You could also try using surrounding double quotes and escaping the inner quotes as follows:

-d "{\"_token\": \"xyz\"}"

One post I found suggests that this might be necessary on Windows

progress now it’s saying 401 unauthorized lol

thanks to the both you of, i was able to resolve the issue, it was the windows issue. I didn’t know i needed /'s. So i was able to successfully integrate into webcore for my first living room fan. It’s definitely a nicer solution than ifttt as it’s much quicker to respond. I tried adding another fan remote to the equation, the app works but when I integrate to webcore it doesn’t respond. I know I have the device ID right as I tested it within the console. I’m at a loss as to why this isn’t working.

Glad you were able to get this fixed! I’ll get this into the documentation for Windows users.

The Action names should be “TurnLightOn” and “TurnLightOff”

got it all fixed, was an issue with the piston switch names as well. so now I have 3 fans running hunter universal remotes, all working with GE switches. Single button turns the lights on, and double tap up/down turns on and off the fans. It’s a simple nice solution and the latency is much better than ifttt

3 Likes