dtgbot - Domoticz TeleGram BOT

Client tools or tools that can connect with Domoticz. Tools for Windows, iOS, Android, Linux etc.
Post Reply
User avatar
jvdz
Posts: 894
Joined: Tuesday 30 December 2014 20:25
Target OS: Raspberry Pi
Domoticz version: Stable
Location: Netherlands
Contact:

Re: dtgbot - Domoticz TeleGram BOT

Post by jvdz » Tuesday 20 October 2015 18:44

There clearly is an issue with the index of the room it is trying to retrieve the devices for. The idx field should be a number in stead of a name.
Could you post (or PM) the result of the json : http://192.168.1.XXX:8080/json.htm?type ... &used=true
Is "Planta Baja" a name of a room?

Jos

satanasinc
Posts: 11
Joined: Monday 19 October 2015 12:15
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: dtgbot - Domoticz TeleGram BOT

Post by satanasinc » Tuesday 20 October 2015 19:44

jvdz wrote:There clearly is an issue with the index of the room it is trying to retrieve the devices for. The idx field should be a number in stead of a name.
Could you post (or PM) the result of the json : http://192.168.1.XXX:8080/json.htm?type ... &used=true
Is "Planta Baja" a name of a room?

Jos
Hi!

Thank you jvdz! PM send.

"Planta Baja" is a floor name not a room. It means low level in spanish.

I'm really very grateful jvdz.
Editing...

After jvdz help i got a new error in the dtb.log....
Spoiler: show
2015-10-20 20:37:41 - #### End populating menuarray
2015-10-20 20:37:41 - TelegramBotWhiteListedIDs user variable does not exist in Domoticz
2015-10-20 20:37:41 - So will allow any id to use the bot
2015-10-20 20:37:41 - JSON request <http://192.168.1.XXX:8080/json.htm?type ... ble&idx=11>
2015-10-20 20:37:41 - Decoded 1
2015-10-20 20:37:41 - dtgbotLogLevel set to: 1
2015-10-20 20:37:41 - TelegramBotWhiteListedIDs user variable does not exist in Domoticz
2015-10-20 20:37:41 - So will allow any id to use the bot
2015-10-20 20:37:41 - Getting 1 the previous Telegram bot message offset from Domoticz
2015-10-20 20:37:41 - 1 user variable does not exist in Domoticz so can not continue
---Edit--

Solved

Guys it may sound obvious, but do not use spaces in domoticz objects names.

Thnx to jvdz for the help. You are Jedi Master :lol:

Greetings from spain.

fhwessels
Posts: 37
Joined: Sunday 12 April 2015 9:09
Target OS: Raspberry Pi
Domoticz version: latest
Location: Johannesburg South Africa
Contact:

Re: dtgbot - Domoticz TeleGram BOT

Post by fhwessels » Monday 16 November 2015 18:43

Hi I just don't have any luck getting dtgbot stating. I dont use any password on Domoticz.

This is the error I am getting:

Code: Select all

/usr/bin/lua5.2: /home/pi/dtgbot//dtg_domoticz.lua:125: attempt to get length of global 'result' (a nil value)
stack traceback:
        /home/pi/dtgbot//dtg_domoticz.lua:125: in function 'device_list_names_idxs'
        /home/pi/dtgbot/dtgbot.lua:174: in function 'dtgbot_initialise'
        /home/pi/dtgbot/dtgbot.lua:229: in main chunk
        [C]: in ?
Here is the details from Domoticz:

Code: Select all

{
result: [
{
LastUpdate: "2015-11-16 16:33:29",
Name: "TelegramBotOffset",
Type: "0",
Value: "1",
idx: "1"
},
{
LastUpdate: "2015-11-16 16:33:58",
Name: "TelegramBotMenu",
Type: "2",
Value: "Off",
idx: "2"
},
{
LastUpdate: "2015-11-16 16:34:34",
Name: "TelegramBotWhiteListedIDs",
Type: "2",
Value: "xxxxxxx",
idx: "3"
}
],
status: "OK",
title: "GetUserVariables"

Code: Select all

{
result: [
{
Devices: 16,
Name: "Main",
Order: "1",
idx: "2"
},
{
Devices: 4,
Name: "Study",
Order: "3",
idx: "3"
}
],
status: "OK",
title: "Plans"
}

User avatar
jvdz
Posts: 894
Joined: Tuesday 30 December 2014 20:25
Target OS: Raspberry Pi
Domoticz version: Stable
Location: Netherlands
Contact:

Re: dtgbot - Domoticz TeleGram BOT

Post by jvdz » Monday 16 November 2015 19:07

You probably do not have any Scenes defined yet in Domoticz and the Function is "complaining" about that.
Please edit your dtg_domoticz.lua and update the below function with this version which should skip in case no Scenes are available:

Code: Select all

-- returns a list of Domoticz items based on type i.e. devices or scenes
function device_list_names_idxs(DeviceType)
  --returns a devcie idx based on its name
  local idx, k, record, decoded_response
  decoded_response = device_list(DeviceType)
  result = decoded_response['result']
  devices = {}
  devicesproperties = {}
  if result ~= nil then
	  for i = 1, #result do
		record = result[i]
		if type(record) == "table" then
		  if DeviceType == "plans" then
			devices[record['Name']] = record['idx']
		  else
			devices[string.lower(record['Name'])] = record['idx']
			devices[record['idx']] = record['Name']
			if DeviceType == 'scenes' then
			  devicesproperties[record['idx']] = {Type=record['Type'], SwitchType = record['Type']}
			end
		  end
		end
	  end
  end
  return devices, devicesproperties
end
Thanks
Jos

fhwessels
Posts: 37
Joined: Sunday 12 April 2015 9:09
Target OS: Raspberry Pi
Domoticz version: latest
Location: Johannesburg South Africa
Contact:

Re: dtgbot - Domoticz TeleGram BOT

Post by fhwessels » Monday 16 November 2015 19:23

Thanks jvdz once I create my scenes dtgbot started.

fhwessels
Posts: 37
Joined: Sunday 12 April 2015 9:09
Target OS: Raspberry Pi
Domoticz version: latest
Location: Johannesburg South Africa
Contact:

Re: dtgbot - Domoticz TeleGram BOT

Post by fhwessels » Tuesday 17 November 2015 18:05

I now have the bot up and running. When I type a command like "help" in from the telegram I don't get a response back from the bot. Why will that be?

Code: Select all

6 - Starting Telegram api Bot message handler
2015-11-17 17:47:46 - -----------------------------------------
2015-11-17 17:47:47 - Domoticz returned getuservariables after 2 attempts
2015-11-17 17:47:47 -  dtgbotLogLevel set to: 0
2015-11-17 17:47:47 - Loading command modules...
2015-11-17 17:47:47 - Loading module <utility>
2015-11-17 17:47:48 - found command <refresh>
2015-11-17 17:47:48 - Loading module <dtgmenu>
2015-11-17 17:47:48 - define LastCommand
2015-11-17 17:47:48 - found command <dtgmenu>
2015-11-17 17:47:48 - Loading module <list>
2015-11-17 17:47:48 - found command <list>
2015-11-17 17:47:48 - found command <dump>
2015-11-17 17:47:48 - Loading module <devices>
2015-11-17 17:47:48 - found command <devices>
2015-11-17 17:47:48 - found command <scenes>
2015-11-17 17:47:48 - Loading module <flick>
2015-11-17 17:47:48 - found command <flick>
2015-11-17 17:47:48 - Loading module <nflick>
2015-11-17 17:47:48 - found command <nflick>
2015-11-17 17:47:48 - Loading module <on>
2015-11-17 17:47:48 - found command <off>
2015-11-17 17:47:48 - found command <on>
2015-11-17 17:47:48 - Loading module <battery>
2015-11-17 17:47:48 - found command <batteries>
2015-11-17 17:47:48 - found command <battery>
2015-11-17 17:47:48 - Loading module <help>
2015-11-17 17:47:48 - found command <start>
2015-11-17 17:47:48 - found command <help>
2015-11-17 17:47:48 - Loading module <temperature>
2015-11-17 17:47:48 - found command <temperatures>
2015-11-17 17:47:48 - found command <tempall>
2015-11-17 17:47:48 - found command <temperature>
2015-11-17 17:47:48 - Decoded Off
2015-11-17 17:47:48 - TelegramBotWhiteListedIDs user variable does not exist in Domoticz
2015-11-17 17:47:48 - So will allow any id to use the bot
2015-11-17 17:47:48 -  dtgbotLogLevel set to: 0
2015-11-17 17:47:48 - TelegramBotWhiteListedIDs user variable does not exist in Domoticz
2015-11-17 17:47:48 - So will allow any id to use the bot
2015-11-17 17:47:48 - Getting TelegramBotOffset the previous Telegram bot message offset from Domo                      ticz
2015-11-17 17:47:48 - Decoded 1

simonrg
Posts: 1054
Joined: Tuesday 16 July 2013 22:54
Target OS: Raspberry Pi
Domoticz version:
Location: North East England
Contact:

Re: dtgbot - Domoticz TeleGram BOT

Post by simonrg » Tuesday 17 November 2015 19:15

fhwessels wrote:I now have the bot up and running. When I type a command like "help" in from the telegram I don't get a response back from the bot. Why will that be?
Try a slash infront of help - /help - should then get a response.
Check out the Telegram generic pages, they document things like this behaviour.
Raspberry Pi 2 B - [email protected] PSU - Raspbian + Domoticz + RFXtrx(89), LightwaveRF House(dimmers, sockets, wireless/mood switches), Owl CM113, 4 LaCross Temp / Humidity Sensors, 4 Siemens PIR, Smappee, Solaredge, ESP8266

fhwessels
Posts: 37
Joined: Sunday 12 April 2015 9:09
Target OS: Raspberry Pi
Domoticz version: latest
Location: Johannesburg South Africa
Contact:

Re: dtgbot - Domoticz TeleGram BOT

Post by fhwessels » Tuesday 17 November 2015 20:58

hi I did try the /help as well and still don't get the response. Here is the info from the getUpdate log

Code: Select all

{
update_id: 121932669,
message: {
message_id: 201,
from: {
id: xxxxxxx,
first_name: "Francois",
last_name: "Wessels",
username: "fwessels"
},
chat: {
id: xxxxxx,
first_name: "Francois",
last_name: "Wessels",
username: "fwessels",
type: "private"
},
date: 1447786998,
text: "/help"
}
}
]

User avatar
jvdz
Posts: 894
Joined: Tuesday 30 December 2014 20:25
Target OS: Raspberry Pi
Domoticz version: Stable
Location: Netherlands
Contact:

Re: dtgbot - Domoticz TeleGram BOT

Post by jvdz » Tuesday 17 November 2015 21:13

Can you show me the dtb.log with the details about processing this message?

Jos

fhwessels
Posts: 37
Joined: Sunday 12 April 2015 9:09
Target OS: Raspberry Pi
Domoticz version: latest
Location: Johannesburg South Africa
Contact:

Re: dtgbot - Domoticz TeleGram BOT

Post by fhwessels » Wednesday 18 November 2015 16:23

hi here is my dtb.log. where will I get the process message?

Code: Select all

2015-11-18 15:17:09 - DomoticzIP: 127.0.0.1
2015-11-18 15:17:09 - DomoticzPort: 8080
2015-11-18 15:17:09 - BotHomePath: /home/pi/dtgbot/
2015-11-18 15:17:09 - BotLuaScriptPath: /home/pi/dtgbot/lua/
2015-11-18 15:17:09 - BotBashScriptPath: /home/pi/dtgbot/bash/
2015-11-18 15:17:09 - TelegramBotToken: xxxxxxxxxxxxxxxxxxxI
2015-11-18 15:17:09 - TelegramBotOffset: TelegramBotOffset
2015-11-18 15:17:09 - -----------------------------------------
2015-11-18 15:17:09 - Starting Telegram api Bot message handler
2015-11-18 15:17:09 - -----------------------------------------
2015-11-18 15:17:10 - Domoticz returned getuservariables after 2 attempts
2015-11-18 15:17:11 -  dtgbotLogLevel set to: 0
2015-11-18 15:17:11 - Loading command modules...
2015-11-18 15:17:11 - Loading module <utility>
2015-11-18 15:17:11 - found command <refresh>
2015-11-18 15:17:11 - Loading module <dtgmenu>
2015-11-18 15:17:11 - define LastCommand
2015-11-18 15:17:11 - found command <dtgmenu>
2015-11-18 15:17:11 - Loading module <list>
2015-11-18 15:17:11 - found command <dump>
2015-11-18 15:17:11 - found command <list>
2015-11-18 15:17:11 - Loading module <devices>
2015-11-18 15:17:11 - found command <devices>
2015-11-18 15:17:11 - found command <scenes>
2015-11-18 15:17:11 - Loading module <flick>
2015-11-18 15:17:11 - found command <flick>
2015-11-18 15:17:11 - Loading module <nflick>
2015-11-18 15:17:11 - found command <nflick>
2015-11-18 15:17:11 - Loading module <on>
2015-11-18 15:17:11 - found command <off>
2015-11-18 15:17:11 - found command <on>
2015-11-18 15:17:11 - Loading module <battery>
2015-11-18 15:17:11 - found command <batteries>
2015-11-18 15:17:11 - found command <battery>
2015-11-18 15:17:11 - Loading module <help>
2015-11-18 15:17:11 - found command <help>
2015-11-18 15:17:11 - found command <start>
2015-11-18 15:17:11 - Loading module <temperature>
2015-11-18 15:17:11 - found command <tempall>
2015-11-18 15:17:11 - found command <temperature>
2015-11-18 15:17:11 - found command <temperatures>
2015-11-18 15:17:11 - Decoded Off
2015-11-18 15:17:11 - TelegramBotWhiteListedIDs user variable does not exist in Domoticz
2015-11-18 15:17:11 - So will allow any id to use the bot
2015-11-18 15:17:11 -  dtgbotLogLevel set to: 0
2015-11-18 15:17:11 - TelegramBotWhiteListedIDs user variable does not exist in Domoticz
2015-11-18 15:17:11 - So will allow any id to use the bot
2015-11-18 15:17:11 - Getting TelegramBotOffset the previous Telegram bot message offset from Domoticz
2015-11-18 15:17:11 - Decoded 1

User avatar
jvdz
Posts: 894
Joined: Tuesday 30 December 2014 20:25
Target OS: Raspberry Pi
Domoticz version: Stable
Location: Netherlands
Contact:

Re: dtgbot - Domoticz TeleGram BOT

Post by jvdz » Wednesday 18 November 2015 17:31

When sending a text message to the BOT you defined, the dtgbot should start processing it and it will show up in the log.
I believe that the new BOTs are by default in private mode, which means only commands prefixed with a slash "/" will be send to the BOT.
https://core.telegram.org/bots look for /setprivacy

Have you followed the https://www.domoticz.com/wiki/Telegram_ ... ur_chat_id section in the WiKi?
Does that work?
Are there any errors listed in: dtb.log.errors?

You also haven't set the TelegramBotWhiteListedIDs yet, which you might want to do to ensure nobody else can send commands to your Domoticz setup.

Jos

fhwessels
Posts: 37
Joined: Sunday 12 April 2015 9:09
Target OS: Raspberry Pi
Domoticz version: latest
Location: Johannesburg South Africa
Contact:

Re: dtgbot - Domoticz TeleGram BOT

Post by fhwessels » Wednesday 18 November 2015 17:58

I done all of this in the wiki here is my info from the chat ID. I can also send message with curl command to the bod and that is working. There is no error dtb.log.error

Code: Select all

{
update_id: 121932675,
message: {
message_id: 215,
from: {
id: xxxxx,
first_name: "Francois",
last_name: "Wessels",
username: "fwessels"
},
chat: {
id: xxxxxxxx,
first_name: "Francois",
last_name: "Wessels",
username: "fwessels",
type: "private"
},
date: 1447856628,
text: "/help"
}
},
{
update_id: 121932676,
message: {
message_id: 216,
from: {
id: xxxxxxxx,
first_name: "Francois",
last_name: "Wessels",
username: "fwessels"
},
chat: {
id: xxxxxxxx,
first_name: "Francois",
last_name: "Wessels",
username: "fwessels",
type: "private"
},
date: 1447856670,
text: "/list"
}
},
{
update_id: 121932677,
message: {
message_id: 217,
from: {
id: xxxxxxxx,
first_name: "Francois",
last_name: "Wessels",
username: "fwessels"
},
chat: {
id: xxxxxxxx,
first_name: "Francois",
last_name: "Wessels",
username: "fwessels",
type: "private"
},
date: 1447856732,
text: "/dump"
}
}
]

User avatar
jvdz
Posts: 894
Joined: Tuesday 30 December 2014 20:25
Target OS: Raspberry Pi
Domoticz version: Stable
Location: Netherlands
Contact:

Re: dtgbot - Domoticz TeleGram BOT

Post by jvdz » Wednesday 18 November 2015 18:26

DTGBOT.lua should be doing the same as what you have done manually.
Can you set the Domoticz uservariable TelegramBotLoglevel to 2, restart DTGBOT, send a command to the bot and show or send me the log (after removing any private info) ?
It should contain a lot more information about what it is doing exactly at startup.

Jos

fhwessels
Posts: 37
Joined: Sunday 12 April 2015 9:09
Target OS: Raspberry Pi
Domoticz version: latest
Location: Johannesburg South Africa
Contact:

Re: dtgbot - Domoticz TeleGram BOT

Post by fhwessels » Wednesday 18 November 2015 18:37

here is my log.

Code: Select all

2015-11-18 18:33:03 - -----------------------------------------
2015-11-18 18:33:03 - Starting Telegram api Bot message handler
2015-11-18 18:33:03 - -----------------------------------------
2015-11-18 18:33:03 - Domoticz returned getuservariables after 1 attempts
2015-11-18 18:33:03 - Decoded 2
2015-11-18 18:33:03 -  dtgbotLogLevel set to: 2
2015-11-18 18:33:03 - Loading command modules...
2015-11-18 18:33:03 - Loading module <utility>
2015-11-18 18:33:03 - found command <refresh>
2015-11-18 18:33:03 - function: 0x1f07d60
2015-11-18 18:33:03 - Loading module <dtgmenu>
2015-11-18 18:33:03 - define LastCommand
2015-11-18 18:33:03 - found command <dtgmenu>
2015-11-18 18:33:03 - function: 0x1ef0718
2015-11-18 18:33:03 - Loading module <list>
2015-11-18 18:33:03 - found command <list>
2015-11-18 18:33:03 - function: 0x1f4fe88
2015-11-18 18:33:03 - found command <dump>
2015-11-18 18:33:03 - function: 0x1f4fe88
2015-11-18 18:33:03 - Loading module <devices>
2015-11-18 18:33:03 - found command <devices>
2015-11-18 18:33:03 - function: 0x1f34ae8
2015-11-18 18:33:03 - found command <scenes>
2015-11-18 18:33:03 - function: 0x1f34ae8
2015-11-18 18:33:03 - Loading module <flick>
2015-11-18 18:33:03 - found command <flick>
2015-11-18 18:33:03 - function: 0x1f4f650
2015-11-18 18:33:03 - Loading module <nflick>
2015-11-18 18:33:03 - found command <nflick>
2015-11-18 18:33:03 - function: 0x1f50990
2015-11-18 18:33:03 - Loading module <on>
2015-11-18 18:33:03 - found command <on>
2015-11-18 18:33:03 - function: 0x1f345b8
2015-11-18 18:33:03 - found command <off>
2015-11-18 18:33:03 - function: 0x1f345b8
2015-11-18 18:33:03 - Loading module <battery>
2015-11-18 18:33:03 - found command <battery>
2015-11-18 18:33:03 - function: 0x1ef2018
2015-11-18 18:33:03 - found command <batteries>
2015-11-18 18:33:03 - function: 0x1ef2018
2015-11-18 18:33:03 - Loading module <help>
2015-11-18 18:33:03 - found command <help>
2015-11-18 18:33:03 - function: 0x1f46b68
2015-11-18 18:33:03 - found command <start>
2015-11-18 18:33:03 - function: 0x1f46b68
2015-11-18 18:33:03 - Loading module <temperature>
2015-11-18 18:33:03 - found command <tempall>
2015-11-18 18:33:03 - function: 0x1f48960
2015-11-18 18:33:03 - found command <temperature>
2015-11-18 18:33:03 - function: 0x1f48960
2015-11-18 18:33:03 - found command <temperatures>
2015-11-18 18:33:03 - function: 0x1f48960
2015-11-18 18:33:03 - JSON request <http://127.0.0.1:8080/json.htm?type=command&param=getuservariable                        &idx=2>
2015-11-18 18:33:03 - Decoded Off
2015-11-18 18:33:03 - WLidx 3
2015-11-18 18:33:03 - JSON request <http://127.0.0.1:8080/json.htm?type=command&param=getuservariable                        &idx=3>
2015-11-18 18:33:03 - Decoded 54005199
2015-11-18 18:33:03 - WLString: 54005199
2015-11-18 18:33:03 - Name :54005199
2015-11-18 18:33:03 - JSON request <http://127.0.0.1:8080/json.htm?type=command&param=getuservariable                        &idx=4>
2015-11-18 18:33:03 - Decoded 2
2015-11-18 18:33:03 -  dtgbotLogLevel set to: 2
2015-11-18 18:33:03 - WLidx 3
2015-11-18 18:33:03 - JSON request <http://127.0.0.1:8080/json.htm?type=command&param=getuservariable                        &idx=3>
2015-11-18 18:33:03 - Decoded XXXXXX
2015-11-18 18:33:03 - WLString:  XXXXXX
2015-11-18 18:33:03 - Name : XXXXXX
2015-11-18 18:33:03 - Getting TelegramBotOffset the previous Telegram bot message offset from Domotic                        z
2015-11-18 18:33:03 - TBOidx 1
2015-11-18 18:33:03 - JSON request <http://127.0.0.1:8080/json.htm?type=command&param=getuservariable                        &idx=1>
2015-11-18 18:33:03 - Decoded 1
2015-11-18 18:33:03 - TBO 1
2015-11-18 18:33:03 - https://api.telegram.org/botbotXXXXXXXXX/ WHY is there 2 botbot here is it right?
[email protected] ~ $

User avatar
jvdz
Posts: 894
Joined: Tuesday 30 December 2014 20:25
Target OS: Raspberry Pi
Domoticz version: Stable
Location: Netherlands
Contact:

Re: dtgbot - Domoticz TeleGram BOT

Post by jvdz » Wednesday 18 November 2015 18:54

WHY is there 2 botbot here is it right?
Did you add the bot prefix in this line in /etc/profile.d/DomoticzData.sh?

Code: Select all

export TelegramBotToken="000000000:keykeykeykeykeykeykeykey"
Jos

fhwessels
Posts: 37
Joined: Sunday 12 April 2015 9:09
Target OS: Raspberry Pi
Domoticz version: latest
Location: Johannesburg South Africa
Contact:

Re: dtgbot - Domoticz TeleGram BOT

Post by fhwessels » Wednesday 18 November 2015 19:17

yes it did when I copy it. I removed it and now it is woking. Thanks for you help :D

User avatar
jvdz
Posts: 894
Joined: Tuesday 30 December 2014 20:25
Target OS: Raspberry Pi
Domoticz version: Stable
Location: Netherlands
Contact:

Re: dtgbot - Domoticz TeleGram BOT

Post by jvdz » Wednesday 18 November 2015 19:20

Great to hear. 8-)
Don't forget to change the debuglevel back to 0 or else the logfile will grow pretty fast.

Enjoy
Jos

fhwessels
Posts: 37
Joined: Sunday 12 April 2015 9:09
Target OS: Raspberry Pi
Domoticz version: latest
Location: Johannesburg South Africa
Contact:

Re: dtgbot - Domoticz TeleGram BOT

Post by fhwessels » Wednesday 18 November 2015 19:21

will do

juankar
Posts: 498
Joined: Saturday 30 August 2014 20:20
Target OS: Raspberry Pi
Domoticz version:
Location: Spain
Contact:

Re: dtgbot - Domoticz TeleGram BOT

Post by juankar » Sunday 17 January 2016 23:34

Hello
I wonder if with Telegram Remote Control is posible to get the status of devices. I just get a list of devices and I can on/off them, but I dont know if they are on or off!!!.
I mean with Remote Control, no with the new "bots system".
The info about bots I've found is not clear, and it looks like the remote control is easier for me.

Thanks

MacJL
Posts: 48
Joined: Tuesday 22 April 2014 22:17
Target OS: OS X
Domoticz version: Beta
Location: France
Contact:

Re: dtgbot - Domoticz TeleGram BOT

Post by MacJL » Wednesday 20 April 2016 9:35

Hello,

I've made a Dokerfile to easily build and run Telegram BOT on my Raspberry.

To build and run it
1 -Install docker
Depend of your Linux ARM distribution. For example, with Raspbian Jessie, you can fin a '.deb' file here, with last versions of docker : http://blog.hypriot.com/downloads/

2 - Build the container image

Code: Select all

docker build -t telegrambot git://github.com/macjl/dtgbot-docker
3 - Run the container with your Telegram parameters :

Code: Select all

docker run -dt --restart=always --name telegrambot --env DomoticzIP=192.168.0.30 --env DomoticzPort=8080 --env TelegramBotToken="123456:ABCDEFG" --env TelegramChatId="987654321" telegrambot
4 - Verify the logs to see if everything is OK

Code: Select all

docker logs telegrambot
Please tell me if you like it!
Last edited by MacJL on Monday 16 May 2016 13:40, edited 1 time in total.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests