dtgbot - Domoticz TeleGram BOT

Client tools or tools that can connect with Domoticz. Tools for Windows, iOS, Android, Linux etc.

Moderator: leecollings

Mrblomme
Posts: 15
Joined: Friday 09 October 2020 9:05
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: dtgbot - Domoticz TeleGram BOT

Post by Mrblomme »

jvdz wrote: Saturday 02 January 2021 11:30 Did you also check the contents of dtg.log.errors as I expect the lua script has errors?

Hmm it seems like there are a few errors...
/usr/bin/lua5.2: error loading module 'ssl.core' from file '/usr/local/lib/lua/5.2/ssl.so':
libssl.so.1.0.0: cannot open shared object file: No such file or directory
stack traceback:
[C]: in ?
[C]: in function 'require'
/usr/local/share/lua/5.2/ssl.lua:7: in main chunk
[C]: in function 'require'
/usr/local/share/lua/5.2/ssl/https.lua:10: in main chunk
[C]: in function 'require'
/home/pi/dtgbot/dtgbot.lua:132: in main chunk
[C]: in ?
/usr/bin/lua5.2: error loading module 'ssl.core' from file '/usr/local/lib/lua/5.2/ssl.so':
libssl.so.1.0.0: cannot open shared object file: No such file or directory
stack traceback:
[C]: in ?
[C]: in function 'require'
/usr/local/share/lua/5.2/ssl.lua:7: in main chunk
[C]: in function 'require'
/usr/local/share/lua/5.2/ssl/https.lua:10: in main chunk
[C]: in function 'require'
/home/pi/dtgbot/dtgbot.lua:132: in main chunk
[C]: in ?
/usr/bin/lua5.2: error loading module 'ssl.core' from file '/usr/local/lib/lua/5.2/ssl.so':
libssl.so.1.0.0: cannot open shared object file: No such file or directory
stack traceback:
[C]: in ?
[C]: in function 'require'
/usr/local/share/lua/5.2/ssl.lua:7: in main chunk
[C]: in function 'require'
/usr/local/share/lua/5.2/ssl/https.lua:10: in main chunk
[C]: in function 'require'
/home/pi/dtgbot/dtgbot.lua:132: in main chunk
[C]: in ?
/usr/bin/lua5.2: error loading module 'ssl.core' from file '/usr/local/lib/lua/5.2/ssl.so':
libssl.so.1.0.0: cannot open shared object file: No such file or directory
stack traceback:
[C]: in ?
[C]: in function 'require'
/usr/local/share/lua/5.2/ssl.lua:7: in main chunk
[C]: in function 'require'
/usr/local/share/lua/5.2/ssl/https.lua:10: in main chunk
[C]: in function 'require'
/home/pi/dtgbot/dtgbot.lua:132: in main chunk
[C]: in ?
/usr/bin/lua5.2: error loading module 'ssl.core' from file '/usr/local/lib/lua/5.2/ssl.so':
User avatar
jvdz
Posts: 2189
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: dtgbot - Domoticz TeleGram BOT

Post by jvdz »

Ah ok ...you haven't installed lua-socket, so try installing that with:
sudo apt install lua-socket

Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
Mrblomme
Posts: 15
Joined: Friday 09 October 2020 9:05
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: dtgbot - Domoticz TeleGram BOT

Post by Mrblomme »

updated lua
pi@Domoticz:~ $ sudo apt install lua-socket
Reading package lists... Done
Building dependency tree
Reading state information... Done
lua-socket is already the newest version (3.0~rc1+git+ac3201d-4).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Code: Select all

/usr/bin/lua5.2: error loading module 'ssl.core' from file '/usr/local/lib/lua/5.2/ssl.so':
        libssl.so.1.0.0: cannot open shared object file: No such file or directory
stack traceback:
        [C]: in ?
        [C]: in function 'require'
        /usr/local/share/lua/5.2/ssl.lua:7: in main chunk
        [C]: in function 'require'
        /usr/local/share/lua/5.2/ssl/https.lua:10: in main chunk
        [C]: in function 'require'
        /home/pi/dtgbot/dtgbot.lua:132: in main chunk
        [C]: in ?
/usr/bin/lua5.2: error loading module 'ssl.core' from file '/usr/local/lib/lua/5.2/ssl.so':
        libssl.so.1.0.0: cannot open shared object file: No such file or directory
stack traceback:
        [C]: in ?
        [C]: in function 'require'
        /usr/local/share/lua/5.2/ssl.lua:7: in main chunk
        [C]: in function 'require'
        /usr/local/share/lua/5.2/ssl/https.lua:10: in main chunk
        [C]: in function 'require'
        /home/pi/dtgbot/dtgbot.lua:132: in main chunk
        [C]: in ?
/usr/bin/lua5.2: error loading module 'ssl.core' from file '/usr/local/lib/lua/5.2/ssl.so':
        libssl.so.1.0.0: cannot open shared object file: No such file or directory
stack traceback:
        [C]: in ?
        [C]: in function 'require'
        /usr/local/share/lua/5.2/ssl.lua:7: in main chunk
        [C]: in function 'require'
        /usr/local/share/lua/5.2/ssl/https.lua:10: in main chunk
        [C]: in function 'require'
        /home/pi/dtgbot/dtgbot.lua:132: in main chunk
        [C]: in ?
/usr/bin/lua5.2: error loading module 'ssl.core' from file '/usr/local/lib/lua/5.2/ssl.so':
        libssl.so.1.0.0: cannot open shared object file: No such file or directory
stack traceback:
        [C]: in ?
        [C]: in function 'require'
        /usr/local/share/lua/5.2/ssl.lua:7: in main chunk
        [C]: in function 'require'
        /usr/local/share/lua/5.2/ssl/https.lua:10: in main chunk
        [C]: in function 'require'
        /home/pi/dtgbot/dtgbot.lua:132: in main chunk
        [C]: in ?
/usr/bin/lua5.2: error loading module 'ssl.core' from file '/usr/local/lib/lua/5.2/ssl.so':
User avatar
jvdz
Posts: 2189
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: dtgbot - Domoticz TeleGram BOT

Post by jvdz »

I guess you also installed the "old" version as defined in the Wiki to "/usr/local/lib/lua/5.2/"?
Could you remove that version as it seems to use that.
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
Mrblomme
Posts: 15
Joined: Friday 09 October 2020 9:05
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: dtgbot - Domoticz TeleGram BOT

Post by Mrblomme »

jvdz wrote: Saturday 02 January 2021 13:34 I guess you also installed the "old" version as defined in the Wiki to "/usr/local/lib/lua/5.2/"?
Could you remove that version as it seems to use that.
Cant seem to remove it (using sudo rm) but is denied...

This is harder than I thought.....
Mrblomme
Posts: 15
Joined: Friday 09 October 2020 9:05
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: dtgbot - Domoticz TeleGram BOT

Post by Mrblomme »

Mrblomme wrote: Saturday 02 January 2021 13:43
jvdz wrote: Saturday 02 January 2021 13:34 I guess you also installed the "old" version as defined in the Wiki to "/usr/local/lib/lua/5.2/"?
Could you remove that version as it seems to use that.
Cant seem to remove it (using sudo rm) but is denied...

This is harder than I thought.....
I've removed the folder and installed it back but same errors..
User avatar
jvdz
Posts: 2189
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: dtgbot - Domoticz TeleGram BOT

Post by jvdz »

Your shouldn't be getting this error anymore:
from file '/usr/local/lib/lua/5.2/ssl.so'. ?
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
Mrblomme
Posts: 15
Joined: Friday 09 October 2020 9:05
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: dtgbot - Domoticz TeleGram BOT

Post by Mrblomme »

jvdz wrote: Saturday 02 January 2021 18:25 Your shouldn't be getting this error anymore:
from file '/usr/local/lib/lua/5.2/ssl.so'. ?
Still getting the next errors.

When I go to /usr/local/lib/lua/5.2/ the file ssl.so is there and in the map socket there's the file ssl.core.
/usr/bin/lua5.2: error loading module 'ssl.core' from file '/usr/local/lib/lua/5.2/ssl.so':
libssl.so.1.0.0: cannot open shared object file: No such file or directory
stack traceback:
[C]: in ?
[C]: in function 'require'
/usr/local/share/lua/5.2/ssl.lua:7: in main chunk
[C]: in function 'require'
/usr/local/share/lua/5.2/ssl/https.lua:10: in main chunk
[C]: in function 'require'
/home/pi/dtgbot/dtgbot.lua:132: in main chunk
[C]: in ?
/usr/bin/lua5.2: error loading module 'ssl.core' from file '/usr/local/lib/lua/5.2/ssl.so':
libssl.so.1.0.0: cannot open shared object file: No such file or directory
stack traceback:
[C]: in ?
[C]: in function 'require'
/usr/local/share/lua/5.2/ssl.lua:7: in main chunk
[C]: in function 'require'
/usr/local/share/lua/5.2/ssl/https.lua:10: in main chunk
[C]: in function 'require'
/home/pi/dtgbot/dtgbot.lua:132: in main chunk
[C]: in ?
User avatar
jvdz
Posts: 2189
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: dtgbot - Domoticz TeleGram BOT

Post by jvdz »

I thought you had removed these files you installed manually: '/usr/local/lib/lua/5.2/ssl.so' ?
It seems they are still there?

There have been several others that reported this issue in the past and they have been able to solve it, have a look to see if that helps you:
search.php?keywords=libssl.so.1.0.0&t=7279&sf=msgonly
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
Mrblomme
Posts: 15
Joined: Friday 09 October 2020 9:05
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: dtgbot - Domoticz TeleGram BOT

Post by Mrblomme »

jvdz wrote: Sunday 03 January 2021 11:01 I thought you had removed these files you installed manually: '/usr/local/lib/lua/5.2/ssl.so' ?
It seems they are still there?

There have been several others that reported this issue in the past and they have been able to solve it, have a look to see if that helps you:
search.php?keywords=libssl.so.1.0.0&t=7279&sf=msgonly
My bad.. thought the file was corrupted so removed it and installed a fresh copy.. :roll:

Should I also delete the ssl.core?

/usr/bin/lua5.2: /usr/local/share/lua/5.2/ssl.lua:7: module 'ssl.core' not found:
no field package.preload['ssl.core']
no file '/usr/local/share/lua/5.2/ssl/core.lua'
no file '/usr/local/share/lua/5.2/ssl/core/init.lua'
no file '/usr/local/lib/lua/5.2/ssl/core.lua'
no file '/usr/local/lib/lua/5.2/ssl/core/init.lua'
no file '/usr/share/lua/5.2/ssl/core.lua'
no file '/usr/share/lua/5.2/ssl/core/init.lua'
no file './ssl/core.lua'
no file '/usr/local/lib/lua/5.2/ssl/core.so'
no file '/usr/lib/arm-linux-gnueabihf/lua/5.2/ssl/core.so'
no file '/usr/lib/lua/5.2/ssl/core.so'
no file '/usr/local/lib/lua/5.2/loadall.so'
no file './ssl/core.so'
no file '/usr/local/lib/lua/5.2/ssl.so'
no file '/usr/lib/arm-linux-gnueabihf/lua/5.2/ssl.so'
no file '/usr/lib/lua/5.2/ssl.so'
no file '/usr/local/lib/lua/5.2/loadall.so'
no file './ssl.so'
stack traceback:
[C]: in function 'require'
/usr/local/share/lua/5.2/ssl.lua:7: in main chunk
[C]: in function 'require'
/usr/local/share/lua/5.2/ssl/https.lua:10: in main chunk
[C]: in function 'require'
/home/pi/dtgbot/dtgbot.lua:132: in main chunk
[C]: in ?
Mrblomme
Posts: 15
Joined: Friday 09 October 2020 9:05
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: dtgbot - Domoticz TeleGram BOT

Post by Mrblomme »

Got rid of all LUA folders and now it's working perfectly!

Thanks for the help and patience Jos!
usky73
Posts: 39
Joined: Saturday 07 November 2015 9:53
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: france
Contact:

Re: dtgbot - Domoticz TeleGram BOT

Post by usky73 »

Dear all

I am trying to control domoticz by using Telegram.
I am using already the telegram API for notification.
I have followed the wiki page instrictions : https://www.domoticz.com/wiki/Remote_Co ... legram_Bot

But I am facing an issue.
The dtb.log.error files is showing an issue with ssl.core library.

Code: Select all

pi@domo:/var/tmp $ cat dtb.log.errors 
/usr/bin/lua5.2: error loading module 'ssl.core' from file '/usr/local/lib/lua/5.2/ssl.so':
	libssl.so.1.0.0: cannot open shared object file: No such file or directory
I found on this long thread a person that solved the issue by removing the lua folder in /usr/local/lib & /usr/local/shared & installed the LUA lib

Code: Select all

sudo apt install lua-socket
I have tested that but I have the same message remaining...

Please help !
Welsyntoffie
Posts: 31
Joined: Tuesday 03 November 2020 10:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: dtgbot - Domoticz TeleGram BOT

Post by Welsyntoffie »

I think this a dtgbot problem.
When I send the command "systemstatus" I get the responses I im looking for, but then I get another reply that I do not want to see.
How do I stop Recieved Message 3...

Send Command...
Pieter, [27.07.21 15:49]
systemstatus

Recieved Message 1
Arduino_Home, [27.07.21 15:49]
Please wait, gathering data...

Recieved Message 2
Arduino_Home, [27.07.21 15:49]
-CPU temperature: 36.9°C
-CPU Usage: 9.09 %
-Memory Usage: 39.03 %
-UpTime: 15.24 h
-Domoticz update available! (version 13191)

Recieved Message 3 (Don't want this)
Arduino_Home, [27.07.21 15:49]
[In reply to Pieter]
t_name":"Pieter","type":"private"},"date":1627393779,"text":"-CPU temperature: 36.9\u00b0C\n-CPU Usage: 9.09 %\n-Memory Usage: 39.03 %\n-UpTime: 15.24 h\n-Domoticz update available! (version 13191)"}}
Welsyntoffie
Posts: 31
Joined: Tuesday 03 November 2020 10:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: dtgbot - Domoticz TeleGram BOT

Post by Welsyntoffie »

usky73 wrote: Tuesday 25 May 2021 18:39 Dear all

I am trying to control domoticz by using Telegram.
I am using already the telegram API for notification.
I have followed the wiki page instrictions : https://www.domoticz.com/wiki/Remote_Co ... legram_Bot

But I am facing an issue.
The dtb.log.error files is showing an issue with ssl.core library.

Code: Select all

pi@domo:/var/tmp $ cat dtb.log.errors 
/usr/bin/lua5.2: error loading module 'ssl.core' from file '/usr/local/lib/lua/5.2/ssl.so':
	libssl.so.1.0.0: cannot open shared object file: No such file or directory
I found on this long thread a person that solved the issue by removing the lua folder in /usr/local/lib & /usr/local/shared & installed the LUA lib

Code: Select all

sudo apt install lua-socket
I have tested that but I have the same message remaining...

Please help !
Check this post viewtopic.php?p=208229#p208229
This worked for me 100%
User avatar
jvdz
Posts: 2189
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: dtgbot - Domoticz TeleGram BOT

Post by jvdz »

Welsyntoffie wrote: Tuesday 27 July 2021 16:41 I think this a dtgbot problem.
When I send the command "systemstatus" I get the responses I im looking for, but then I get another reply that I do not want to see.
How do I stop Recieved Message 3...
Have you made changes to the bash file systemstatus.sh in directory dtgbot/bash ?
You can also check the file SystemStatus.txt in the defined $TempFileDir in the setup file to see what the text was at the time the Telegram was send.
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
Welsyntoffie
Posts: 31
Joined: Tuesday 03 November 2020 10:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: dtgbot - Domoticz TeleGram BOT

Post by Welsyntoffie »

jvdz wrote: Tuesday 27 July 2021 19:13 Have you made changes to the bash file systemstatus.sh in directory dtgbot/bash ?
You can also check the file SystemStatus.txt in the defined $TempFileDir in the setup file to see what the text was at the time the Telegram was send.
I only changed the rid in systemstatus.sh.
Even before I changed the id's I received the 3rd message, for that reason I thought is was because it could not find the id's

temperature.sh is Unmodified and also gives me a 3rd unwanted message

The text file is normal, there is nothing else inside the text file...
-CPU temperature: 37°C
-CPU Usage: 8.06 %
-Memory Usage: 35.06 %
-UpTime: 19.67 h
-Domoticz update available! (version 13191)
Welsyntoffie
Posts: 31
Joined: Tuesday 03 November 2020 10:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: dtgbot - Domoticz TeleGram BOT

Post by Welsyntoffie »

I am having difficulty getting an image on here so made a post on reddit...

https://www.reddit.com/r/Domoticz/comme ... _telegram/
User avatar
jvdz
Posts: 2189
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: dtgbot - Domoticz TeleGram BOT

Post by jvdz »

Well it looks like a part of the response from the CURL command if send in a reply, but don't understand why that would happen.
As you can see in the BASH file: It sends the content of the text file with a curl command to your TelegramID.
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
Welsyntoffie
Posts: 31
Joined: Tuesday 03 November 2020 10:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: dtgbot - Domoticz TeleGram BOT

Post by Welsyntoffie »

jvdz wrote: Tuesday 27 July 2021 20:49 Well it looks like a part of the response from the CURL command if send in a reply, but don't understand why that would happen.
As you can see in the BASH file: It sends the content of the text file with a curl command to your TelegramID.
Yes, both the first responses is as what I would expect.

If you look at this manual/info https://www.domoticz.com/wiki/Telegram_ ... ctionality then that person never receives his responses as a reply but rather as a new message. I followed all the instruction from the wiki except for installing the CLI part of telegram.

I was thinking that their might be some debug switch that is On that also sends the raw string to see the full CURL but can not find anything ragarding that.
Welsyntoffie
Posts: 31
Joined: Tuesday 03 November 2020 10:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: dtgbot - Domoticz TeleGram BOT

Post by Welsyntoffie »

jvdz wrote: Tuesday 27 July 2021 20:49 Well it looks like a part of the response from the CURL command if send in a reply, but don't understand why that would happen.
As you can see in the BASH file: It sends the content of the text file with a curl command to your TelegramID.
So I removed the last line (72) in the BASH file that sends the message. As expected I do not get any message except for the one saying gathering data...
Removing that line aswell (11) then I get a message Reply done. and nothing alse. Only 1 message
Adding line 72 back then I get the extra garbage message after the correct message.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest