Error in the logs when sending SMS
Moderators: leecollings, remb0
-
- Posts: 69
- Joined: Thursday 07 January 2016 19:31
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.7
- Location: France
- Contact:
Error in the logs when sending SMS
Hello,
I have an error message every time I send an SMS that appears in the logs:
Error: Error opening url: https://myurl,mymessage
And yet the SMS arrives on my smartphone which excludes a problem with the URL.
I use it without any problem both on "action on" and "action off" of devices and in scripts (blocky, dzVents).
Everything works well but this error message in the logs bothers me.
Does anyone have any idea why this error, how to trace it and how to solve it?
I have an error message every time I send an SMS that appears in the logs:
Error: Error opening url: https://myurl,mymessage
And yet the SMS arrives on my smartphone which excludes a problem with the URL.
I use it without any problem both on "action on" and "action off" of devices and in scripts (blocky, dzVents).
Everything works well but this error message in the logs bothers me.
Does anyone have any idea why this error, how to trace it and how to solve it?
-
- Posts: 356
- Joined: Saturday 27 February 2016 0:30
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.2
- Contact:
Re: Error in the logs when sending SMS
You ma have an error code returned, while message is sent.
What does return the command when you copy/paste it into a browser?
What does return the command when you copy/paste it into a browser?
-
- Posts: 69
- Joined: Thursday 07 January 2016 19:31
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.7
- Location: France
- Contact:
Re: Error in the logs when sending SMS
Thanks @Flying Domotic
In the html type the following resources are used :
load
resource:///modules/FaviconLoader.sys.mjs:175:20
load
resource:///modules/FaviconLoader.sys.mjs:564:70
loadIcons
resource:///modules/FaviconLoader.sys.mjs:643:26
onPageShow
resource:///modules/FaviconLoader.sys.mjs:677:12
onHeadParsed
resource:///actors/LinkHandlerChild.sys.mjs:54:24
handleEvent
resource:///actors/LinkHandlerChild.sys.mjs:170:21
Nothing special. The SMS is send and received, that's all.FlyingDomotic wrote: ↑Sunday 16 February 2025 23:18 What does return the command when you copy/paste it into a browser?
In the html type the following resources are used :
load
resource:///modules/FaviconLoader.sys.mjs:175:20
load
resource:///modules/FaviconLoader.sys.mjs:564:70
loadIcons
resource:///modules/FaviconLoader.sys.mjs:643:26
onPageShow
resource:///modules/FaviconLoader.sys.mjs:677:12
onHeadParsed
resource:///actors/LinkHandlerChild.sys.mjs:54:24
handleEvent
resource:///actors/LinkHandlerChild.sys.mjs:170:21
-
- Posts: 356
- Joined: Saturday 27 February 2016 0:30
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.2
- Contact:
Re: Error in the logs when sending SMS
I mean, does the page return an error (non 200 status) when opened in a browser?
-
- Posts: 69
- Joined: Thursday 07 January 2016 19:31
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.7
- Location: France
- Contact:
Re: Error in the logs when sending SMS
@FlyingDomotic
No error code in the browser. As I said, SMS is send without any message of any sort. All is working like a charm.
The URL is in this form : "https://smsapi.myoperator/sendmsg?user= ... %20message"
(as the URL is truncated, the real content is : smsapi.myoperator/sendmsg?user=<MyUserNumber>&pass=<MyPass>&msg=The%20text%20of%20my%20message)
The same URL is also used successfully by my NAS Synology to send me notifications. So we can definitely forget a problem with the URL itself.
The only error reported is in the log in Domoticz.
So I suspect it is more a bug in Domoticz itself than anything else.
No error code in the browser. As I said, SMS is send without any message of any sort. All is working like a charm.
The URL is in this form : "https://smsapi.myoperator/sendmsg?user= ... %20message"
(as the URL is truncated, the real content is : smsapi.myoperator/sendmsg?user=<MyUserNumber>&pass=<MyPass>&msg=The%20text%20of%20my%20message)
The same URL is also used successfully by my NAS Synology to send me notifications. So we can definitely forget a problem with the URL itself.
The only error reported is in the log in Domoticz.
So I suspect it is more a bug in Domoticz itself than anything else.
-
- Posts: 356
- Joined: Saturday 27 February 2016 0:30
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.2
- Contact:
Re: Error in the logs when sending SMS
Effectively, very strange... I was thinking about and error reported by HTTP, for example when closing URL, but this seems not to be the case...
-
- Posts: 69
- Joined: Thursday 07 January 2016 19:31
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.7
- Location: France
- Contact:
Re: Error in the logs when sending SMS
Thanks @FlyingDomotic
This is probably a subject to be reported in the bug section I guess.
I don't know if it is possible for an admin or moderator to move this discussion to this section.
This would avoid creating a duplicate topic.
This is probably a subject to be reported in the bug section I guess.
I don't know if it is possible for an admin or moderator to move this discussion to this section.
This would avoid creating a duplicate topic.
- waltervl
- Posts: 5843
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Error in the logs when sending SMS
With only this information in this topic it will be hard to debug I guess.
Do you see this error in all cases you use it in Domoticz (as action script, in blockly, in dzvents)?
I agree that it seems more a strange return of the sms operator URL.
You could try to run it from your domoticz server in a curl eg
Code: Select all
curl -k https://smsapi.myoperator/sendmsg?user=<MyUserNumber>&pass=<MyPass>&msg=The%20text%20of%20my%20message
Code: Select all
curl -i
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 69
- Joined: Thursday 07 January 2016 19:31
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.7
- Location: France
- Contact:
Re: Error in the logs when sending SMS
Hello @waltervl
As I indicated in my first message, this error appears regardless of the origin in Domoticz: action on/off, blocky script, DzVents, Lua.
gives :
[1] 3769
[2] 3770
and
gives :
[3] 3772
[4] 3773
[1] Done curl -k https://smsapi.myoperator/sendmsg?user=<MyUserNumber>
[2] Done pass=<MyPass>
pi@Domoticz:~ $ HTTP/2 400
server: nginx
date: Tue, 18 Feb 2025 15:42:38 GMT
But stop here and does not give the hand after that.
After a Ctrl C, I have :
^C
[1]- Done curl -i https://smsapi.myoperator/sendmsg?user=<MyUserNumber>
[2]+ Done pass=<MyPass>
pi@Domoticz:~ $
I don't understand if these returns are normal, but I hope it can help to solve this issue.
To note that none of the two above curl results in an SMS on my smartphone
As I indicated in my first message, this error appears regardless of the origin in Domoticz: action on/off, blocky script, DzVents, Lua.
Code: Select all
curl -k https://smsapi.myoperator/sendmsg?user=<MyUserNumber>&pass=<MyPass>&msg=The%20text%20of%20my%20message
[1] 3769
[2] 3770
and
Code: Select all
curl -i https://smsapi.myoperator/sendmsg?user=<MyUserNumber>&pass=<MyPass>&msg=The%20text%20of%20my%20message
[3] 3772
[4] 3773
[1] Done curl -k https://smsapi.myoperator/sendmsg?user=<MyUserNumber>
[2] Done pass=<MyPass>
pi@Domoticz:~ $ HTTP/2 400
server: nginx
date: Tue, 18 Feb 2025 15:42:38 GMT
But stop here and does not give the hand after that.
After a Ctrl C, I have :
^C
[1]- Done curl -i https://smsapi.myoperator/sendmsg?user=<MyUserNumber>
[2]+ Done pass=<MyPass>
pi@Domoticz:~ $
I don't understand if these returns are normal, but I hope it can help to solve this issue.
To note that none of the two above curl results in an SMS on my smartphone
- habahabahaba
- Posts: 233
- Joined: Saturday 18 March 2023 14:44
- Target OS: Windows
- Domoticz version: 2024.4
- Contact:
Re: Error in the logs when sending SMS
So, 4 tips of sending:I use it without any problem both on "action on" and "action off" of devices and in scripts (blocky, dzVents).
Everything works well but this error message in the logs bothers me.
- "action on"
- "action off"
- blocky
- dzVents
And each of them causes an error?
-
- Posts: 69
- Joined: Thursday 07 January 2016 19:31
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.7
- Location: France
- Contact:
Re: Error in the logs when sending SMS
@habahabahaba
Yes, all of them.
Just for testing purpose, I have reactivated an old script in DzVents and here is the log:
This SMS is well received on my smartphone despite the error
If I remove the "%20" from the message, then I have the following log with an error in the format:
This SMS is not received because of the format
Yes, all of them.
Just for testing purpose, I have reactivated an old script in DzVents and here is the log:
Code: Select all
2025-02-18 17:50:06.244 Error: Error opening url: https://smsapi.myoperator/sendmsg?user=<MyUserNumber>&pass=<MyPass>&msg=My%20test%message
2025-02-18 17:50:06.273 dzVents: Handling httpResponse-events for: "Sending SMS"
2025-02-18 17:50:06.273 dzVents: ------ Start internal script: Script #1: HTTPResponse: "Sending SMS"
2025-02-18 17:50:06.281 dzVents: ------ Finished Script #1
If I remove the "%20" from the message, then I have the following log with an error in the format:
Code: Select all
2025-02-18 17:49:34.795 Error: Error opening url: https://smsapi.myoperator/sendmsg?user=<MyUserNumber>&pass=<MyPass>&msg=My other test message
2025-02-18 17:49:34.823 dzVents: Handling httpResponse-events for: "Sending SMS"
2025-02-18 17:49:34.823 dzVents: ------ Start internal script: Script #1: HTTPResponse: "Sending SMS"
2025-02-18 17:49:34.823 Error: dzVents: HTTP/1.1 response: 3 ==>> URL using bad/illegal format or missing URL
2025-02-18 17:49:34.831 dzVents: ------ Finished Script #1
- waltervl
- Posts: 5843
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Error in the logs when sending SMS
The curl -i looks like it gives back http 400 which is an error: Bad Request
https://developer.mozilla.org/en-US/doc ... Status/400
https://developer.mozilla.org/en-US/doc ... Status/400
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
- habahabahaba
- Posts: 233
- Joined: Saturday 18 March 2023 14:44
- Target OS: Windows
- Domoticz version: 2024.4
- Contact:
Re: Error in the logs when sending SMS
Can you show the script?
-
- Posts: 69
- Joined: Thursday 07 January 2016 19:31
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.7
- Location: France
- Contact:
Re: Error in the logs when sending SMS
OK @waltervl, but if it was the case, delivery of the SMS should fail.
If an error in the format, the same URL would give an error in my browser. As well, if the certificate of my operator was not good, an error would be reported in my browser.
So, I don't understand why this error in the log.
If an error in the format, the same URL would give an error in my browser. As well, if the certificate of my operator was not good, an error would be reported in my browser.
So, I don't understand why this error in the log.
Last edited by Michel13 on Tuesday 18 February 2025 18:52, edited 1 time in total.
-
- Posts: 69
- Joined: Thursday 07 January 2016 19:31
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.7
- Location: France
- Contact:
Re: Error in the logs when sending SMS
Code: Select all
return {
on = {
devices = {15},
httpResponses = {
'Sending SMS'
}
},
execute = function(domoticz, device)
local MotionSensor = domoticz.devices(15) -- variable of the device
if (MotionSensor.lastUpdate.secondsAgo > 2) then
if (MotionSensor.state == 'On') then
domoticz.openURL({
url = 'https://smsapi.myoperator/sendmsg?user=<MyUserNumber>&pass=<MyPass>&msg=My%20message', --
method = 'GET',
callback = 'Sending SMS', -- see httpResponses above.
}).afterSec(1) -- here you can regulate the delay of opening URL in seconds
else
domoticz.openURL({
url = 'https://smsapi.free-mobile.fr/sendmsg?user=<MyUserNumber>&pass=<MyPass>&msg=My%20other%20message', --
method = 'GET',
callback = 'Sending SMS',
}).afterSec(0)
end
end
end
}
- waltervl
- Posts: 5843
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Error in the logs when sending SMS
Why do you think that? It could be that the smsprovider has a bug and sends the sms but also sends an error back.Michel13 wrote: ↑Tuesday 18 February 2025 18:43 OK @waltervl, but if it was the case, delivery of the SMS should fail.
If an error in the format, the same URL would give an error in my browser. As well, if the certificate of my operator was not good, an error would be reported in my browser.
So, I don't understand why this error in the log.
Is it an official described API or is it build up by some script? You can also ask the smsprovider why they send back a 400 response for your request ...
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 69
- Joined: Thursday 07 January 2016 19:31
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.7
- Location: France
- Contact:
Re: Error in the logs when sending SMS
It is an official API.
Moreover, the URL is a direct copy of the one given by my operator in my account which include the account number and the pass.
The only difference is of course the text of the message where all spaces must be replaced by %20.
In the same page, there are some explanations on the return codes :
The error 400 concerns a missing parameter which is not the case.The HTTP return code indicates the success or failure of the operation:
200: The SMS has been sent to your mobile.
400: One of the mandatory parameters is missing.
402: Too many SMS have been sent in too short a time.
403: The service is not activated on the Subscriber Area, or incorrect login / key.
500: Server-side error. Please try again later.
Just to make sure, I have first copy the URL given in my account in place of an other one in Domoticz. Same error. And to check if it is not an error due to a hidden character, I have rewrite the URL directly into Domoticz: same result:
Code: Select all
2025-02-19 11:48:49.315 Error: Error opening url: https://smsapi.myoperator/sendmsg?user=<MyUserNumber>&pass=<MyPass>&msg=Hello%20World%20!
It could be a problem with the operator, why not, but as long as the SMS is delivered, that's enough for me. I will not pay more attention to the error in the log.
- waltervl
- Posts: 5843
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Error in the logs when sending SMS
The sms operator should supply a 200 feedback in order for Domoticz not to give an error.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 69
- Joined: Thursday 07 January 2016 19:31
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.7
- Location: France
- Contact:
Re: Error in the logs when sending SMS
Well, this is wishful thinking. The truth is that the operator is probably the only one in France to offer this service for free with its package. As long as it works, he will do nothing. And for my part, I am not ready to waste time trying to convince him for a simple error in the Domoticz logs that does not affect the operation. The cause is lost in advance.
Who is online
Users browsing this forum: Bing [Bot] and 1 guest