Web request with variable in the url


#6

0 again
in the webrequest, I use the ‘expression’ option, is there another way of doing it?


#7

Put that expression in the Log to console task and look at the output.


#8

0 always


#9

I m able to get the first variable but the second one still shown as text… like:
http/myurl?lat=45.55555lon=@longitude…
It should have a transition between …maybe a formula to merge text? concatenate?


#10

In an expression box, you can concat using the + sign


#11

You need to put your variables inside {@curly_brackets} when typing the URL.


#12

I make it works this way:
“https://api.openweathermap.org/data/2.5/onecall?lat=”@actual_latitude + “&lon=”@actual_longitude “&units=metric&exclude=hourly,daily,minutely&lang=fr&appid=xxxxxxxxxx”

Looks like I was using & at the place of + and I also notice that the + is not even needed after a variable, it miss one and still working…

Thanks again! You found it!


#13

Glad you got it working.

If you just type the URL as a ‘value’ rather than an ‘expression’, using {@curly_brackets} for your variables, you would save yourself the whole “…”+@xyz+"…"+@abc mess

:wink:


#14

I am trying to send a text request to my AV receiver.
Instruction manual says…
“The RIO Command Set is available as ASCII text via IP (using port 9621)”
My IP is 192.168.0.39
My variable name is Russound_Command and is VERSION
That should return the version of software my receiver is using.
This does not seem to work…


#15

Have you tried a get request? Then see if the version details are returned in $response
I use the above method to access the admin page of my nas to check its status


#16

Log shows…


#17

Can you use https? It’s coming back to me, and I had issues with http when I moved to HE from ST. My nas connection uses https.


#18

No dice.


#19

Can you test from another platform? Not sure you could send the message from a browser url line, and see if you get a response. I’ve used nodered in the past to test such things, if you have a raspberry pi its installed, and is very easy to set up a simple flow to test the http response


#20

You and I have had this conversation before. And as I recall, what I am trying to do is not possible with webcore. I admit, I do not understand UDP, TCP and making http calls to devices. So, my own ignorance in this arena is the rate limiting step! :slight_smile:


#21

I thought it sounded familiar!
I think it’s worth trying to get a solution working with nodered (not node.js) nodered is so much simpler. If you can get that to work you could then look at triggering the nodered flow from webcore.

Other solutions that may work -
There is an app (VM) homebridge that brings non apple homekit devices into homekit. There is a plugin to control marantz/denon amps, there maybe one for yours. You’d then have to get homekit & webcore integrated. Its a lot of work & rather convoluted, but may depend on how much you need the functionality.


#22

Greatly appreciate the help, this time and last. :slight_smile: I have long wanted to start using node-red. I just have not jumped in yet. Presently, I am using a telnet driver on Hubitat to control my Russound, and that is working…most of the time. I was hoping to switch to IP control, or at least evaluate it. BUT, if I did switch to IP control, I would have to modify all of my telnet pistons…about 25. SO, maybe not the best idea.


#23

Nodered is well worth getting into! A few things I use if for:-
-Monitor/graph power & temp usage over time
-scrapes the local authority website to tell me when to put the correct refuse bin out (uses WC too)
-When I play movie/tv show on apple tv, pauses, speaks synopsis through sonos, then resumes (I used to do this with WC, but the nodered solution is more reliable and simpler)


#24

many times this is a telnet connection, not an http rest request

If it is telnet, you may need an app to do this.


#25

I use a modified Hubitat telnet driver now that works well. I was just hoping that I could move away from that to http for future-proofing.