Telegram notification error message in log window

On various Hardware and OS systems: pi / windows / routers / nas, etc

Moderator: leecollings

Post Reply
rgroothuis
Posts: 347
Joined: Friday 03 April 2015 17:09
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Telegram notification error message in log window

Post by rgroothuis »

I get the following error message in the Domoticz error log:

Code: Select all

2021-01-04 18:11:31.208 Error: HTTP: <!DOCTYPE html>
2021-01-04 18:11:31.208 <html lang="en">
2021-01-04 18:11:31.208 <head>
2021-01-04 18:11:31.208 <meta charset="utf-8">
2021-01-04 18:11:31.208 <title>Error</title>
2021-01-04 18:11:31.208 </head>
2021-01-04 18:11:31.208 <body>
2021-01-04 18:11:31.208 <pre>Cannot GET /hGei7GkeifHifbr/HoekHuis%20Deurbel/Doorbell%20was%20pressed%20at%2018:11:30%2004/01/2021.</pre>
2021-01-04 18:11:31.208 </body>
2021-01-04 18:11:31.208 </html>
The message does arrive on the Telegram. Why do I get this error? And how can I resolve this?

The DZVents code I use to send the Telegram notification:

Code: Select all

domoticz.notify(USAGE_DEVICES[device.name], NotificatonMessage, domoticz.PRIORITY_HIGH)
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Telegram notification error message in log window

Post by waaren »

rgroothuis wrote: Monday 04 January 2021 21:31 I get the following error message in the Domoticz error log:
The message does arrive on the Telegram. Why do I get this error? And how can I resolve this?
  • do you also see this message when sending a test message from the notification setting screen?
  • and when you send domoticz.notify('test', 'test', domoticz.PRIORITY_HIGH) from you script?
  • what is your domoticz version?
  • when did you first noticed this error?
  • were there any recent changes on your system / network
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
rgroothuis
Posts: 347
Joined: Friday 03 April 2015 17:09
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Telegram notification error message in log window

Post by rgroothuis »

waaren wrote: Monday 04 January 2021 22:03
rgroothuis wrote: Monday 04 January 2021 21:31 I get the following error message in the Domoticz error log:
The message does arrive on the Telegram. Why do I get this error? And how can I resolve this?
  • do you also see this message when sending a test message from the notification setting screen?
  • and when you send domoticz.notify('test', 'test', domoticz.PRIORITY_HIGH) from you script?
  • what is your domoticz version?
  • when did you first noticed this error?
  • were there any recent changes on your system / network
All good questions, let me answer them one by one.

When sending the test message I don't see that error message in the log file.

This is the code I used to send the Telegram notification message:

Code: Select all

local VoorDeurSlot = domoticz.devices('Voordeur Status')
local DateTimeEvent = os.date("%X %d/%m/%Y")
domoticz.notify(VoorDeurSlot.name, DateTimeEvent .. ": Front door status is now: \"" .. VoorDeurSlot.state .. "\".", domoticz.PRIORITY_HIGH)
The Domoticz version is 2020.2 from 26-04-2020, the stable version.

I didn't made any significant changes recently. Was playing the the priority level on the Telegram notify but that is all back to PRIORITY_HIGH now.
It is not always happening, not on all Telegram message. Only on some, but I've not discovered the differences yet, if there are any.

I just noticed the following error message in the log:

Code: Select all

2021-01-05 09:23:00.775 Error: HTTP: Internal Server Error
2021-01-05 10:02:00.742 Error: HTTP: Internal Server Error
I will do also a reboot of Domoticz, maybe that solves the problem.

Could it have something to do with the amount of Telegram messages sent in a short time interval?
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Telegram notification error message in log window

Post by waaren »

rgroothuis wrote: Tuesday 05 January 2021 10:10 Could it have something to do with the amount of Telegram messages sent in a short time interval?
I don't know but how many and in what time interval?

The error message does not clearly states that the origin is the notification to telegram. To be sure that it comes from there can you try again after changing the line

Code: Select all

domoticz.notify(VoorDeurSlot.name, DateTimeEvent .. ": Front door status is now: \"" .. VoorDeurSlot.state .. "\".", domoticz.PRIORITY_HIGH)
to

Code: Select all

domoticz.notify(VoorDeurSlot.name, DateTimeEvent .. ": Front door status is now: \"" .. VoorDeurSlot.state .. "\".",domoticz.PRIORITY_HIGH,nil,nil,domoticz.NSS_TELEGRAM)
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
rgroothuis
Posts: 347
Joined: Friday 03 April 2015 17:09
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Telegram notification error message in log window

Post by rgroothuis »

I will give it a try in a view moments.

I restarted Domoticz and saw the following in the error log:

Code: Select all

2021-01-05 10:27:00.622 Error: WebServer(HTTP) startup failed on address 0.0.0.0 with port: 80: bind: Address already in use
2021-01-05 10:27:00.622 Error: WebServer(HTTP) check privileges for opening ports below 1024
2021-01-05 10:27:00.627 Error: [web:443] missing SSL DH parameters from file ./server_cert.pem
2021-01-05 10:27:00.633 Error: No servers are configured. Hence mydomoticz will not be started either (if configured)
2021-01-05 10:27:05.976 Error: OpenZWave: Type_Notification, NodeID not found internally!. HomeID: 0, NodeID: 255 (0xff)
I don't understand the first message about address already in use. This is in my view not correct, port 80 is available. When I type in the Domoticz IP address (http) then it redirects me to https. So Domoticz is listing on port 80.

When in a script I do a "https://192.168.0.100/json.htm?type=lightlog&idx=98" I get a "2021-01-05 10:34:11.726 Error: HTTP: Internal Server Error" error message.

Code: Select all

            domoticz.openURL(
            {
                url = 'https://192.168.0.100/json.htm?type=lightlog&idx=98',
                callback = 'Garagedeur-98',
            })
Something it wrong with the HTTP server, looks like it.
rgroothuis
Posts: 347
Joined: Friday 03 April 2015 17:09
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Telegram notification error message in log window

Post by rgroothuis »

I was able to reproduce:

The code:

Code: Select all

            domoticz.openURL(
            {
                url = 'https://192.168.0.100/json.htm?type=lightlog&idx=98',
                callback = 'Garagedeur-98',
            })
Is sometimes (not always) generating the following error:

Code: Select all

2021-01-05 10:49:13.061 Error: Error opening url: https://192.168.0.100/json.htm?type=lightlog&idx=98
2021-01-05 10:49:13.126 Error: dzVents: Error: (3.0.2) DeviceChangeNotifications: HTTP/1.1 response: 60 ==>> SSL peer certificate or SSH remote key was not OK
2021-01-05 10:49:13.126 Error: dzVents: Error: (3.0.2) DeviceChangeNotifications: There was a problem handling the request.
rgroothuis
Posts: 347
Joined: Friday 03 April 2015 17:09
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Telegram notification error message in log window

Post by rgroothuis »

waaren wrote: Tuesday 05 January 2021 10:27
rgroothuis wrote: Tuesday 05 January 2021 10:10 Could it have something to do with the amount of Telegram messages sent in a short time interval?
I don't know but how many and in what time interval?

The error message does not clearly states that the origin is the notification to telegram. To be sure that it comes from there can you try again after changing the line

Code: Select all

domoticz.notify(VoorDeurSlot.name, DateTimeEvent .. ": Front door status is now: \"" .. VoorDeurSlot.state .. "\".", domoticz.PRIORITY_HIGH)
to

Code: Select all

domoticz.notify(VoorDeurSlot.name, DateTimeEvent .. ": Front door status is now: \"" .. VoorDeurSlot.state .. "\".",domoticz.PRIORITY_HIGH,nil,nil,domoticz.NSS_TELEGRAM)
This seems to solve the problem. When trying to reproduce the Telegram error with this updated code/line the error message is gone.

Should I change all notify code lines and add the extra parameters?
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Telegram notification error message in log window

Post by waaren »

rgroothuis wrote: Tuesday 05 January 2021 10:53 This seems to solve the problem. When trying to reproduce the Telegram error with this updated code/line the error message is gone.

Should I change all notify code lines and add the extra parameters?
What this change does is limit the notification to telegram only. If you leave out the subsystem parameter from the command, the notification will go to ALL configured and active notification subsystems.
So in this case it looks like one of the other notification systems generates the error message.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
rgroothuis
Posts: 347
Joined: Friday 03 April 2015 17:09
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Telegram notification error message in log window

Post by rgroothuis »

waaren wrote: Tuesday 05 January 2021 11:03
rgroothuis wrote: Tuesday 05 January 2021 10:53 This seems to solve the problem. When trying to reproduce the Telegram error with this updated code/line the error message is gone.

Should I change all notify code lines and add the extra parameters?
What this change does is limit the notification to telegram only. If you leave out the subsystem parameter from the command, the notification will go to ALL configured and active notification subsystems.
So in this case it looks like one of the other notification systems generates the error message.
Interesting, good to know. I do have a follow-up question, how does sending a Telegram notification message trigger other notifications? I don't understand how to debug this. Can you explain in more detail?
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Telegram notification error message in log window

Post by waaren »

rgroothuis wrote: Tuesday 05 January 2021 11:27 Interesting, good to know. I do have a follow-up question, how does sending a Telegram notification message trigger other notifications? I don't understand how to debug this. Can you explain in more detail?
This code does not specify a notificaton subsystem so it will send a notification to all configured and active notification subsystems.

Code: Select all

domoticz.notify(VoorDeurSlot.name, DateTimeEvent .. ": Front door status is now: \"" .. VoorDeurSlot.state .. "\".", domoticz.PRIORITY_HIGH)
This code specifies telegram as target notification subsystem and will therefore send a notification only to telegram.

Code: Select all

domoticz.notify(VoorDeurSlot.name, DateTimeEvent .. ": Front door status is now: \"" .. VoorDeurSlot.state .. "\".",domoticz.PRIORITY_HIGH,nil,nil,domoticz.NSS_TELEGRAM)
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest