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
url: http://192.168.0.110:8084/json.htm
parameters: ?type=devices&rid=32
JSON: $.[0][result][CounterToday]
variable: solarToday
What is wrong with the parameters, does it need special formatting? I tried between brackets as well but to no avail.
And the stangest thing is, my JSON contains this "8.153 kWh" but Homey seems to know the meaning of of the abbreviation of kWh and tells me "kilowatt hours" . How can it do that?
These are the values used:
I can't find a "<" token anywhere in those
In a separate flow I'm using a similar card to get some other values from another source, that works just fine (green tick appears). The only difference is that it has content between the {}s.
You can get it here if you don't want to wait: https://github.com/irritanterik/homey-http-request-actions
(I sooo wish there was an internal Homey system log that recorded flow action)
Update: nothing to do with the trigger not working, I look at the BetterLogic list of variables and their timestamps. That's not correct, see https://forum.athom.com/discussion/840/better-logic-variable-management#latest.
Pretty, please?
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: numbersandlettershere='));
BTW, is the option to update variable in better logic from a certain JSON value fully working now?
Thanks for making this app, works wonderfully. I have a question, which is perhaps not specifically a problem with this app, but more with my inability to fully grasp HTTP GET/POST/whatever.
Yamaha receivers can be controlled with HTTP_POST, as far as I know, but a quite lengthy xml code has to be send. Nothing that I try in Homey seems to work. What I think I should be sending is something like the following:
POST /YamahaRemoteControl/ctrl HTTP/1.1
"<YAMAHA_AV cmd="PUT"><System><Power_Control><Power>Standby</Power></Power_Control></System></YAMAHA_AV>"
Do you have any idea how to enable this in Homey?
Thanks~!
The HTTP app does not support xml formatted or free format body POST.
An issue with a free format body would be special characters. It would be hard and possibly risky to work around Homey's native special-character-escaping mechanism for flow card parameters.
Replace the commands and in a few days Yamaha might be working
I currently use Domoticz as I have a bunch of MySensors. I have 2 of these sensors on my robot mower garage, one detects rain, and another detects soil moisture, they're both simple on / off switches.
I am right in thinking that in order to record them as variables to use elsewhere, I need 2 flows for each. One that runs on an interval and looks up the JSON value, and the seconds which uses the trigger card, to set the better logic variable. Is that right? Also, how can I match the http variable to my better logic variable?
Edit: Okay, got it working. This is how I have it setup:
Flow 1: every 5 minutes get a 2 x JSON values
Flow 2 & 3: Based on variable trigger, set Better Logic variable.
Flow 4: If Better Logic variables = "On", Trigger mower to return.
Does that seem an efficient use of the cards?
Using the Better Logic API for this is also an options.
BTW, I'm pasting in a plain text GET command:
http://192.168.1.14:8080/json.htm?type=command¶m=switchlight&idx=6&switchcmd=On
It seems to get changed to:
http://192.168.1.14:8080/json.htm?type=command¶m=switchlight&idx=6&switchcmd=On
On either paste or save, any ideas?
What happens when you try it as:
http://192.168.1.14:8080/json.htm?type=command&param=switchlight&idx=6&switchcmd=On
Such a shame I was so close to the perfect flow to my robot mower!