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)

18910111214»

Comments

  • Sorry to ask a nitwit question.. How should i put the next command in a flowcard? (Tried a few, but doesn't work..)

    curl -d "<YAMAHA_AV cmd=\"PUT\"><Main_Zone><Power_Control><Power>Standby</Power></Power_Control></Main_Zone></YAMAHA_AV>" http://192.168.178.29/YamahaRemoteControl/ctrl
     
    before http there is a space
  • fredsky said:
    Sorry to ask a nitwit question.. How should i put the next command in a flowcard? (Tried a few, but doesn't work..)

    curl -d "<YAMAHA_AV cmd=\"PUT\"><Main_Zone><Power_Control><Power>Standby</Power></Power_Control></Main_Zone></YAMAHA_AV>" http://192.168.178.29/YamahaRemoteControl/ctrl
     
    before http there is a space
    Have you read this thread: https://forum.athom.com/discussion/1119/yamaha-receiver/
  • Gerco90Gerco90 Member
    edited February 2018
    Hello all,

    I have a question. I have a Pioneer receiver and installed the Pioneer app on Homey. It is working great, but the command to switch my receiver to the GAME hdmi input (my Chromecast) is not working (probably it is a different command for my receiver). Now I was wondering. I can control my receiver with a telnet session, and with telnet I am able to switch my receiver to the GAME hdmi input. Is it possible to send a telnet command with the help of this app?

    Thanks in advance!
  • I searched for timeout but couldn't find the answer. I use the "and" for a get code card and my value is 200. I run a series of events when the call returns a 200. I would like to run an "else"  statement when the call timeouts. I hoped returning nothing (timeout) would trigger the else function. But I dont see this happen. Anyone an idea how to make this possible? I would like an error push message when an applience which I control through http isn't online.
  • Phaeton said:
    I searched for timeout but couldn't find the answer. I use the "and" for a get code card and my value is 200. I run a series of events when the call returns a 200. I would like to run an "else"  statement when the call timeouts. I hoped returning nothing (timeout) would trigger the else function. But I dont see this happen. Anyone an idea how to make this possible? I would like an error push message when an applience which I control through http isn't online.
    The net scan app is perfect for this purpose: https://apps.athom.com/app/nl.terryhendrix.netscan
  • Gerco90 said:
    Hello all,

    I have a question. I have a Pioneer receiver and installed the Pioneer app on Homey. It is working great, but the command to switch my receiver to the GAME hdmi input (my Chromecast) is not working (probably it is a different command for my receiver). Now I was wondering. I can control my receiver with a telnet session, and with telnet I am able to switch my receiver to the GAME hdmi input. Is it possible to send a telnet command with the help of this app?

    Thanks in advance!
    Hi Gerco,

    Telnet is not supported by the HTTP app.
  • Phaeton said:
    I searched for timeout but couldn't find the answer. I use the "and" for a get code card and my value is 200. I run a series of events when the call returns a 200. I would like to run an "else"  statement when the call timeouts. I hoped returning nothing (timeout) would trigger the else function. But I dont see this happen. Anyone an idea how to make this possible? I would like an error push message when an applience which I control through http isn't online.
    The net scan app is perfect for this purpose: https://apps.athom.com/app/nl.terryhendrix.netscan
    Thanks, works like a charm!
  • @ErikVanDongen

    Hi Erik, I tried using the POST action card (A30) with a https URL. It fails with the message "unable to verify the first certificate" even though the URL has a valid SSL certificate. Any clue what is going on and how to fix it?
  • Phuturist said:
    @ErikVanDongen

    Hi Erik, I tried using the POST action card (A30) with a https URL. It fails with the message "unable to verify the first certificate" even though the URL has a valid SSL certificate. Any clue what is going on and how to fix it?
    Is this issue only with posting to https? Could you test it with a GET request also on the same endpoint?
  • PhuturistPhuturist Member
    edited May 2018
    Phuturist said:
    @ErikVanDongen

    Hi Erik, I tried using the POST action card (A30) with a https URL. It fails with the message "unable to verify the first certificate" even though the URL has a valid SSL certificate. Any clue what is going on and how to fix it?
    Is this issue only with posting to https? Could you test it with a GET request also on the same endpoint?
    Turns out the SSL certificate did not have the intermediate and root certificate included and node/Homey appearantly did not have it in store. So that's fixed now.

    But I ran into another problem. I'm trying to set a header overriding the card with node http options. Havent got it working yet though. But I'll fiddle some more.

    [EDIT]
    Fixed it!
  • mickelmickel Member
    edited May 2018
    I have some Moxa E1214  6 DI, 6 relay modules,    these are modbus modules.
    Beacuse there is not yet a modbus app,  i using a RPI with openhab en mqtt to  read and write the modules with homey.
    This works OK but in firmware 3  there is also a RESTful api in the device intergraded.

    And a want to use that,  but don't know exactly how.
    The documentation for the API can be found on https://www.moxa.com/support/DownloadFile.aspx?type=support&id=13711

    Basicaly you can do a GET or a PUT message towards the moxa.   i tested this with postman and it works, but i want to know if its possible with homey and the HTTP Request flow APP.

    As example to get the device info  you need to send a GET  with http://<IPADDRESS>/api/slot/0/sysInfo/device
    but with some headers, they are  necessary!
    The headers are : 
    > Accept: vdn.dac.v1
    > Content-Type: application/json

    The return message is a JSON output  like : {"slot":0,"sysInfo":{"device":[{"modelName":"E1214","deviceName":"slave1","deviceUpTime":"22:54:50","firmwareVersion":"V3.0 Build17111512"}]}}

    It will be great if somebody can help me out so i get this to work.

    EDIT :  found the solution after some debugging

    Creating flow that triggers e.g. every 5 seconds.(if)

    (then)  A22 card   with  url (first field:)  

    {"method":"get","protocol":"http:","hostname":"192.168.2.15","path":"/api/slot/0/io/di/<channelnumber>/diStatus","headers":{"Accept":"vdn.dac.v1","Content-Type":"application/json"}}

    <channelnumber> = input number on the moxa module (0-6 for the E1214)

    This returns jSON: 
    {
        "slot": 0,
        "io": {
            "di": {
                "0": {
                    "diStatus": 0
                }
            }
        }
    }

    Second Field JSONPath : $.io.di[*].diStatus   because i only needs the status.
    Status can be 0 or 1  en that will be stored in a variable(third field)

    Now testing and composing the put to trigger a relay output, any help will be great
  • viixviix Member
    I’m polling a few public api with the Json to better logic variable card for 6 variables each.

    Is there a way to only poll once and extract the 6 variables via json instead of using the card 6 times to poll?

    the way I’m doing it seems to lag my homey everytime it polls..
  • viix said:
    I’m polling a few public api with the Json to better logic variable card for 6 variables each.

    Is there a way to only poll once and extract the 6 variables via json instead of using the card 6 times to poll?

    the way I’m doing it seems to lag my homey everytime it polls..
    Yes, use card A24 to get the JSON and then card T81 as trigger on a flow where you extract the json values.
  • BasPostBasPost Member
    edited July 2018
    Hi, I need some help. I want to get a status of a device in Domoticz. I ping my tv's in Domoticz and wan't to check the status with a flow in Homey with JSON. So I can use it in Homey to trigger events.
    Netscan doesn't seem to work for me, see picture.
    So that's why I want to use Domoticz and JSON with flows
  • BasPost said:
    Hi, I need some help. I want to get a status of a device in Domoticz. I ping my tv's in Domoticz and wan't to check the status with a flow in Homey with JSON. So I can use it in Homey to trigger events.
    Netscan doesn't seem to work for me, see picture.
    So that's why I want to use Domoticz and JSON with flows
    Whats the problem with netscan? It's the perfect app for this kind of flows. The http app cards does not handle unreachable devices well. With the netscan app you can trigger a flow by a device going online or offline. So polling every 5 minutes is not needed then.
  • viixviix Member
    Yes, use card A24 to get the JSON and then card T81 as trigger on a flow where you extract the json values.
    Thanks! Finally trimmed down my flows..
    one more question, is there a way to execute a flow when any of the json path returns an error?

    I can test a flow to check manually but when public APIs decide to change the path, I wouldn’t be updated and I was wondering if there is a card for that?
  • _Marco__Marco_ Member
    edited July 2018
    I have a question, and I thought that this worked in the near past ok, but now not any more.

    I have 2 camera's connected to my Synology, for both camera's I use an http action with an different name in it:


    The MP-cam is switched off in Synology and will not detect anything, but still every time a movement is detected on the Doorbird camera I get an log of both in Simple Log:
    2018-07-15 16:12:30 Beweging in kantoor (overdag)
    2018-07-15 16:12:30 Beweging bij deurbel gedetecteerd (overdag)

    2018-07-15 14:28:56 Beweging in kantoor (overdag)
    2018-07-15 14:28:56 Beweging bij deurbel gedetecteerd (overdag)

    SImple log lines are written by different flows, where the last part of the url is the selection. (if value = Doorbird_MotionDetect) ..






    Or is my Surveillance on the NAS sending both...

    If http://192.168.10.XXX/api/app/com.internet/whitelist/Camera-Motion/MP-CAM1_MotionDetect is triggered I also see the VoordeurLicht variable set on the Doorbird flow.
  • @ErikVanDongen Thanks a lot for this awesome app! 

    I'm using it to shutdown or reboot my HTPC using a piece of software called 'Airytec Switch Off'. It creates a link to shutdown or reboot my HTPC. Really awesome and usefull.

    But I like to do more with it, like starting programs on my HTPC and change settings in windows 10. Do you know some windows apps that can be used for this?

    Anyone? Really like an option to start a windows script using this Homey app..
  • @ErikVanDongen Thanks a lot for this awesome app! 

    I'm using it to shutdown or reboot my HTPC using a piece of software called 'Airytec Switch Off'. It creates a link to shutdown or reboot my HTPC. Really awesome and usefull.

    But I like to do more with it, like starting programs on my HTPC and change settings in windows 10. Do you know some windows apps that can be used for this?

    Anyone? Really like an option to start a windows script using this Homey app..
    Are the predefined script in your Airytec solution usable? (http://www.airytec.com/en/switch-off/feature.aspx?id=predefined-scripts)
  • _Marco_ said:
    I have a question, and I thought that this worked in the near past ok, but now not any more.

    I have 2 camera's connected to my Synology, for both camera's I use an http action with an different name in it:


    The MP-cam is switched off in Synology and will not detect anything, but still every time a movement is detected on the Doorbird camera I get an log of both in Simple Log:
    2018-07-15 16:12:30 Beweging in kantoor (overdag)
    2018-07-15 16:12:30 Beweging bij deurbel gedetecteerd (overdag)

    2018-07-15 14:28:56 Beweging in kantoor (overdag)
    2018-07-15 14:28:56 Beweging bij deurbel gedetecteerd (overdag)

    SImple log lines are written by different flows, where the last part of the url is the selection. (if value = Doorbird_MotionDetect) ..






    Or is my Surveillance on the NAS sending both...

    If http://192.168.10.XXX/api/app/com.internet/whitelist/Camera-Motion/MP-CAM1_MotionDetect is triggered I also see the VoordeurLicht variable set on the Doorbird flow.
    As long as one or more conditions in the center column are not met, the 'Anders' actions will be executed. So you havn't set this flows set up correctly. 
  • I solved my double and unwanted second  logging and actions by not reusing the Camera-Motion part, but used 2 different ones.  At that moment it started working again (no need to change the flows).

    http://192.168.10.XXX/api/app/com.internet/whitelist/MP-CAM1/MP-CAM1_MotionDetect
    http://192.168.10.XXX/api/app/com.internet/whitelist/Doorbird/Doorbird_MotionDetect


    Is it a bug maybe?
    Why could I not used the Camera-Motion part for both flows?

  • _Marco_ said:
    I solved my double and unwanted second  logging and actions by not reusing the Camera-Motion part, but used 2 different ones.  At that moment it started working again (no need to change the flows).

    http://192.168.10.XXX/api/app/com.internet/whitelist/MP-CAM1/MP-CAM1_MotionDetect
    http://192.168.10.XXX/api/app/com.internet/whitelist/Doorbird/Doorbird_MotionDetect


    Is it a bug maybe?
    Why could I not used the Camera-Motion part for both flows?

    This is not a bug, it's logic.
    The 'anders' actions are performed when 1 or more conditions are not met. 
  • @ErikVanDongen Thanks a lot for this awesome app! 

    I'm using it to shutdown or reboot my HTPC using a piece of software called 'Airytec Switch Off'. It creates a link to shutdown or reboot my HTPC. Really awesome and usefull.

    But I like to do more with it, like starting programs on my HTPC and change settings in windows 10. Do you know some windows apps that can be used for this?

    Anyone? Really like an option to start a windows script using this Homey app..
    Are the predefined script in your Airytec solution usable? (http://www.airytec.com/en/switch-off/feature.aspx?id=predefined-scripts)
    No, that's the strange thing.. locally they are working, but over the internet they are not. Than, only restarting and shutdown is working..
Sign In or Register to comment.