dtgbot - Domoticz TeleGram BOT
Moderator: leecollings
- corbin
- Posts: 463
- Joined: Saturday 20 August 2016 22:57
- Target OS: Windows
- Domoticz version: Beta
- Location: Brisbane, Australia
- Contact:
Re: dtgbot - Domoticz TeleGram BOT
thanks for the answers, I've lost my previous telegram setup and about to add back in
Question about the Xiaomi Gateway in Domoticz? Please check the Wiki first: https://www.domoticz.com/wiki/Xiaomi_Gateway_(Aqara)
-
- Posts: 3
- Joined: Sunday 17 July 2016 11:39
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: dtgbot - Domoticz TeleGram BOT
I dont know if this is the logging from the time it didnt work, but the file contains the followingjvdz wrote:The dtgbot.log.errors file should contain the error encountered as described in the wiki: https://www.domoticz.com/wiki/Remote_Co ... log.errors
Have you checked that?
Jos
Code: Select all
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
^M 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0^M100 292 100 231 100 61 2714 716 --:--:-- --:--:-- --:--:-- 2750
jq: error: Cannot iterate over null
jq: error: Cannot iterate over null
jq: error: Cannot iterate over null
jq: error: Cannot iterate over null
/home/pi/dtgbot/bash//systemstatus.sh: line 48: [: : integer expression expected
/home/pi/dtgbot/bash//systemstatus.sh: line 52: [: : integer expression expected
/home/pi/dtgbot/bash//systemstatus.sh: line 56: [: : integer expression expected
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
^M 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0^M 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0^M100 566 100 345 100 221 3510 224$
/home/pi/dtgbot/bash//checkdomoticzupdate.sh: 21: [: -le: unexpected operator
/home/pi/dtgbot/bash//checkdomoticzupdate.sh: 26: [: -le: unexpected operator
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
^M 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0^M100 266 100 220 100 46 2214 463 --:--:-- --:--:-- --:--:-- 2222
- jvdz
- Posts: 2280
- Joined: Tuesday 30 December 2014 19:25
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.107
- Location: Netherlands
- Contact:
Re: dtgbot - Domoticz TeleGram BOT
It looks to me this is the error log of a currently running dtgbot service instance as I don't see any hard errors that would make the service stop?
It seems you have done some bash commands here to request the system status and update status which both failed.
Could it be that there is an issue with the required variables definition required for dtgbot?
One other thing to do would be to set the variable TelegramBotLoglevel to 2 and start the dtgbot service. This should generate a more detailed dtg.log so you can see what is happening. You can share them with me via PM in case you have questions.
Jos
It seems you have done some bash commands here to request the system status and update status which both failed.
Could it be that there is an issue with the required variables definition required for dtgbot?
One other thing to do would be to set the variable TelegramBotLoglevel to 2 and start the dtgbot service. This should generate a more detailed dtg.log so you can see what is happening. You can share them with me via PM in case you have questions.
Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
-
- Posts: 3
- Joined: Saturday 18 February 2017 16:40
- Target OS: Linux
- Domoticz version:
- Contact:
Re: dtgbot - Domoticz TeleGram BOT
Hi All!
today faced the same issue -
/usr/bin/lua5.2: /home/domoticz/dtgbot/dtgbot.lua:549: attempt to index global 'msg' (a nil value)
stack traceback:
/home/domoticz/dtgbot/dtgbot.lua:549: in main chunk
[C]: in ?
on line 549 i have print_to_log(1,msg.text)
Is there any solution?
today faced the same issue -
/usr/bin/lua5.2: /home/domoticz/dtgbot/dtgbot.lua:549: attempt to index global 'msg' (a nil value)
stack traceback:
/home/domoticz/dtgbot/dtgbot.lua:549: in main chunk
[C]: in ?
on line 549 i have print_to_log(1,msg.text)
Is there any solution?
- jvdz
- Posts: 2280
- Joined: Tuesday 30 December 2014 19:25
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.107
- Location: Netherlands
- Contact:
Re: dtgbot - Domoticz TeleGram BOT
I actually looked at this issue a few weeks ago when it was reported by G3rard. It turned out he was receiving channel messages which don't contain the message field information. To fix the issue just replace this portion of the code:
With:
This will avoid processing nil messages and simply continue with the next message in the queue.
Jos
Code: Select all
print_to_log(1,'update_id ',tt.update_id)
print_to_log(1,msg.text)
TelegramBotOffset = tt.update_id + 1
print_to_log(1,'TelegramBotOffset '..TelegramBotOffset)
set_variable_value(TBOidx,TBOName,0,TelegramBotOffset)
-- Offset updated before processing in case of crash allows clean restart
on_msg_receive(msg)
Code: Select all
print_to_log(1,'update_id ',tt.update_id)
-- print_to_log(1,msg.text)
TelegramBotOffset = tt.update_id + 1
print_to_log(1,'TelegramBotOffset '..TelegramBotOffset)
set_variable_value(TBOidx,TBOName,0,TelegramBotOffset)
-- Offset updated before processing in case of crash allows clean restart
if msg ~= nil and msg.text ~= nil then
print_to_log(1,msg.text)
on_msg_receive(msg)
end
Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
- G3rard
- Posts: 669
- Joined: Wednesday 04 March 2015 22:15
- Target OS: -
- Domoticz version: No
- Location: The Netherlands
- Contact:
dtgbot - Domoticz TeleGram BOT
That fix of Jos works like a charm.
Dtgbot is already running for some weeks now, where before this change the service used to stop frequently.
Dtgbot is already running for some weeks now, where before this change the service used to stop frequently.
Not using Domoticz anymore
-
- Posts: 39
- Joined: Saturday 26 April 2014 15:27
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: dtgbot - Domoticz TeleGram BOT
Got everythink working i think, no errors but i dont get any responds when i send a command like "systemstatus"
and this is the log:
Error_log is empty, Got any ideas? Thank you in advance!
Code: Select all
root@Domoticzmainz:/etc/init.d# sudo service dtgbot status
● dtgbot.service - LSB: A Telegram bot designed to control Domoticz
Loaded: loaded (/etc/init.d/dtgbot)
Active: active (running) since Fri 2017-04-14 20:12:17 CEST; 8min ago
Process: 7474 ExecStart=/etc/init.d/dtgbot start (code=exited, status=0/SUCCESS)
CGroup: /system.slice/dtgbot.service
├─7481 /bin/sh /home/pi/dtgbot/dtgbot /var/run/dtgbot.pid
└─7482 /usr/bin/lua5.2 /home/pi/dtgbot/dtgbot.lua
Apr 14 20:12:17 Domoticzmainz dtgbot[7474]: Starting Telegram Bot for Domoti....
Apr 14 20:12:17 Domoticzmainz systemd[1]: Started LSB: A Telegram bot design....
Hint: Some lines were ellipsized, use -l to show in full.
root@Domoticzmainz:/etc/init.d#
Code: Select all
2017-04-14 20:12:17 - DomoticzIP: XXXXXXXX:[email protected]
2017-04-14 20:12:17 - DomoticzPort: 8080
2017-04-14 20:12:17 - BotHomePath: /home/pi/dtgbot/
2017-04-14 20:12:17 - BotLuaScriptPath: /home/pi/dtgbot/lua/
2017-04-14 20:12:17 - BotBashScriptPath: /home/pi/dtgbot/bash/
2017-04-14 20:12:17 - TelegramBotToken: XXXXXXXXXXXXXXXXXXXXXXXX
2017-04-14 20:12:17 - TelegramBotOffset: TelegramBotOffset
2017-04-14 20:12:17 - -----------------------------------------
2017-04-14 20:12:17 - Starting Telegram api Bot message handler
2017-04-14 20:12:17 - -----------------------------------------
2017-04-14 20:12:17 - Domoticz returned getuservariables after 1 attempts
2017-04-14 20:12:17 - dtgbotLogLevel set to: 0
2017-04-14 20:12:17 - Loading command modules...
2017-04-14 20:12:17 - Loading module <utility>
2017-04-14 20:12:17 - found command <refresh>
2017-04-14 20:12:17 - Loading module <dtgmenu>
2017-04-14 20:12:17 - define LastCommand
2017-04-14 20:12:17 - found command <dtgmenu>
2017-04-14 20:12:17 - Loading module <list>
2017-04-14 20:12:17 - found command <dump>
2017-04-14 20:12:17 - found command <list>
2017-04-14 20:12:17 - Loading module <devices>
2017-04-14 20:12:17 - found command <scenes>
2017-04-14 20:12:17 - found command <devices>
2017-04-14 20:12:17 - Loading module <flick>
2017-04-14 20:12:17 - found command <flick>
2017-04-14 20:12:17 - Loading module <nflick>
2017-04-14 20:12:17 - found command <nflick>
2017-04-14 20:12:17 - Loading module <on>
2017-04-14 20:12:17 - found command <off>
2017-04-14 20:12:17 - found command <on>
2017-04-14 20:12:17 - Loading module <battery>
2017-04-14 20:12:17 - found command <batteries>
2017-04-14 20:12:17 - found command <battery>
2017-04-14 20:12:17 - Loading module <help>
2017-04-14 20:12:17 - found command <start>
2017-04-14 20:12:17 - found command <help>
2017-04-14 20:12:17 - Loading module <temperature>
2017-04-14 20:12:17 - found command <temperatures>
2017-04-14 20:12:17 - found command <temperature>
2017-04-14 20:12:17 - found command <tempall>
2017-04-14 20:12:17 - Decoded On
2017-04-14 20:12:18 - WLidx 10
2017-04-14 20:12:18 - Decoded 34492***
2017-04-14 20:12:18 - WLString: 34492***
2017-04-14 20:12:18 - dtgbotLogLevel set to: 0
2017-04-14 20:12:18 - WLidx 10
2017-04-14 20:12:18 - Decoded 34492***
2017-04-14 20:12:18 - WLString: 34492***
2017-04-14 20:12:18 - Getting TelegramBotOffset the previous Telegram bot message offset from Domoticz
2017-04-14 20:12:18 - Decoded 1
RPI 3b+, PiFace 2, RFcom, Aeon Zwave USB, Aeon Home Energy Meter Gen 5, several Shelly switches, several ESP8266 sensors.
-
- Posts: 39
- Joined: Saturday 26 April 2014 15:27
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: dtgbot - Domoticz TeleGram BOT
Ok, thanks to jvdz i managed to get it to work! Really great he could help me.
I made a couple of stupd mistakes which I will explain here so maybe other people will benefit from it:
First: when making the DomoticzData.sh you will have to fill in your token. DO NOT begin with " bot" like this:
export TelegramBotToken="bot12345678:token_tokentokentokentoken"
It has to be made like this:
export TelegramBotToken="12345678:token_tokentokentokentoken"
----------------------------------------------------------------------------------------------------------------------------------------------
And when all fails, and you need to make a logfile, make a uservariable with the name:
(notice the capital letters!)
TelegramBotLoglevel
Integer
2
This will make the DTG.log much bigger and this way you can dig deeper into errors.
I made a couple of stupd mistakes which I will explain here so maybe other people will benefit from it:
First: when making the DomoticzData.sh you will have to fill in your token. DO NOT begin with " bot" like this:
export TelegramBotToken="bot12345678:token_tokentokentokentoken"
It has to be made like this:
export TelegramBotToken="12345678:token_tokentokentokentoken"
----------------------------------------------------------------------------------------------------------------------------------------------
And when all fails, and you need to make a logfile, make a uservariable with the name:
(notice the capital letters!)
TelegramBotLoglevel
Integer
2
This will make the DTG.log much bigger and this way you can dig deeper into errors.
RPI 3b+, PiFace 2, RFcom, Aeon Zwave USB, Aeon Home Energy Meter Gen 5, several Shelly switches, several ESP8266 sensors.
-
- Posts: 94
- Joined: Monday 30 November 2015 16:21
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: dtgbot - Domoticz TeleGram BOT
mmm...
tried installing dtgbot on 2 machines (a x64 ubuntu server 16.04 and a pi with x86 ubuntu 14.04) by following the Wiki
both failed.
on both machines:
With sudo service dtgbot start, it gives in the server:
In the Pi it says
But the bot is unable to connect domoticz.
on both systems the file DomoticzData.sh is like:
on the ubuntu server, the error log gives:
The Pi dont have any errors, but cannot connect to Domoticz.
What to do?
edit:
After rebooting the Pi it gives a few error lines
I have rooms defined in domoticz, but it seems that it cannot find any?
tried installing dtgbot on 2 machines (a x64 ubuntu server 16.04 and a pi with x86 ubuntu 14.04) by following the Wiki
both failed.
on both machines:
Code: Select all
ubuntu@ubuntu:~/apps/dtgbot$ sudo lua dtgbot.lua
2017-05-10 20:23:30 - DomoticzIP not found check /etc/profile.d/DomoticzData.sh
2017-05-10 20:23:30 - DomoticzPort not found check /etc/profile.d/DomoticzData.sh
2017-05-10 20:23:30 - BotHomePath not found check /etc/profile.d/DomoticzData.sh
2017-05-10 20:23:30 - BotLuaScriptPath not found check /etc/profile.d/DomoticzData.sh
2017-05-10 20:23:30 - TempFileDir not found check /etc/profile.d/DomoticzData.sh
2017-05-10 20:23:30 - BotBashScriptPath not found check /etc/profile.d/DomoticzData.sh
2017-05-10 20:23:30 - TelegramBotToken not found check /etc/profile.d/DomoticzData.sh
2017-05-10 20:23:30 - TelegramBotOffset not found check /etc/profile.d/DomoticzData.sh
lua: dtgbot.lua:69: attempt to concatenate global 'DomoticzPort' (a nil value)
stack traceback:
dtgbot.lua:69: in main chunk
[C]: in ?
Code: Select all
● dtgbot.service - LSB: A Telegram bot designed to control Domoticz
Loaded: loaded (/etc/init.d/dtgbot; bad; vendor preset: enabled)
Active: active (exited) since Wed 2017-05-10 18:07:09 CEST; 2h 34min ago
Docs: man:systemd-sysv-generator(8)
Process: 18676 ExecStop=/etc/init.d/dtgbot stop (code=exited, status=0/SUCCESS)
Process: 18692 ExecStart=/etc/init.d/dtgbot start (code=exited, status=0/SUCCESS)
May 10 18:07:09 centraalpunt systemd[1]: Starting LSB: A Telegram bot designed to control Domoticz...
May 10 18:07:09 centraalpunt dtgbot[18692]: Starting Telegram Bot for Domoticz ... Done.
May 10 18:07:09 centraalpunt systemd[1]: Started LSB: A Telegram bot designed to control Domoticz.
Code: Select all
* dtgbot is running
on both systems the file DomoticzData.sh is like:
Code: Select all
#!/bin/bash
# Variables to avoid having to set local system information in individual automation scripts
#I can't get the next line to work during start-up so have gone to 127 instead
# export DomoticzIP=$(hostname -I|sed 's/[ ]*$//')
export DomoticzIP="192.168.88.2"
export DomoticzPort="8000"
export TempFileDir="/var/tmp/"
export BotHomePath="/home/user/apps/dtgbot/"
export BotBashScriptPath=$BotHomePath"bash/"
export BotLuaScriptPath=$BotHomePath"lua/"
export BotLuaLog=$TempFileDir"dtb.log"
export TelegramChatId="my_chat_id"
export TelegramBotToken="my_bot_ID:My_bot_token"
export TelegramBotOffset="TelegramBotOffset"
export EmailTo="[email protected]"
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: ELFCLASS32
stack traceback:
[C]: in ?
[C]: in function 'require'
/usr/local/share/lua/5.2/socket.lua:12: in main chunk
[C]: in function 'require'
/usr/local/share/lua/5.2/socket/http.lua:10: in main chunk
[C]: in function 'require'
/home/user/apps/dtgbot/dtgbot.lua:93: in main chunk
[C]: in ?
What to do?
edit:
After rebooting the Pi it gives a few error lines
Code: Select all
dtg_domoticz.lua:178: attempt to index field 'result'( a nil value)
/dtg_domoticz.lua:178: in funtion 'devinfo_from_name'
/dtgmenu:433: in funtion 'MakeRoomMenus'
/dtgmenu:382: in funtion 'PopulateMenuTab'
/dtgbot.lua:211 in function 'dtg_initialise'
/dtgbot.lua:230 in main chunk
Last edited by maomanna on Wednesday 10 May 2017 21:09, edited 1 time in total.
- jvdz
- Posts: 2280
- Joined: Tuesday 30 December 2014 19:25
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.107
- Location: Netherlands
- Contact:
Re: dtgbot - Domoticz TeleGram BOT
It seems there is a problem with the LUA setup on Ubuntu and am not sure what is needed there as I don't have that setup available.
Edit: A quick search of the forum revealed this post: http://www.domoticz.com/forum/viewtopic ... S32#p54112
As to the RPI issue: How have you identified it can't connect to domoticz? What is shown in the dtg log files when you start it?
Jos
Edit: A quick search of the forum revealed this post: http://www.domoticz.com/forum/viewtopic ... S32#p54112
As to the RPI issue: How have you identified it can't connect to domoticz? What is shown in the dtg log files when you start it?
Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
-
- Posts: 94
- Joined: Monday 30 November 2015 16:21
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: dtgbot - Domoticz TeleGram BOT
editted my post above 
By using dtgbot, it seems that my domoticz is crashing

By using dtgbot, it seems that my domoticz is crashing

- jvdz
- Posts: 2280
- Joined: Tuesday 30 December 2014 19:25
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.107
- Location: Netherlands
- Contact:
Re: dtgbot - Domoticz TeleGram BOT
It helps when you set the loglevel to 2 and then supply me with the dtg.log file so we can exactly see what is happening ( as defined in the Wiki).
I don't know why domoticz could be crashing as it only does json calls, but maybe the error you see and the crash are related.
Jos
I don't know why domoticz could be crashing as it only does json calls, but maybe the error you see and the crash are related.
Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
-
- Posts: 51
- Joined: Friday 18 September 2015 21:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: dtgbot - Domoticz TeleGram BOT
Seems like i have the same problem as maomanna described on my raspberry pi3, I think something broke after i updated the kernel of my pi because before that everything was working fine.
My dtb.errors.log
My dtblog (dtgbotloglevel2.removed telegrambottoken)
My dtb.errors.log
Code: Select all
/usr/bin/lua5.2: /home/pi/dtgbot//dtg_domoticz.lua:178: attempt to index field 'result' (a nil value)
stack traceback:
/home/pi/dtgbot//dtg_domoticz.lua:178: in function 'devinfo_from_name'
/home/pi/dtgbot/lua//dtgmenu.lua:433: in function 'MakeRoomMenus'
/home/pi/dtgbot/lua//dtgmenu.lua:382: in function 'PopulateMenuTab'
/home/pi/dtgbot/dtgbot.lua:211: in function 'dtgbot_initialise'
/home/pi/dtgbot/dtgbot.lua:230: in main chunk
[C]: in ?
Code: Select all
2017-05-11 23:44:12 - DomoticzIP: 192.168.1.27
2017-05-11 23:44:12 - DomoticzPort: 8080
2017-05-11 23:44:12 - BotHomePath: /home/pi/dtgbot/
2017-05-11 23:44:12 - BotLuaScriptPath: /home/pi/dtgbot/lua/
2017-05-11 23:44:12 - TempFileDir: /var/tmp/
2017-05-11 23:44:12 - BotBashScriptPath: /home/pi/dtgbot/bash/
2017-05-11 23:44:12 - TelegramBotToken: -
2017-05-11 23:44:12 - TelegramBotOffset: TelegramBotOffset
2017-05-11 23:44:12 - -----------------------------------------
2017-05-11 23:44:12 - Starting Telegram api Bot message handler
2017-05-11 23:44:12 - -----------------------------------------
2017-05-11 23:44:12 - JSON request <http://192.168.1.27:8080/json.htm?type=command¶m=getuservariables>
2017-05-11 23:44:12 - Domoticz returned getuservariables after 1 attempts
2017-05-11 23:44:12 - JSON request <http://192.168.1.27:8080/json.htm?type=devices&order=name&used=true>
2017-05-11 23:44:12 - JSON request <http://192.168.1.27:8080/json.htm?type=scenes&order=name&used=true>
2017-05-11 23:44:12 - JSON request <http://192.168.1.27:8080/json.htm?type=plans&order=name&used=true>
2017-05-11 23:44:12 - JSON request <http://192.168.1.27:8080/json.htm?type=command¶m=getlanguage>
2017-05-11 23:44:12 - dtgbotLogLevel set to: 2
2017-05-11 23:44:12 - Loading command modules...
2017-05-11 23:44:12 - Loading module <utility>
2017-05-11 23:44:12 - found command <refresh>
2017-05-11 23:44:12 - function: 0x793b60
2017-05-11 23:44:12 - Loading module <dtgmenu>
2017-05-11 23:44:12 - define LastCommand
2017-05-11 23:44:12 - found command <dtgmenu>
2017-05-11 23:44:12 - function: 0x7a3b80
2017-05-11 23:44:12 - Loading module <list>
2017-05-11 23:44:12 - found command <dump>
2017-05-11 23:44:12 - function: 0x7a01c8
2017-05-11 23:44:12 - found command <list>
2017-05-11 23:44:12 - function: 0x7a01c8
2017-05-11 23:44:12 - Loading module <devices>
2017-05-11 23:44:12 - found command <devices>
2017-05-11 23:44:12 - function: 0x7aa040
2017-05-11 23:44:12 - found command <scenes>
2017-05-11 23:44:12 - function: 0x7aa040
2017-05-11 23:44:12 - Loading module <flick>
2017-05-11 23:44:12 - found command <flick>
2017-05-11 23:44:12 - function: 0x7a9c50
2017-05-11 23:44:12 - Loading module <nflick>
2017-05-11 23:44:12 - found command <nflick>
2017-05-11 23:44:12 - function: 0x7acb98
2017-05-11 23:44:12 - Loading module <on>
2017-05-11 23:44:12 - found command <on>
2017-05-11 23:44:12 - function: 0x7aee50
2017-05-11 23:44:12 - found command <off>
2017-05-11 23:44:12 - function: 0x7aee50
2017-05-11 23:44:12 - Loading module <battery>
2017-05-11 23:44:12 - found command <batteries>
2017-05-11 23:44:12 - function: 0x7b69e0
2017-05-11 23:44:12 - found command <battery>
2017-05-11 23:44:12 - function: 0x7b69e0
2017-05-11 23:44:12 - Loading module <help>
2017-05-11 23:44:12 - found command <start>
2017-05-11 23:44:12 - function: 0x7b5b08
2017-05-11 23:44:12 - found command <help>
2017-05-11 23:44:12 - function: 0x7b5b08
2017-05-11 23:44:12 - Loading module <temperature>
2017-05-11 23:44:12 - found command <tempall>
2017-05-11 23:44:12 - function: 0x7b9980
2017-05-11 23:44:12 - found command <temperature>
2017-05-11 23:44:12 - function: 0x7b9980
2017-05-11 23:44:12 - found command <temperatures>
2017-05-11 23:44:12 - function: 0x7b9980
2017-05-11 23:44:12 - JSON request <http://192.168.1.27:8080/json.htm?type=command¶m=getuservariable&idx=139>
2017-05-11 23:44:12 - Decoded On
2017-05-11 23:44:12 - #### Start populating menuarray
2017-05-11 23:44:12 - Submenu table including buttons defined in menu.cfg: (1) 1 (2)
2017-05-11 23:44:12 - => (1) Misc (2) (3) n (4) 3
2017-05-11 23:44:12 - ==> start devinfo_from_name (2) refresh
2017-05-11 23:44:12 - !!!! found device (1) (2) 0
2017-05-11 23:44:12 - --< devinfo_from_name: (1) 0 (2) 9999 (3) (4) command (5) command (6) command (7)
2017-05-11 23:44:12 - static -> (1) Misc (2) refresh (3) (4) 9999 (5) command (6) command (7) command (8) 100 (9)
2017-05-11 23:44:12 - ==> start devinfo_from_name (2) tempall
2017-05-11 23:44:12 - !!!! found device (1) (2) 0
2017-05-11 23:44:12 - --< devinfo_from_name: (1) 0 (2) 9999 (3) (4) command (5) command (6) command (7)
2017-05-11 23:44:12 - static -> (1) Misc (2) tempall (3) (4) 9999 (5) command (6) command (7) command (8) 100 (9)
2017-05-11 23:44:12 - ==> start devinfo_from_name (2) battery
2017-05-11 23:44:12 - !!!! found device (1) (2) 0
2017-05-11 23:44:12 - --< devinfo_from_name: (1) 0 (2) 9999 (3) (4) command (5) command (6) command (7)
2017-05-11 23:44:12 - static -> (1) Misc (2) battery (3) (4) 9999 (5) command (6) command (7) command (8) 100 (9)
2017-05-11 23:44:12 - ==> start devinfo_from_name (2) batteries
2017-05-11 23:44:12 - !!!! found device (1) (2) 0
2017-05-11 23:44:12 - --< devinfo_from_name: (1) 0 (2) 9999 (3) (4) command (5) command (6) command (7)
2017-05-11 23:44:12 - static -> (1) Misc (2) batteries (3) (4) 9999 (5) command (6) command (7) command (8) 100 (9)
2017-05-11 23:44:12 - ==> start devinfo_from_name (2) systemstatus
2017-05-11 23:44:12 - !!!! found device (1) (2) 0
2017-05-11 23:44:12 - --< devinfo_from_name: (1) 0 (2) 9999 (3) (4) command (5) command (6) command (7)
2017-05-11 23:44:12 - static -> (1) Misc (2) systemstatus (3) (4) 9999 (5) command (6) command (7) command (8) 100 (9)
2017-05-11 23:44:12 - ==> start devinfo_from_name (2) dtgmenu
2017-05-11 23:44:12 - !!!! found device (1) (2) 0
2017-05-11 23:44:12 - --< devinfo_from_name: (1) 0 (2) 9999 (3) (4) command (5) command (6) command (7)
2017-05-11 23:44:12 - static -> (1) Misc (2) dtgmenu (3) (4) 9999 (5) command (6) command (7) command (8) 100 (9)
2017-05-11 23:44:12 - Creating Room Menus: (1) 1 (2)
2017-05-11 23:44:12 - JSON request <http://192.168.1.27:8080/json.htm?type=command¶m=getplandevices&idx=2&order=name&used=true>
2017-05-11 23:44:12 - For room woonkamer got some devices and/or scenes
2017-05-11 23:44:12 - - Plan record: (1) Verlichting woonkamer (2) 13 (3) 0
2017-05-11 23:44:12 - --> device record
2017-05-11 23:44:12 - ==> start devinfo_from_name (1) 13 (2)
2017-05-11 23:44:12 - JSON request <http://192.168.1.27:8080/json.htm?type=devices&rid=13>
2017-05-11 23:44:12 - device (1) (2) Verlichting woonkamer (3) 13 (4) 13
2017-05-11 23:44:12 - !!!! found device (1) Verlichting woonkamer (2) Verlichting woonkamer (3) 13 (4) 13
2017-05-11 23:44:12 - !!!! found device (1) Verlichting woonkamer (2) 13
2017-05-11 23:44:12 - --< devinfo_from_name: (1) 1 (2) 13 (3) Verlichting woonkamer (4) devices (5) Light/Switch (6) On/Off (7) Off
2017-05-11 23:44:12 - Dynamic -> (1) woonkamer (2) Verlichting_ (3) Verlichting woonkamer (4) 13 (5) devices (6) Light/Switch (7) On/Off (8) 100 (9) Off
2017-05-11 23:44:12 - - Plan record: (1) Energy meter (2) 72 (3) 0
2017-05-11 23:44:12 - --> device record
2017-05-11 23:44:12 - ==> start devinfo_from_name (1) 72 (2)
2017-05-11 23:44:12 - JSON request <http://192.168.1.27:8080/json.htm?type=devices&rid=72>
2017-05-11 23:44:12 - device (1) (2) Energy meter (3) 72 (4) 72
2017-05-11 23:44:12 - !!!! found device (1) Energy meter (2) Energy meter (3) 72 (4) 72
2017-05-11 23:44:12 - !!!! found device (1) Energy meter (2) 72
2017-05-11 23:44:12 -
2017-05-11 23:44:12 -
2017-05-11 23:44:12 - - Plan record: (1) Gas (2) 11 (3) 0
2017-05-11 23:44:12 - --> device record
2017-05-11 23:44:12 - ==> start devinfo_from_name (1) 11 (2)
2017-05-11 23:44:12 - JSON request <http://192.168.1.27:8080/json.htm?type=devices&rid=11>
2017-05-11 23:44:12 - device (1) (2) Gas (3) 11 (4) 11
2017-05-11 23:44:12 - !!!! found device (1) Gas (2) Gas (3) 11 (4) 11
2017-05-11 23:44:12 - !!!! found device (1) Gas (2) 11
2017-05-11 23:44:12 -
2017-05-11 23:44:12 -
2017-05-11 23:44:12 - - Plan record: (1) Keuken verlichting (2) 31 (3) 0
2017-05-11 23:44:12 - --> device record
2017-05-11 23:44:12 - ==> start devinfo_from_name (1) 31 (2)
2017-05-11 23:44:12 - JSON request <http://192.168.1.27:8080/json.htm?type=devices&rid=31>
2017-05-11 23:44:12 - device (1) (2) Keuken verlichting (3) 31 (4) 31
2017-05-11 23:44:12 - !!!! found device (1) Keuken verlichting (2) Keuken verlichting (3) 31 (4) 31
2017-05-11 23:44:12 - !!!! found device (1) Keuken verlichting (2) 31
2017-05-11 23:44:12 - --< devinfo_from_name: (1) 1 (2) 31 (3) Keuken verlichting (4) devices (5) Light/Switch (6) On/Off (7) Off
2017-05-11 23:44:12 - Dynamic -> (1) woonkamer (2) Keuken_verlichting (3) Keuken verlichting (4) 31 (5) devices (6) Light/Switch (7) On/Off (8) 100 (9) Off
2017-05-11 23:44:12 - - Plan record: (1) Tv huiskamer (2) 84 (3) 0
2017-05-11 23:44:12 - --> device record
2017-05-11 23:44:12 - ==> start devinfo_from_name (1) 84 (2)
2017-05-11 23:44:12 - JSON request <http://192.168.1.27:8080/json.htm?type=devices&rid=84>
2017-05-11 23:44:12 - device (1) (2) Tv huiskamer (3) 84 (4) 84
2017-05-11 23:44:12 - !!!! found device (1) Tv huiskamer (2) Tv huiskamer (3) 84 (4) 84
2017-05-11 23:44:12 - !!!! found device (1) Tv huiskamer (2) 84
2017-05-11 23:44:12 - --< devinfo_from_name: (1) 1 (2) 84 (3) Tv huiskamer (4) devices (5) Light/Switch (6) On/Off (7) On
2017-05-11 23:44:12 - Dynamic -> (1) woonkamer (2) Tv_huiskamer (3) Tv huiskamer (4) 84 (5) devices (6) Light/Switch (7) On/Off (8) 100 (9) On
2017-05-11 23:44:12 - - Plan record: (1) Kodi (2) 36 (3) 0
2017-05-11 23:44:12 - --> device record
2017-05-11 23:44:12 - ==> start devinfo_from_name (1) 36 (2)
2017-05-11 23:44:13 - JSON request <http://192.168.1.27:8080/json.htm?type=devices&rid=36>
Last edited by DennisD on Tuesday 10 April 2018 16:26, edited 1 time in total.
-
- Posts: 94
- Joined: Monday 30 November 2015 16:21
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: dtgbot - Domoticz TeleGram BOT
@JvdZ and I working on a solution.
Hopefully we have one soon. When founded, we'll post it.
On my ubuntu server, i have a different problem. Cause it is a x64 system, i dont have the right lua library. The sudo apt-get install lua5.2 is installed, but it looks like that dtgbot isn't pointed to that dirs
Hopefully we have one soon. When founded, we'll post it.
On my ubuntu server, i have a different problem. Cause it is a x64 system, i dont have the right lua library. The sudo apt-get install lua5.2 is installed, but it looks like that dtgbot isn't pointed to that dirs
- G3rard
- Posts: 669
- Joined: Wednesday 04 March 2015 22:15
- Target OS: -
- Domoticz version: No
- Location: The Netherlands
- Contact:
Re: dtgbot - Domoticz TeleGram BOT
I have dtgbot working on my Ubuntu server. It took some extra steps which I think I have written down. Will have a look at it this weekend and share the steps here.
Not using Domoticz anymore
-
- Posts: 94
- Joined: Monday 30 November 2015 16:21
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: dtgbot - Domoticz TeleGram BOT
but do you have a x86 or x64 ubuntu server?G3rard wrote:I have dtgbot working on my Ubuntu server. It took some extra steps which I think I have written down. Will have a look at it this weekend and share the steps here.
- jvdz
- Posts: 2280
- Joined: Tuesday 30 December 2014 19:25
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.107
- Location: Netherlands
- Contact:
Re: dtgbot - Domoticz TeleGram BOT
I am working with maomanna in PM on his issue, but it seems his PI issue is due to the fact that a JSON call doesn't return a RESULT section, hence causing the nil issue in lua.DennisD wrote:Seems like i have the same problem as maomanna described on my raspberry pi3, I think something broke after i updated the kernel of my pi because before that everything was working fine.
Could you post the result of that last JSON call from the log to see whether you have the same issue?
Code: Select all
http://192.168.1.27:8080/json.htm?type=devices&rid=36
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
-
- Posts: 51
- Joined: Friday 18 September 2015 21:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: dtgbot - Domoticz TeleGram BOT
That was it, no more entries after that. That was the last line of the log.
If i copy and paste the url in my browser i do get a result so the device is there and the json call works.
If i copy and paste the url in my browser i do get a result so the device is there and the json call works.
Last edited by DennisD on Friday 12 May 2017 9:55, edited 1 time in total.
- jvdz
- Posts: 2280
- Joined: Tuesday 30 December 2014 19:25
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.107
- Location: Netherlands
- Contact:
Re: dtgbot - Domoticz TeleGram BOT
Sorry, I was trying to ask you to put that exact line in your browser, hit enter and show me the result returned. 
Jos

Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
-
- Posts: 51
- Joined: Friday 18 September 2015 21:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: dtgbot - Domoticz TeleGram BOT
Sorry just edited my post , but here is the outcome of the json call:"
{
"ActTime" : 1494575660,
"ServerTime" : "2017-05-12 09:54:20",
"Sunrise" : "05:54",
"Sunset" : "21:24",
"status" : "OK",
"title" : "Devices"
}
{
"ActTime" : 1494575660,
"ServerTime" : "2017-05-12 09:54:20",
"Sunrise" : "05:54",
"Sunset" : "21:24",
"status" : "OK",
"title" : "Devices"
}
Who is online
Users browsing this forum: No registered users and 1 guest