rqxrqx
(Reinhard Schmid)
1
I’am trying to send a message to WhatsApp as described in the thired method here: WhatsApp Text Messages from OpenHAB - CallMeBot API
executeCommandLine ("wget","https://api.callmebot.com/whatsapp.php?source=openHAB&phone=4366004xxxxx&apikey=xxxxx&text=Test")
The log result is: 2023-04-20 17:25:38.949 [WARN ] [rg.openhab.core.io.net.exec.ExecUtil] - Error occurred when executing commandLine '[wget, https://api.callmebot.com/whatsapp.php?source=openHAB&phone=436604xxxxx&apikey=xxxxx&text=Test]'java.io.IOException: Cannot run program “wget”: CreateProcess error=2, Das System kann die angegebene Datei nicht finden
Any idea what could be the reason?
1 Like
What is the OS that you use?
Is wget available at the commandline/shell at all?
rqxrqx
(Reinhard Schmid)
3
Win10
Do you mean the Karaf Consol? It is not available there.
hmerk
(Hans-Jörg Merk)
4
No, on Windows cmd. If you did not install wget, this cannot work.
rqxrqx
(Reinhard Schmid)
5
OK, wget for Windows was not installed, but is actually not needed.
The Windows cmd command “curl” solves the problem.
Thank you for the help.
JimT
(jimtng)
6
Or you could use the HttpUtil so you don’t need to call any external programs.
rqxrqx
(Reinhard Schmid)
7
Its the second method in the linke above.
It works but only with sendHttpGetRequest and not SendHttpGetRequest as in the link.