This is the forum archive of Homey. For more information about Homey, visit the Official Homey website.

The Homey Community has been moved to https://community.athom.com.

This forum is now read-only for archive purposes.
Official

[APP] Simple HTTP Connector For Flows (2.0.0)

13468914

Comments

  • You need to put the query parameters (stuff starting with ?) in a json format. Check the description in the app store.
  • HansieNLHansieNL Member
    edited April 2016
    @MarkSwift ;
    Have you tried to delete the characters "d&p" of command&param and type them again.
    I had once somewhere a hidden character.
  • HansieNL said:
    @MarkSwift ;
    Have you tried to delete the characters "d&p" of command&param and type them again.
    I had once somewhere a hidden character.

    MarkSwift said:
    Same thing, after saving and returning to the flow it's been modified
    I tried that, it actually works if I do, but then once I save and return it's back to the funky character again. @ErikVanDongen, I'm not familiar with how to convert it to JSON, I've had a shot but it doesn't seem to work, can you point me in the right direction please?
  • @MarkSwift ;
    Use the 'HTTP Get JSON' card with parameters:
    url: http://192.168.1.14:8080/json.htm
    json: {"type":"command","param":"switchlight","idx":6,"switchcmd":"On"}

  • MarkSwift said:
    HansieNL said:
    @MarkSwift ;
    Have you tried to delete the characters "d&p" of command&param and type them again.
    I had once somewhere a hidden character.

    MarkSwift said:
    Same thing, after saving and returning to the flow it's been modified
    I tried that, it actually works if I do, but then once I save and return it's back to the funky character again. @ErikVanDongen, I'm not familiar with how to convert it to JSON, I've had a shot but it doesn't seem to work, can you point me in the right direction please?
    Well, &para is the code for a paragraph, the funky character. I guess converting it to JSON like @ErikVanDongen says will do the job. 
  • Thanks! Probably one of the most useful apps in the app store! I am trying to integrate this with calls from outside of the LAN, to be able to send GET requests from Tasker while I am not at home, in order to trigger flows on Homey.

    I tried to search through this thread to find which port I would have to forward on my router, but cannot find it anywhere :blush: 
  • ErikVanDongenErikVanDongen Member
    edited April 2016
    You don't need to port-forward, just use the url homey provides for external access:
    https://<your id>.homey.athom.com/api/app/com.internet/testevent

    <your id> is what you see in your browser url when logging in externally to your Homey via my.athom.com.
  • keverjeroenkeverjeroen Member
    edited April 2016
    Anyone tried this app to communicate with a Sonos?
  • Weezul said:
    Thanks! Probably one of the most useful apps in the app store! I am trying to integrate this with calls from outside of the LAN, to be able to send GET requests from Tasker while I am not at home, in order to trigger flows on Homey.

    I tried to search through this thread to find which port I would have to forward on my router, but cannot find it anywhere :blush: 
    Have you seen this: https://forum.athom.com/discussion/comment/13981/#Comment_13981

    It uses the BetterLogic app but does what you want to achieve as far as I can tell.
  • You don't need to port-forward, just use the url homey provides for external access:
    https://<your id>.homey.athom.com/api/app/com.internet/testevent

    <your id> is what you see in your browser url when logging in externally to your Homey via my.athom.com.
    This is even better than the answer I was hoping for. Thanks!

    Phuturist said:
    Weezul said:
    Thanks! Probably one of the most useful apps in the app store! I am trying to integrate this with calls from outside of the LAN, to be able to send GET requests from Tasker while I am not at home, in order to trigger flows on Homey.

    I tried to search through this thread to find which port I would have to forward on my router, but cannot find it anywhere :blush: 
    Have you seen this: https://forum.athom.com/discussion/comment/13981/#Comment_13981

    It uses the BetterLogic app but does what you want to achieve as far as I can tell.
    Thank you, will check it out, might save me from having a long list of flows
  • posthokposthok Member
    edited April 2016
    Can someone explain me how to use this in homey  flow and get a status from domoticz and when the status is on, switch a socket? I can''t figure this out.
    This is what i get from Domoticz api.

    Retrieve status of specific device

    You can get the status of a specific device with:

    /json.htm?type=devices&rid=IDX
  • aloftaloft Member
    Anyone tried this app to communicate with a Sonos?
    Yes, just did (inspired by your question): I installed https://github.com/jishi/node-sonos-http-api/blob/master/README.md in a Docker image outside of Homey. 

    You can use HTTP GETs to issue the commands: 
    e.g. : http://192.168.89.2:6005/2. Keuken Stereo/favorite/Deezer Flow

    this flow will then start the Deezer Flow favorite configured in your Homey. 

    I have also programmed a Kaku remote to turn the volume up and down : http://192.168.89.2:6005/2. Keuken Stereo/volume/+5

    The node-sonos-http-api has all sorts of commands and presets, so possibilities seem endless. 

    I expect that the Homey provided Sonos app will integrate it much better, but for now, this is a workable solution to get my favorite stations playing via Homey. 
  • posthokposthok Member
    edited April 2016
    aloft said:
    Anyone tried this app to communicate with a Sonos?
    Yes, just did (inspired by your question): I installed https://github.com/jishi/node-sonos-http-api/blob/master/README.md in a Docker image outside of Homey. 

    You can use HTTP GETs to issue the commands: 
    e.g. : http://192.168.89.2:6005/2. Keuken Stereo/favorite/Deezer Flow

    this flow will then start the Deezer Flow favorite configured in your Homey. 

    I have also programmed a Kaku remote to turn the volume up and down : http://192.168.89.2:6005/2. Keuken Stereo/volume/+5

    The node-sonos-http-api has all sorts of commands and presets, so possibilities seem endless. 

    I expect that the Homey provided Sonos app will integrate it much better, but for now, this is a workable solution to get my favorite stations playing via Homey. 
    Can you give me an example or screenprint of your http flow i don't understand how you did this.
  • aloftaloft Member
    posthok said:
    aloft said:
    Anyone tried this app to communicate with a Sonos?
    Yes, just did (inspired by your question): I installed https://github.com/jishi/node-sonos-http-api/blob/master/README.md in a Docker image outside of Homey. 

    You can use HTTP GETs to issue the commands: 
    e.g. : http://192.168.89.2:6005/2. Keuken Stereo/favorite/Deezer Flow

    this flow will then start the Deezer Flow favorite configured in your Homey. 

    I have also programmed a Kaku remote to turn the volume up and down : http://192.168.89.2:6005/2. Keuken Stereo/volume/+5

    The node-sonos-http-api has all sorts of commands and presets, so possibilities seem endless. 

    I expect that the Homey provided Sonos app will integrate it much better, but for now, this is a workable solution to get my favorite stations playing via Homey. 
    Can you give me an example or screenprint of your http flow i don't understand how you did this.

  • Can someone explain me how to use this in homey  flow and get a status from domoticz and when the status is on, switch a socket? I can''t figure this out and don't understand the structure and syntax.
    This is what i get from Domoticz api.

    Retrieve status of specific device

    You can get the status of a specific device with:

    /json.htm?type=devices&rid=IDX
  • Sorry for asking (no help anyway), but I figured it out myself. Thanx for nothing.
  • posthok said:
    Sorry for asking (no help anyway), but I figured it out myself. Thanx for nothing.
    First, no need to be passive aggressive. Second, it's common courtesy that if you found a fix yourself, you post it to help potential others who get the same problem in the future. Nothing is more frustrating than googling a problem only to find 'I fixed it, but not going to tell you'.
  • Stil not working. A tutorial with flow syntax and Triggers would be nice. 
  • posthok said:
    Stil not working. A tutorial with flow syntax and Triggers would be nice. 
    The apps readme describes the 'Get variable and trigger a flow with it' scenario. Can you provide the complete request and response for your case? Without that it's hard to help.
  • posthokposthok Member
    edited April 2016
    Believe me I've read read.me, and believe it or not, i'm still struggling to use it in the flow. But i'm not so smart, that's my problem. A tutorial using it in a flow would be nice although.
  • ErikVanDongenErikVanDongen Member
    edited April 2016
    Well, you're smart enough to buy a Homey and install this app :wink: .
    I thing you need some help from the domoticz community on making the right request to domoticz. If you have that working in your browser, post the response here and we'll explain how to trigger a flow based on that response.
  • Ok thanx. Will uninstall then and wait for a consumer friendly app (with tutorial) :'(
  • posthok said:
    Ok thanx. Will uninstall then and wait for a consumer friendly app (with tutorial) :'(
    Can you provide the complete request and response for your case? Maybe a screenshot of your browser window with the domoticz request en response body? It's *really* hard for me to help you without it. 
  • I have solved my problem. I wan't to switch a socket on when my tv is on and the other way around. I've used the status from my Chromecast to switch hyperion on and of.
  • Good thread! Amazing how long it got without ever stating the exact problem :)

  • MG11MG11 Member
    edited April 2016
    This is kinda scary:
    if you know the Homey's ID of an user (who's using HTTP request flow cards App) you can execute every flow-action in its house/flat. You just have to find out the name of that flow/action and can trigger the action over the browser,.f.e.
    https://<id>.homey.athom.com/api/app/com.internet/<flow name> 

    Guys, that's really scary, don't you think so?
    Don't you think that this permanently activated external access (API) to Homey is a potential security threat?
  • I can make the API methods requires authorization (bearer token) if you want.
  • MG11MG11 Member
    ErikVanDongen This would make sense and in my opinion is a very important security feature. 
  • And the bearer-token gets refreshed with every login?
  • And the bearer-token gets refreshed with every login?
    No, it's a personal token for your account. The author of Better Logic already implemented this on my request. It would be good to have this for the HTTP app as well.
Sign In or Register to comment.