{"id":267703,"date":"2015-11-07T20:09:03","date_gmt":"2015-11-07T17:09:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=267703"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=267703","title":{"rendered":"\u0411\u044e\u0434\u0436\u0435\u0442\u043d\u0430\u044f \u0440\u0430\u0441\u0441\u044b\u043b\u043a\u0430 \u0421\u041c\u0421"},"content":{"rendered":"<p>       <b>\u041f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e \u0432\u0441\u0435\u0445 \u0445\u0430\u0431\u0440\u043e\u0436\u0438\u0442\u0435\u043b\u0435\u0439!<\/b><\/p>\n<p>  \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u0437\u0430\u043b\u0438\u0437\u0430\u043d\u043d\u0430\u044f \u0442\u0435\u043c\u0430 \u043f\u0440\u043e \u0440\u0430\u0441\u0441\u044b\u043b\u043a\u0443 \u0441\u043c\u0441 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439, \u043d\u043e \u043a\u0430\u043a \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c\u0441\u044f: \u00ab\u043c\u043d\u043e\u0433\u043e \u2014 \u043d\u0435 \u043c\u0430\u043b\u043e\u00bb. \u041a\u0430\u043a-\u0442\u043e \u0442\u0430\u043a \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u043e\u043d\u0430 \u043c\u0435\u043d\u044f \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043f\u0440\u0435\u0441\u043b\u0435\u0434\u0443\u0435\u0442: \u0442\u043e \u043e\u0434\u043d\u0438, \u0442\u043e \u0434\u0440\u0443\u0433\u0438\u0435 \u0434\u043e\u0431\u0440\u044b\u0435 \u043b\u044e\u0434\u0438 \u043f\u043e\u043f\u0440\u043e\u0441\u044f\u0442 \u043f\u0440\u0438\u043d\u044f\u0442\u044c \u0443\u0447\u0430\u0441\u0442\u0438\u0435 (\u0441\u043e\u0432\u0435\u0442\u043e\u043c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440) \u0432 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0431\u044e\u0434\u0436\u0435\u0442\u043d\u043e\u0439 \u0440\u0430\u0441\u0441\u044b\u043b\u043a\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439. \u0418 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u043f\u0440\u043e\u043f\u0430\u0434\u0430\u0442\u044c \u043d\u0430\u043a\u043e\u043f\u043b\u0435\u043d\u043d\u043e\u043c\u0443 \u0434\u043e\u0431\u0440\u0443, \u043e\u0441\u0442\u0430\u0432\u043b\u044e \u0437\u0434\u0435\u0441\u044c, \u0430 \u0432\u0434\u0440\u0443\u0433 \u043a\u043e\u043c\u0443-\u0442\u043e \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f\u2026<\/p>\n<p>  <habracut\/><br \/>  \u0418\u0442\u0430\u043a-\u0441\u2026 \u041e\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0432\u0441\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 \u0431\u0430\u0437\u0435 \u043e\u0431\u044b\u0447\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u0430 \u0438 \u043e\u0441\u0438 \u0441\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u0430 NT. \u0410 \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u0441\u0440\u0430\u0437\u0443 \u043a \u00ab\u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u044b\u043c\u00bb \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u043c. <\/p>\n<p>  \u0427\u0435\u043c \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0445\u0432\u0430\u0441\u0442\u0430\u0442\u044c\u0441\u044f arduino \u0432 \u044d\u0442\u043e\u043c \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438? \u041e\u0442\u0432\u0435\u0447\u0443 \u0441\u0440\u0430\u0437\u0443, \u041e\u041d\u041e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043d\u043e \u0435\u0441\u0442\u044c \u043d\u044e\u0430\u043d\u0441\u044b, \u043e \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0430\u043f\u0438\u0448\u0443 \u043d\u0438\u0436\u0435. \u0412\u043e\u043e\u0431\u0449\u0435\u043c, \u0438\u043c\u0435\u0435\u043c \u043a\u0438\u0442\u0430\u0439\u0441\u043a\u0438\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 arduino 2560 (\u0431\u044b\u043b\u043e \u043f\u0435\u0440\u0435\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043d\u043e \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0441\u044f \u043b\u0438\u043d\u0435\u0439\u043a\u0430) \u0438 \u0434\u0432\u0430 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u044f \u2014 \u0441\u0435\u0442\u044c W5100 (\u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442) \u0438 GSM SIM 900. \u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u044d\u0442\u043e \u0432\u0441\u0435 \u0434\u0435\u043b\u043e \u043a\u0430\u043a-\u0442\u043e \u0442\u0430\u043a.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/2c8\/ead\/201\/2c8ead2011b102984e5b8d84ba22f682.png\" alt=\"image\"\/><\/p>\n<p>  \u0417\u0430\u0434\u0430\u0447\u0430 \u0431\u044b\u043b\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f:<br \/>   \u2014 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u0443\u043c\u0435\u0442\u044c \u043e\u0431\u0449\u0430\u0442\u044c\u0441\u044f \u043f\u043e http<br \/>   \u2014 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435<br \/>   \u2014 \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 json<\/p>\n<p>  \u0413\u0443\u0433\u043b \u0434\u0435\u043b\u0438\u0442\u0441\u044f \u0432\u0441\u0435\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439, \u0438 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0421\u043a\u0435\u0442\u0447<\/b><\/p>\n<div class=\"spoiler_text\"><a name=\"habracut\"><\/a><\/p>\n<pre><code>#include &lt;SPI.h&gt; #include &lt;Ethernet.h&gt;  #include &lt;String.h&gt;  #include &quot;SIM900.h&quot; #include &lt;SoftwareSerial.h&gt; #include &quot;sms.h&quot;  #include &lt;LiquidCrystal_I2C.h&gt; #include &lt;Wire.h&gt;  byte mac[] = { 0x90, 0xA2, 0x00, 0x00, 0x00, 0x01 };     IPAddress ip(192,168,34,139);                                EthernetServer server(80);  char char_in = 0;     String HTTP_req;      SMSGSM sms;  boolean started=false; bool power = false;  LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);  void setup() {    Serial.begin(9600);             lcd.begin(16,2);   lcd.setCursor(0,0);   lcd.print(&quot;INIT GSM...&quot;);   lcd.setCursor(0,1);   lcd.print(&quot;WAIT!!!&quot;);      \/\/powerUp();   gsm.forceON();      if (gsm.begin(4800)) {     Serial.println(&quot;\\nstatus=READY&quot;);     lcd.clear();     lcd.setCursor(0,0);     lcd.print(&quot;READY&quot;);         started=true;     }   else {     Serial.println(&quot;\\nstatus=IDLE&quot;);     lcd.clear();     lcd.setCursor(0,0);     lcd.print(&quot;IDLE&quot;);   }      Ethernet.begin(mac, ip);    server.begin();             }  void software_reset() {   asm volatile (&quot;  jmp 0&quot;);   }   void loop() {   EthernetClient client = server.available();    if (client) {     while (client.connected()) {       if (client.available()) {         char_in = client.read();  \/\/         HTTP_req += char_in;                if (char_in == '\\n') {                        Serial.println(HTTP_req);                      if(HTTP_req.indexOf(&quot;GET \/res&quot;) &gt;= 0) {             reset_processing(&HTTP_req, &client);             break;           }            if(HTTP_req.indexOf(&quot;GET \/sms&quot;) &gt;= 0) {             sms_processing(&HTTP_req, &client);             break;           }                if(HTTP_req.indexOf(&quot;GET \/test&quot;) &gt;= 0) {             test_processing(&HTTP_req, &client);             break;           }              else {             client_header(&client);               break;           }              }       }     }     HTTP_req = &quot;&quot;;         client.stop();   }       if(power) {     delay(1000);     software_reset();   } }  char* string2char(String command) {   if(command.length()!=0){     char *p = const_cast&lt;char*&gt;(command.c_str());     return p;   } }  void parse_data(String *data) {   data-&gt;replace(&quot;GET \/sms\/&quot;,&quot;&quot;);   data-&gt;replace(&quot;GET \/test\/&quot;, &quot;&quot;);    int lastPost = data-&gt;indexOf(&quot;\\r&quot;);   *data = data-&gt;substring(0, lastPost);   data-&gt;replace(&quot; HTTP\/1.1&quot;, &quot;&quot;);   data-&gt;replace(&quot; HTTP\/1.0&quot;, &quot;&quot;);   data-&gt;trim(); }  \/\/ explode  String request_value(String *data, char separator, int index) {   int found = 0;   int strIndex[] = {0, -1};   int maxIndex = data-&gt;length()-1;    for(int i=0; i&lt;=maxIndex && found&lt;=index; i++) {     if(data-&gt;charAt(i)==separator || i==maxIndex) {       found++;       strIndex[0] = strIndex[1]+1;       strIndex[1] = (i == maxIndex) ? i+1 : i;     }   }   return found&gt;index ? data-&gt;substring(strIndex[0], strIndex[1]) : &quot;&quot;; }  bool gsm_status() {   bool result = false;   switch(gsm.CheckRegistration()) {     case 1:       result = true;       break;     default:       break;   }   return result; }  bool gsm_send(char *number_str, char *message_str) {   bool result = false;   switch(sms.SendSMS(number_str, message_str)) {     case 1:       result = true;       break;     default:       break;   }    return result;  }  void reset_processing(String *data, EthernetClient *cl) {   client_header(cl);       cl-&gt;println(&quot;\\{\\&quot;error\\&quot;: 0, \\&quot;message\\&quot;: \\&quot;restarting...\\&quot;\\}&quot;);      power = true;    }  void test_processing(String *data, EthernetClient *cl) {   parse_data(data);      if(started) {     client_header(cl);     cl-&gt;println(&quot;\\{\\&quot;id\\&quot;:&quot; + request_value(data, '\/',0) + &quot;,\\&quot;error\\&quot;:0&quot; + &quot;,\\&quot;message\\&quot;:\\&quot;test success\\&quot;\\}&quot;);      } }  void sms_processing(String *data, EthernetClient *cl) {   parse_data(data);    if(started) {     if (gsm_send(string2char(request_value(data, '\/', 1)), string2char(request_value(data, '\/', 2)))) {       client_header(cl);       cl-&gt;println(&quot;\\{\\&quot;id\\&quot;:&quot; + request_value(data, '\/',0) + &quot;,\\&quot;error\\&quot;:0&quot; + &quot;,\\&quot;message\\&quot;:\\&quot;success\\&quot;\\}&quot;);     }     else {       if(!gsm_status()) {         client_header(cl);         cl-&gt;println(&quot;\\{\\&quot;id\\&quot;:&quot; + request_value(data, '\/',0) + &quot;,\\&quot;error\\&quot;:2&quot; + &quot;,\\&quot;message\\&quot;:\\&quot;gsm not registered\\&quot;\\}&quot;);            power = true;       }       else {         client_header(cl);         cl-&gt;println(&quot;\\{\\&quot;id\\&quot;:&quot; + request_value(data, '\/',0) + &quot;,\\&quot;error\\&quot;:1&quot; + &quot;,\\&quot;message\\&quot;:\\&quot;fail\\&quot;\\}&quot;);            }     }   } }  void client_header(EthernetClient *cl) {   cl-&gt;println(&quot;HTTP\/1.1 200 OK&quot;);   cl-&gt;println(&quot;Content-Type: text\/plain&quot;);   cl-&gt;println(&quot;Connection: close&quot;);     cl-&gt;println(); } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0417\u0430\u043b\u0438\u0432\u0430\u0435\u043c, \u0443\u043f\u0430\u043a\u043e\u0432\u044b\u0432\u0430\u0435\u043c \u0432 \u043a\u043e\u0440\u043e\u0431\u043e\u0447\u043a\u0443. \u0412\u0440\u043e\u0434\u0435 \u0431\u044b \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043a\u0440\u0430\u0441\u0438\u0432\u043e, \u043e\u0442\u0434\u0430\u0435\u043c \u0434\u043e\u0431\u0440\u044b\u043c \u043b\u044e\u0434\u044f\u043c.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/db4\/c7b\/f30\/db4c7bf3018aa18445f5d8f46f7b8885.png\" alt=\"image\"\/><\/p>\n<p>  \u0427\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0432 \u043a\u043e\u0434\u0435:<br \/>   \u2014 \u043f\u043e\u0434\u043d\u044f\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u0435\u043d\u044c\u043a\u0438\u0439 http<br \/>   \u2014 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u044b\u0435 GET<br \/>   \u2014 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0447\u0435\u0440\u0435\u0437 SERIAL \u043d\u0430 SIM 900<br \/>   \u2014 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u00abJSON\u00bb<\/p>\n<p>  \u0418 \u0432\u043e\u0442 \u0442\u0443\u0442 \u0435\u0441\u0442\u044c \u043e\u0434\u0438\u043d \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043d\u044e\u0430\u043d\u0441, \u043f\u0435\u0440\u0435\u0434 \u0443\u043c\u043d\u044b\u043c\u0438 \u043b\u044e\u0434\u044c\u043c\u0438 \u0441\u0442\u043e\u0438\u0442 \u0437\u0430\u0434\u0430\u0447\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c \u0441\u0435\u0440\u0432\u0438\u0441, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u044d\u0442\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0441\u0440\u0430\u0437\u0443 \u043f\u0430\u0447\u043a\u0443 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439, \u043d\u043e \u044d\u0442\u043e \u0443\u0436\u0435 \u043d\u0435 \u043c\u043e\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b. \u0412 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0441\u0442\u0432\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0441\u0435\u0431\u044f \u043f\u043e\u0432\u0435\u043b\u043e \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e. <\/p>\n<p>  \u041d\u0430\u0440\u0430\u0449\u0438\u0432\u0430\u0435\u043c \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u0438\u2026 \u0417\u0430\u0434\u0430\u0447\u0430 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u0430\u044f: \u043f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u0435 \u2014 \u043c\u0430\u0442\u044c \u0443\u0447\u0435\u043d\u0438\u044f. \u0423\u043c\u043d\u044b\u0435 \u043b\u044e\u0434\u0438 \u0443\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u043a\u043b\u0430\u0441\u0441\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u043c: \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u0438\u0441\u0442\u043e\u0440\u0438\u044f \u0438 \u043f\u0440\u043e\u0447\u0438\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0441\u0442\u0438. <\/p>\n<p>  \u0418\u0442\u0430\u043a, \u043d\u0430 \u0440\u0443\u043a\u0430\u0445 \u0438\u043c\u0435\u0435\u043c raspberry pi, \u0442\u0430\u043a\u043e\u0439 \u0436\u0435 \u043c\u043e\u0434\u0443\u043b\u044c SIM 900 (\u0431\u044b\u043b \u0432\u0437\u044f\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0434\u0438 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043b\u0438\u043d\u0443\u043a\u0441 \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 3g-\u043c\u043e\u0434\u0435\u043c\u0430\u043c\u0438 \u0447\u0435\u0440\u0435\u0437 USB) \u0438 \u0441\u0430\u043c 3g-modem huawei e-\u043b\u0438\u043d\u0435\u0439\u043a\u0438<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/abe\/439\/99d\/abe43999db553041d1ada411cc3edf09.jpg\" alt=\"image\"\/><\/p>\n<p>  \u0421\u043d\u043e\u0432\u0430 \u0437\u0430\u0434\u0430\u0435\u043c \u0433\u0443\u0433\u043b\u0443 \u043d\u0443\u0436\u043d\u044b\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b, \u0447\u0438\u0442\u0430\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c\u0441\u044f \u0441 \u044f\u0437\u044b\u043a\u043e\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u2014 python \u2014 \u0431\u044b\u0441\u0442\u0440\u043e, \u043f\u0440\u043e\u0441\u0442\u043e, \u043d\u0430\u0434\u0435\u0436\u043d\u043e\u2026<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0441\u043a\u0440\u0438\u043f\u0442<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">import serial, time from flask import Flask import RPi.GPIO as GPIO  app = Flask(__name__)   def sim900_on():     gsm = serial.Serial('\/dev\/ttyAMA0', 115200, timeout=1)     gsm.write('ATZ\\r')     time.sleep(0.05)      abort_after = 5     start = time.time()     output = &quot;&quot;      while True:         output = output + gsm.readline()         if 'OK' in output:             gsm.close()             return True         delta = time.time() - start         if delta &gt;= abort_after:             gsm.close()             break       #GPIO.setwarnings(False)     GPIO.setmode(GPIO.BOARD)                     GPIO.setup(11, GPIO.OUT)                     GPIO.output(11, True)                      time.sleep(1.2)     GPIO.output(11, False)      return False   def gsm_send(id, port, phone, msg):      delay = False     if 'AMA' in port:         delay = True       msg = msg.replace('\\\\n', '\\n')     msg = msg.replace('\\s', ' ')      gsm = serial.Serial('\/dev\/tty%s' % port, 115200, timeout=1)     gsm.write('ATZ\\r')      if delay:         time.sleep(0.05)      gsm.write('AT+CMGF=1\\r\\n')      if delay:         time.sleep(0.05)      gsm.write('AT+CMGS=&quot;%s&quot;\\r\\n' % phone)      if delay:         time.sleep(0.05)      gsm.write(msg + '\\r\\n')      if delay:         time.sleep(0.05)      gsm.write(chr(26))      if delay:         time.sleep(0.05)      abort_after = 15     start = time.time()     output = &quot;&quot;      while True:          output = output + gsm.readline()         #print output         if '+CMGS:' in output:             print output             gsm.close()             return '{&quot;id&quot;:%s,&quot;error&quot;:0,&quot;message&quot;:&quot;success&quot;, &quot;raw&quot;:&quot;%s&quot;}' % (id, output)         if 'ERROR' in output:             print output             gsm.close()             return '{&quot;id&quot;:%s,&quot;error&quot;:0,&quot;message&quot;:&quot;fail&quot;, &quot;raw&quot;:&quot;%s&quot;}' % (id, output)          delta = time.time() - start         if delta &gt;= abort_after:             gsm.close()             return '{&quot;id&quot;:%s,&quot;error&quot;:1,&quot;message&quot;:&quot;timeout&quot;, &quot;raw&quot;:&quot;%s&quot;}' % (id, output)  @app.route('\/sms\/&lt;id&gt;\/&lt;port&gt;\/&lt;phone&gt;\/&lt;msg&gt;',methods=['GET']) def get_data(id, port, phone, msg):     return gsm_send(id, port, phone, msg)  @app.route('\/',methods=['GET']) def index():     return &quot;Hello World&quot;  if __name__ == &quot;__main__&quot;:     sim900_on()     app.run(host=&quot;0.0.0.0&quot;, port=8080, threaded=True)<\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0421\u043a\u0430\u0440\u043c\u043b\u0438\u0432\u0430\u0435\u043c \u043f\u0438\u0442\u043e\u043d\u0443, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u00abstart-stop-daemon\u00bb, \u043f\u0440\u0438\u0434\u0430\u0435\u043c \u0434\u0440\u0443\u0436\u0435\u043b\u044e\u0431\u043d\u044b\u0439 \u0432\u0438\u0434, \u043e\u0442\u0434\u0430\u0435\u043c \u0434\u043e\u0431\u0440\u044b\u043c \u043b\u044e\u0434\u044f\u043c\u2026<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/62e\/996\/2d3\/62e9962d337a9531022ad6fcbed83ff5.png\" alt=\"image\"\/><\/p>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0434\u0438\u043d \u0432 \u043e\u0434\u0438\u043d, \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430 \u0441\u0447\u0435\u0442 \u0448\u0438\u043d\u044b USB \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0442\u044c. \u0412 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0441\u0442\u0432\u0435 \u043f\u0440\u0435\u0442\u0435\u043d\u0437\u0438\u0439 \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u2014 \u0432\u0441\u0435 \u0431\u044b\u043b\u0438 \u041e\u0427\u0415\u041d\u042c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u044b. <\/p>\n<p>  \u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0443\u0434\u0430\u0447\u043d\u044b\u043c, \u0447\u0442\u043e \u043f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c \u0436\u0435\u043b\u0430\u043d\u0438\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e \u0434\u0435\u043b\u043e \u0432 \u00ab\u043b\u0438\u0447\u043d\u044b\u0445\u00bb \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0430\u0445, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u0432\u043d\u0435\u0434\u0440\u0438\u0442\u044c \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u0430\u043f\u043f\u0430\u0440\u0430\u0442. \u041d\u043e \u043d\u0430\u0434\u043e \u0431\u044b\u043b\u043e \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u043e\u0442 \u0433\u043b\u0430\u0432\u043d\u043e\u0433\u043e \u043d\u044e\u0430\u043d\u0441\u0430 \u2014 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439. \u041f\u0440\u0438\u043d\u0446\u0438\u043f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u044f \u0432\u0437\u044f\u043b \u0443 \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u0433\u043e \u0432\u0435\u043d\u0434\u043e\u0440\u0430 (\u043e\u043d \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u043b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e-\u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u044b\u0439 \u043a\u043e\u043c\u043b\u0435\u043a\u0441, \u0447\u0430\u0441\u0442\u044c \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u043b\u0430 smtp-\u0441\u0435\u0440\u0432\u0435\u0440 \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0435\u0435 \u043d\u0430 gsm-\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e). \u0422\u0430\u043a\u0430\u044f \u0441\u0445\u0435\u043c\u0430 \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u043b\u044e\u0431\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430.<\/p>\n<p>  \u0418\u0442\u0430\u043a, \u043d\u0443\u0436\u043d\u044b\u0435 \u0437\u043d\u0430\u043d\u0438\u044f \u0443\u0436\u0435 \u0434\u0430\u0432\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u044b, \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u0435\u043c \u043a \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">SMTP-\u0434\u0435\u043c\u043e\u043d<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">#!\/usr\/bin\/env python2.7 # -*- coding: utf-8 -*-  import smtpd import asyncore import email import MySQLdb import subprocess  def InsertNewMessage(phone, msg):     conn = MySQLdb.connect(host=&quot;localhost&quot;, # your host, usually localhost                      user=&quot;sms&quot;, # your username                       passwd=&quot;sms&quot;, # your password                       db=&quot;sms&quot;) # name of the data base     c = conn.cursor()     c.execute('insert into message_queue (phone, message) values (&quot;%s&quot;, &quot;%s&quot;)' % (phone, msg))     conn.commit()     conn.close()  class CustomSMTPServer(smtpd.SMTPServer):      def process_message(self, peer, mailfrom, rcpttos, data):          msg = email.message_from_string(data)         phone = rcpttos[0].split('@',1)[0]         addr = mailfrom          for part in msg.walk():             if part.get_content_type() == &quot;text\/plain&quot;: # ignore attachments\/html                 body = part.get_payload(decode=True)           InsertNewMessage(phone, str(body))  subprocess.Popen(&quot;\/home\/pi\/daemons\/sms\/pygsmd.py&quot;, shell=True)  server = CustomSMTPServer(('0.0.0.0', 25), None)  asyncore.loop()<\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0414\u0435\u043c\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442, \u043a\u0430\u043a \u044f \u0443\u0436\u0435 \u043f\u0438\u0441\u0430\u043b \u0432\u044b\u0448\u0435, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u00abstart-stop-daemon\u00bb, \u0430 \u0441\u0430\u043c smtp \u0441\u043a\u0440\u0438\u043f\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043f\u043e\u0434\u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0431\u0430\u0437\u043e\u0439 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">gsm \u0441\u043a\u0440\u0438\u043f\u0442<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">#!\/usr\/bin\/env python2.7 # -*- coding: utf-8 -*-  import serial import time import MySQLdb import commands   def gsm_send(port, phone, msg):      print 'Sending message: %s to: %s' % (msg, phone)     gsm = serial.Serial('\/dev\/tty%s' % port,                         460800,                         timeout=5,                         xonxoff = False,                         rtscts = False,                         bytesize = serial.EIGHTBITS,                         parity = serial.PARITY_NONE,                         stopbits = serial.STOPBITS_ONE )     gsm.write('ATZ\\r\\n')     time.sleep(0.05)     gsm.write('AT+CMGF=1\\r\\n')     time.sleep(0.05)     gsm.write('''AT+CMGS=&quot;''' + phone + '''&quot;\\r''')     time.sleep(0.05)     gsm.write(msg + '\\r\\n')     time.sleep(0.05)     gsm.write(chr(26))     time.sleep(0.05)      abort_after = 15     start = time.time()     output = &quot;&quot;       while True:          output = output + gsm.readline()         #print output         if '+CMGS:' in output:             #print output             gsm.close()             return 0         if 'ERROR' in output:             #print output             gsm.close()             return 1          delta = time.time() - start         if delta &gt;= abort_after:             gsm.close()             return 1  def msg_delete(list):     conn = MySQLdb.connect(host=&quot;localhost&quot;,                      user=&quot;sms&quot;,                       passwd=&quot;sms&quot;,                       db=&quot;sms&quot;)     c = conn.cursor()     c.execute(&quot;delete from  message_queue where id in %s;&quot; % list)     conn.commit()     conn.close()  def msg_hadle():     list = tuple()     conn = MySQLdb.connect(host=&quot;localhost&quot;,                      user=&quot;sms&quot;,                       passwd=&quot;sms&quot;,                       db=&quot;sms&quot;)     c = conn.cursor()     c.execute(&quot;select * from message_queue&quot;)      numrows = int(c.rowcount)     if numrows &gt; 0:         for row in c.fetchall():             result = gsm_send('USB0', ('+' +  row[1]),  row[2])             if result == 0:                 list +=(str(row[0]),)      conn.close()      if len(list) == 1:         qlist = str(list).replace(',','')      if len(list) &gt; 1:         qlist = str(list)      if len(list) &gt; 0:         msg_delete(qlist)      del list  while True:     try:         msg_hadle()     except:         print &quot;mysql error&quot;      time.sleep(10)<\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0412 \u0441\u0432\u044f\u0437\u043a\u0435 \u0441 \u043c\u043e\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0432\u0435\u0434\u0435\u0442 \u0441\u0435\u0431\u044f \u0430\u0434\u0435\u043a\u0432\u0430\u0442\u043d\u043e, \u0445\u043e\u0442\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0435 \u0442\u0430\u043a \u0434\u0430\u0432\u043d\u043e. \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u0435\u043d \u043a\u043e\u043c\u0443-\u043d\u0438\u0431\u0443\u0434\u044c.               <\/p>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/261387\/\"> http:\/\/habrahabr.ru\/post\/261387\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       <b>\u041f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e \u0432\u0441\u0435\u0445 \u0445\u0430\u0431\u0440\u043e\u0436\u0438\u0442\u0435\u043b\u0435\u0439!<\/b><\/p>\n<p>  \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u0437\u0430\u043b\u0438\u0437\u0430\u043d\u043d\u0430\u044f \u0442\u0435\u043c\u0430 \u043f\u0440\u043e \u0440\u0430\u0441\u0441\u044b\u043b\u043a\u0443 \u0441\u043c\u0441 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439, \u043d\u043e \u043a\u0430\u043a \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c\u0441\u044f: \u00ab\u043c\u043d\u043e\u0433\u043e \u2014 \u043d\u0435 \u043c\u0430\u043b\u043e\u00bb. \u041a\u0430\u043a-\u0442\u043e \u0442\u0430\u043a \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u043e\u043d\u0430 \u043c\u0435\u043d\u044f \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043f\u0440\u0435\u0441\u043b\u0435\u0434\u0443\u0435\u0442: \u0442\u043e \u043e\u0434\u043d\u0438, \u0442\u043e \u0434\u0440\u0443\u0433\u0438\u0435 \u0434\u043e\u0431\u0440\u044b\u0435 \u043b\u044e\u0434\u0438 \u043f\u043e\u043f\u0440\u043e\u0441\u044f\u0442 \u043f\u0440\u0438\u043d\u044f\u0442\u044c \u0443\u0447\u0430\u0441\u0442\u0438\u0435 (\u0441\u043e\u0432\u0435\u0442\u043e\u043c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440) \u0432 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0431\u044e\u0434\u0436\u0435\u0442\u043d\u043e\u0439 \u0440\u0430\u0441\u0441\u044b\u043b\u043a\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439. \u0418 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u043f\u0440\u043e\u043f\u0430\u0434\u0430\u0442\u044c \u043d\u0430\u043a\u043e\u043f\u043b\u0435\u043d\u043d\u043e\u043c\u0443 \u0434\u043e\u0431\u0440\u0443, \u043e\u0441\u0442\u0430\u0432\u043b\u044e \u0437\u0434\u0435\u0441\u044c, \u0430 \u0432\u0434\u0440\u0443\u0433 \u043a\u043e\u043c\u0443-\u0442\u043e \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f\u2026<\/p>\n<p>  <habracut\/><br \/>  \u0418\u0442\u0430\u043a-\u0441\u2026 \u041e\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0432\u0441\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 \u0431\u0430\u0437\u0435 \u043e\u0431\u044b\u0447\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u0430 \u0438 \u043e\u0441\u0438 \u0441\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u0430 NT. \u0410 \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u0441\u0440\u0430\u0437\u0443 \u043a \u00ab\u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u044b\u043c\u00bb \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u043c. <\/p>\n<p>  \u0427\u0435\u043c \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0445\u0432\u0430\u0441\u0442\u0430\u0442\u044c\u0441\u044f arduino \u0432 \u044d\u0442\u043e\u043c \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438? \u041e\u0442\u0432\u0435\u0447\u0443 \u0441\u0440\u0430\u0437\u0443, \u041e\u041d\u041e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043d\u043e \u0435\u0441\u0442\u044c \u043d\u044e\u0430\u043d\u0441\u044b, \u043e \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0430\u043f\u0438\u0448\u0443 \u043d\u0438\u0436\u0435. \u0412\u043e\u043e\u0431\u0449\u0435\u043c, \u0438\u043c\u0435\u0435\u043c \u043a\u0438\u0442\u0430\u0439\u0441\u043a\u0438\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 arduino 2560 (\u0431\u044b\u043b\u043e \u043f\u0435\u0440\u0435\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043d\u043e \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0441\u044f \u043b\u0438\u043d\u0435\u0439\u043a\u0430) \u0438 \u0434\u0432\u0430 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u044f \u2014 \u0441\u0435\u0442\u044c W5100 (\u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442) \u0438 GSM SIM 900. \u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u044d\u0442\u043e \u0432\u0441\u0435 \u0434\u0435\u043b\u043e \u043a\u0430\u043a-\u0442\u043e \u0442\u0430\u043a.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/2c8\/ead\/201\/2c8ead2011b102984e5b8d84ba22f682.png\" alt=\"image\"\/><\/p>\n<p>  \u0417\u0430\u0434\u0430\u0447\u0430 \u0431\u044b\u043b\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f:<br \/>   \u2014 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u0443\u043c\u0435\u0442\u044c \u043e\u0431\u0449\u0430\u0442\u044c\u0441\u044f \u043f\u043e http<br \/>   \u2014 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435<br \/>   \u2014 \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 json<\/p>\n<p>  \u0413\u0443\u0433\u043b \u0434\u0435\u043b\u0438\u0442\u0441\u044f \u0432\u0441\u0435\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439, \u0438 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0421\u043a\u0435\u0442\u0447<\/b><\/p>\n<div class=\"spoiler_text\">\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-267703","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/267703","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=267703"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/267703\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=267703"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=267703"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=267703"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}