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)

ErikVanDongenErikVanDongen Member
edited September 2017 in Apps

Simple HTTP Connector For Flows



Check it out the full description in the store : https://apps.athom.com/app/com.internet

Feedback is welcome! 
Happy hacking!

19-sep-2017: Version 2.0.0 is published.
Minor bugfixes and rewrite to SDK v2 

02-01-2017: Version 1.5.0 is published. A lot has happened since 1.3.3. I added support for white-listed unauthorized API calls (check the settings page). Also added more JSONpath logic cards, a POST trigger and XML cards.
08-08-2016: Version 1.3.3 is now published. The better logic card now supports Number typed variables.
02-07-2016: Version 1.3.0 is now published. A new action card for setting Better Logic variables is added.
31-05-2016: Version 1.2.1 is now published. It has now a build in timeout on request of 30 seconds. With the geek http options you can set {"url": "http://www.athom.com", "timeout": milliseconds} if you want a custom timeout.
04-05-2016: Version 1.2.0 is now published in the app store. It allows disabling the authorization on the API (restart app after settings change) and some geeky stuff with http options.
26-04-2016: Update: version 1.0.0 is now released. It has a breaking change for API users: API calls for flow triggers now require the authorization header.

Tagged:
«13456714

Comments

  • Who!! great!! I use my vera3 to push some Zwave data to the "outside" world (local Rpi) so i definitely going to use this!
  • Congrats :smiley: 

    I installed it, but have no way of testing. The cards showed up :smiley: 
  • My first usage was trigger the {"alert": "select"} effect on my hue lights.  :)

  • Great! 
    Maybe it is possible to use it with the smarter coffee maker! 
  • Great work!
    can we use this possibly to trigger the philips hue scenes?
  • I want to half the volume because it is so loud (Please Emile add a function in next update to edit the volume it shouldnt be that hard)
  • Cool, should be possible to use this for controlling my Hyperion server and for instance have the connected LEDs show the same color as the Homey LED ring :smiley: 
  • MarcoFMarcoF Member
    edited February 2016
    @kitkat ;;;
    You can use @ErikVanDongen app to change the volume of homey
    In card "HTTP Post JSON":
    Add this to the "url" field: "http://IPToYourHomey/api/manager/speaker/" 
    Add this to the "JSON" field: { "volume"': 0.5 }

    And as i read it right, the next update will have an volume option.


  • hrc said:
    Great work!
    can we use this possibly to trigger the philips hue scenes?
    Yes you can. Learn from this: http://www.developers.meethue.com/documentation/getting-started and then create a HTTP Put request for activating a scene for a group. (http://www.developers.meethue.com/documentation/groups-api)

  • Could you also add the option for other HTTP methods?
  • I'm not sure how the Kodi app is coming along, but json for Kodi does wonders as well (if somebody wants to tinker with it without knowing Kodi has json support)
  • I'm not sure how the Kodi app is coming along, but json for Kodi does wonders as well (if somebody wants to tinker with it without knowing Kodi has json support)
    No one is working on a Kodi app yet. Would be great of this app can be used for (basic) kodi stuff.
  • KoenMartensKoenMartens Member
    edited February 2016
    Phuturist said:
    I'm not sure how the Kodi app is coming along, but json for Kodi does wonders as well (if somebody wants to tinker with it without knowing Kodi has json support)
    No one is working on a Kodi app yet. Would be great of this app can be used for (basic) kodi stuff.
    Ah you're right. Was confusing this with a Plex app.

    The most basic json commands for Kodi are:

    Play/Pause: #KodiUrl#/jsonrpc?request={"jsonrpc":"2.0","id":"1","method":"Player.PlayPause","params":{"playerid":0}}
    
    Next song/video in playlist: #KodiUrl#/jsonrpc?request={"jsonrpc":"2.0","id":"1","method":"Player.Goto","params":{"playerid":0,"to":"next"}}
    Previous: #KodiUrl#/jsonrpc?request={"jsonrpc":"2.0","id":"1","method":"Player.Goto","params":{"playerid":0,"to":"previous"}} Stop: #KodiUrl#/jsonrpc?request={"jsonrpc":"2.0","id":"1","method":"Player.Stop","params":{"playerid":0}}

    A lot of information on what's playing now (not sure if you can put this in the Flows, but if there ever will be something like 'If you ask 'Who is this artist?''-->'Speak the result of this json query'

    #KodiUrl#/jsonrpc?request={"jsonrpc":"2.0","method":"Player.GetItem","params":{"properties":%5B"title","album","artist","duration","thumbnail","file","fanart","streamdetails"%5D,"playerid":0},"id":"AudioGetItem"}
    In which you can remove all properties except one to only get that one result, or leave them all in to get em all. Note that that command only works for audio, not for video.

    Also information on time can be requested as follows:
    #KodiUrl#/jsonrpc?request={"jsonrpc":"2.0","id":"1","method":"Player.GetProperties","params":{"playerid":0,"properties":%5B"time","percentage","totaltime","position","repeat","shuffled","currentsubtitle","subtitles"%5D}}

    Which works the same as the title/album/artist one.

    In all cases, #KodiUrl# should be replaced with your Kodi url and port, which can be found under Kodi settings, as long as UpnP is enabled on Kodi (for me it is 192.168.xx.xx, with port 8080 (I believe that port is standard)).

    I will look into doing a bit more work on Kodi support if I have my Homey, but alas.

    I have used these commands a while back for a Rainmeter-supported interface of Kodi
  • now the correct json to control the famous lightring of the homey ?
  • Richard said:
    Could you also add the option for other HTTP methods?
    Sure. Which options would you like? 
  • Brilliant!! :love: 
  • This is great !!  Now I can use my homey together with my Domoticz system.....  :p
  • It doesn't let me install it:


  • There seem to be connection problems for the moment (although I just installed the app).  Maybe try again a bit later.
  • kitkat said:
    I want to half the volume because it is so loud (Please Emile add a function in next update to edit the volume it shouldnt be that hard)
    Emile already mentioned a couple of time this will be available in 0.8.18, so use the solution mentioned here, or have patience for a few days until they release the new firmware :)
  • hrc said:
    Great work!
    can we use this possibly to trigger the philips hue scenes?
    Yes you can. Learn from this: http://www.developers.meethue.com/documentation/getting-started and then create a HTTP Put request for activating a scene for a group. (http://www.developers.meethue.com/documentation/groups-api)

    Thanks!
  • Richard said:
    Could you also add the option for other HTTP methods?
    Sure. Which options would you like? 
    DELETE and PUT please
  • Richard said:
    DELETE and PUT please
    Looks like PUT is in already?
  • DELETE and PUT please
    PUT is already supported. I'll add DELETE in the next version. 
    I will also add condition versions of the cards for checking the response-code.
  • Very nice! I was thinking of this myself. I'm still a very noob, but can I also pass in a variable from homey to this request? 
  • MarcoF said:
    @kitkat ;;;
    You can use @ErikVanDongen app to change the volume of homey
    In card "HTTP Post JSON":
    Add this to the "url" field: "http://IPToYourHomey/api/manager/speaker/" 
    Add this to the "JSON" field: { "volume"': 0.5 }

    And as i read it right, the next update will have an volume option.


    I tried making this flow, but when I test run it, the little circle above the globe icon just keeps spinning indefinitely.
    The volume doesn't appear to change (it's still loud when I use 0.1)
    Do the spaces matter between the brackets?
  • no. but there is a ' too much
  • Noticed that also after a couple of tries :)
    But after removing it, I still have the same problem.
Sign In or Register to comment.