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.
The Homey Community has been moved to https://community.athom.com.
This forum is now read-only for archive purposes.
Official
Comments
Use card A22
First parameter: {"method": "POST", "uri": "http://192.168.0.25", "json": {"801":{"170":null}}}
Second parameter: $.801.170.116
Third parameter: select a Better Logic variable
First of all thank you for this very usefull app.
I am using the T20 trigger card to send data from my Arduino to Homey with a HTTP GET. The data I include is only available as a string. However I would like to transfer it to a betterlogic number variable. As far as I can see there is no equivalent to the A80 card which you can use only for JSON expression? Is there any possibility to do this? Do you plan such a feature in future?
You can use the API interface of Better Logic directly (requires a PUT request, type conversion will be done by Better Logic). Another approach is to use a MathJs Expression action from the Better Logic app:
I try to use this App to get my Bose Sountouch running and do not get this scenario running:
Can someone tell me where I need to enter what in a flowcard?
"So in short to set the Preset to Preset 1, you would send the following XML payload:
Recipient : http://speakerIP:8090/key
Data : <key state ="press" sender="Gabbo">PRESET_1</key>"
Source: https://community.bose.com/t5/SoundTouch-Speakers/API-Code-use/m-p/23804#M23577
Receipint is the URL I think, but when I enter the "data" into the second field there is only PRESET_1 remaining and when I test the flow I get error 400.
Thanks for your help.
Comment after some try and errors:
OK, I got it to work to Switch the Bose Sountough on/off, like when you press the power button:
- Used the POST XML Flow Card
- Insert in the first field: "http://"insert_IP_adress_of_the_Bose_ST_here":8090/key"
- in the second field "<key state="press" sender="Gabbo">POWER</key>"
This turns the Sountouch on/off when I Trigger the flow. But: When I copy and paste the second command in the flow, then there is only displayed "POWER". To make this working, you need to type the whole comment by hand in the field to accept the whole command line as it is displayed.
What I did not discover, how to use the PRESET_1 commant, as it overrides the existing presets in ST.
I'm also wondering if there is no one using the Bose ST. In other Forums there are a lot of sample scripts and apps for this device. Isn't here someone using Bose Soudtough? I'm not a coder :-(, but it seems simple to write an app for this or some Workflows with this HTTP app.
Later on, the app implemented the XML option, but since I quit programming for Homey, I haven't tested the XML card. However, I got the same issue as you have with the XML changing to POWER only. I guess the XML tags are removed somehow. But the author said he fixed it. (but maybe not)
But yes, the Bose SoundTouch API is very simple, you are ight. But programming for homey is cumbersome taking you back to the 80's
suggestion to log and it looks to be an authentication issue:
For the record, for testing/logging purpose I created a new user account on my axis camera called "user" with password "pass" like shown in the log. So this is not an error but done on purpose to give you a full view on the log.
Also using advanced http options gives the same error:
{"protocol":"http:","hostname":"ipaddress","port":80,"path":"/axis-cgi/io/virtualinput.cgi?action=1:/","headers":{"authorization":"Basic dXNlcjpwYXNz"}}
I am able to execute these with the app on my Axis camera:
Not sure what the issue is but it looks that authentication is not working .... someone any clue?
I've tried to search the forum but I haven't find a clear answer. The question is; is it possible to GET a Ajax call and get some information in the return. For example I call a flow and within the flow a variable is set to true, so the return would be something like { status:OK, variable: true, etc.. }
Thanks!
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?
I want to use the GET JSONpath function to check if the system is on "STANDBY":
1. URL: http://192.168.0.20:8090/now_playing
2. No parameter needed, but I can't save the flow without a value... any ideas?
3. JSONpath: $.nowPlaying.source
4. Value: STANDBY
The following is returend when I enter the URL in my browser:
Can someone help me?
Sorry but i can't get it working. Can somebody give me a simple example how to trigger a flow by a http request?
Thanks
If I open this url in my browser: 192.168.1.210/api/app/com.internet/kantoorventilator
(the ip is of my Homey, set it to match yours!)
It triggers this flow:
And the ventilator in my Office switches on or off :-)
Is this what you were looking for?
{"status":401,"result":"no_auth_method_found"}
{"status":200,"result":"OK"}
Are you in the same Network? Perhaps you are sending this via G3/4 (external network) and Homey is on a different one...
Both Homey and your pc/phone should be connected to the same wifi network.
You can disable it in the app's settings (on your own risk), or use one of the ways to add bearer token as header along with the GET
Also after disabling the auth method i keep getting:
["status"]=> int(401) ["result"]=> string(20) "no_auth_method_found"
Ofcource i added the IP's to the whitelist, but i keep getting teh same error.
Also i have no idea what the login should be, i cannot set any user/pass etc.
Think there is a bug in the app, i cannot get it to work at all, when i 'test' the card in homey it works normal, but when i try it from a remote browser or remote address (within my network) it gives the above no auth message.
Turning off the auth message has no effect, also adding IP's to whitelist does not work.
Hope this can be fixed soon, my wall tablet is sadly not working anymore (i build a interface on these http flow cards to control my lighting).
update/edit:
It seems that the url for local network is changed in this new version!
old url:
http://[YourHomeyIP]/api/app/com.internet/[event]/[value]
new url:
http://[YourHomeyIP]/api/app/com.internet/whitelist/[event]/[value]
The whitelist option is new in the url....
After updating the url it worked again.
Did you ever get this to work, I am trying to do the same thing but not successful so far;-(
Jacques
$.nowPlaying.$.source
Will that work for you?
I am trying to post an XML soap message to my TV to turn it of. But when I use the POST XML action card, I am unable to paste the required XML code in the second parameter field:
Has anyone any idea why this doesn't work? From curl of via postman everything works fine.
Gr. Remco
Good tip, the flooring XML with escaped <> is working in the action card:
< = <
> = >