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.

HTTP app help

Hi 

Can anyone help med to send this command to my domoticz with the HTTP app  ,  dont know where and what card to use.

http://192.168.1.137:8080/json.htm?type=command&param=switchlight&idx=99&switchcmd=Off

Thanks




Comments

  • Use the http get card (at the "...then" column) and insert the above url.
  • djeskodjesko Member
    thanks will try that , dont know if i did before
  • djeskodjesko Member
    dont work , will try more later tonight !  
  • djesko said:
    dont work , will try more later tonight !  
    Can you post a screenshot of your flow?
  • djeskodjesko Member

    here you go 

    flow.PNG 296.2K
  • I'm using HTTP Get JSON and have no problems.
    Also check if HTTP authentication is disabled
  • djeskodjesko Member
    @HansieNL ;

    Any example pic to share? 
  • posthokposthok Member
    edited June 2016
    I'll think you have to try this http get json
    ulr http://192.168.1.137:8080/json.htm? 
    {"type":"command","param":"switchlight","idx":99,"switchcmd":"Off"}
    You'll have to be sure that your homey ip is known by domoticz in settings local ip.


  • HTTP Get JSON:
    URL: http://192.168.2.11:8080/json.htm
    command: {"type":"command","param":"switchlight","idx":7,"switchcmd":"On"}
  • @HansieNL  Do you now if the status On in your example could be send to a variable in Homey?
    type=devices&rid=IDX
  • djeskodjesko Member
    working now , thanks all !  
  • posthok said:
    @HansieNL  Do you now if the status On in your example could be send to a variable in Homey?
    type=devices&rid=IDX
    yep, you can change every part of the (json) string with a variable. 
  • thanx
  • Hey Guys
    A few weeks ago i discovered that the flow card parameters now allow querystrings to be passed with the url parameter. If this works for all situations, i will remove the json parameter in a future version. Can you give me some feedback on this. Are these flows working if create them like the topicstarter did earlier on?
  • Hey Guys
    A few weeks ago i discovered that the flow card parameters now allow querystrings to be passed with the url parameter. If this works for all situations, i will remove the json parameter in a future version. Can you give me some feedback on this. Are these flows working if create them like the topicstarter did earlier on?
    Is it possible to get the long forcast out of wunderground:
    http://api.wunderground.com/api/ID/forecast/q/nl/Breda.json
    $.forecast.txt_forecast.forecastday[1].fcttext_metric

    I should get: "Partly cloudy skies. Low around 10C. Winds W at 10 to 15 km/h"
    but I get: un... iets..
  • Hey Guys
    A few weeks ago i discovered that the flow card parameters now allow querystrings to be passed with the url parameter. If this works for all situations, i will remove the json parameter in a future version. Can you give me some feedback on this. Are these flows working if create them like the topicstarter did earlier on?
    Is it possible to get the long forcast out of wunderground:
    http://api.wunderground.com/api/ID/forecast/q/nl/Breda.json
    $.forecast.txt_forecast.forecastday[1].fcttext_metric

    I should get: "Partly cloudy skies. Low around 10C. Winds W at 10 to 15 km/h"
    but I get: un... iets..
    Which language is your Homey set to?
  • @RobinVanKekem Dutch. Could that be the problem? I thought it was only the spoken language
  • PhuturistPhuturist Member
    edited July 2016
    @ThijsDeJong, I dont think the language matters. Here is the URL and the JSON I use to get the forecast into a BetterLogic variable. 


    $.[forecast][txt_forecast][forecastday][0][fcttext_metric]

    If you find a way to have Homey actually say the forecast let me know, I have not managed to do this and can only get it into a variable.
  • @ThijsDeJong @Phuturist ;
    Have you tried this approach? Get the weather expection based on a speech trigger, and trigger a flow on a better logic variable is set flow. 

    Trigger:


    Action flow:



  • @Phuturist ;

    THNX for the JSON. Still don't understand why mine, didn't work.
    But he Your works so I'm happy!!

    About the speech.
    I made a second flow:


    This works for me.

    Thnx for the teamwork!

  • Awesome stuff, teamwork indeed. I was pulling in the weather forecast at specific time intervals. Doing it on demand for the forcast and using the changed variable card never occured to me. :+1: 
  • Great forum. Happy to be able to finally help someone.
  • I did notice an issue with the either the HTTP app or the BetterLogic app. If a retrieved forecast contains a foward slash in in km/u for the wind speed then the BetterLogic variable is not set. I believe it to be an issue with the BeterLogic card of the HTTP app. Can you confirm this @ErikVanDongen ;
  • @RobinVanKekem Dutch. Could that be the problem? I thought it was only the spoken language
    I thought you talked about letting Homey say the forecast.
  • Phuturist said:
    I did notice an issue with the either the HTTP app or the BetterLogic app. If a retrieved forecast contains a foward slash in in km/u for the wind speed then the BetterLogic variable is not set. I believe it to be an issue with the BeterLogic card of the HTTP app. Can you confirm this @ErikVanDongen ;
    I can confirm I just fixed this issue. Can you retest this with the version now available on github?
  • Phuturist said:
    I did notice an issue with the either the HTTP app or the BetterLogic app. If a retrieved forecast contains a foward slash in in km/u for the wind speed then the BetterLogic variable is not set. I believe it to be an issue with the BeterLogic card of the HTTP app. Can you confirm this @ErikVanDongen ;
    I can confirm I just fixed this issue. Can you retest this with the version now available on github?
    Nice, will let you know. Going to check it out this evening.
Sign In or Register to comment.