HTTP request
Posted: 23 Feb 2020 13:34
Good Morning,
I have been looking in forum and I couldnt find the response for the problem I have.
First I have to say my level is JS is very low, but in other cases I could do what I needed.
In this case I created a HTTP request switchBinary. The URL for actions On and Off works perfectly, but in the URL to get value I have http://192.168.45.126/relay/0 that respond the value: {"ison":true, "has_timer":false} if the relay is on and {"ison":false, "has_timer":false} if the relay is off
I try many combinations for "Inline Javascript to parse incoming data to 'on'/'off' strings" but i must be doing something bad, for example $$.ison === 'true' ? 'on' : 'off'
if you could help me I would be very grateful. Thank you in advance.
I have been looking in forum and I couldnt find the response for the problem I have.
First I have to say my level is JS is very low, but in other cases I could do what I needed.
In this case I created a HTTP request switchBinary. The URL for actions On and Off works perfectly, but in the URL to get value I have http://192.168.45.126/relay/0 that respond the value: {"ison":true, "has_timer":false} if the relay is on and {"ison":false, "has_timer":false} if the relay is off
I try many combinations for "Inline Javascript to parse incoming data to 'on'/'off' strings" but i must be doing something bad, for example $$.ison === 'true' ? 'on' : 'off'
if you could help me I would be very grateful. Thank you in advance.