LazrQ
November 28, 2019, 4:32pm
1
Hi,
Just bought a Homey Pro. So, I am new to this. Thx for any help.
I have several HTTP requests setup in iOS Shortcuts to turn on/off lights.
I am now trying to setup them up in Homey but can get it to work.
In iOS the setup is as following:
URL:
http://zapp-16200XXX.local/zrap/chscan/ch1
Method:
Post
Headers:
Request Body:
Form
Request Body
Cmd on
In Homey I tried the following flow:
HTTP request flow cards - POST form
URL:
http://zapp-16200xxx.local/zrap/chscan/ch1
Data:
{„cmd“: „On“}
I always get an error „400“.
Any suggestions why it is not working?
Thx a lot
Some screenshots:
iOS Shortcuts:
Homey:
And did u check this post about it?
LazrQ
November 28, 2019, 5:44pm
3
Thx. Yes, I did. I believe I have read any post in the forum about HTTP requests.
I want to replace http requests in Shortcuts with http requests in Homey.
So, my problem is not related to the post you recommended. Thx anyway.
The iOS version is requesting …/ch1
but the Homey version is requesting …/ch
(missing a trailing “1”). Also, the iOS version is using lowercase “off” but the Homey version is using start case “On”.
LazrQ
November 29, 2019, 12:53pm
6
Thx all for your help.
I found a different command which works. I am using the „logic web request“ command instead of http request.
Code structure is same as used in iOS Shortcuts. See screenshot below.
Erik
December 2, 2019, 8:55am
8
Hi all. Sorry for my late reaction. Maybe the difference is that my app sends the form variables with the querystring of the url request and the homey native card puts them in the body.
I’m happy you were able to solve this using the native card.
LazrQ
December 2, 2019, 10:25am
9
Hi Viktor,
Yes, I use this to include my Feller Light/Shutter Switches using zeptrionAir into my HomeKit setup.
Viktor
December 4, 2019, 6:23am
10
Then i am to late to help you, but anyway here how is working with the http app from Erik: