telegram bot added (working version)

This commit is contained in:
Dmitry Borisenko
2020-11-04 23:48:21 +03:00
parent aec1d50732
commit 2cad740fc6
32 changed files with 294 additions and 173 deletions

View File

@@ -13,7 +13,7 @@
"mqttUser": "rise",
"mqttPass": "23ri22se32",
"scen": "1",
"pushingboxid": "v7C133E426B0C69E",
"telegramApi": "1425283609:AAFf3YO8ouCJF23kU8CMiU7XXy21MFhbn9w",
"weblogin": "admin",
"webpass": "admin",
"udponoff": "1",

View File

@@ -37,8 +37,8 @@
},
{
"type": "link",
"title": "Конфигурация push",
"action": "/?set.push",
"title": "Конфигурация telegram",
"action": "/?set.telegram",
"class": "btn btn-block btn-default"
},
{

View File

@@ -22,30 +22,24 @@
{
"type": "h4",
"style": "width:60%;float:left;",
"title": "Device id:"
"title": "Telegram API token:"
},
{
"type": "input",
"title": "",
"name": "push-arg",
"name": "telegramApi-arg",
"style": "width:40%;float:right",
"state": "{{pushingboxid}}"
"state": "{{telegramApi}}"
},
{
"type": "button",
"title": "{{ButSave}}",
"action": "set?pushingboxid=[[push-arg]]",
"action": "set?telegramApi=[[telegramApi-arg]]",
"class": "btn btn-block btn-default",
"style": "width:100%;display:inline"
},
{
"type": "hr"
},
{
"type": "link",
"title": "Перезагрузить устройство",
"action": "javascript:if(confirm(renameBlock(jsonResponse,'Перезагрузить?'))){send_request(this,'/restart?device=ok');}",
"class": "btn btn-block btn-danger"
}
]
}