{"id":283332,"date":"2016-12-31T16:25:03","date_gmt":"2016-12-31T13:25:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=283332"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=283332","title":{"rendered":"\u0423\u043c\u043d\u0430\u044f \u0442\u0435\u043f\u043b\u0438\u0446\u0430 \u0432 Telegram"},"content":{"rendered":"<p>\u0414\u043e\u0431\u0440\u044b\u0439 \u0434\u0435\u043d\u044c. \u041d\u0430 \u043d\u0430\u0448\u0435\u043c \u0443\u0447\u0430\u0441\u0442\u043a\u0435 \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0442\u0435\u043f\u043b\u0438\u0446\u0430. \u0415\u0451 \u0433\u043b\u0430\u0432\u043d\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u2014 \u043f\u0435\u0440\u0435\u0433\u0440\u0435\u0432 \u0432 \u0436\u0430\u0440\u043a\u043e\u0435 \u0432\u0440\u0435\u043c\u044f, \u0442.\u043a. \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d\u0430 \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043d\u0430 \u0441\u0438\u0431\u0438\u0440\u0441\u043a\u0443\u044e \u0432\u0435\u0441\u043d\u0443. \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0432\u044b\u0445\u043e\u0434 \u2014 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0442\u044c\/\u0437\u0430\u043a\u0440\u044b\u0432\u0430\u0442\u044c \u0434\u0432\u0435\u0440\u0438 \u0438 \u043e\u043a\u043d\u0430, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0443. \u041d\u043e \u044d\u0442\u043e \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e. \u0410 \u0435\u0441\u043b\u0438 \u044d\u0442\u043e \u043d\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u0442\u043e \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430 \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u0434\u043e +50 \u0433\u0440\u0430\u0434\u0443\u0441\u043e\u0432, \u0447\u0442\u043e \u044f\u0432\u043d\u043e \u043d\u0435 \u0445\u043e\u0440\u043e\u0448\u043e. \u0410 \u0432\u0435\u0447\u0435\u0440\u043e\u043c \u0432\u0441\u0451 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u043e\u0440\u043e\u0437\u0438\u0442\u044c. \u0422\u0430\u043a \u0438 \u043d\u0430\u0447\u0430\u043b\u0430\u0441\u044c \u0435\u0451 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044f.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/geektimes\/post_images\/dad\/e37\/ae3\/dade37ae3afba69377f7d7ac53a94b3b.jpg\" alt=\"image\"\/><br \/>  <a name=\"habracut\"><\/a><br \/>  \u0412 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043c\u044b \u043a\u0443\u043f\u0438\u043b\u0438 Raspberry Pi 2. \u0420\u0430\u0437\u043e\u0431\u0440\u0430\u0432\u0448\u0438\u0441\u044c \u0441 \u043d\u0438\u043c, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043b\u0438 \u0434\u0430\u0442\u0447\u0438\u043a DS18B20 \u043f\u043e \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435. \u0417\u0430\u0442\u0435\u043c \u0431\u044b\u043b\u0438 \u043a\u0443\u043f\u043b\u0435\u043d\u044b \u0434\u0432\u0430 \u0431\/\u0443 \u0430\u0432\u0442\u043e\u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u0441\u0442\u0435\u043a\u043b\u043e\u043f\u043e\u0434\u044a\u0451\u043c\u043d\u0438\u043a\u0430. \u041a\u0430\u043a \u0438 \u0432\u0441\u0435 DC \u0434\u0432\u0438\u0433\u0430\u0442\u0435\u043b\u0438, \u043e\u043d\u0438 \u0434\u0432\u0438\u0436\u0443\u0442\u0441\u044f \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043f\u043e\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u0438. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043a \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0434\u0432\u0438\u0433\u0430\u0442\u0435\u043b\u044e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0434\u0432\u0430 \u0440\u0435\u043b\u0435: \u043e\u0434\u043d\u043e \u0434\u043b\u044f \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u044f, \u0434\u0440\u0443\u0433\u043e\u0435 \u0434\u043b\u044f \u0437\u0430\u043a\u0440\u044b\u0442\u0438\u044f. \u042d\u0442\u0438 \u0440\u0435\u043b\u0435 \u0443\u0436\u0435 \u0447\u0435\u0440\u0435\u0437 \u0442\u0440\u0430\u043d\u0437\u0438\u0441\u0442\u043e\u0440\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043a \u0441\u0430\u043c\u0438\u043c \u043f\u043e\u0440\u0442\u0430\u043c GPIO. \u0418 \u043f\u0438\u0442\u0430\u0435\u043c \u044d\u0442\u043e \u0432\u0441\u0451 \u0434\u0435\u043b\u043e \u0430\u043a\u043a\u0443\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u043e\u043c 12V. \u0422\u0430\u043a \u0436\u0435, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0441\u0436\u0435\u0447\u044c \u0434\u0432\u0438\u0433\u0430\u0442\u0435\u043b\u0438, \u0432 \u043a\u0440\u0430\u0439\u043d\u0438\u0445 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445 \u043e\u043a\u043d\u0430 \u0431\u044b\u043b\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u043a\u043e\u043d\u0446\u0435\u0432\u044b\u0435 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u0438, \u0438 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u043e\u043a\u043d\u043e \u043e\u0442\u043a\u0440\u044b\u043b\u043e\u0441\u044c\/\u0437\u0430\u043a\u0440\u044b\u043b\u043e\u0441\u044c \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0440\u0432\u0443\u0442 \u0441\u0435\u0442\u044c.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/geektimes\/post_images\/976\/39f\/9d2\/97639f9d24e51af037d3baca1200359e.jpg\" alt=\"image\"\/><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/geektimes\/post_images\/1ec\/ed9\/824\/1eced98242cb39b2a74d3d8babb31a19.jpg\" alt=\"image\"\/><\/p>\n<p>  \u0410 \u0434\u043b\u044f \u0441\u0432\u044f\u0437\u0438 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c WiFi \u0430\u0434\u0430\u043f\u0442\u0435\u0440 TP-LINK \u0441 \u0443\u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0430\u043d\u0442\u0435\u043d\u043d\u043e\u0439 \u00ab\u0414\u0432\u043e\u0439\u043d\u043e\u0439 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u00bb \u0434\u043b\u044f \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u0451\u043c\u0430 <s>\u0441\u043e\u0441\u0435\u0434\u0441\u043a\u043e\u0433\u043e WIFI<\/s> \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0433\u043e WIFI \u0440\u043e\u0443\u0442\u0435\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 40 \u043c\u0435\u0442\u0440\u043e\u0432.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/geektimes\/post_images\/a7a\/c93\/db7\/a7ac93db7ed2017891be1ded712e1e25.jpg\" alt=\"image\"\/><\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0438\u0448\u0435\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u044d\u0442\u0438\u043c\u0438 \u043f\u0440\u0438\u0432\u043e\u0434\u0430\u043c\u0438. \u0411\u044b\u043b \u0432\u044b\u0431\u0440\u0430\u043d \u044f\u0437\u044b\u043a Python, \u0442.\u00a0\u043a. \u0443 \u043d\u0435\u0433\u043e \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 Raspberry Pi \u0438 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e GPIO \u043f\u043e\u0440\u0442\u043e\u0432. \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u043e\u043a\u043d\u043e, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u0430\u0442\u044c +3.3V \u043d\u0430 \u0442\u0440\u0430\u043d\u0437\u0438\u0441\u0442\u043e\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u0442 \u0440\u0435\u043b\u0435, \u0438 \u0442\u043e \u043d\u0430\u0447\u043d\u0451\u0442 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0442\u044c \u043e\u043a\u043d\u043e. \u0427\u0442\u043e\u0431\u044b \u0435\u0433\u043e \u0437\u0430\u043a\u0440\u044b\u0442\u044c, \u0434\u0435\u043b\u0430\u0435\u043c \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u044d\u0442\u043e \u0441\u043b\u0443\u0447\u0430\u0435\u043c \u043d\u0430\u0448\u0435 \u0440\u0435\u043b\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043e \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442 \u043a \u043f\u0440\u0438\u0432\u043e\u0434\u0443. \u041d\u043e \u043d\u0430 Raspberry \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0434\u0430\u0451\u043c \u0442\u043e\u043a \u0442\u043e \u043d\u0430 \u043e\u0434\u0438\u043d \u043f\u043e\u0440\u0442, \u0442\u043e \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439. \u041c\u044b \u0440\u0435\u0448\u0438\u043b\u0438, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430 \u0431\u043e\u043b\u044c\u0448\u0435 26 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u043e\u043a\u043d\u043e \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 1 \u0441\u0435\u043a\u0443\u043d\u0434\u044b. \u0417\u0430\u0442\u0435\u043c \u0436\u0434\u0451\u043c 3 \u043c\u0438\u043d\u0443\u0442\u044b. \u0415\u0441\u043b\u0438 \u043e\u043f\u044f\u0442\u044c \u0436\u0430\u0440\u043a\u043e, \u0442\u043e \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0432\u0442\u043e\u0440\u043e\u0435 \u043e\u043a\u043d\u043e \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u0441\u0435\u043a\u0443\u043d\u0434\u044b. \u0416\u0434\u0451\u043c \u043e\u043f\u044f\u0442\u044c 3 \u043c\u0438\u043d\u0443\u0442\u044b, \u0438 \u0434\u0435\u043b\u0430\u0435\u043c \u0437\u0430\u043d\u043e\u0432\u043e. \u0422\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u0441 \u0437\u0430\u043a\u0440\u044b\u0442\u0438\u0435\u043c, \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0443\u0442 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u043d\u0438\u0436\u0435 24 \u0433\u0440\u0430\u0434\u0443\u0441\u043e\u0432. \u0410 \u0432\u043e\u0442 \u0438 \u043a\u043e\u0434:<\/p>\n<pre><code class=\"python\">import RPi.GPIO as GPIO import time import os import datetime  GPIO.setmode(GPIO.BOARD) GPIO.cleanup() GPIO.setup(31, GPIO.OUT) GPIO.setup(33, GPIO.OUT) GPIO.setup(35, GPIO.OUT) GPIO.setup(37, GPIO.OUT)  #\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0443 def gettemp():   if os.path.isdir(&quot;id \u0434\u0430\u0442\u0447\u0438\u043a\u0430&quot;): #\u0415\u0441\u043b\u0438 \u0434\u0430\u0442\u0447\u0438\u043a \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0451\u043d, \u0442\u043e \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435     tfile2=open(&quot;\/sys\/bus\/w1\/devices\/id \u0434\u0430\u0442\u0447\u0438\u043a\u0430&quot;)     ttext2=tfile2.read()     tfile2.close()     temp2=ttext2.split(&quot;\\n&quot;)[1].split(&quot; &quot;)[9]     t2=float(temp2[2:])\/1000     print t2   else: #\u0435\u0441\u043b\u0438 \u043d\u0435\u0442, \u0442\u043e \u0437\u0430\u0434\u0430\u0451\u043c \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u043e\u0435     print ('File not found')     t2==24   return t2  t2=24 #\u0417\u0430\u0434\u0430\u0451\u043c \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0434\u0430\u0442\u0447\u0438\u043a\u0430 while True: \u0432\u0435\u0447\u043d\u044b\u0439 \u0446\u0438\u043a\u043b t2=gettemp()   if    t2&lt;24: #\u0415\u0441\u043b\u0438 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430 \u043c\u0435\u043d\u044c\u0448\u0435 24, \u0442\u043e \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u043e\u043a\u043d\u043e \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u0441\u0435\u043a\u0443\u043d\u0434\u044b           GPIO.output(37, 1)         print (&quot;close1&quot;)         time.sleep(1)         GPIO.output(37, 0)    elif  t2&gt;26: #\u0415\u0441\u043b\u0438 \u0431\u043e\u043b\u044c\u0448\u0435 26, \u0442\u043e \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u043e\u043a\u043d\u043e \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u0441\u0435\u043a\u0443\u043d\u0434\u044b         GPIO.output(35, 1)         print (&quot;open1&quot;)         time.sleep(2)         GPIO.output(35, 0)            else: #\u0418\u043d\u0430\u0447\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0434\u0435\u043b\u0430\u0435\u043c         print (&quot;none1&quot;)   time.sleep(180)#\u0416\u0434\u0451\u043c 3 \u043c\u0438\u043d\u0443\u0442\u044b  #\u041e\u043f\u044f\u0442\u044c \u0447\u0438\u0442\u0430\u0435\u043c \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0443 t2=gettemp()  #\u0412\u0441\u0451 \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043e \u0432\u0442\u043e\u0440\u044b\u043c \u043e\u043a\u043d\u043e\u043c.   if    t2&lt;24:         GPIO.output(33, 1)         print (&quot;close2&quot;)         time.sleep(1)         GPIO.output(33, 0)    elif  t2&gt;26:            GPIO.output(31, 1)         print (&quot;open2&quot;)         time.sleep(1)         GPIO.output(31, 0)          else:         print (&quot;none2&quot;)   #\u041e\u043f\u044f\u0442\u044c \u0436\u0434\u0451\u043c 3 \u043c\u0438\u043d\u0443\u0442\u044b   time.sleep(180) <\/code><\/pre>\n<p>   <b>\u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0448\u043e\u0443 \u0434\u043b\u044f \u0442\u0435\u0445, \u043a\u043e\u043c\u0443 \u0444\u0438\u0437\u0438\u043a\u0430 \u043d\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430.<\/b><\/p>\n<p>  \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0432 Apache \u043d\u0430 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432 Raspbian, \u043c\u044b \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u043c\u0435\u0441\u044f\u0446\u0430 \u043d\u0435 \u043c\u043e\u0433\u043b\u0438 \u0434\u043e\u0441\u0442\u0443\u0447\u0430\u0442\u044c\u0441\u044f \u0434\u043e \u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043a\u0438 \u0438\u0437 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430. \u0427\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0435 \u0434\u0435\u043b\u0430\u043b\u0438. \u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043b\u0438 \u043f\u043e\u0440\u0442\u044b, \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u043b\u0438 \u0438\u0445, \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043f\u043e\u043c\u043e\u0433\u0430\u043b\u0430. \u041f\u0440\u0438\u0447\u0451\u043c \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438. \u041f\u043e\u0442\u043e\u043c \u043c\u044b \u0443\u0437\u043d\u0430\u043b\u0438 \u043f\u0435\u0447\u0430\u043b\u044c\u043d\u0443\u044e \u043f\u0440\u0430\u0432\u0434\u0443: \u043c\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u043c\u0441\u044f \u0437\u0430 NAT. \u0418 \u0443\u0441\u043b\u0443\u0433 \u043f\u043e \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u043c\u0443 IP \u043d\u0430\u0448 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 (\u041f\u0440\u0438\u0432\u0435\u0442 \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u0430\u043c \u0420\u0435\u0433\u0438\u043e\u043d \u0422\u0435\u043b\u0435\u043a\u043e\u043c\u0430). \u041f\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u043b\u0438 \u043c\u043d\u043e\u0433\u043e \u043e\u0431\u0445\u043e\u0434\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u043d\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0432\u044b\u0445\u043e\u0434\u0438\u043b\u043e. \u041f\u044b\u0442\u0430\u043b\u0441\u044f \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0435\u0431 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043d\u0430 \u0445\u043e\u0441\u0442\u0438\u043d\u0433\u0435, \u043d\u043e \u0434\u043b\u044f \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0442\u043e\u0436\u0435 \u043d\u0443\u0436\u0435\u043d IP. \u0411\u0440\u043e\u043a\u0435\u0440 IPv6 \u043a \u0442\u043e\u043c\u0443 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0443\u0436\u0435 \u0437\u0430\u043a\u0440\u044b\u043b\u0441\u044f. \u0410 \u0434\u0435\u043b\u0430\u0442\u044c VPN \u0434\u043e\u0440\u043e\u0433\u043e, \u0432\u0435\u0434\u044c \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0432\u0441\u0451 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e. \u0418 \u0442\u0443\u0442 \u0440\u0435\u0448\u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Telegram \u0431\u043e\u0442\u0430. \u041a\u0430\u043a \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u043e\u043d \u0438\u043c\u0435\u0435\u0442 \u0434\u0432\u0430 \u0440\u0435\u0436\u0438\u043c\u0430: \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u0439 \u043e\u043f\u0440\u043e\u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u043f\u0440\u044f\u043c\u043e \u043a \u043d\u0430\u043c. \u041f\u0435\u0440\u0432\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u043b, \u0442.\u043a. \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043e\u0442 \u043d\u0430\u043c IP \u0430\u0434\u0440\u0435\u0441\u0430. \u041f\u043e\u043a\u043e\u043f\u0430\u0432\u0448\u0438\u0441\u044c \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435 \u043d\u0430\u0448\u0451\u043b \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443: pytelegrambotapi. \u0418 \u043f\u0440\u0438\u043d\u044f\u043b\u0441\u044f \u0437\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u043e\u0434\u0430. \u041f\u0440\u0430\u0432\u0434\u0430 \u0432\u044b\u0445\u043e\u0434\u0438\u043b\u0438 \u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b. \u0415\u043b\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u0430\u044f MySQL \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043e\u0442\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0430\u0441\u044c \u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445, \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e \u0447\u0438\u0442\u0430\u043b\u0430 \u0438\u0437 \u043d\u0435\u0451 \u0432\u0441\u0451 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e. \u041f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0434\u0435\u043b\u0430\u0442\u044c \u043a\u043e\u0441\u0442\u044b\u043b\u044c: \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0444\u0430\u0439\u043b, \u0445\u0440\u0430\u043d\u044f\u0449\u0438\u0439\u0441\u044f \u0432 \u041e\u0417\u0423, \u0437\u0430\u0442\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c bash \u0441\u043a\u0440\u0438\u043f\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0447\u0438\u0442\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u0437\u0430\u043d\u0435\u0441\u0451\u0442 \u0432 \u0411\u0414.<\/p>\n<p>  \u0414\u0435\u043b\u0430\u0435\u043c \u0444\u0430\u0439\u043b config.ini, \u0442\u0443\u0434\u0430 \u043a\u0438\u0434\u0430\u0435\u043c:<\/p>\n<pre><code>[mysql] host = localhost database = telegram user = root password = secret&lt;\/code&gt; \u041d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430 \u0441\u0432\u043e\u0438.  \t\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0444\u0430\u0439\u043b python_mysql_dbconfig.py , \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c:  &lt;source lang=&quot;python&quot;&gt;from configparser import ConfigParser   def read_db_config(filename='config.ini', section='mysql'):     &quot;&quot;&quot; Read database configuration file and return a dictionary object     :param filename: name of the configuration file     :param section: section of database configuration     :return: a dictionary of database parameters     &quot;&quot;&quot;     # create parser and read ini configuration file     parser = ConfigParser()     parser.read(filename)       # get section, default to mysql     db = {}     if parser.has_section(section):         items = parser.items(section)         for item in items:             db[item[0]] = item[1]     else:         raise Exception('{0} not found in the {1} file'.format(section, filename))       return db<\/code><\/pre>\n<p>  \u0422\u0430\u043a \u0436\u0435 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0430\u0439\u043b python_mysql_connect2.py, \u0441 \u0432\u043e\u0442 \u0442\u0430\u043a\u0438\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c:<\/p>\n<pre><code class=\"python\">from mysql.connector import MySQLConnection, Error from python_mysql_dbconfig import read_db_config  def connect():     &quot;&quot;&quot; Connect to MySQL database &quot;&quot;&quot;      db_config = read_db_config()      try:         print('Connecting to MySQL database...')         conn = MySQLConnection(**db_config)          if conn.is_connected():             print('connection established.')         else:             print('connection failed.')      except Error as error:         print(error)      finally:         conn.close()         print('Connection closed.')  if __name__ == '__main__':     connect() <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0432\u0441\u0451 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043b\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0411\u0414.<\/p>\n<p>  \u041e\u0442\u0432\u043b\u0435\u0447\u0451\u043c\u0441\u044f \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043e\u0442 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043f\u0435\u0440\u0435\u0439\u0434\u0451\u043c \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043a \u043e\u0431\u0449\u0435\u043d\u0438\u044e \u0441 \u0431\u043e\u0442\u043e\u043c. \u041d\u0443 \u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e, \u043f\u0438\u0448\u0435\u043c @BotFather, \u0438 \u0431\u0435\u0440\u0451\u043c \u0443 \u043d\u0435\u0433\u043e \u0442\u043e\u043a\u0435\u043d. \u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0444\u0430\u0439\u043b config.py, \u0438 \u043f\u0438\u0448\u0435\u043c \u0432 \u043d\u0435\u0433\u043e \u0434\u0432\u0435 \u0441\u0442\u0440\u043e\u0447\u043a\u0438:<\/p>\n<pre><code class=\"python\"># -*- coding: utf-8 -*- token = '\u0412\u0430\u0448 \u0442\u043e\u043a\u0435\u043d' <\/code><\/pre>\n<p>  \u042f \u0440\u0435\u0448\u0438\u043b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0431\u043e\u0442\u0435 \u0442\u0440\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438:<\/p>\n<ul>\n<li>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b<\/li>\n<li>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u043d\u0438\u043c\u043a\u043e\u0432<\/li>\n<li>\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u043a\u043d\u0430\u043c\u0438<\/li>\n<\/ul>\n<p>   \u0421 \u043f\u0435\u0440\u0432\u044b\u043c \u0432\u0441\u0451 \u043f\u0440\u043e\u0441\u0442\u043e, \u043f\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0443 \u0447\u0438\u0442\u0430\u0435\u043c \u0444\u0430\u0439\u043b \u0441 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u043e\u0439, \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u044d\u0442\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e.<\/p>\n<p>  \u0421\u043e \u0441\u043d\u0438\u043c\u043a\u0430\u043c\u0438 \u043f\u043e\u0441\u043b\u043e\u0436\u043d\u0435\u0435. \u042f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u0443 Motion. \u0412 \u0435\u0451 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u0445 \u043f\u0440\u043e\u0441\u0438 \u043a\u043b\u0430\u0441\u0442\u044c \u0432 \u043f\u0430\u043f\u043a\u0443 \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u0441\u043d\u0438\u043c\u043a\u0438, \u043d\u0443 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c \u043a\u0430\u0436\u0434\u044b\u0435 30 \u0441\u0435\u043a\u0443\u043d\u0434. \u0418 \u0434\u0435\u043b\u0430\u0435\u043c \u0444\u0430\u0439\u043b\u044b \u0441 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c\u0438 \u0438\u043c\u0435\u043d\u0430, \u0438 \u043e\u043d\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u043c\u0435\u043d\u044f\u044e\u0442 \u0434\u0440\u0443\u0433 \u0434\u0440\u0443\u0433\u0430. \u0410 \u043f\u043e\u0442\u043e\u043c \u043f\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0443 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0444\u0430\u0439\u043b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e.<\/p>\n<p>  \u041d\u0443 \u0438 \u0442\u0440\u0435\u0442\u0438\u0439, \u0441\u0430\u043c\u044b\u0439 \u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c: \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u043a\u043d\u0430\u043c\u0438. \u0423 \u043c\u0435\u043d\u044f \u0433\u043b\u0430\u0432\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430: \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u043a\u0430, \u043d\u043e \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e, \u0442\u043e \u043c\u044b \u0435\u0451 \u043c\u043e\u0436\u0435\u043c \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c. \u0414\u0435\u043b\u0430\u043b \u044f \u044d\u0442\u043e \u0442\u0430\u043a. \u0421\u043e\u0437\u0434\u0430\u043b \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0439 \u0444\u0430\u0439\u043b. \u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u0435\/\u0437\u0430\u043a\u0440\u044b\u0442\u0438\u0435, \u043f\u0440\u0438\u043e\u0442\u043a\u0440\u044b\u0442\u0438\u0435, \u043f\u0440\u0438\u0437\u0430\u043a\u0440\u044b\u0442\u0438\u0435 \u043e\u043a\u043d\u0430 \u0438\u043b\u0438 \u043d\u0430 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\/\u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u043a\u0438 \u0431\u043e\u0442 \u043f\u0438\u0448\u0435\u0442 \u0432 \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u043d\u043e\u043c\u0435\u0440 \u043a\u043e\u043c\u0430\u043d\u0434\u044b. \u041a\u0430\u0436\u0434\u044b\u0435 \u043f\u044f\u0442\u044c \u0441\u0435\u043a\u0443\u043d\u0434 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u043a\u043d\u0430\u043c\u0438 \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b, \u0438 \u0435\u0441\u043b\u0438 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0451\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u0443, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0435\u0451. \u041f\u043e\u0441\u043b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0432 \u044d\u0442\u043e\u0442 \u0436\u0435 \u0444\u0430\u0439\u043b \u043f\u0438\u0448\u0435\u0442, \u0447\u0442\u043e \u0432\u0441\u0451 \u043f\u0440\u043e\u0448\u043b\u043e \u0443\u0441\u043f\u0435\u0448\u043d\u043e. \u0411\u043e\u0442 \u043e\u043f\u044f\u0442\u044c \u0447\u0438\u0442\u0430\u0435\u0442 \u0444\u0430\u0439\u043b, \u0438 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u044f\u0435\u0442 \u043d\u0430\u0441, \u0447\u0442\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430.<\/p>\n<p>  \u041d\u0443 \u0430 \u0442\u0435\u043f\u0435\u0440\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0442\u0430 \u0436\u0435 \u0441\u0430\u043c\u0430\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0434\u043b\u044f \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u043d\u0438\u044f \u043e\u043a\u043e\u043d, \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u0436\u0435 \u043f\u0435\u0440\u0435\u0434\u0435\u043b\u0430\u043d\u043d\u0430\u044f \u043f\u043e\u0434 \u0431\u043e\u0442\u0430(temp.py):<\/p>\n<pre><code class=\"python\">import RPi.GPIO as GPIO import time import os import datetime  GPIO.setmode(GPIO.BOARD) GPIO.cleanup() GPIO.setup(31, GPIO.OUT) GPIO.setup(33, GPIO.OUT) GPIO.setup(35, GPIO.OUT) GPIO.setup(37, GPIO.OUT)  #\u041f\u0438\u0448\u0435\u043c \u0432 \u0444\u0430\u0439\u043b, \u0447\u0442\u043e \u0433\u043e\u0442\u043e\u0432\u044b \u043a \u0440\u0430\u0431\u043e\u0442\u0435 f = open('\/mnt\/raw\/wind', 'w') f.write('OK') f.close()  #\u041f\u0438\u0448\u0435\u043c, \u0447\u0442\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u043a\u0430 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0430 f = open('\/mnt\/raw\/pos', 'w') f.write('1') f.close()  #\u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0443 def gettemp():   if os.path.isdir(&quot;\/sys\/bus\/w1\/devices\/id \u0434\u0430\u0442\u0447\u0438\u043a\u0430&quot;): #\u0415\u0441\u043b\u0438 \u0434\u0430\u0442\u0447\u0438\u043a \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0451\u043d, \u0442\u043e \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435     tfile2=open(&quot;\/sys\/bus\/w1\/devices\/id \u0434\u0430\u0442\u0447\u0438\u043a\u0430\/w1_slave&quot;)     ttext2=tfile2.read()     tfile2.close()     temp2=ttext2.split(&quot;\\n&quot;)[1].split(&quot; &quot;)[9]     t2=float(temp2[2:])\/1000     print t2   else: #\u0435\u0441\u043b\u0438 \u043d\u0435\u0442, \u0442\u043e \u0437\u0430\u0434\u0430\u0451\u043c \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u043e\u0435     print ('File not found')     t2==24   return t2  #\u0412\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u043a\u0443 \u043f\u043e \u0434\u0435\u0444\u043e\u043b\u0442\u0443 i=1 #\u0414\u0435\u0444\u043e\u043b\u0442\u043d\u0430\u044f \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430 t2=24  #\u0427\u0438\u0442\u0430\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043e\u0442 \u0431\u043e\u0442\u0430 def info():     f = open('\/mnt\/raw\/wind')     com = f.read()     f.close()     return com  #\u041e\u0442\u0432\u0435\u0447\u0430\u0435\u043c \u0431\u043e\u0442\u0443, \u0447\u0442\u043e \u0432\u0441\u0451 \u0443\u0441\u043f\u0435\u0448\u043d\u043e def ans():     f = open('\/mnt\/raw\/wind', 'w')     f.write('OK')     f.close()     print (&quot;OK&quot;)  #\u0410\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u044b def rob():     c = info()     if c==&quot;10&quot;:         GPIO.output(37, 1)         print (&quot;close1&quot;)         time.sleep(3)         GPIO.output(37, 0)         ans()     elif c==&quot;11&quot;:         GPIO.output(35, 1)         print (&quot;open1&quot;)         time.sleep(2)         GPIO.output(35, 0)         ans()     elif c==&quot;12&quot;:         GPIO.output(37, 1)         print (&quot;close1&quot;)         time.sleep(3)         GPIO.output(37, 0)         ans()     elif c==&quot;13&quot;:         GPIO.output(35, 1)         print (&quot;open1&quot;)         time.sleep(1)         GPIO.output(35, 0)         ans()     elif c==&quot;20&quot;:         GPIO.output(33, 1)         print (&quot;close2&quot;)         time.sleep(3)         GPIO.output(33, 0)         ans()     elif c==&quot;21&quot;:         GPIO.output(31, 1)         print (&quot;open2&quot;)         time.sleep(3)         GPIO.output(31, 0)         ans()     elif c==&quot;22&quot;:         GPIO.output(33, 1)         print (&quot;close2&quot;)         time.sleep(1)         GPIO.output(33, 0)         ans()     elif c==&quot;23&quot;:         GPIO.output(31, 1)         print (&quot;open2&quot;)         time.sleep(1)         GPIO.output(31, 0)         ans()     elif c==&quot;30&quot;:         global i         i=0         ans()         f = open('\/mnt\/raw\/pos', 'w')         f.write('0')         f.close()         print('30')         global i         i=0         ans()     elif c==&quot;31&quot;:         f = open('\/mnt\/raw\/pos', 'w')         f.write('1')         f.close()         print('31')         global i         i=1         ans()          while True:  #\u0427\u0438\u0442\u0430\u0435\u043c \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u044b  rob()  #\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0430 \u043b\u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u043a\u0430  if i==1:    gettemp()    if    t2&lt;24:           GPIO.output(37, 1)         print (&quot;close1&quot;)         time.sleep(1)         GPIO.output(37, 0)    elif  t2&gt;26:          GPIO.output(35, 1)         print (&quot;open1&quot;)         time.sleep(2)         GPIO.output(35, 0)    else:         print (&quot;none1&quot;)           #\u041e\u0436\u0438\u0434\u0430\u0435\u043c 3 \u043c\u0438\u043d\u0443\u0442\u044b, \u0438 \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0447\u0438\u0442\u0430\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u044b   j=0   while(j&lt;36):       rob()       time.sleep(5)       j=j+1       if i==0:           break   gettemp()    if    t2&lt;24:         GPIO.output(33, 1)         print (&quot;close2&quot;)         time.sleep(1)         GPIO.output(33, 0)           elif  t2&gt;26:            GPIO.output(31, 1)         print (&quot;open2&quot;)         time.sleep(1)         GPIO.output(31, 0)    else:          print (&quot;none2&quot;)    j=0   while(j&lt;36):       rob()       time.sleep(5)       j=j+1       if i==0:           break <\/code><\/pre>\n<p>   \u041d\u043e \u0430 \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043f\u0440\u043e \u0441\u0430\u043c\u043e\u0433\u043e \u0431\u043e\u0442\u0430. \u041a\u0430\u043a \u044f \u0443\u0436\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043b, \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 PyTelegramBotApi. \u0415\u0441\u043b\u0438 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u043a <a href=\"https:\/\/github.com\/eternnoir\/pyTelegramBotAPI\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043d\u0430 GitHub<\/a>, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c \u0447\u0442\u043e \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043a\u043e\u043c\u0430\u043d\u0434 \u0431\u043e\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0445\u0435\u043d\u0434\u043b\u0435\u0440\u044b. \u0425\u0435\u043d\u0434\u043b\u0435\u0440 \u2014 \u044d\u0442\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u0432 \u043d\u0430\u0448\u0435\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0449\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435. \u0412 \u043d\u0430\u0448\u0435\u0439 \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u0430\u044f \u0444\u0440\u0430\u0437\u0430 \u0432 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435. \u0410 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u044d\u0442\u043e \u0432\u0441\u0451 \u0447\u0442\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432 \u044f\u0437\u044b\u043a\u0435 python. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u0441\u044b\u043b\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043a\u0430\u043a\u0443\u044e-\u043d\u0438\u0431\u0443\u0434\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0438\u043b\u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u043b\u044f \u043e\u043a\u043e\u043d \u0432 \u0444\u0430\u0439\u043b. \u0412 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u043d\u0430\u0448\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u044d\u0442\u0438\u0445 \u0441\u0430\u043c\u044b\u0445 \u0445\u0435\u043d\u0434\u043b\u0440\u043e\u0432 \u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043e\u043f\u0440\u043e\u0441\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430. <\/p>\n<p>  \u041d\u043e \u0442\u0430\u043a \u0436\u0435 \u044f \u0441\u0430\u043c \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u0435\u0449\u0451 \u043e\u0434\u043d\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0443\u044e \u0432\u0435\u0449\u044c: \u0431\u043b\u043e\u043a \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438. \u041d\u0443 \u043a\u0430\u043a \u043f\u043e\u043d\u044f\u0442\u043d\u043e \u0438\u0437 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f, \u043e\u043d \u0441\u0434\u0435\u043b\u0430\u043d \u0434\u043b\u044f \u0437\u0430\u0449\u0438\u0442\u044b \u043d\u0430\u0448\u0435\u0439 \u0442\u0435\u043f\u043b\u0438\u0446\u044b \u043e\u0442 \u043d\u0435\u0441\u0430\u043d\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430. \u041e\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u043e. \u041f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u0431\u043e\u0442\u0443 \u043e\u043d \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 \u0443 \u043d\u0430\u0441 \u043f\u0430\u0440\u043e\u043b\u044c. \u0415\u0441\u043b\u0438 \u043c\u044b \u0435\u0433\u043e \u0432\u0432\u043e\u0434\u0438\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, \u0431\u043e\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0430\u0441 \u0432 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445, \u0438 \u043f\u0440\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f\u0445 \u043d\u0430\u043c \u0443\u0436\u0435 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u043d\u0443\u0436\u043d\u043e. \u0411\u043e\u0442 \u0443\u0437\u043d\u0430\u0451\u0442 \u043d\u0430\u0441 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 chat-id. Chat-id \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0445\u0440\u0430\u043d\u0438\u043c \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u0432\u0441\u0451 \u0432\u0440\u0435\u043c\u044f \u043d\u0435 \u0434\u0451\u0440\u0433\u0430\u0442\u044c \u0431\u0430\u0437\u0443.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u0444\u0430\u0439\u043b daba.py \u0438 \u043f\u0438\u0448\u0435\u043c \u0442\u0443\u0434\u0430 \u0432\u043e\u0442 \u044d\u0442\u043e:<\/p>\n<pre><code class=\"python\">from mysql.connector import MySQLConnection, Error from python_mysql_dbconfig import read_db_config import time  def getkey(): #\u0427\u0438\u0442\u0430\u0435\u043c \u043f\u0430\u0440\u043e\u043b\u044c \u0434\u043b\u044f \u0431\u043e\u0442\u0430     try:         dbconfig = read_db_config()         conn = MySQLConnection(**dbconfig)         cursor = conn.cursor()         cursor.execute(&quot;SELECT key2 FROM tkey where id=0&quot;)          row = cursor.fetchone()          return row         print(row)         except Error as e:         print(e)      finally:         cursor.close()         conn.close() def sendup(): #\u041e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0432\u0440\u0435\u043c\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0431\u043e\u0442\u0430 (\u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442)     stime=time.time()     query = &quot;INSERT INTO uptime(datetime, also) &quot; \\     &quot;VALUES(now(), 20)&quot;     args=(stime)     try:         dbconfig = read_db_config()         conn = MySQLConnection(**dbconfig)         cursor = conn.cursor()         cursor.execute(query)          row = cursor.fetchone()          return(row)         print(row)         except Error as e:         print(e)      finally:         cursor.close()         conn.close() def getid(idi): #\u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0435\u0441\u0442\u044c \u043b\u0438 id \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 \u0431\u0430\u0437\u0435     query=&quot;SELECT accecpt FROM users WHERE chatid ='&quot;+str(idi)+&quot;'&quot;     try:         dbconfig = read_db_config()         conn = MySQLConnection(**dbconfig)         cursor = conn.cursor()         cursor.execute(query)          row = cursor.fetchone()         #print (str(row))         if str(row)==&quot;None&quot;:             return 0;             print (0)         else:             return 20;          except Error as e:         print(e)      #finally:         #cursor.close()         #conn.close() def newuser(idi): #\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445     query = (&quot;INSERT INTO users SET `chatid`='12345'&quot;)     try:         dbconfig = read_db_config()         conn = MySQLConnection(**dbconfig)         cursor = conn.cursor()         cursor.execute(query)          row = cursor.fetchone()          print(row)         except Error as e:         print(e)         return(e)      finally:         cursor.close()         conn.close()  if __name__ == '__main__':     query_with_fetchone() <\/code><\/pre>\n<p>  \u0422\u0430\u043a \u0436\u0435 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u0440\u0430\u0437\u0443 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0435\u0449\u0451 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432. \u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0444\u0430\u0439\u043b newuser.sh \u0438 \u043f\u0438\u0448\u0435\u043c \u0432 \u043d\u0435\u0433\u043e: <\/p>\n<pre><code class=\"bash\">#!\/bin\/bash a=`cat \/mnt\/raw\/user` cat \/dev\/null &gt; \/mnt\/raw\/user  mysql -u root -pkoshak &lt;&lt; EOF use telegram; INSERT INTO users(chatid) VALUES('$a'); EOF <\/code><\/pre>\n<p>  \u0418 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0434\u0432\u0430 \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0431\u043e\u0442\u0430 \u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043e\u043a\u043e\u043d:<\/p>\n<pre><code class=\"bash\">#!\/bin\/bash i=0 while [ $i = 0 ] do echo New python sleep 5 python3 bot.py done <\/code><\/pre>\n<p>  \u0418 \u0435\u0449\u0451 \u043e\u0434\u0438\u043d:<\/p>\n<pre><code class=\"bash\">#!\/bin\/bash i=0 while [ $i = 0 ] do echo New python sleep 5 python3 temp.py done <\/code><\/pre>\n<p>   \u00ab\u0417\u0430\u0447\u0435\u043c \u043c\u044b \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u043c?\u00bb \u0441\u043f\u0440\u043e\u0441\u0438\u0442\u0435 \u0432\u044b. \u0410 \u0442\u0443\u0442 \u0434\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0438\u043d\u043e\u0433\u0434\u0430 \u0438\u0437-\u0437\u0430 \u043d\u0435\u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f, \u0438\u043b\u0438 \u043e\u0448\u0438\u0431\u043a\u0438 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 Telegram \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u043b\u0435\u0442\u0435\u0442\u044c. \u0410 \u0441\u043a\u0440\u0438\u043f\u0442 \u0435\u0451 \u0433\u043e\u043d\u044f\u0435\u0442 \u0432 \u0432\u0435\u0447\u043d\u043e\u043c \u0446\u0438\u043a\u043b\u0435: \u0432\u044b\u043b\u0435\u0442\u0435\u043b\u0430 \u2014 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b \u0447\u0435\u0440\u0435\u0437 5 \u0441\u0435\u043a\u0443\u043d\u0434 \u0441\u043d\u043e\u0432\u0430. \u0410 \u0434\u043b\u044f \u043e\u043a\u043e\u043d \u044f \u0441\u0434\u0435\u043b\u0430\u043b \u044d\u0442\u043e \u043d\u0430 \u0432\u0441\u044f\u043a\u0438\u0439 \u043f\u043e\u0436\u0430\u0440\u043d\u044b\u0439: \u0432\u0434\u0440\u0443\u0433 \u0442\u043e\u0436\u0435 \u0438\u0437-\u0437\u0430 \u0441\u0431\u043e\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0432\u044b\u043b\u0435\u0442\u0438\u0442, \u0430 \u043d\u0430\u0441 \u0432 \u0442\u0435\u043f\u043b\u0438\u0446\u0435 \u043d\u0435\u0442, \u0432\u0435\u0440\u043d\u0451\u043c\u0441\u044f \u0438 \u0431\u0443\u0434\u0435\u0442 \u0443 \u043d\u0430\u0441 \u0442\u043e\u043c\u0430\u0442\u043d\u044b\u0439 \u0441\u0443\u043f \u0438\u043b\u0438 \u043f\u043e\u043c\u0438\u0434\u043e\u0440\u043d\u043e\u0435 \u043c\u043e\u0440\u043e\u0436\u0435\u043d\u043d\u043e\u0435.<\/p>\n<p>  \u041d\u0443 \u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u0430\u043c\u043e\u0435 \u0433\u043b\u0430\u0432\u043d\u043e\u0435, \u0441\u043a\u0440\u0438\u043f\u0442 \u0441\u0430\u043c\u043e\u0433\u043e \u0431\u043e\u0442\u0430 (bot.py):<\/p>\n<pre><code class=\"python\"># -*- coding: utf-8 -*- import config import telebot import subprocess import time from telebot import types import datetime import os from daba import getkey from daba import sendup from daba import getid #from daba import newuser #from temp import tep import os  #\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0444\u0430\u0439\u043b f = open('\/mnt\/raw\/user', 'tw', encoding='utf-8') f.close()  global par par=0  #\u0422\u0435\u043a\u0441\u0442 \u0434\u043b\u044f \u043d\u0435\u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f global a a=&quot;\u0412\u044b \u043d\u0435 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b. \u041f\u0440\u043e\u0439\u0434\u0438\u0442\u0435 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \/auth [\u043f\u0430\u0440\u043e\u043b\u044c]&quot;  #\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b def get_temp():   if os.path.isdir(&quot;\/sys\/bus\/w1\/devices\/id \u0434\u0430\u0442\u0447\u0438\u043a\u0430&quot;):      tfile2=open(&quot;\/sys\/bus\/w1\/devices\/id \u0434\u0430\u0442\u0447\u0438\u043a\u0430\/w1_slave&quot;)     ttext2=tfile2.read()     tfile2.close()     temp2=ttext2.split(&quot;\\n&quot;)[1].split(&quot; &quot;)[9]     t2=float(temp2[2:])\/1000     return t2    else:     print ('File not found')    #\u041f\u0430\u0440\u043e\u043b\u044c keyword=str(getkey())[2:-3]  #\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0442\u043e\u043a\u0435\u043d\u0430 bot = telebot.TeleBot(config.token) print (sendup()) #\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u043e\u0439 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b  #########################\u041a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0430 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438########################################## markup2 = types.ReplyKeyboardMarkup(row_width=1, resize_keyboard=True) #\u0410\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f, \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435, \u043a\u043e\u043b\u0432\u0430 \u043a\u043d\u043e\u043f\u043e\u043a \u0432 \u043e\u0434\u043d\u043e\u0439 \u0440\u044f\u0434\u0443 markdown = types.ReplyKeyboardHide() #\u0414\u0435\u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f itembtn5 = types.KeyboardButton(' \u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f') #\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u043d\u043e\u043f\u043a\u0438 5 markup2.add(itembtn5) #\u0417\u0430\u043d\u0435\u0441\u0435\u043d\u0438\u0435 \u043a\u043d\u043e\u043f\u043e\u043a \u0432 \u043c\u0430\u0442\u0440\u0438\u0446\u0443 #########################\u041a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0430 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438##########################################   #########################\u041a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0430 \u0433\u043b\u0430\u0432\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u044e########################################## markup = types.ReplyKeyboardMarkup(row_width=3, resize_keyboard=True) #\u0410\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f, \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435, \u043a\u043e\u043b\u0432\u0430 \u043a\u043d\u043e\u043f\u043e\u043a \u0432 \u043e\u0434\u043d\u043e\u0439 \u0440\u044f\u0434\u0443 itembtn1 = types.KeyboardButton(' \u041f\u0440\u0438\u0441\u043b\u0430\u0442\u044c \u0441\u043d\u0438\u043c\u043e\u043a') #\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u043d\u043e\u043f\u043a\u0438 1 itembtn4 = types.KeyboardButton(' \u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u043a\u043d\u0430\u043c\u0438') itembtn2 = types.KeyboardButton(' \u041f\u0440\u0438\u0441\u043b\u0430\u0442\u044c \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0443') #\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u043d\u043e\u043f\u043a\u0438 2 markup.add(itembtn1, itembtn4, itembtn2) #\u0417\u0430\u043d\u0435\u0441\u0435\u043d\u0438\u0435 \u043a\u043d\u043e\u043f\u043e\u043a \u0432 \u043c\u0430\u0442\u0440\u0438\u0446\u0443 #########################\u041a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0430 \u0433\u043b\u0430\u0432\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u044e##########################################   #########################\u0415\u0449\u0451 \u043a\u043d\u043e\u043f\u043a\u0438##########################################  markup3 = types.ReplyKeyboardMarkup(row_width=2, resize_keyboard=True) #\u0410\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f, \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435, \u043a\u043e\u043b\u0432\u0430 \u043a\u043d\u043e\u043f\u043e\u043a \u0432 \u043e\u0434\u043d\u043e\u0439 \u0440\u044f\u0434\u0443 itembtn10 = types.KeyboardButton(' \u0412\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u043a\u0443 ') #\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u043d\u043e\u043f\u043a\u0438 10 itembtn11 = types.KeyboardButton('\ufe0f \u0420\u0443\u0447\u043d\u043e\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435') itembtn12 = types.KeyboardButton(' \u041d\u0430\u0437\u0430\u0434') markup3.add(itembtn10, itembtn11, itembtn12) #\u0417\u0430\u043d\u0435\u0441\u0435\u043d\u0438\u0435 \u043a\u043d\u043e\u043f\u043e\u043a \u0432 \u043c\u0430\u0442\u0440\u0438\u0446\u0443  markup4 = types.ReplyKeyboardMarkup(row_width=2, resize_keyboard=True) #\u0410\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f, \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435, \u043a\u043e\u043b\u0432\u0430 \u043a\u043d\u043e\u043f\u043e\u043a \u0432 \u043e\u0434\u043d\u043e\u0439 \u0440\u044f\u0434\u0443 itembtn13 = types.KeyboardButton(' \u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u043a\u0443 ') #\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u043d\u043e\u043f\u043a\u0438 13 markup4.add(itembtn13, itembtn11, itembtn12) #\u0417\u0430\u043d\u0435\u0441\u0435\u043d\u0438\u0435 \u043a\u043d\u043e\u043f\u043e\u043a \u0432 \u043c\u0430\u0442\u0440\u0438\u0446\u0443  markup5 = types.ReplyKeyboardMarkup(row_width=2, resize_keyboard=True) #\u0410\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f, \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435, \u043a\u043e\u043b\u0432\u0430 \u043a\u043d\u043e\u043f\u043e\u043a \u0432 \u043e\u0434\u043d\u043e\u0439 \u0440\u044f\u0434\u0443 itembtn14 = types.KeyboardButton(' \u041f\u0435\u0440\u0432\u043e\u0435 \u043e\u043a\u043d\u043e') #\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u043d\u043e\u043f\u043a\u0438 14 itembtn15 = types.KeyboardButton(' \u0412\u0442\u043e\u0440\u043e\u0435 \u043e\u043a\u043d\u043e') #\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u043d\u043e\u043f\u043a\u0438 15 itembtn16 = types.KeyboardButton('\ufe0f \u041d\u0430\u0437\u0430\u0434') #\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u043d\u043e\u043f\u043a\u0438 16 markup5.add(itembtn14, itembtn15, itembtn16) #\u0417\u0430\u043d\u0435\u0441\u0435\u043d\u0438\u0435 \u043a\u043d\u043e\u043f\u043e\u043a \u0432 \u043c\u0430\u0442\u0440\u0438\u0446\u0443  markup6 = types.ReplyKeyboardMarkup(row_width=2, resize_keyboard=True) #\u0410\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f, \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435, \u043a\u043e\u043b\u0432\u0430 \u043a\u043d\u043e\u043f\u043e\u043a \u0432 \u043e\u0434\u043d\u043e\u0439 \u0440\u044f\u0434\u0443 itembtn17 = types.KeyboardButton('\ufe0f \u041e\u0442\u043a\u0440\u044b\u0442\u044c \u043e\u043a\u043d\u043e ') #\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u043d\u043e\u043f\u043a\u0438 17 itembtn18 = types.KeyboardButton('\ufe0f \u0417\u0430\u043a\u0440\u044b\u0442\u044c \u043e\u043a\u043d\u043e ') #\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u043d\u043e\u043f\u043a\u0438 18 itembtn19 = types.KeyboardButton(' \u041f\u0440\u0438\u043e\u0442\u043a\u0440\u044b\u0442\u044c \u043e\u043a\u043d\u043e ') #\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u043d\u043e\u043f\u043a\u0438 19 itembtn20 = types.KeyboardButton(' \u041f\u0440\u0438\u0437\u0430\u043a\u0440\u044b\u0442\u044c \u043e\u043a\u043d\u043e ') #\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u043d\u043e\u043f\u043a\u043820 itembtn21 = types.KeyboardButton('\ufe0f \u041d\u0430\u0437\u0430\u0434') #\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u043d\u043e\u043f\u043a\u0438 21 markup6.add(itembtn17, itembtn18, itembtn19, itembtn20, itembtn21) #\u0417\u0430\u043d\u0435\u0441\u0435\u043d\u0438\u0435 \u043a\u043d\u043e\u043f\u043e\u043a \u0432 \u043c\u0430\u0442\u0440\u0438\u0446\u0443  markup7 = types.ReplyKeyboardMarkup(row_width=2, resize_keyboard=True) #\u0410\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f, \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435, \u043a\u043e\u043b\u0432\u0430 \u043a\u043d\u043e\u043f\u043e\u043a \u0432 \u043e\u0434\u043d\u043e\u0439 \u0440\u044f\u0434\u0443 itembtn22 = types.KeyboardButton('\ufe0f \u041e\u0442\u043a\u0440\u044b\u0442\u044c \u043e\u043a\u043d\u043e ') #\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u043d\u043e\u043f\u043a\u0438 22 itembtn23 = types.KeyboardButton('\ufe0f \u0417\u0430\u043a\u0440\u044b\u0442\u044c \u043e\u043a\u043d\u043e ') #\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u043d\u043e\u043f\u043a\u0438 23 itembtn24 = types.KeyboardButton(' \u041f\u0440\u0438\u043e\u0442\u043a\u0440\u044b\u0442\u044c \u043e\u043a\u043d\u043e ') #\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u043d\u043e\u043f\u043a\u043824 itembtn25 = types.KeyboardButton(' \u041f\u0440\u0438\u0437\u0430\u043a\u0440\u044b\u0442\u044c \u043e\u043a\u043d\u043e ') #\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u043d\u043e\u043f\u043a\u043825 markup7.add(itembtn22, itembtn23, itembtn24, itembtn25, itembtn21) #\u0417\u0430\u043d\u0435\u0441\u0435\u043d\u0438\u0435 \u043a\u043d\u043e\u043f\u043e\u043a \u0432 \u043c\u0430\u0442\u0440\u0438\u0446\u0443 #########################\u0415\u0449\u0451 \u043a\u043d\u043e\u043f\u043a\u0438########################################## bot.send_message(45215125, &quot;\u041f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430&quot;)#\u0412\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u0441\u044e\u0434\u0430 \u0432\u0430\u0448 chat-id        #\u0423\u0437\u043d\u0430\u0435\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u043a\u0438 \u043e\u043a\u043e\u043d def pos():     f = open('\/mnt\/raw\/pos')     com = f.read()     f.close()     return com  #\u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f def avtor(idi):     global par#\u0415\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u043d\u043e\u043b\u044c     if par==idi:             return 0     else:#\u0417\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 \u0411\u0414, \u0435\u0441\u043b\u0438 \u043e\u043d \u0442\u0430\u043c \u0435\u0441\u0442\u044c, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c 0             if getid(str(idi))==20:                 par=idi#\u0417\u0430\u043d\u043e\u0441\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e                 return 0             else:#\u041f\u0438\u0448\u0435\u043c \u0447\u0442\u043e \u043c\u044b \u043d\u0435 \u0437\u043d\u0430\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f                 bot.send_message(idi, &quot;\u0412\u044b \u043d\u0435 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b. \u041f\u0440\u043e\u0439\u0434\u0438\u0442\u0435 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \/auth [\u043f\u0430\u0440\u043e\u043b\u044c]&quot;, reply_markup=markup2)                 return 1                @bot.message_handler(regexp=&quot; \u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f&quot;) def auth(message):     bot.send_message(message.chat.id, &quot;\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \/auth [\u043f\u0430\u0440\u043e\u043b\u044c]&quot;)  #\u0422\u043e\u0436\u0435 \u0430\u0432\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f @bot.message_handler(commands=['auth']) def start2(message):     if message.text[6:]==keyword:#\u0412\u044b\u0440\u0435\u0437\u0430\u0435\u043c \u043f\u0430\u0440\u043e\u043b\u044c \u0438\u0437 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f       if getid(str(message.chat.id))==20:#\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043f\u0430\u0440\u043e\u043b\u044c \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0442\u0430\u043c \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u043d\u0430\u043c \u0432\u0435\u0440\u043d\u0451\u0442\u0441\u044f \u043a\u043e\u0434 20         bot.send_message(message.chat.id, &quot;\u0412\u044b \u0443\u0436\u0435 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u044b&quot;)       else:         global par         bot.send_message(message.chat.id, &quot;\u0423\u0441\u043f\u0435\u0448\u043d\u043e&quot;, reply_markup=markup)         par=message.chat.id         #\u041e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c chat-id \u0432 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445         f = open('\/mnt\/raw\/user', 'w')         f.write(str(message.chat.id))         f.close()         os.system('newuser.sh')         print (message.chat.id)         print (par)     else:         bot.send_message(message.chat.id, &quot;\u041d\u0435\u0432\u0435\u0440\u043d\u043e&quot;)         print (keyword)         print (message.text[6:])         print (message.chat.id)   # \u041a\u043e\u043c\u0430\u043d\u0434\u0430 \/start @bot.message_handler(commands=['start']) def start(message):      global par      if avtor(message.chat.id)!=0:          print (par)          bot.send_message(message.chat.id, &quot; \u0412\u044b \u043d\u0435 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b. \u041f\u0440\u043e\u0439\u0434\u0438\u0442\u0435 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \/auth [\u043f\u0430\u0440\u043e\u043b\u044c]&quot;, reply_markup=markup2)      else: \t     bot.send_message(message.chat.id, &quot; \u0412\u044b \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c. \u041d\u0430\u0431\u0435\u0440\u0438\u0442\u0435 \/help, \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0443\u0437\u043d\u0430\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u043a\u043e\u043c\u0430\u043d\u0434.&quot;)    #\u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043f\u043e\u043c\u043e\u0449\u0438 - \/help @bot.message_handler(commands=['help']) def help(message):   if avtor(message.chat.id)==0:      mas=' \u0414\u0430\u043d\u043d\u044b\u0439 \u0431\u043e\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0442\u0435\u043f\u043b\u0438\u0446\u0435\u0439 \u043d\u0430 \u043c\u043e\u0451\u043c \u0443\u0447\u0430\u0441\u0442\u043a\u0435. \\n \u0421\u043f\u0438\u0441\u043e\u043a \u043a\u043e\u043c\u0430\u043d\u0434 \u0434\u043b\u044f \u043f\u043e\u043c\u043e\u0449\u0438, \u0432 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u044d\u0442\u0438\u043c \u0431\u043e\u0442\u043e\u043c:  \\n \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043f\u0440\u0430\u0432\u043a\u0443 - \/help \\n \u041e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u0432\u0441\u0451 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b :)'      bot.send_message(message.chat.id, mas, reply_markup=markup)      print (message.chat.id, message.text)  \t   #\u0417\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u043d\u0430 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0443 @bot.message_handler(commands=['show']) def show(message):   if avtor(message.chat.id)==0:      mas='\u041a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0430 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0430'      bot.send_message(message.chat.id, mas, reply_markup=markup)      print (message.chat.id, message.text)    #\u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0443 @bot.message_handler(regexp=&quot; \u041f\u0440\u0438\u0441\u043b\u0430\u0442\u044c \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0443&quot;) def temp(message):   if avtor(message.chat.id)==0:      tp=get_temp()      mas='  \u0422\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430 \u0432 \u0442\u0435\u043f\u043b\u0438\u0446\u0435: '+str(tp)+'\u00b0C'      bot.send_message(message.chat.id, mas)      print (message.chat.id, message.text)       #\u043f\u0440\u0438\u0441\u043b\u0430\u0442\u044c \u0441\u043d\u0438\u043c\u043e\u043a @bot.message_handler(regexp=&quot; \u041f\u0440\u0438\u0441\u043b\u0430\u0442\u044c \u0441\u043d\u0438\u043c\u043e\u043a&quot;) def photo(message):       if avtor(message.chat.id)==0:           path='\/mnt\/raw\/photo\/foto.jpg' #\u041f\u0443\u0442\u044c \u043a \u043f\u0430\u043f\u043a\u0443 \u0441\u043e \u0441\u043d\u0438\u043c\u043a\u043e\u043c          try:              f = open(path, 'rb') #\u041e\u0442\u043a\u0440\u044b\u0442\u0438\u044f \u0444\u0430\u0439\u043b\u0430 - \u0441\u043d\u0438\u043c\u043a\u0430              bot.send_photo(message.chat.id, f) #\u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0441\u043d\u0438\u043c\u043a\u0430              print (message.chat.id, message.text)          except:              bot.send_message(message.chat.id, &quot;\u0424\u043e\u0442\u043e\u043a \u043d\u0435\u0442 :(&quot;)   #\u041f\u0435\u0440\u0435\u0445\u043e\u0434 \u0432 \u043c\u0435\u043d\u044e \u043e\u043a\u043e\u043d @bot.message_handler(regexp=&quot; \u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u043a\u043d\u0430\u043c\u0438&quot;) def windows(message):    if avtor(message.chat.id)==0:        print (&quot;window&quot;)        print (pos())        if str(pos())[0]=='1':            bot.send_message(message.chat.id, &quot;\u041e\u043a&quot;, reply_markup=markup3)#\u0415\u0441\u043b\u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u043a\u0430 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0430, \u0442\u043e \u0432\u044b\u0432\u043e\u0434\u0438\u043c \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0443 \u0441 \u043d\u0430\u0434\u043f\u0438\u0441\u044c\u044e \u00ab\u0412\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u043a\u0443\u00bb        else:             bot.send_message(message.chat.id, &quot;\u041e\u043a&quot;, reply_markup=markup4)#\u0410 \u0437\u0434\u0435\u0441\u044c \u0432\u0441\u0451 \u0441 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442  #\u041a\u043d\u043e\u043f\u043a\u0430 \u043d\u0430\u0437\u0430\u0434 @bot.message_handler(regexp=&quot; \u041d\u0430\u0437\u0430\u0434&quot;) def windows(message):    if avtor(message.chat.id)==0:        bot.send_message(message.chat.id, &quot;\u041e\u043a&quot;,  reply_markup=markup)  #\u0412\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u043a\u0438 @bot.message_handler(regexp=&quot; \u0412\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u043a\u0443 &quot;) def windows(message):    if avtor(message.chat.id)==0:        f = open('\/mnt\/raw\/wind', 'w')#\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0444\u0430\u0439\u043b        f.write('30')#\u041f\u0438\u0448\u0435\u043c \u0442\u0443\u0434\u0430 \u043a\u043e\u0434 \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u0432 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u044d\u0442\u043e 30        f.close()#\u0417\u0430\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0444\u0430\u0439\u043b        k=&quot;No&quot;#\u0414\u0435\u0444\u043e\u043b\u0442\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439        while k[0:2]!=&quot;OK&quot;:#\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043e\u0442\u0432\u0435\u0442             time.sleep(5)#\u0416\u0434\u0451\u043c 5 \u0441\u0435\u043a\u0443\u043d\u0434            f = open('\/mnt\/raw\/wind')#\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0444\u0430\u0439\u043b            k = f.read()#\u0427\u0438\u0442\u0430\u0435\u043c \u043e\u0442\u0432\u0435\u0442            f.close()#\u0417\u0430\u043a\u0440\u044b\u0432\u0430\u0435\u0442            print(k[0:2])        bot.send_message(message.chat.id, &quot;\u0423\u0441\u043f\u0435\u0448\u043d\u043e&quot;,  reply_markup=markup4)  @bot.message_handler(regexp=&quot; \u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u043a\u0443 &quot;) def windows(message):    if avtor(message.chat.id)==0:        f = open('\/mnt\/raw\/wind', 'w')        f.write('31')        f.close()        k=&quot;No&quot;        while k[0:2]!=&quot;OK&quot;:            time.sleep(5)                       f = open('\/mnt\/raw\/wind')            k = f.read()            f.close()            print(k[0:2])        bot.send_message(message.chat.id, &quot;\u0423\u0441\u043f\u0435\u0448\u043d\u043e&quot;,  reply_markup=markup3)  @bot.message_handler(regexp=&quot;\ufe0f \u0420\u0443\u0447\u043d\u043e\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435&quot;) def windows(message):    if avtor(message.chat.id)==0:        bot.send_message(message.chat.id, &quot;\u041e\u043a&quot;,  reply_markup=markup5)  @bot.message_handler(regexp=&quot;\ufe0f \u041d\u0430\u0437\u0430\u0434&quot;) def windows(message):    if avtor(message.chat.id)==0:        if str(pos())[0]=='1':            bot.send_message(message.chat.id, &quot;\u041e\u043a&quot;, reply_markup=markup3)        else:             bot.send_message(message.chat.id, &quot;\u041e\u043a&quot;, reply_markup=markup4)  @bot.message_handler(regexp=&quot;\ufe0f \u041d\u0430\u0437\u0430\u0434&quot;) def windows(message):    if avtor(message.chat.id)==0:        bot.send_message(message.chat.id, &quot;\u041e\u043a&quot;,  reply_markup=markup5)  #\u0411\u0435\u0433\u0430\u0435\u043c \u043f\u043e \u043c\u0435\u043d\u044e @bot.message_handler(regexp=&quot; \u041f\u0435\u0440\u0432\u043e\u0435 \u043e\u043a\u043d\u043e&quot;) def windows(message):    if avtor(message.chat.id)==0:        bot.send_message(message.chat.id, &quot;\u041e\u043a&quot;,  reply_markup=markup6) @bot.message_handler(regexp=&quot; \u0412\u0442\u043e\u0440\u043e\u0435 \u043e\u043a\u043d\u043e&quot;) def windows(message):    if avtor(message.chat.id)==0:        bot.send_message(message.chat.id, &quot;\u041e\u043a&quot;,  reply_markup=markup7)  @bot.message_handler(regexp=&quot;\ufe0f \u041e\u0442\u043a\u0440\u044b\u0442\u044c \u043e\u043a\u043d\u043e &quot;) def windows(message):    if avtor(message.chat.id)==0:        f = open('\/mnt\/raw\/wind', 'w')        f.write('11')        f.close()        k=&quot;No&quot;        while k[0:2]!=&quot;OK&quot;:            time.sleep(5)                       f = open('\/mnt\/raw\/wind')            k = f.read()            f.close()            print(k[0:2])        bot.send_message(message.chat.id, &quot;\u0423\u0441\u043f\u0435\u0448\u043d\u043e&quot;,  reply_markup=markup6)  @bot.message_handler(regexp=&quot;\ufe0f \u0417\u0430\u043a\u0440\u044b\u0442\u044c \u043e\u043a\u043d\u043e &quot;) def windows(message):    if avtor(message.chat.id)==0:        f = open('\/mnt\/raw\/wind', 'w')        f.write('10')        f.close()        k=&quot;No&quot;        while k[0:2]!=&quot;OK&quot;:            time.sleep(5)                       f = open('\/mnt\/raw\/wind')            k = f.read()            f.close()            print(k[0:2])        bot.send_message(message.chat.id, &quot;\u0423\u0441\u043f\u0435\u0448\u043d\u043e&quot;,  reply_markup=markup6)  @bot.message_handler(regexp=&quot; \u041f\u0440\u0438\u043e\u0442\u043a\u0440\u044b\u0442\u044c \u043e\u043a\u043d\u043e &quot;) def windows(message):    if avtor(message.chat.id)==0:        f = open('\/mnt\/raw\/wind', 'w')        f.write('13')        f.close()        k=&quot;No&quot;        while k[0:2]!=&quot;OK&quot;:            time.sleep(5)                       f = open('\/mnt\/raw\/wind')            k = f.read()            f.close()            print(k[0:2])        bot.send_message(message.chat.id, &quot;\u0423\u0441\u043f\u0435\u0448\u043d\u043e&quot;,  reply_markup=markup6)  @bot.message_handler(regexp=&quot; \u041f\u0440\u0438\u0437\u0430\u043a\u0440\u044b\u0442\u044c \u043e\u043a\u043d\u043e &quot;) def windows(message):    if avtor(message.chat.id)==0:        f = open('\/mnt\/raw\/wind', 'w')        f.write('12')        f.close()        k=&quot;No&quot;        while k[0:2]!=&quot;OK&quot;:            time.sleep(5)                       f = open('\/mnt\/raw\/wind')            k = f.read()            f.close()            print(k[0:2])        bot.send_message(message.chat.id, &quot;\u0423\u0441\u043f\u0435\u0448\u043d\u043e&quot;,  reply_markup=markup6)  @bot.message_handler(regexp=&quot;\ufe0f \u041e\u0442\u043a\u0440\u044b\u0442\u044c \u043e\u043a\u043d\u043e &quot;) def windows(message):    if avtor(message.chat.id)==0:        f = open('\/mnt\/raw\/wind', 'w')        f.write('21')        f.close()        k=&quot;No&quot;        while k[0:2]!=&quot;OK&quot;:            time.sleep(5)                       f = open('\/mnt\/raw\/wind')            k = f.read()            f.close()            print(k[0:2])        bot.send_message(message.chat.id, &quot;\u0423\u0441\u043f\u0435\u0448\u043d\u043e&quot;,  reply_markup=markup7)  @bot.message_handler(regexp=&quot;\ufe0f \u0417\u0430\u043a\u0440\u044b\u0442\u044c \u043e\u043a\u043d\u043e &quot;) def windows(message):    if avtor(message.chat.id)==0:        f = open('\/mnt\/raw\/wind', 'w')        f.write('20')        f.close()        k=&quot;No&quot;        while k[0:2]!=&quot;OK&quot;:            time.sleep(5)                       f = open('\/mnt\/raw\/wind')            k = f.read()            f.close()            print(k[0:2])        bot.send_message(message.chat.id, &quot;\u0423\u0441\u043f\u0435\u0448\u043d\u043e&quot;,  reply_markup=markup7)  @bot.message_handler(regexp=&quot; \u041f\u0440\u0438\u043e\u0442\u043a\u0440\u044b\u0442\u044c \u043e\u043a\u043d\u043e &quot;) def windows(message):    if avtor(message.chat.id)==0:        f = open('\/mnt\/raw\/wind', 'w')        f.write('23')        f.close()        k=&quot;No&quot;        while k[0:2]!=&quot;OK&quot;:            time.sleep(5)                       f = open('\/mnt\/raw\/wind')            k = f.read()            f.close()            print(k[0:2])        bot.send_message(message.chat.id, &quot;\u0423\u0441\u043f\u0435\u0448\u043d\u043e&quot;,  reply_markup=markup7)  @bot.message_handler(regexp=&quot; \u041f\u0440\u0438\u0437\u0430\u043a\u0440\u044b\u0442\u044c \u043e\u043a\u043d\u043e &quot;) def windows(message):    if avtor(message.chat.id)==0:        f = open('\/mnt\/raw\/wind', 'w')        f.write('22')        f.close()        k=&quot;No&quot;        while k[0:2]!=&quot;OK&quot;:            time.sleep(5)                       f = open('\/mnt\/raw\/wind')            k = f.read()            f.close()            print(k[0:2])        bot.send_message(message.chat.id, &quot;\u0423\u0441\u043f\u0435\u0448\u043d\u043e&quot;,  reply_markup=markup7)  #\u0420\u0435\u0430\u043a\u0446\u0438\u044f \u043d\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u043d\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u0435 \u0432\u044b\u0448\u0435 @bot.message_handler(content_types=[&quot;text&quot;]) def repeat_all_messages(message):    if avtor(message.chat.id)==0:          bot.send_message(message.chat.id, &quot;\u042f \u043d\u0435 \u0437\u043d\u0430\u044e \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b. \u041d\u0430\u0431\u0435\u0440\u0438 \/help, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u043a\u043e\u043c\u0430\u043d\u0434&quot;)          print (message.chat.id, message.text)  #\u041e\u0442\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043d\u043e\u0432\u044b\u0445 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 if __name__ == '__main__':         bot.polling()<\/code><\/pre>\n<p>  \u041d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0437\u0434\u0435\u0441\u044c id \u0434\u0430\u0442\u0447\u0438\u043a\u0430, chat-id \u0438 \u043f\u0443\u0442\u044c \u043a \u0440\u0430\u0437\u0434\u0435\u043b\u0443 \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438. \u0422\u0435\u043f\u0435\u0440\u044c \u0443 \u043d\u0430\u0441 \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0451 \u0433\u043e\u0442\u043e\u0432\u043e. \u041a\u0430\u0447\u0430\u0435\u043c \u044d\u0442\u043e\u0442 <a href=\"https:\/\/yadi.sk\/d\/yqJbyKRz35xYoP\">\u0434\u0430\u043c\u043f<\/a>, \u0438 \u0437\u0430\u043b\u0438\u0432\u0430\u0435\u043c \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u0441\u0432\u043e\u0439 \u0441\u0435\u0440\u0432\u0435\u0440, \u0438 \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u0441\u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u0434\u0435\u043b \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438, \u0434\u0443\u043c\u0430\u044e 10 \u041c\u0411 \u0445\u0432\u0430\u0442\u0438\u0442 \u043f\u043e \u0433\u043e\u0440\u043b\u043e. \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0434\u0432\u0430 \u043d\u0430\u0448\u0438\u0445 \u0441\u043a\u0440\u0438\u043f\u0442\u0430-\u0441\u0442\u0430\u0440\u0442\u0435\u0440\u0430 \u0438 \u0440\u0430\u0434\u0443\u0435\u043c\u0441\u044f. \u041f\u0430\u0440\u043e\u043b\u044c \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e: telbot. \u041c\u0435\u043d\u044f\u0435\u043c \u0435\u0433\u043e \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 tkey \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<h3>\u0421\u041c\u0421 \u0438\u043d\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/h3>\n<p>  \u0422\u0430\u043a \u0436\u0435 \u0441\u0434\u0435\u043b\u0430\u043b \u0421\u041c\u0421 \u0438\u043d\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0430 \u0441\u043b\u0443\u0447\u0430\u0439 \u043f\u0435\u0440\u0435\u0433\u0440\u0435\u0432\u0430. \u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0444\u0430\u0439\u043b sms.py:<\/p>\n<pre><code>#!\/usr\/bin\/env python # -*- coding: utf8 -*-   &quot;&quot;&quot; \u0410\u0432\u0442\u043e\u0440 \u0422\u0438\u0442\u043e\u0432 \u0410.\u0412. t_aleksandr_v@inbox.ru 17.02.2015 &quot;&quot;&quot;   &quot;&quot;&quot; \u0421\u043a\u0440\u0438\u043f\u0442 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0421\u041c\u0421 \u0447\u0435\u0440\u0435\u0437 \u0441\u0430\u0439\u0442 sms.ru &quot;&quot;&quot; &quot;&quot;&quot; \u041f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b:&quot;&quot;&quot;   &quot;&quot;&quot; -i \u0438\u043b\u0438 --idsender - id \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043d\u0430 sms.ru&quot;&quot;&quot; &quot;&quot;&quot; -t \u0438\u043b\u0438 --to - \u043d\u043e\u043c\u0435\u0440 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u0435\u043b\u044f \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 79219996660&quot;&quot;&quot; &quot;&quot;&quot; -s \u0438\u043b\u0438 --subject - \u0442\u0435\u043a\u0441\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043d\u0430 \u043b\u0430\u0442\u0438\u043d\u0438\u0446\u0435&quot;&quot;&quot;     from urllib2 import urlopen from optparse import OptionParser     def sendsms(idsender,subject,to):       subject = subject.replace(&quot; &quot;,&quot;+&quot;)     url=&quot;http:\/\/sms.ru\/sms\/send?api_id=%s&text=%s&to=%s&quot; %(idsender,subject,to)     res=urlopen(url)   if __name__ == '__main__':       parser = OptionParser()       parser.add_option(&quot;-i&quot;, &quot;--\u0432\u0430\u0448 \u043a\u043b\u044e\u0447&quot;, dest=&quot;idsender&quot;, default=&quot;\u0432\u0430\u0448 \u043a\u043b\u044e\u0447&quot;, help=&quot;ID user on sms.ru&quot;, metavar=&quot;IDSENDER&quot;)     parser.add_option(&quot;-t&quot;, &quot;--\u0432\u0430\u0448 \u0442\u0435\u043b\u0435\u0444\u043e\u043d&quot;, dest=&quot;to&quot;, default=&quot;\u0432\u0430\u0448 \u0442\u0435\u043b\u0435\u0444\u043e\u043d&quot;, help=&quot;to telephone number&quot;, metavar=&quot;TO&quot;)     parser.add_option(&quot;-s&quot;, &quot;--temperatyra 32&quot;, dest=&quot;subject&quot;, default=&quot;Jara tut, otkroy okno&quot;, help=&quot;Name of subject&quot;, metavar=&quot;SUBJECT&quot;)       (options, args) = parser.parse_args()       sendsms(options.idsender,options.subject,options.to)<\/code><\/pre>\n<p>  \u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c\u0441\u044f \u043d\u0430 sms.ru \u0438 \u0431\u0435\u0440\u0451\u043c \u0442\u0430\u043a API-key \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u0434\u043b\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u0432. \u0422\u0430\u043a \u0436\u0435 \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0432 \u0441\u043a\u0440\u0438\u043f\u0442\u0435 \u0432\u0430\u0448 \u043d\u043e\u043c\u0435\u0440 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430. <\/p>\n<p>  \u0412 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u043a\u043e\u043d \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e:<\/p>\n<pre><code>Vr=0<\/code><\/pre>\n<p>  \u0417\u0430\u0442\u0435\u043c \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u0432\u0435\u0447\u043d\u044b\u0439 \u0446\u0438\u043a\u043b \u044d\u0442\u043e\u0442 \u043a\u043e\u0434:<\/p>\n<pre><code>d = datetime.today() V = d.strftime('%H') V = int(V)  if    (t2&gt;32 and Vr!=V):          print (V)         Vr=V         os.system('\/home\/samba\/sms.py')<\/code><\/pre>\n<p>  \u0412 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430 \u043f\u043e\u0440\u043e\u0433\u0430 32, \u0441\u043c\u0441 \u0431\u0443\u0434\u0443\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b \u0440\u0430\u0437 \u0432 \u0447\u0430\u0441, \u043f\u043e\u043a\u0430 \u043e\u043d\u0430 \u043d\u0435 \u0441\u043f\u0430\u0434\u0451\u0442.<\/p>\n<p>  <b>P.S.<\/b> \u0412 \u043f\u043b\u0430\u043d\u0430\u0445 \u043d\u0430 \u0431\u0443\u0434\u0443\u0449\u0435\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0439 \u043e\u0431\u043e\u0433\u0440\u0435\u0432\u0430\u0442\u0435\u043b\u044c \u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u043e\u043b\u0438\u0432.<\/p>\n<p>  \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0432\u0441\u0435\u043c \u0442\u0435\u043c, \u043a\u0442\u043e \u0434\u043e\u0447\u0438\u0442\u0430\u043b \u0434\u043e \u043a\u043e\u043d\u0446\u0430.<br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/geektimes.ru\/post\/284258\/\"> https:\/\/geektimes.ru\/post\/284258\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0414\u043e\u0431\u0440\u044b\u0439 \u0434\u0435\u043d\u044c. \u041d\u0430 \u043d\u0430\u0448\u0435\u043c \u0443\u0447\u0430\u0441\u0442\u043a\u0435 \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0442\u0435\u043f\u043b\u0438\u0446\u0430. \u0415\u0451 \u0433\u043b\u0430\u0432\u043d\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u2014 \u043f\u0435\u0440\u0435\u0433\u0440\u0435\u0432 \u0432 \u0436\u0430\u0440\u043a\u043e\u0435 \u0432\u0440\u0435\u043c\u044f, \u0442.\u043a. \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d\u0430 \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043d\u0430 \u0441\u0438\u0431\u0438\u0440\u0441\u043a\u0443\u044e \u0432\u0435\u0441\u043d\u0443. \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0432\u044b\u0445\u043e\u0434 \u2014 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0442\u044c\/\u0437\u0430\u043a\u0440\u044b\u0432\u0430\u0442\u044c \u0434\u0432\u0435\u0440\u0438 \u0438 \u043e\u043a\u043d\u0430, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0443. \u041d\u043e \u044d\u0442\u043e \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e. \u0410 \u0435\u0441\u043b\u0438 \u044d\u0442\u043e \u043d\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u0442\u043e \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430 \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u0434\u043e +50 \u0433\u0440\u0430\u0434\u0443\u0441\u043e\u0432, \u0447\u0442\u043e \u044f\u0432\u043d\u043e \u043d\u0435 \u0445\u043e\u0440\u043e\u0448\u043e. \u0410 \u0432\u0435\u0447\u0435\u0440\u043e\u043c \u0432\u0441\u0451 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u043e\u0440\u043e\u0437\u0438\u0442\u044c. \u0422\u0430\u043a \u0438 \u043d\u0430\u0447\u0430\u043b\u0430\u0441\u044c \u0435\u0451 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044f.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/geektimes\/post_images\/dad\/e37\/ae3\/dade37ae3afba69377f7d7ac53a94b3b.jpg\" alt=\"image\"\/>  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-283332","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/283332","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=283332"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/283332\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=283332"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=283332"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=283332"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}