curl on blocky

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
korniza
Posts: 157
Joined: Thursday 27 August 2015 18:12
Target OS: Raspberry Pi / ODroid
Domoticz version: V3.6028
Location: Greece
Contact:

curl on blocky

Post by korniza »

Merry Christmas to everyone.
I try to use curl on a blocky script but I did not find any way to run it. I also tried to search on forum but search return error.

Code: Select all

Forbidden

You don't have permission to access /forum/search.php?keywords=curl on this server.
the command I try to run from domoticz is the following

Code: Select all

curl -X POST -d "text=We wish you a merry Christmas and a happy new year" http://localhost:8010/google-home-notifier
>>>> Google Home <<<<<
SBC: Odroid XU4 * Raspberry Pi2 * banana Pi v1
Peripherals: rfxtrx433E, aeon z-stick gen5, bluetooth dongles
Extended Software packages: Xeoma (video NVR), FHEM (extra home automation software)
User avatar
Egregius
Posts: 2592
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: curl on blocky

Post by Egregius »

What's wrong with the Messages > http block?
korniza
Posts: 157
Joined: Thursday 27 August 2015 18:12
Target OS: Raspberry Pi / ODroid
Domoticz version: V3.6028
Location: Greece
Contact:

Re: curl on blocky

Post by korniza »

how I can add the parameter on text using http block? sorry it is my first time I use this
>>>> Google Home <<<<<
SBC: Odroid XU4 * Raspberry Pi2 * banana Pi v1
Peripherals: rfxtrx433E, aeon z-stick gen5, bluetooth dongles
Extended Software packages: Xeoma (video NVR), FHEM (extra home automation software)
User avatar
Egregius
Posts: 2592
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: curl on blocky

Post by Egregius »

Doesn't this work?

Code: Select all

http://localhost:8010/google-home-notifier?text="We wish you a merry Christmas and a happy new year"
korniza
Posts: 157
Joined: Thursday 27 August 2015 18:12
Target OS: Raspberry Pi / ODroid
Domoticz version: V3.6028
Location: Greece
Contact:

Re: curl on blocky

Post by korniza »

Egregius wrote:Doesn't this work?

Code: Select all

http://localhost:8010/google-home-notifier?text="We wish you a merry Christmas and a happy new year"
Nope. I tried http:// and open url but no action performed :(
>>>> Google Home <<<<<
SBC: Odroid XU4 * Raspberry Pi2 * banana Pi v1
Peripherals: rfxtrx433E, aeon z-stick gen5, bluetooth dongles
Extended Software packages: Xeoma (video NVR), FHEM (extra home automation software)
korniza
Posts: 157
Joined: Thursday 27 August 2015 18:12
Target OS: Raspberry Pi / ODroid
Domoticz version: V3.6028
Location: Greece
Contact:

Re: curl on blocky

Post by korniza »

I think has to do with curl -X POST option.
>>>> Google Home <<<<<
SBC: Odroid XU4 * Raspberry Pi2 * banana Pi v1
Peripherals: rfxtrx433E, aeon z-stick gen5, bluetooth dongles
Extended Software packages: Xeoma (video NVR), FHEM (extra home automation software)
User avatar
Egregius
Posts: 2592
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: curl on blocky

Post by Egregius »

If the other side doesn't accept a GET request you could put your curl in a shell script and call that script.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest