Экспорт переводов
Перейти к навигации
Перейти к поиску
Параметры
Группа
Main
QuadroBase v.1.0 Smart Home Controller
Smart Basic Kit
Smart Home Starter Kit
Web API
Беспроводной датчик движения QB PIR-1
Беспроводной датчик обнаружения воды QB WATER-1
Беспроводной датчик открытия двери/окна QB OPEN-1
Инструкции
Контролер умного дома QuadroBase v.1.0
Контроллер умного дома QuadroBase v.1.0
Контроллер управления розеткой ТМ Quadrobit
Метеостанция 4 в 1
Радиоуправляемая розетка QB SOCKET-1
Радиоуправляемый водопроводный кран QB VALVE-1 с контроллером QB POWER-1
Радиоуправляемый диммер ТМ Quadrobit
Список функций портала Quadrobit.com
Техническая документация
Устройства QuadroBit
Устройства и комплекты
Язык
aa - Afar
ab - Abkhazian
abs - Ambonese Malay
ace - Achinese
ady - Adyghe
ady-cyrl - Adyghe (Cyrillic script)
aeb - Tunisian Arabic
aeb-arab - Tunisian Arabic (Arabic script)
aeb-latn - Tunisian Arabic (Latin script)
af - Afrikaans
ak - Akan
aln - Gheg Albanian
am - Amharic
an - Aragonese
ang - Old English
anp - Angika
ar - Arabic
arc - Aramaic
arn - Mapuche
arq - Algerian Arabic
ary - Moroccan Arabic
arz - Egyptian Arabic
as - Assamese
ase - American Sign Language
ast - Asturian
atj - Atikamekw
av - Avaric
avk - Kotava
awa - Awadhi
ay - Aymara
az - Azerbaijani
azb - South Azerbaijani
ba - Bashkir
ban - Balinese
bar - Bavarian
bbc - Batak Toba
bbc-latn - Batak Toba (Latin script)
bcc - Southern Balochi
bcl - Central Bikol
be - Belarusian
be-tarask - Belarusian (Taraškievica orthography)
bg - Bulgarian
bgn - Western Balochi
bh - Bhojpuri
bho - Bhojpuri
bi - Bislama
bjn - Banjar
bm - Bambara
bn - Bangla
bo - Tibetan
bpy - Bishnupriya
bqi - Bakhtiari
br - Breton
brh - Brahui
bs - Bosnian
btm - Batak Mandailing
bto - Iriga Bicolano
bug - Buginese
bxr - Russia Buriat
ca - Catalan
cbk-zam - Chavacano
cdo - Min Dong Chinese
ce - Chechen
ceb - Cebuano
ch - Chamorro
cho - Choctaw
chr - Cherokee
chy - Cheyenne
ckb - Central Kurdish
co - Corsican
cps - Capiznon
cr - Cree
crh - Crimean Turkish
crh-cyrl - Crimean Tatar (Cyrillic script)
crh-latn - Crimean Tatar (Latin script)
cs - Czech
csb - Kashubian
cu - Church Slavic
cv - Chuvash
cy - Welsh
da - Danish
de - German
de-at - Austrian German
de-ch - Swiss High German
de-formal - German (formal address)
din - Dinka
diq - Zazaki
dsb - Lower Sorbian
dtp - Central Dusun
dty - Doteli
dv - Divehi
dz - Dzongkha
ee - Ewe
egl - Emilian
el - Greek
eml - Emiliano-Romagnolo
en - English
en-ca - Canadian English
en-gb - British English
eo - Esperanto
es - Spanish
es-419 - Latin American Spanish
es-formal - español (formal)
et - Estonian
eu - Basque
ext - Extremaduran
fa - Persian
ff - Fulah
fi - Finnish
fit - Tornedalen Finnish
fj - Fijian
fo - Faroese
fr - French
frc - Cajun French
frp - Arpitan
frr - Northern Frisian
fur - Friulian
fy - Western Frisian
ga - Irish
gag - Gagauz
gan - Gan Chinese
gan-hans - Gan (Simplified)
gan-hant - Gan (Traditional)
gcr - kréyòl gwiyanè
gd - Scottish Gaelic
gl - Galician
glk - Gilaki
gn - Guarani
gom - Goan Konkani
gom-deva - Goan Konkani (Devanagari script)
gom-latn - Goan Konkani (Latin script)
gor - Gorontalo
got - Gothic
grc - Ancient Greek
gsw - Swiss German
gu - Gujarati
gv - Manx
ha - Hausa
hak - Hakka Chinese
haw - Hawaiian
he - Hebrew
hi - Hindi
hif - Fiji Hindi
hif-latn - Fiji Hindi (Latin script)
hil - Hiligaynon
ho - Hiri Motu
hr - Croatian
hrx - Hunsrik
hsb - Upper Sorbian
ht - Haitian Creole
hu - Hungarian
hu-formal - magyar (formal)
hy - Armenian
hyw - Western Armenian
hz - Herero
ia - Interlingua
id - Indonesian
ie - Interlingue
ig - Igbo
ii - Sichuan Yi
ik - Inupiaq
ike-cans - Eastern Canadian (Aboriginal syllabics)
ike-latn - Eastern Canadian (Latin script)
ilo - Iloko
inh - Ingush
io - Ido
is - Icelandic
it - Italian
iu - Inuktitut
ja - Japanese
jam - Jamaican Creole English
jbo - Lojban
jut - Jutish
jv - Javanese
ka - Georgian
kaa - Kara-Kalpak
kab - Kabyle
kbd - Kabardian
kbd-cyrl - Kabardian (Cyrillic script)
kbp - Kabiye
kg - Kongo
khw - Khowar
ki - Kikuyu
kiu - Kirmanjki
kj - Kuanyama
kk - Kazakh
kk-arab - Kazakh (Arabic script)
kk-cn - Kazakh (China)
kk-cyrl - Kazakh (Cyrillic script)
kk-kz - Kazakh (Kazakhstan)
kk-latn - Kazakh (Latin script)
kk-tr - Kazakh (Turkey)
kl - Kalaallisut
km - Khmer
kn - Kannada
ko - Korean
ko-kp - Korean (North Korea)
koi - Komi-Permyak
kr - Kanuri
krc - Karachay-Balkar
kri - Krio
krj - Kinaray-a
krl - Karelian
ks - Kashmiri
ks-arab - Kashmiri (Arabic script)
ks-deva - Kashmiri (Devanagari script)
ksh - Colognian
ku - Kurdish
ku-arab - Kurdish (Arabic script)
ku-latn - Kurdish (Latin script)
kum - Kumyk
kv - Komi
kw - Cornish
ky - Kyrgyz
la - Latin
lad - Ladino
lb - Luxembourgish
lbe - Lak
lez - Lezghian
lfn - Lingua Franca Nova
lg - Ganda
li - Limburgish
lij - Ligurian
liv - Livonian
lki - Laki
lmo - Lombard
ln - Lingala
lo - Lao
loz - Lozi
lrc - Northern Luri
lt - Lithuanian
ltg - Latgalian
lus - Mizo
luz - Southern Luri
lv - Latvian
lzh - Literary Chinese
lzz - Laz
mai - Maithili
map-bms - Basa Banyumasan
mdf - Moksha
mg - Malagasy
mh - Marshallese
mhr - Eastern Mari
mi - Maori
min - Minangkabau
mk - Macedonian
ml - Malayalam
mn - Mongolian
mni - Manipuri
mnw - Mon
mo - Moldovan
mr - Marathi
mrj - Western Mari
ms - Malay
mt - Maltese
mus - Creek
mwl - Mirandese
my - Burmese
myv - Erzya
mzn - Mazanderani
na - Nauru
nah - Nāhuatl
nan - Min Nan Chinese
nap - Neapolitan
nb - Norwegian Bokmål
nds - Low German
nds-nl - Low Saxon
ne - Nepali
new - Newari
ng - Ndonga
niu - Niuean
nl - Dutch
nl-informal - Nederlands (informeel)
nn - Norwegian Nynorsk
no - Norwegian
nov - Novial
nrm - Norman
nso - Northern Sotho
nv - Navajo
ny - Nyanja
nys - Nyunga
oc - Occitan
olo - Livvi-Karelian
om - Oromo
or - Odia
os - Ossetic
pa - Punjabi
pag - Pangasinan
pam - Pampanga
pap - Papiamento
pcd - Picard
pdc - Pennsylvania German
pdt - Plautdietsch
pfl - Palatine German
pi - Pali
pih - Norfuk / Pitkern
pl - Polish
pms - Piedmontese
pnb - Western Punjabi
pnt - Pontic
prg - Prussian
ps - Pashto
pt - Portuguese
pt-br - Brazilian Portuguese
qqq - Message documentation
qu - Quechua
qug - Chimborazo Highland Quichua
rgn - Romagnol
rif - Riffian
rm - Romansh
rmy - Romani
rn - Rundi
ro - Romanian
roa-tara - Tarantino
ru - Russian
rue - Rusyn
rup - Aromanian
ruq - Megleno-Romanian
ruq-cyrl - Megleno-Romanian (Cyrillic script)
ruq-latn - Megleno-Romanian (Latin script)
rw - Kinyarwanda
sa - Sanskrit
sah - Sakha
sat - Santali
sc - Sardinian
scn - Sicilian
sco - Scots
sd - Sindhi
sdc - Sassarese Sardinian
sdh - Southern Kurdish
se - Northern Sami
sei - Seri
ses - Koyraboro Senni
sg - Sango
sgs - Samogitian
sh - Serbo-Croatian
shi - Tachelhit
shi-latn - Tachelhit (Latin script)
shi-tfng - Tachelhit (Tifinagh script)
shn - Shan
shy-latn - Shawiya (Latin script)
si - Sinhala
simple - Simple English
sk - Slovak
skr - Saraiki
skr-arab - Saraiki (Arabic script)
sl - Slovenian
sli - Lower Silesian
sm - Samoan
sma - Southern Sami
sn - Shona
so - Somali
sq - Albanian
sr - Serbian
sr-ec - Serbian (Cyrillic script)
sr-el - Serbian (Latin script)
srn - Sranan Tongo
ss - Swati
st - Southern Sotho
stq - Saterland Frisian
sty - cебертатар
su - Sundanese
sv - Swedish
sw - Swahili
szl - Silesian
ta - Tamil
tay - Tayal
tcy - Tulu
te - Telugu
tet - Tetum
tg - Tajik
tg-cyrl - Tajik (Cyrillic script)
tg-latn - Tajik (Latin script)
th - Thai
ti - Tigrinya
tk - Turkmen
tl - Tagalog
tly - Talysh
tn - Tswana
to - Tongan
tpi - Tok Pisin
tr - Turkish
tru - Turoyo
ts - Tsonga
tt - Tatar
tt-cyrl - Tatar (Cyrillic script)
tt-latn - Tatar (Latin script)
tum - Tumbuka
tw - Twi
ty - Tahitian
tyv - Tuvinian
tzm - Central Atlas Tamazight
udm - Udmurt
ug - Uyghur
ug-arab - Uyghur (Arabic script)
ug-latn - Uyghur (Latin script)
uk - Ukrainian
ur - Urdu
uz - Uzbek
uz-cyrl - Uzbek (Cyrillic script)
uz-latn - Uzbek (Latin script)
ve - Venda
vec - Venetian
vep - Veps
vi - Vietnamese
vls - West Flemish
vmf - Main-Franconian
vo - Volapük
vot - Votic
vro - Võro
wa - Walloon
war - Waray
wo - Wolof
wuu - Wu Chinese
xal - Kalmyk
xh - Xhosa
xmf - Mingrelian
yi - Yiddish
yo - Yoruba
yue - Cantonese
za - Zhuang
zea - Zeelandic
zgh - Standard Moroccan Tamazight
zh - Chinese
zh-cn - Chinese (China)
zh-hans - Simplified Chinese
zh-hant - Traditional Chinese
zh-hk - Chinese (Hong Kong)
zh-mo - Chinese (Macau)
zh-my - Chinese (Malaysia)
zh-sg - Chinese (Singapore)
zh-tw - Chinese (Taiwan)
zu - Zulu
Формат:
Экспорт для оффлайнового перевод
Экспорт в родном формате
Вывести
{{DISPLAYTITLE:Web API}}<languages /> * API v01 * API ( json ) URL https://quadrobit.com/ = Account = == Login == request: Request URL: [site]/api/login request parameters: (string) email, (string) password Request example: <pre> { "email":"aaaa@aaaa.aa", "password":"12345678" } response: response parameters: (object) Response sample: <pre> { "user_id":1, "username":"Ivan Pupkin", "email":"aaaa@aaa.aa", "phone": "423546546546", "sex":2, // 0 - not specified , 1 - female , 2 - male "country":219, // country code in database "active_configuration":"1", "refcode":"JHE-1GD-T8B-9HB", "status":10, // 0 - inactive, 10 - active "token":"1Cyuvr9DKMbB6aFQ-mLPLeGZXFLyuK8d", "expired":1502586831 // timestamp to which token is active } </pre> == Registration == request: Request URL: [site]/api/registration request parameters: (string) email, (string) password Request example: <pre> { "email":"aaaa@aaaa.aa", "password":"12345678" } </pre> response: параметры ответа: (object) пример: <pre> { "user_id": 43, "username": "user_4383", "email": "aaaa@aaa.aa", "sex": null, "country": null, "active_configuration": null, "refcode": "746-81O-0RJ-RJS", "status": 10 } </pre> == User Profile (profile) == request: Request URL: [site]/api/profile/ request parameters: (string) token Request example: <pre> { "token":"_zcX0_QceAqgP_seIvjG32EC3HMO34ae" } </pre> response: параметры ответа: (object) пример: <pre> { "user_id":1, "username":"Ivan Pupkin", "email":"aaaa@aaa.aa", "phone": "423546546546", "sex":2, // пол 0 - не указан , 1 - женский , 2 - мужской "send_email": 1, "send_sms": 0, "role": 1, "lang": 2, "country":219, // код страны в базе "active_configuration":"1", "refcode":"JHE-1GD-T8B-9HB", "status":10, // 0 - неактивен , 10 - активен "token":"1Cyuvr9DKMbB6aFQ-mLPLeGZXFLyuK8d", } </pre> = Controllers = == List of User Controllers (list) == request: Request URL: [site]/api/ctrl/list/ request parameters: (string) token Request example: <pre> { "token":"_zcX0_QceAqgP_seIvjG32EC3HMO34ae" } </pre> response: response parameters: (array) Sample answer: <pre> { "0":{ "id":"11", "name":"AS_A61301A020E4", "armed":"0", //0 - disarmed, 1 - under guard "device_ids":"a:3:{i:0;i:1;i:1;i:2;i:2;i:3;}", //ids of devices on the Controller "action_ids":"a:0:{}", //ids of actions on the Controller "timezone":"3", "token":"747D3844ABD35B08F27D18D15D7178B7AF99A754D805633928D4362D19B4AEC2", "online":"1" }, "1":{ "id":"12", "name":"AS_A61301A020E5", "armed":"1", "device_ids":"a:3:{i:0;i:1;i:1;i:2;i:2;i:3;}", "action_ids":"a:0:{}", "timezone":"2", "token":"734D3844ABD35B08F27D18D15D7178B7AF99A754D805633928D4362D19B4AEC2", "online":"0" }] </pre> == Controller Information (info) == request: Request URL: [site]/api/ctrl/info/ request parameters: #(int) controller_id, #(string) token Request example: <pre> { "controller_id": 1 , "token":"_zcX0_QceAqgP_seIvjG32EC3HMO34ae" } </pre> response: response parameters: (object) response parameters: (object) <pre> { "id":"6", "name":"AS_7F26335CCF4B", "armed":"1", "device_ids":"a:26:{i:0;i:25;i:1;i:26;i:2;i:28;i:3;i:19;i:4;i:40;i:5;i:41;i:6;i:42;i:7;i:43;i:8;i:36;i:9;i:34;i:10;i:29;i:11;i:45;i:12;i:38;i:13;i:33;i:14;i:30;i:15;i:31;i:16;i:49;i:17;i:24;i:18;i:46;i:19;i:47;i:20;i:44;i:21;i:27;i:22;i:22;i:23;i:9;i:24;i:23;i:25;i:7;}", "action_ids":"a:4:{i:0;i:45;i:1;i:46;i:2;i:49;i:3;i:42;}", "timezone":"3", "token":"660D91C2B0926A8C981AE7DA4AAA4421A3D86D136262A6F8E98ACF534A7A715B", "online":"1" } </pre> == Arming / disarming the Controller (armed) == request: Request URL: [site]/api/ctrl/armed/ request parameters: #(int) controller_id, #(string) token example: <pre> { "controller_id": 6 , "token":"_zcX0_QceAqgP_seIvjG32EC3HMO34ae" } </pre> Since MQTT is one-way, there can be no answer. Answer that the request is gone as follows: Response: Example: <pre> { "result": "Ok" } </pre> == Add Controller (add) == request: Request URL: [site]/api/ctrl/add request parameters: (string) token Example <pre> { "token": "_ zcX0_QceAqgP_seIvjG32EC3HMO34ae" } </ pre> Response: Example: <pre> { "PIN": "7gDH" } </ pre> After entering the PIN code, you need to update the list of Controllers (/ api / ctrl / list /) == Update the list of devices and actions on the controller (update) == === Stage 1 - update the list of IDS devices on the controller === Request: Request URL: [site]/api/ctrl/update/ Request parameters: #(int) controller_id, #(string) token example: <pre> { "controller_id": 6, "token": "_ zcX0_QceAqgP_seIvjG32EC3HMO34ae" } </ pre> Response: Example: <pre> { "result": "Ok" // "Ok" = request was sent } </ pre> === Stage 2 - the update information about each device === request: Request URL: [site]/api/ctrl/update-devices/ request parameters: (int) controller_id, (string) token Request example: <pre> { "controller_id": 6 , "token":"_zcX0_QceAqgP_seIvjG32EC3HMO34ae", } </pre> response: response parameters: Sample answer: <pre> { "result": "Ok" // answer that the request is gone } </ pre> The process takes place automatically. To obtain the result, a timeout is required, after which a standard request is made to receive data (controller, devices) == Delete Controller (delete) == Request URL: [site]/api/ctrl/delete Request parameters: Request example: <pre> { "token": "8yE-VIQrYuZ2bTeho_lajxjOJPnIe_Yx", "controller_id": "81" } </pre> response: example: <pre> { "error": null, "data": {"resuls": "Ok"} } </pre> == Update controller status (update-status) == request: Request URL: [site]/api/ ctrl/update-status/ Request parameters: (string) token, (int) controller_id Request example: <pre> { "token":"_zcX0_QceAqgP_seIvjG32EC3HMO34ae", "controller_id": 122 } </pre> response: response parameters: Sample answer: <pre> { "error":null, "data":{ "resuls":"Ok" } } </pre> == Getting the current status of the Controller (get-status) == request: Request URL: [site]/api/ ctrl/get-status/ request parameters (string) token, (int) controller_id Request example: <pre> { "token":"_zcX0_QceAqgP_seIvjG32EC3HMO34ae", "controller_id": 122 } </pre> response: response parameters: Sample answer: <pre> { "error":null, "data":{ "status":1 } } </pre> The “status” field can have the following values: • 0 - offline • 1 - online • 2 - online after power on == Transmit Local IP Controller (get-ip) == Request URL: [site]/api/ctrl/get-ip Request Params: token (required): string(64); controller_id (required): int; SUCCESS RESPONSE: <pre> { data:'192.168.0.15', error: null } </pre> == Setting a Subscription on the Controller == in/subscription/set Request URL: [site]/in/subscription/set” <pre> { "seq_id": 0, "id": 1, // Subscription ID (see below) "remain_time": 100 // remaining time in seconds, 4294967295 - unlimited } </pre> == View Subscription Status (get-subscribe-status) == Request URL: [site]/api/ctrl/get-subscribe-status params: token (required): string(64) controller_id (required): int response: {data:{id: 1, controller_id: 40, user_id: 424, remain_time: 100, request_time: 1355314332, response_time: 1355315332, success: 0}, error: ''} == Activation / extension / purchase of a subscription (set-subscribe) == Request URL: [site]/api/ctrl/set-subscribe params: token (required): string(64) controller_id (required): int response: <pre> { data:{ id: 1, controller_id: 40, user_id: 424, remain_time: 100, request_time: 1355314332, response_time: 1355315332, success: 0 }, error: '' } </pre> == Getting phone list (get-phones) == Request URL: [site]/api/ctrl/get-phones Params: token (required): string, 64 controller_id (required): int type (optional): string, range ['recipient', 'authorized', 'all'], default 'all' Response: <pre> { 'error': null, data: [ {'id': 5, 'phone': '+380123456789'}, {'id': 6, 'phone': '+380123334455'}, {'id': 7, 'phone': '+380112223344'} ] } </pre> == Edit phone (edit-phone) == Request URL: [site]/api/ctrl/edit-phone Params: token (required): string, 64 phone_id (required): int is_recipient (optional): int is_authorized (optional): int phone (optional): string Response: <pre> { "error":null, "data":{ "id":2, "controller_id":81, "phone":"+380503334455", "is_recipient":"1", "is_authorized":0 } } </pre> == Delete phone (delete-phone) == Request URL: [site]/api/ctrl/delete-phone Params: token (required): string, 64 phone_id (required): int Response: <pre> { "error":null, "data":{"response":"OK"} } </pre> == Add Phone (add-phone) == Request URL: [site]/api/ctrl/add-phone Params: token (required): string, 64 controller_id (required): int phone (required): string is_recipient (optional): int is_authorized (optional): int Response: <pre> { "error":null, "data":{ "id":2, "controller_id":81, "phone":"+380503334455", "is_recipient":"1", "is_authorized":0 } } </pre> = Devices = == Getting a list of user devices (list) == request: Request URL: [site]/api/device/list request parameters: (int) controller_id, (string) token Request example: <pre> { "controller_id": 1 , "token":"_zcX0_QceAqgP_seIvjG32EC3HMO34ae" } </pre> response: Sample answer: <pre> { "0":{ "id":"122", "external_id":"19", // id at the Controller "controller_id":"6", "name":"Сирена", "type_id":"2", //device type "codes":":{ //codes (buttons) "0":{ "id":"218", "external_cod_id":"32", "device_id":"122", "name":"ON", "code":"3675192", "protocol":"1", "pulse_len":null, "group_1":"1", "group_2":"0", "group_3":"0", "group_4":"0", "group_5":"0", "group_6":"0", "group_7":"0", "group_8":"0", "active":"1" }, "1":{ ... } }, "state":"1", "on_dashboard":"1", //show at Homepage "active":"1" }, "1":{ "id":"120", "external_id":"22", "controller_id":"6", "name":"XXXXXX", "type_id":"3", "codes": ... , "state":"1", "on_dashboard":"0", "active":"1" } } </pre> == Device Information (info) == request: Request URL: [site]/api/device/info/ request parameters: (int) controller_id, (int) device_id, (string) token Request example: <pre> { "controller_id": 1 , "device_id": 122, "token":"_zcX0_QceAqgP_seIvjG32EC3HMO34ae" } </pre> response: response parameters: Sample answer: <pre> { "id":"122", "external_id":"19", "controller_id":"6", "name":"Сирена", "type_id":"2", "codes":{ "0":{ "id":"218", "external_cod_id":"32", "device_id":"122", "name":"ON", "code":"3675192", "protocol":"1", "pulse_len":null, "group_1":"1", "group_2":"0", "group_3":"0", "group_4":"0", "group_5":"0", "group_6":"0", "group_7":"0", "group_8":"0", "active":"1" }, "1":{ "id":"219", "external_cod_id":"33", "device_id":"122", "name":"OFF", "code":"3675186 ... } }, "state":"1", "on_dashboard":"1", "active":"1" } </pre> == Update Device Information (update) == request: Request URL: [site]/api/device/update/ параметры запроса: (int) device_id, (string) name, (int) active, (string) token, Request example: <pre> { "device_id": 107, // local device id "name": "New name", // new name "active": 1, "token":"_zcX0_QceAqgP_seIvjG32EC3HMO34ae" } </pre> response: response parameters: Sample answer: <pre> { "resuls" : "Ok" } </pre> == Deleting a device (delete) == request: Request URL: [site]/api/device/delete/ request parameters: (int) device_id, (string) token Request example: <pre> { "device_id": 107, // local device id "token":"_zcX0_QceAqgP_seIvjG32EC3HMO34ae" } </pre> response: Parameters of the answer: Sample answer: <pre> { "resuls" : "Ok" } </pre> == Getting weather data (last) == request: Request URL: [site]/api/device/meteo-last/ request parameters: (string) token, (int) device_id Request example: <pre> { "token":"_zcX0_QceAqgP_seIvjG32EC3HMO34ae", "device_id": 130 } </pre> response: response parameters: (object) Example response: <pre> { "id":"4046", "controller_name":"AS_7FD6785CCF5D", "internal_id":"55", "device_id":"130", "name":"7", "temp":"240", "hum":"245", "illum":"0", "pres":"1239", "volt":"32", "date_time":"2016-03-02 21:09:40", "new":"0" } </pre> == Receiving meteorological data for the period == request: Request URL: [site]/api/device/meteo-period/ request parameters: (string) token, (int) device_id, (int) period Request example: <pre> { "token":"_zcX0_QceAqgP_seIvjG32EC3HMO34ae", "device_id": 130, "period": 1 // number of days } </pre> response: response parameters: (array to objects) Example response: <pre> [ { "id":"4065", "controller_name":"AS_7FD6785CCF5D", "internal_id":"55", "device_id":"130", "name":"7", "temp":"240", "hum":"523", "illum":"0", "pres":"1239", "volt":"32", "date_time":"2017-07-30 21:11:07", "new":"0" }, { "id":"4067", "controller_name":"AS_7FD6785CCF5D ... }, ] </pre> == Receive power data (last) == request: Request URL: [site]/api/device/electro-last/ request parameters: (string) token, (int) device_id Request example: <pre> { "token":"_zcX0_QceAqgP_seIvjG32EC3HMO34ae", "device_id": 130 } </pre> response: response parameters: (object) Example response: <pre> { "id":"318", "controller_id":"11", "external_id":"2", "device_id":"125", "name":"23", "token":"747D3844ABD35B08F27D18D15D7178B7AF99A754D805633928D4362D19B4AEC2", "last_seen":"2017-07-21 04:20:27", "available":"1", "voltage":"24", "have_voltage":"1", "current":"2147483647", "have_current":"1", "supp_voltage":"33", "date_create":"2017-07-21 01:20:33", "new":"0" } </pre> == Obtain power data for a period (period) == request: Request URL: [site]/api/device/electro-period/ request parameters: (string) token, (int) device_id, (int) period Request example: <pre> { "token":"_zcX0_QceAqgP_seIvjG32EC3HMO34ae", "device_id": 130, "period": 1 // количество дней } </pre> response: response parameters: (array to objects) Sample answer: <pre> [ { "id":"318", "controller_id":"11", "external_id":"2", "device_id":"125", "name":"23", "token":"747D3844ABD35B08F27D18D15D7178B7AF99A754D805633928D4362D19B4AEC2", "last_seen":"2017-07-21 04:20:27", "available":"1", "voltage":"24", "have_voltage":"1", "current":"2147483647", "have_current":"1", "supp_voltage":"33", "date_create":"2017-07-21 01:20:33", "new":"0" }, { "id":"318", "controller_id":"11", ... }, ] </pre> == Getting data about third-party devices (other-last) == The method returns information about the last detected third-party device. request: Request URL: [site]/api/device/other-last/ Request parameters: (string) token, (int) device_id Request example: <pre> { "token":"_zcX0_QceAqgP_seIvjG32EC3HMO34ae", "device_id": 118 } </pre> response: response parameters: (object) Example response: <pre> { "id":"1301", "controller_id":"6", "device_id":"118", "name":"Розетка", "code":"81", "pulse_len":null, "bit_len":null, "protocol":null, "groups":null, "type":null, "date_time":"2017-08-21 04:55:18", "active":null, "new":"1" } </pre> == Get data on third-party devices for the period (other-period) == request: Request URL: [site]/api/device/other-period/ request parameters: (string) token, (int) device_id, (int) period Request example: { "token":"_zcX0_QceAqgP_seIvjG32EC3HMO34ae", "device_id": 118, "period": 1 // number of days } response: response parameters: (array to objects) Example response: <pre> { "id":"1301", "controller_id":"6", "device_id":"118", "name":"Розетка", "code":"81", "pulse_len":null, "bit_len":null, "protocol":null, "groups":null, "type":null, "date_time":"2017-08-21 04:55:18", "active":null, "new":"1" }, { "id":"4067", "controller_id":"6", ... } </pre> = Devices adding Wizard = == Door open sensor (create-door-open-sensor) == URL: [site]/api/wizard/create-door-open-sensor Parameters: controller_id (required): int token (required): string, 64 device_name (optional): string, 256 code_ready (optional): string, 64 //Readiness code name code_alarm (optional): string, 64 //Alert code name code_low_battery (optional): string, 64 //Name of low battery code RESPONSE: <pre> { data:{ 'response': 'OK' }, error: null } </pre> After sending the parameters, the added device is expected to be activated. When triggered, the process of adding occurs, and only after that the answer comes. == Flood sensor (create-flood-sensor) == Request URL: [site]/api/wizard/create-flood-sensor Params: controller_id (required): int token (required): string, 64 device_name (optional): string, 256 code_alarm (optional): string, 64 //Alert code name code_tamper (optional): string, 64 //Intervention code name code_low_battery (optional): string, 64 //Name of low battery code RESPONSE: <pre> { data: { 'response': 'OK' }, error: null } </pre> --------------------------------------- After sending the parameters, the added device is expected to be activated. When triggered, the process of adding occurs, and only after that the answer comes. == Remote, 4 buttons (create-console) == Request URL: [site]/api/wizard/create-console Params: controller_id (required): int token (required): string, 64 device_name (optional): string, 256 code_lock (optional): string, 64 //Lock code name code_unlock (optional): string, 64 //Unlock code name code_s (optional): string, 64 //"s" code name code_alarm (optional): string, 64 //Alert code name RESPONSE: <pre> { data: { 'response': 'OK' }, error: null } </pre> --------------------------------------- After sending the parameters, the added device is expected to be activated. When triggered, the process of adding occurs, and only after that the answer comes. == Siren (create-siren) == Request URL: [site]/api/wizard/create-siren Params: controller_id (required): int token (required): string, 64 device_name (optional): string, 256 code_on (optional): string, 64 //Name of the inclusion code code_off (optional): string, 64 //Shutdown code name code_blank (optional): string, 64 // blank code name RESPONSE: <pre> { data: { 'response': 'OK' }, error: null } </pre> --------------------------------------- Before sending the parameters, it is necessary to transfer the siren to the training mode == Weather Station: Get a list of weather stations found in the last 10 minutes (get-meteos) == Request URL: [site]/api/wizard/get-meteos Params: controller_id (required): int token (required): string, 64 RESPONSE: <pre> { "error":null, "data": [{"id":"93","controller_id":"79","date":"1528389351","type":"7","family":"0","rf_code":null,"rf_bit_len":null,"rf_pulse_len":null,"rf_protocol":null,"rf_freq":null,"ir_code":null,"ir_bit_len":null,"ir_address":null,"ir_protocol":null,"meteo_num":"0"}] } </pre> == Adding Weather Station (create-meteo) == Request URL: [site][site]/api/wizard/create-meteo Params: controller_id (required): int token (required): string, 64 meteo_num (required): int //It turns out in the list above device_name (optional): string, 256 RESPONSE: <pre> { "error":null, "data":{ "response":"OK" } } </pre> == Water tap == The procedure for adding a crane: 1) Generate codes 2) Press the button on the tap until the tap flashes three times. 3) Send one code 4) Press the button on the tap once 5) Press the button on the tap until it blinks 4 times 6) Send the second code from the generated 7) Press the button on the tap once 8) Send a request to create a crane. === Code Generation === Request URL: [site]/api/wizard/create-codes Params: controller_id (required): int token (required): string, 64 Response: <pre> { "error":null, "data":{"response":{"id":30,"masks":"[6,4,0,1]","code_1":"9920950","code_2":"9920948","code_3":"9920944","code_4":"9920945"} } } </pre> === Code Execution === Request URL: [site]/api/wizard/execute-code Params: controller_id (required): int token (required): string, 64 code (required): int // Takes from generated Response: <pre> { error: null, data: { "response":"OK" } } </pre> === Adding a tap === Request URL: [site]/api/wizard/create-crane-by-codes Params: controller_id (required): int token (required): string, 64 code_1 (required): int code_2 (required): int device_name (optional): string, 256 code_open (optional): string, 64 //The name of the opening code code_close (optional): string, 64 //Closing code name RESPONSE: <pre> { data:{'response': 'OK'}, error: null } </pre> Название кода закрытия The procedure for adding the socket is as follows: 1) Generate codes 2) Press the button on the outlet until it flashes 3) Send one code 4) Press the button on the outlet until it flashes 4) Зажать на розетке кнопку, пока она не начнет мигать 6) Send a request to create an outlet === Generation of codes (create-codes) === Request URL: [site]/api/wizard/create-codes Params: controller_id (required): int token (required): string, 64 socket (required): любое значение. Response: <pre> { "error":null, "data":{ "response":{"id":30,"masks":"[257, 258]","code_1":"8737025","code_2":"8737026"} } } </pre> === Code Execution (execute-code) === Request URL: [site]/api/wizard/execute-code Params: controller_id (required): int token (required): string, 64 code (required): int // Takes from generated Response <pre> { error: null, data: {'response' => 'OK'} } </pre> === Add a socket (create-socket) === Request URL: [site]/api/wizard/create-socket Params: controller_id (required): int token (required): string, 64 code_1 (required): int code_2 (required): int device_name (optional): string, 256 code_off (optional): string, 64 //Shutdown Code Name code_on (optional): string, 64 //Name of the inclusion code RESPONSE: <pre> { data: {'response':'OK'}, error: null } </pre> = Scripts = == List of scripts (list) == request: Request URL: [site]/api/scheduler/list/ request parameters: (string) token Request example: <pre> { "token":"_zcX0_QceAqgP_seIvjG32EC3HMO34ae" } </pre> response: response parameters: Example response: <pre> { "0":{ "id":9, "external_id":42, "name":"test_form_web", "operation":"local", "armed":0, "type":"meteo", "action_id":1, "a_controller_id":6, "a_device_id":112, "a_code_id":0, "a_device_external_id":38, "a_armed":0, "a_conf1":0, "a_conf2":0, "a_conf3":0, "a_conf4":0, "a_conf5":0, "a_conf6":0, "a_conf7":0, "a_conf8":0, "target_id":1, "t_controller_id":6, "t_device_id":119, "t_code_id":203, "t_device_external_id":7, "t_armed":0, "t_conf1":0, "t_conf2":0, "t_conf3":0, "t_conf4":0, "t_conf5":0, "t_conf6":0, "t_conf7":0, "t_conf8":0, "date":null, "repetition":"0", "sensor_type":"1", "logic_operation":"=", "value":"3", "active":1 }, "1":{ "id":10, "external_id":45 ... } } </pre> == Update Scripts (update) == The request is carried out in 2 stages: in the first stage it occurs when a request is made to update the Controller (see "Updating the Controller"); at the second stage, information about each action is updated. request: Request URL: [site]/api/scheduler/update/ request parameters: (int) controller_id, (string) token Request example: <pre> { "controller_id": 6 , "token":"_zcX0_QceAqgP_seIvjG32EC3HMO34ae", } </pre> response: response parameters: Example response: <pre> { "result": "Ok" // ответ что запрос ушел } </pre> The update process happens automatically. To get the result, a timeout is required, after which a standard data request is made (controller, actions) == Script Information (info) == request: Request URL: [site]/api/scheduler/info/ request parameters: (int) scheduler_id, (string) token Example response: <pre> { "scheduler_id": 122, "token":"_zcX0_QceAqgP_seIvjG32EC3HMO34ae" } </pre> response: response parameters: Example response: <pre> { "id":9, "external_id":42, "name":"test_form_web", "operation":"local", "armed":0, "type":"meteo", "action_id":1, "a_controller_id":6, "a_device_id":112, "a_code_id":0, "a_device_external_id":38, "a_armed":0, "a_conf1":0, "a_conf2":0, "a_conf3":0, "a_conf4":0, "a_conf5":0, "a_conf6":0, "a_conf7":0, "a_conf8":0, "target_id":1, "t_controller_id":6, "t_device_id":119, "t_code_id":203, "t_device_external_id":7, "t_armed":0, "t_conf1":0, "t_conf2":0, "t_conf3":0, "t_conf4":0, "t_conf5":0, "t_conf6":0, "t_conf7":0, "t_conf8":0, "date":null, "repetition":"0", "sensor_type":"1", "logic_operation":"=", "value":"3", "active":1 } </pre> = User logs (logs) = request: Request URL: [site]/api/profile/logs/ request parameters: (string) token Request example: <pre> { "token":"_zcX0_QceAqgP_seIvjG32EC3HMO34ae" } </pre> response: response parameters: (object) example: { } = Codes = == Getting code info (info) == request: Request URL: [site]/api/property/info/ request parameters: (int) controller_id, (int) device_id, (int) code_id, (string) token Request example: <pre> { "controller_id": 6, "device_id": 109, "code_id": 192, "token":"_zcX0_QceAqgP_seIvjG32EC3HMO34ae" } </pre> response: response parameters: Example response: <pre> { "id":"192", "external_cod_id":"67", "device_id":"109", "name":"4 OFF", "code":"12209156", "protocol":"1", "pulse_len":null, "group_1":"1", "group_2":"0", "group_3":"0", "group_4":"0", "group_5":"0", "group_6":"0", "group_7":"0", "group_8":"0", "active":"1" } </pre> == Change code name (update-code-name) == Request URL: [site]/api/device/update-code-name Request Params: token (required): string(64) code_id (required): int name (optional): string(255) SUCCESS RESPONSE: <pre> { data: { 'message': "OK" }, error: null } </pre> == Receiving codes by signal type (get-codes-by-subtype) == Request URL: [site]/api/device/get-codes-by-subtype Request Params: token (required): string(64) device_subtype_id (optional): int, default 0. == Getting a list of codes (get-codes) == Request URL: [site]/api/device/get-codes PARAMS: token (required): string 64 controller_id (required): int SUCCESS RESPONSE: <pre> { data: [ { devices: [ { id: 13 external_id: 7, controller_id: 5, name: "Simple device", type_id: 2, password: null, codes: "a:4:{i:0;i:46;i:1;i:47;i:2;i:48;i:3;i:45;}", state: 1, on_dashboard: 0, active: 1, new: 1, family: DEVICE_FAMILY_RADIO, camera_id: null, camera_host: null }, { id: 14 external_id: 8, controller_id: 5, name: "Simple device", type_id: 2, password: null, codes: "a:4:{i:0;i:46;i:1;i:47;i:2;i:48;i:3;i:45;}", state: 1, on_dashboard: 0, active: 1, new: 1, family: DEVICE_FAMILY_RADIO, camera_id: null, camera_host: null }, ], code: { id: 12, controller_id: 5, device_type_id: 2, code: 498654, protocol: 1, bit_len: 32, pulse_len: 86, freq: 77, address: 94, num: 1, date_create: '2018-04-13 18:29:11" } }, { devices: [ { id: 13 external_id: 7, controller_id: 5, name: "Simple device", type_id: 2, password: null, codes: "a:4:{i:0;i:46;i:1;i:47;i:2;i:48;i:3;i:45;}", state: 1, on_dashboard: 0, active: 1, new: 1, family: DEVICE_FAMILY_RADIO, camera_id: null, camera_host: null }, { id: 14 external_id: 8, controller_id: 5, name: "Simple device", type_id: 2, password: null, codes: "a:4:{i:0;i:46;i:1;i:47;i:2;i:48;i:3;i:45;}", state: 1, on_dashboard: 0, active: 1, new: 1, family: DEVICE_FAMILY_RADIO, camera_id: null, camera_host: null }, ], code: { id: 12, controller_id: 5, device_type_id: 2, code: 498654, protocol: 1, bit_len: 32, pulse_len: 86, freq: 77, address: 94, num: 1, date_create: '2018-04-13 18:29:11" } }, }, error: null, } </pre> == Adding code to a device (set-code-to-device) == Request URL: [site]/api/device/set-code-to-device PARAMS: token (required): string 64 code_id (required): int device_id (required): int name (optional): string 256 SUCCESS RESPONSE: <pre> { data: { id: 5, external_cod_id: 15, device_id: 14, name: "Name" code: 8463517, protocol: 0, pulse_len: 86, active: 1, }, error: null } </pre> == Remove code (remove-code) == Request URL: [site]/api/device/remove-code PARAMS: token (required): string 64 code_id (required): int SUCCESS RESPONSE: <pre> { data: { message: "OK" }, error: null } </pre> = Events = == Press the button on the device (event) == request: Request URL: [site]/api/device/event/ request parameters: (string) controller_name, (int) device_external_id, (int) cod_external_id, (string) token, (int) device_type Request example: <pre> { "controller_name": " AS_7F26335CCF4B" , "device_external_id": 19, "cod_external_id": 1, "device_type": 1, "token":"_zcX0_QceAqgP_seIvjG32EC3HMO34ae" } </pre> since MQTT is one-way, there can be no answer. An answer may be returned that the request has been sent: response: response parameters: Sample answer: <pre> { "result": "Ok" } </pre> = Places = == Getting a list of places (places-list) == Request URL: [site]/api/places/places-list Request params: token (required): string, 64 Response: <pre> { "error":null, "data":{ "rooms":[{"id":1,"root_id":1,"user_id":424,"lvl":0,"name":"Дом","icon":0,"icon_type":1,"color":"#fff2cc","readonly":0,"visible":1},{"id":2,"root_id":1,"user_id":424,"lvl":1,"name":"Спальня","icon":0,"icon_type":1,"color":"#b6d7a8","readonly":0,"visible":1}] } } </pre> == Creating a place (create) == Request URL: [site]/api/places/create Request params: token (required): string, 64 root (optional): int, default 1 lft (optional): int, from 1 to 5 //Summ of rgt should be 5 rgt (optional): int, from 1 to 5 //Summ of lft should be 5 lvl (optional): int, default 0 name (optional): string, 64, default 'Simple name' icon (optional): string, default '' //Valid parameters are keys that are presented above color (optional): string, default: '#ccc' //Any color in HEX format, the grid at the beginning is required active (optional): int, default 1 selected (optional): int, default 0 disabled (optional): int, default 0 readonly (optional): int, default 0 visible (optional): int, default 1 collapsed (optional): int, default 0 movable_u (optional): int, default 1 movable_d (optional): int, default 1 movable_l (optional): int, default 1 movable_r (optional): int, default 1 removable (optional): int, default 1 removable_all (optional): int, default 0 inverse_text (optional): string, default 'black' Response: <pre> { error:null, data: {'message': 'OK'} } </pre> == Editing a place (edit) == Request URL: [site]/api/places/edit Request params: token (required): string, 64 place_id (required): int root (optional): int, default 1 lft (optional): int, from 1 to 5 //Summ of rgt should be 5 rgt (optional): int, from 1 to 5 //Summ of lft should be 5 lvl (optional): int, default 0 name (optional): string, 64, default 'Simple name' icon (optional): string, default '' //Allowed parameters as object keys are presented above color (optional): string, default: '#ccc' //Any color in HEX format, the grid at the beginning is required active (optional): int, default 1 selected (optional): int, default 0 disabled (optional): int, default 0 readonly (optional): int, default 0 visible (optional): int, default 1 collapsed (optional): int, default 0 movable_u (optional): int, default 1 movable_d (optional): int, default 1 movable_l (optional): int, default 1 movable_r (optional): int, default 1 removable (optional): int, default 1 removable_all (optional): int, default 0 inverse_text (optional): string, default 'black' Response: <pre> { error:null, data: {'message': 'OK'} } </pre> == Deleting a place (delete) == Request URL: [site]/api/places/delete Request params: token (required): string, 64 place_id (required): int Response: <pre> { error:null, data: {'message': 'OK'} } </pre> == Ebus subscription activation == Getting the subscription status on the Controller - “in/subscription/get”: <pre> { "id": 1, // Subscription ID (see below) "seq_id": 0 } </pre> Response: <pre> { "seq_id": 0, "remain_time": 100, // remaining time in seconds; 4294967295 is unlimited "success": 0/1 } </pre> Subscription setting on the Controller - “in/subscription/set”: <pre> { "seq_id": 0, "id": 1, // Subscription ID (see below) "remain_time": 100 // Remaining time in seconds; 4294967295 is unlimited } </pre> Response: <pre> { "seq_id": 0, "success": 0/1 } </pre> Subscription IDs: SUBSCRIPTION_EBUS = 1 Controller Status The Controller sends information about its online/offline status to the “out/status” topic. Request format: <pre> { "status": 1 // see below } </pre> The “status” field can have the following values: • "0" - offline • "1" - online • "2" - online after power on When receiving a message with the status "2", the portal should send information about user subscriptions to the Controller, as described in the "Subscriptions" section. = Errors = error parameters: <pre> { "errors":{ "password": [ "Incorrect username." ] } } </pre>
Навигация
Персональные инструменты
русский
Войти
Пространства имён
Служебная страница
Варианты
Просмотры
Ещё
Поиск
Навигация
Заглавная страница
Свежие правки
Случайная статья
QuadroBit
Инструменты
Спецстраницы
Версия для печати