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
[edit]
Nope, same result.
Has anyone else tried doing this yet?
Hi I’m trying to use this but am struggling with the 2nd part of the HTTP PUT Json.
This is the complete URL that switches on a lamp at my Domoticz.
http://10.8.4.36:8080/json.htm?type=command¶m=switchlight&idx=20&switchcmd=On
If I past this in a browser it works.
It would be nice to hook up Homey to Domoticz via JSON. If that works I would be able to use the voice commands of Homey to control devices (IDX) numbers of Domoticz.
When I use the "HTTP PUT Json" option
The first part looks like "http://10.8.4.36:8080/"
The 2nd part i tried
{json.htm?type=command¶m=switchlight&idx=20&switchcmd=On} --> Not working
{type=command¶m=switchlight&idx=20&switchcmd=On} --> Not working
Anybody an idea ?
Following the rules {} is an object.
volume is a string and 0.5 is a value
Strings are notated between ""
Values can be int/string/float/etc. and depending on the type the notation is different.
Try these on http://jsonlint.com/
The last one is valid.
http://10.8.4.36:8080/json.htm?type=command¶m=switchlight&idx=20&switchcmd=On
in a "get" flow card.
Unfortunately, both give the same result and the volume stays the same.
I guess I'll just wait a couple of days until .18 is released and it's included in the UI
When you open http://<ip>/api/manager/speaker, you get:
It's OK, I'll wait a couple of days for the new firmware
I have just updated your app with my own app i created earlier.
This can trigger flows or send values to hmey by sending a http get request to homey on port 9090 eg:
http://iphomey:9090/triggerflow
http://iphomey:9090/updatevalue/value
You can find the code here:
https://github.com/elgenioNL/homey-http-request-actions-master
No need for me to create and upload an extra app especially for this:)
I tried the HTTP Get but it doesn't work.. which is strange because in a browser it works and this is a http "get" as well.
I see this in the dev app log of homey.log:
Http Get action. Passed parameter: { url: 'http://192.168.1.36:8080/json.htm?type=command&param=switchlight&idx=128&switchcmd=Toggle' }
Hi BramSloot,
So if I understand correctly,
Homey interprets the string and sends it as you captured it ? If so I presume the code of the app needs to be changed.
I also tried to look in the logfile of Domoticz but nothing shows up there.
Is there an option get some more insight in the logging etc… of Homey ?
Thx for your investigation and feedback so far, much appreciated.
I'm considering an extra action card for passing url (get) parameters, to overcome the &-encoding issue.
the adresses ar all local, and it works when i use chrome/firefox. Yet the command won't come thru use the HTTP GET . Am i understanding the HTTP GET option wrong?
@ErikVanDongen Glad to hear it. The & is essential for the ur l to work unfortunatly, tried it without, but it didn't work. Thought it was me
Then i'll wait for release 0.3.x but i'm glad it's clear what the "problem" is with the & in the get tring.
I added the flow trigger card (copied it from @BramSloot) and a new card for get requests with URL parameters. Put these parameters in a valid JSON object:
This is my how I can turn on my Denon receiver.
http://192.168.0.2/MainZone/index.put.asp?cmd0=PutZone_OnOff/ON
Download the github repository to your pc and then run it from the command line with athom project --run
(after installing nodejs and the athom cli and the 'athom --login' command)
Thanx