[SOLVED] Item value in WGET rule

Hi, I have a rule that downloads an mage when an item is changed:

rule "ringo"
when
Item Ringo changed
then
executeCommandLine("wget http://a.little.image.jpg -O /tmp/" + "FOTO_TEMP.jpg",5000)
end

How should I set it out so that the FOTO.TEMP uses instead the new value of the item Ringo? I also have another item, let’s call it Bingo, that is the current url of the image.How would I construct it to use the value of that item instead of http://a.little.image.jpg.

Many thanks, I am just having problems with where to put my " and + sybols

executeCommandLine("wget http://a.little.image.jpg -O /tmp/" + Ringo.state.toString +  ".jpg"

Thank you so much for that. I’m learning every day with help from people like you. Here is the final version that downloads the latest video from the ring doorbell thing to my temp folder as datestamp.mp4 in case it helps anyone or can be used for a cctv capture etc:

rule "ringo"
when
Item Ring_Time changed
then
executeCommandLine("wget "+ Ring_URL.state.toString +" -O /tmp/" + Ring_Time.toString + ".mp4",5000)
end
1 Like

Figured you’d work the other part out :wink: