Page 17 of 30

Re: dtgbot - Domoticz TeleGram BOT

Posted: Thursday 22 November 2018 12:48
by nosehook
I am not that familiar with Linux, so I do not know how I am afraid...

I tried sudo apt-get remove libssl1.0.0_1.0.1t-1+deb8u8_armhf.deb

resulting in:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package libssl1.0.0_1.0.1t-1+deb8u8_armhf.deb
E: Couldn't find any package by glob 'libssl1.0.0_1.0.1t-1+deb8u8_armhf.deb'
E: Couldn't find any package by regex 'libssl1.0.0_1.0.1t-1+deb8u8_armhf.deb'

Re: dtgbot - Domoticz TeleGram BOT

Posted: Wednesday 05 December 2018 12:02
by pesa1234
Hi, thanks for the dgtbot service, very good.

I have an issue with the selector label name:
Here my log... How can I solve this issue?

Code: Select all

dtgbot: Start DTGMENU ... (1) Riscaldamento
2018-12-05 11:38:35 - ==> menu.lua process:Riscaldamento
2018-12-05 11:38:35 - -< getSelectorStatusLabel found: T2ZmfEF1dG98Rm9yY2Vk (1) 1 (2) T2ZmfEF1dG98Rm9yY2Vk
2018-12-05 11:38:35 - -< getSelectorStatusLabel not found: 2 (1) 1 (2) T2ZmfE5vcm1hbHxFY29ub215
2018-12-05 11:38:35 -   -< replymarkup:{"keyboard":[["Caldaia - Off"],["Economy_Temp - 20.0°C"],["Normal_Temp - 21.0°C"],["StatoCaldaia - Off"],["Termostato - T2ZmfEF1dG98Rm9yY2Vk"],["Termostato_-_Mode - "],["Termostato_-_Pausa - On"],["menu"]],"selective":true,"resize_keyboard":true}
2018-12-05 11:38:35 - ==< show options in submenu.
Why that strange label T2ZmfEF1dG98Rm9yY2Vk? I use SVT plugin

And also this...

Code: Select all

tgbot: Start DTGMENU ... (1) Clima
2018-12-05 11:38:27 - ==> menu.lua process:Clima
2018-12-05 11:38:27 - -< getSelectorStatusLabel not found: 0 (1) 1 (2) T2ZmfEF1dG98RHJ5
2018-12-05 11:38:27 -   -< replymarkup:{"keyboard":[["AC_Mode - "],["AC_Temp - 24.0°C"],["menu"]],"selective":true,"resize_keyboard":true}
2018-12-05 11:38:27 - ==< show options in submenu.
What I make wrong? Thanks

Re: dtgbot - Domoticz TeleGram BOT

Posted: Wednesday 05 December 2018 12:23
by jvdz
This is an issue since the last production version of Domoticz where the Selector switch options are encoded with base64, and you are the first one reporting the issue as I haven't upgrade my production system as yet. :)
I will have a look at this in the coming days an post the fix.
PM me in case you would like to help testing.

Jos

Re: dtgbot - Domoticz TeleGram BOT

Posted: Wednesday 05 December 2018 14:13
by pesa1234
At the moment I can't send PM, I don't know why, but, sure I can try help you.

Re: dtgbot - Domoticz TeleGram BOT

Posted: Wednesday 09 January 2019 22:38
by TomDZ
I seem to be having the same problem as other users on this forum:

Code: Select all

/usr/bin/lua: 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:66: in main chunk
        [C]: in ?

Re: dtgbot - Domoticz TeleGram BOT

Posted: Thursday 10 January 2019 9:43
by jvdz
Have you added the extra LUA libraries as described in the instructions? :
https://www.domoticz.com/wiki/Remote_Co ... _Libraries

Jos

Re: dtgbot - Domoticz TeleGram BOT

Posted: Thursday 10 January 2019 10:05
by TomDZ
Jos,
I did indeed add them. Downloaded them from your first post and installed them to the required directory.

I read the following and wonder if this is the problem:

Libssl.so.1.0.0 obsolete library on Raspbian Stretch, updated November 2017. Since the beginning of November 2017, the libssl.so.1.0.0 library seems to no longer be integrated into the Raspbian Strech repository. Here’s how to install the library. A big thank you to Guillaume for the tip.
See article : https://diyprojects.io/domoticz-install ... DcKIS7TXeV

The installation I didn't do because i get a lot of warnings and errors with files missing when I follow the description given in the article.

Regards,
Tom

Re: dtgbot - Domoticz TeleGram BOT

Posted: Wednesday 06 February 2019 21:15
by pimseb
Anybody got this bot working ?
I have this error in my log file :

Code: Select all

/usr/bin/lua5.2: error loading module 'socket.core' from file '/usr/local/lib/lua/5.2/socket/core.so':
        /usr/local/lib/lua/5.2/socket/core.so: wrong ELF class: ELFCLASS64

Re: dtgbot - Domoticz TeleGram BOT

Posted: Wednesday 06 February 2019 22:49
by jvdz
Looks like you need to rebuild those userfiles. Are you not using a raspberry?

Jos

Re: dtgbot - Domoticz TeleGram BOT

Posted: Wednesday 06 February 2019 22:58
by pimseb
Hello jos yes I do with rasbian stretch.
I followed the tutorial on domoticz wiki and used the tar.gz files from the first page of this post

Re: dtgbot - Domoticz TeleGram BOT

Posted: Wednesday 06 February 2019 23:17
by jvdz
Understand, but it that precompiled version seems not be compatible with your RaspberryPI. which version are you using?
I am still an older RPI and have no issues with the core.so. I did have some issue with the ssl.so when I upgraded one of the PI's to Stretch as that was causing some crash every now and then so rebuild that from the source found here: https://github.com/brunoos/luasec

Jos

Re: dtgbot - Domoticz TeleGram BOT

Posted: Thursday 07 February 2019 7:11
by pimseb
My version :

Linux raspberrypi 4.14.90-v7+ #1183 SMP Fri Dec 21 14:03:50 GMT 2018 armv7l GNU/Linux
model name : ARMv7 Processor rev 4 (v7l)
BogoMIPS : 38.40
Raspberry Pi 3 Model B Rev 1.2

Re: dtgbot - Domoticz TeleGram BOT

Posted: Thursday 07 February 2019 11:47
by jvdz
I don't have a RPI3b so can test with that.... maybe others have tested this?
Maybe @simonrg can tell us which sources he used to compile these libraries, but my guess is these:
https://github.com/diegonehab/luasocket -> socket.* stuff
https://github.com/brunoos/luasec -> /usr/local/lib/lua/5.2/ssl.so

Jos

Re: dtgbot - Domoticz TeleGram BOT

Posted: Thursday 07 February 2019 12:27
by pimseb
Thank you jvdz. It seems to be very complicated for me. However I'd love to see this bot working...
I've checked https://github.com/brunoos/luasec but the makefile is about lua 5.1 and not 5.2. Isn't it a problem ?

Re: dtgbot - Domoticz TeleGram BOT

Posted: Friday 22 February 2019 9:54
by miroslavpetrov
Hello everyone. I have the following problem to solve:
I use domoticz in my factory to control many things and heating is one of them. I have heating schedule set by timers. However, if the production schedule lags behind, we need to work on Saturday. The problem is my schedule is set from Monday to Friday and I have created a second timer plan in domoticz that includes Saturday. I have created a virtual switch called "Working Saturday" and if it is set to ON, domoticz switches to the second timer plan.
So, why I write in this topic... My idea is to use my telegram bot to ask me every Friday at 16:00 "Are we working tomorrow" and if I answer with "yes" it will turn on the virtual switch.
I have been reading about dtgbot and telegram bot in general but I didin't find a solution to this. Can somebody help?

Re: dtgbot - Domoticz TeleGram BOT

Posted: Friday 22 February 2019 21:24
by pimseb
Sorry I still can't make dtgwork I can't help you :-(
I was unable to compile the libraries for lua, I don't even know how to do it. If somebody has them compiled for the Rapberry 3B (ready to use, like the 2 rar files on the first page of this post) please send them to me :-)

Re: dtgbot - Domoticz TeleGram BOT

Posted: Thursday 28 February 2019 12:34
by Marcello1970
I've got the bot working on the RB3.

Edit the sources.list

Code: Select all

sudo nano /etc/apt/sources.list
add the next line:

Code: Select all

deb http://archive.raspbian.org/raspbian/ jessie main contrib non-free rpi
Save it with CTRL + X , Y
and then:

Code: Select all

sudo apt-get update
sudo apt-get install libssl1.0.0
Then the bot works!
Thanks to:
https://diyprojects.io/domoticz-install ... HfCKOhKgdW

Re: dtgbot - Domoticz TeleGram BOT

Posted: Thursday 28 February 2019 15:30
by pimseb
Marcello1970 : Thank you so much ! It's working here finally
I have now to figure out how to use it. Btw I'm able to talk to my bot directly in private but is it possible to have the command in a channel shared by a group ?

Re: dtgbot - Domoticz TeleGram BOT

Posted: Saturday 27 July 2019 11:17
by beamzer
Is there a way to set variables from dtgbot ? I use these to control my alerting options from the PIR sensors (wemos d1 mini through mqtt), so controlling these through telegram would be nice.

Code: Select all

return {
   on = {
      devices = {
         'PIR-1'
      }
   },
   execute = function(domoticz, PIRswitch)
      if (PIRswitch.state == 'On') then				-- if1
	 if (domoticz.variables('SchuurAlert').value == 1) then -- if2
         	domoticz.log('PIR Schuur Alert')
         	domoticz.notify('Domoticz Alert', 'Schuur Motion', domoticz.PRIORITY_EMERGENCY, domoticz.SOUND_DEFAULT,'', domoticz.NSS_PUSHOVER)
         	domoticz.variables('SchuurAlert').set(0)
	elseif (domoticz.variables('SchuurAlert').value == 2) then
        	domoticz.notify('Domoticz Alert', 'Schuur Motion', domoticz.PRIORITY_EMERGENCY, domoticz.SOUND_DEFAULT,'', domoticz.NSS_TELEGRAM)
	end -- if2
      end -- if1
   end -- execute
}

Re: dtgbot - Domoticz TeleGram BOT

Posted: Saturday 27 July 2019 13:34
by jvdz
You could simply create a bash file in dtgbot/bash and have that set the uservariable. Just have a look at the existing examples and modify one to set the appropriate uservariable via an JSON command.

Jos