Skip to content
  • Home
  • Aktuell
  • Tags
  • 0 Ungelesen 0
  • Kategorien
  • Unreplied
  • Beliebt
  • GitHub
  • Docu
  • Hilfe
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Standard: (Kein Skin)
  • Kein Skin
Einklappen
ioBroker Logo

Community Forum

donate donate
  1. ioBroker Community Home
  2. Русский
  3. ioBroker
  4. ioBroker драйвера
  5. Node red

NEWS

  • Weihnachtsangebot 2025! 🎄
    BluefoxB
    Bluefox
    22
    1
    1.0k

  • UPDATE 31.10.: Amazon Alexa - ioBroker Skill läuft aus ?
    apollon77A
    apollon77
    48
    3
    9.1k

  • Monatsrückblick – September 2025
    BluefoxB
    Bluefox
    14
    1
    2.4k

Node red

Geplant Angeheftet Gesperrt Verschoben ioBroker драйвера
74 Beiträge 8 Kommentatoren 20.6k Aufrufe
  • Älteste zuerst
  • Neuste zuerst
  • Meiste Stimmen
Antworten
  • In einem neuen Thema antworten
Anmelden zum Antworten
Dieses Thema wurde gelöscht. Nur Nutzer mit entsprechenden Rechten können es sehen.
  • BluefoxB Offline
    BluefoxB Offline
    Bluefox
    schrieb am zuletzt editiert von
    #17

    @aurodionov:

    Чего-то много ерор при обновлении

    ! 2015-05-17 13:22:12.380 - info: iobroker upgrade node-red
    ! 2015-05-17 13:22:13.178 - info: iobroker npm install iobroker.node-red –production --prefix "/opt/iobroker" (System call)
    ! 2015-05-17 13:22:45.762 - info: iobroker ../node-icu-charset-detector.cpp:5:28: fatal error: unicode/ucsdet.h: Нет такого файла или каталогаcompilation terminated.
    ! 2015-05-17 13:22:46.220 - info: iobroker make: *** [Release/obj.target/node-icu-charset-detector/node-icu-charset-detector.o] Ошибка 1
    ! 2015-05-17 13:22:46.230 - info: iobroker gyp
    ! 2015-05-17 13:22:46.237 - info: iobroker
    ! 2015-05-17 13:22:46.241 - info: iobroker ERR!
    ! 2015-05-17 13:22:46.250 - info: iobroker build error
    ! 2015-05-17 13:22:46.264 - info: iobroker gyp
    ! 2015-05-17 13:22:46.268 - info: iobroker
    ! 2015-05-17 13:22:46.273 - info: iobroker ERR!
    ! 2015-05-17 13:22:46.278 - info: iobroker stack
    ! 2015-05-17 13:22:46.291 - info: iobroker Error: make failed with exit code: 2gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
    ! gyp ERR! stack at ChildProcess.emit (events.js:98:17)
    ! 2015-05-17 13:22:46.294 - info: iobroker gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:809:12)
    ! 2015-05-17 13:22:46.321 - info: iobroker gyp ERR! System Linux 3.2.0-4-686-paegyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
    ! gyp ERR! cwd /opt/iobroker/node_modules/iobroker.node-red/node_modules/node-red/node_modules/irc/node_modules/node-icu-charset-detector
    ! gyp ERR! node -v v0.10.29
    ! gyp ERR! node-gyp -v v0.13.1
    ! gyp ERR! not ok
    ! 2015-05-17 13:22:55.479 - info: iobroker npm
    ! 2015-05-17 13:22:55.485 - info: iobroker WARN optional dep failed, continuing
    ! 2015-05-17 13:22:55.488 - info: iobroker node-icu-charset-detector@0.0.7
    ! 2015-05-17 13:24:24.671 - info: iobroker npm install –production --prefix "/opt/iobroker/node_modules/iobroker.node-red" (System call)
    ! 2015-05-17 13:24:29.783 - info: iobroker got /opt/iobroker/node_modules/iobroker.node-red/admin
    ! 2015-05-17 13:24:29.812 - info: host.SmartHome object change system.adapter.node-red.0
    ! 2015-05-17 13:24:29.812 - info: host.SmartHome stopInstance system.adapter.node-red.0
    ! 2015-05-17 13:24:29.821 - info: iobroker upload node-red.admin /opt/iobroker/node_modules/iobroker.node-red/admin/node-red.png node-red.png image/png
    ! 2015-05-17 13:24:29.816 - info: node-red.0 kill node-red task
    ! 2015-05-17 13:24:29.900 - info: iobroker upload node-red.admin /opt/iobroker/node_modules/iobroker.node-red/admin/index.html index.html text/html
    ! 2015-05-17 13:24:29.961 - info: iobroker Adapter "node-red" updated
    ! 2015-05-17 13:24:29.971 - info: iobroker exit 0
    ! 2015-05-17 13:24:30.348 - info: node-red.0 node-red exited with 0
    ! 2015-05-17 13:24:30.821 - info: host.SmartHome stopInstance system.adapter.node-red.0 killing pid 26077
    ! 2015-05-17 13:24:30.828 - info: node-red.0 terminating
    ! 2015-05-17 13:24:30.845 - info: host.SmartHome instance system.adapter.node-red.0 terminated with code 0 (OK)
    ! 2015-05-17 13:24:33.333 - info: host.SmartHome instance system.adapter.node-red.0 started with pid 28634
    ! 2015-05-17 13:24:34.197 - info: node-red.0 starting. Version 0.2.1 in /opt/iobroker/node_modules/iobroker.node-red
    ! 2015-05-17 13:24:34.319 - info: node-red.0 Starting node-red: /opt/iobroker/node_modules/iobroker.node-red/node_modules/node-red/red.js -v --settings /opt/iobroker/node_modules/iobroker.node-red/userdata/settings.js
    ! 2015-05-17 13:24:39.682 - warn: node-red.0 17 May 13:24:39 - [warn] –----------------------------------------
    ! 2015-05-17 13:24:39.684 - warn: node-red.0 17 May 13:24:39 - [warn] [arduino] Error: Cannot find module 'arduino-firmata'
    ! 2015-05-17 13:24:39.686 - warn: node-red.0 17 May 13:24:39 - [warn] [rpi-gpio] Info : Ignoring Raspberry Pi specific node.
    ! 17 May 13:24:39 - [warn] [redisout] Error: Cannot find module 'redis'
    ! 17 May 13:24:39 - [warn] –----------------------------------------
    Или это норма и не стоит паниковать. `
    Если работает, то не стоит :)

    1 Antwort Letzte Antwort
    0
    • I Offline
      I Offline
      instalator
      schrieb am zuletzt editiert von
      #18

      @Bluefox:

      Интересно…

      Ты устанавливал serialport ручками?

      Удали папку 'c:\ioBroker\node_modules\iobroker.node-red\node_modules\node-red\node_modules\serialport' ручками или скорей всего просто деактивируй node-red и обнови.

      Я думаю, что бинарный файл 'c:\ioBroker\node_modules\iobroker.node-red\node_modules\node-red\node_modules\serialport\build\serialport\v1.4.10\Release\node-v11-win32-ia32\serialport.node в использовании и система не может его удалить. `

      Руками не ставил, в ноде игрался с сериалом.

      Дело в том что у меня исчезла стрелка обновления, брокер пишет что нод не установлен (версию не отображает), хотя в списке установленых драйверов он есть. На вкладку нод ред нажимаю ругается на таймаут

      Высокий уровень Децибел вреден для здоровья!

      http://blog.instalator.ru/

      1 Antwort Letzte Antwort
      0
      • BluefoxB Offline
        BluefoxB Offline
        Bluefox
        schrieb am zuletzt editiert von
        #19

        Напиши просто в 'c:\ioBroker\

        iobroker stop
        npm install iobroker.node-red
        iobroker.start
        
        
        1 Antwort Letzte Antwort
        0
        • E Offline
          E Offline
          electric69
          schrieb am zuletzt editiert von
          #20

          При обновлении в логе ошибки.

          При этом адаптер уходит в циклицескую перезагрузку.

          Даже плату вешает, ssh тормозит))
          50_pic_127.jpg
          50_pic_128.jpg

          1 Antwort Letzte Antwort
          0
          • BluefoxB Offline
            BluefoxB Offline
            Bluefox
            schrieb am zuletzt editiert von
            #21

            @electric69:

            При обновлении в логе ошибки.

            При этом адаптер уходит в циклицескую перезагрузку.

            Даже плату вешает, ssh тормозит)) `
            Выполни

            cd /opt/iobroker
            npm install iobroker.node-red
            
            

            Важно! Сохрани перед этим все свои flows!!!

            1 Antwort Letzte Antwort
            0
            • E Offline
              E Offline
              electric69
              schrieb am zuletzt editiert von
              #22

              @Bluefox:

              @electric69:

              При обновлении в логе ошибки.

              При этом адаптер уходит в циклицескую перезагрузку.

              Даже плату вешает, ssh тормозит)) `
              Выполни

              cd /opt/iobroker
              npm install iobroker.node-red
              
              

              Важно! Сохрани перед этим все свои flows!!! `
              flows у меня не было пока никаких))

              Не найду норм. примеров в инете, чтобы попробовать этот node-red.

              Установка из консоли тоже дала ошибки, но прошла до завершения.
              50_pic_129.jpg

              1 Antwort Letzte Antwort
              0
              • BluefoxB Offline
                BluefoxB Offline
                Bluefox
                schrieb am zuletzt editiert von
                #23

                node-red пытается установить несколько опциональных модулей (oprional dep) и не может.

                Но это не страшно.

                1 Antwort Letzte Antwort
                0
                • I Offline
                  I Offline
                  instalator
                  schrieb am zuletzt editiert von
                  #24

                  @Bluefox:

                  Напиши просто в 'c:\ioBroker\

                  iobroker stop
                  npm install iobroker.node-red
                  iobroker.start
                  
                  ```` `  
                  

                  Поставился, только все что было пропало.
                  @Bluefox:

                  Важно! Сохрани перед этим все свои flows!!! `
                  А как их сохранить если Node-red перестал запускатся при предыдущей попытке обновить? Автоматически не бэкапятся?

                  Высокий уровень Децибел вреден для здоровья!

                  http://blog.instalator.ru/

                  1 Antwort Letzte Antwort
                  0
                  • BluefoxB Offline
                    BluefoxB Offline
                    Bluefox
                    schrieb am zuletzt editiert von
                    #25

                    Ну на будущее:

                    /opt/iobroker/node_modules/iobroker.node-red/userdata/flows.json

                    Я, кстати, в новой версии убрал flows из папки, где они могут удалиться и переместил их в

                    /opt/iobroker/iobroker-data/node-red/flows.json

                    Можешь попробовать новую версию?

                    cd /opt/iobroker
                    ./iobroker stop node-red.0
                    npm install https://github.com/ioBroker/ioBroker.node-red/tarball/master
                    ./iobroker start node-red.0
                    
                    

                    Важно! Сохрани перед этим все свои flows!!!

                    1 Antwort Letzte Antwort
                    0
                    • I Offline
                      I Offline
                      instalator
                      schrieb am zuletzt editiert von
                      #26

                      Не получается у меня вытянуть sessionid. Что я делаю не так? Где вообще почитать можно про нод ред? На каком языке пишутся функции?

                      ! [{"id":"b7d37336.482c9","type":"inject","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":86,"y":100,"z":"865a081c.79a5f8","wires":[["6368c27e.9c973c"]]},{"id":"62c44e09.9d3bb","type":"debug","name":"","active":true,"console":"false","complete":"false","x":597,"y":160,"z":"865a081c.79a5f8","wires":[]},{"id":"6368c27e.9c973c","type":"http request","name":"","method":"GET","ret":"txt","url":"https://www.sistemagorod.ru/lk/":[["f057ea4b.0fa818","3d13c92d.c2ec36"]]},{"id":"f057ea4b.0fa818","type":"function","name":"","func":"if (msg.payload.indexOf('")[1];\n\n return [msg];\n }\n","outputs":1,"valid":true,"x":415,"y":64,"z":"865a081c.79a5f8","wires":[["62c44e09.9d3bb"]]},{"id":"3d13c92d.c2ec36","type":"debug","name":"","active":true,"console":"false","complete":"false","x":429,"y":233,"z":"865a081c.79a5f8","wires":[]}]

                      Вроде что то получилось, но не знаю как избавиться от мусора в конце:

                      ! [{"id":"b7d37336.482c9","type":"inject","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":86,"y":100,"z":"865a081c.79a5f8","wires":[["6368c27e.9c973c"]]},{"id":"62c44e09.9d3bb","type":"debug","name":"","active":true,"console":"false","complete":"false","x":597,"y":160,"z":"865a081c.79a5f8","wires":[]},{"id":"6368c27e.9c973c","type":"http request","name":"","method":"GET","ret":"txt","url":"https://www.sistemagorod.ru/lk/":[["f057ea4b.0fa818","3d13c92d.c2ec36"]]},{"id":"f057ea4b.0fa818","type":"function","name":"","func":"if (~msg.payload.indexOf('")[0];\n// msg.payload.frequency = parseFloat(words[2].split(":")[1]);\n// msg.payload.time = words[1].split(">")[1];\n\n return [msg];\n }\n","outputs":1,"valid":true,"x":415,"y":64,"z":"865a081c.79a5f8","wires":[["62c44e09.9d3bb"]]},{"id":"3d13c92d.c2ec36","type":"debug","name":"","active":true,"console":"false","complete":"false","x":429,"y":233,"z":"865a081c.79a5f8","wires":[]}]

                      Победил):

                      ! [{"id":"b7d37336.482c9","type":"inject","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":94,"y":100,"z":"865a081c.79a5f8","wires":[["6368c27e.9c973c"]]},{"id":"62c44e09.9d3bb","type":"debug","name":"SessionId","active":true,"console":"false","complete":"payload","x":636,"y":99,"z":"865a081c.79a5f8","wires":[]},{"id":"6368c27e.9c973c","type":"http request","name":"","method":"GET","ret":"txt","url":"https://www.sistemagorod.ru/lk/":[["f057ea4b.0fa818"]]},{"id":"f057ea4b.0fa818","type":"function","name":"sessionid","func":"if (~msg.payload.indexOf('

                      Теперь как передать sessionid в пост запросе вообще не понятно.

                      Высокий уровень Децибел вреден для здоровья!

                      http://blog.instalator.ru/

                      1 Antwort Letzte Antwort
                      0
                      • I Offline
                        I Offline
                        instalator
                        schrieb am zuletzt editiert von
                        #27

                        Передается ли заголовок?

                        ! [{"id":"b7d37336.482c9","type":"inject","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":94,"y":100,"z":"865a081c.79a5f8","wires":[["6368c27e.9c973c"]]},{"id":"6368c27e.9c973c","type":"http request","name":"","method":"GET","ret":"txt","url":"https://www.sistemagorod.ru/lk/":[["f057ea4b.0fa818"]]},{"id":"f057ea4b.0fa818","type":"function","name":"sessionid","func":"if (~msg.payload.indexOf('<link_text text="https://www.sistemagorod.ru/lk/auth?typ … pin=xxxx\n">https://www.sistemagorod.ru/lk/auth?type-auth=phone&answer-captcha=&phone=xxxx&pin=xxxx\n</link_text> msg.headers = {\n 'Origin': 'https://www.sistemagorod.ru',\n 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36',\n 'Content-Type': 'application/x-www-form-urlencoded',\n 'Referer': 'https://www.sistemagorod.ru/lk/%27,%5Cn 'Cookie': 'JSESSIONID=' + msg.sessionid\n }\n\n var url= "https://www.sistemagorod.ru/lk/auth?typ ... n\nmsg.url = url;\n\nreturn msg;","outputs":1,"valid":true,"x":93,"y":179,"z":"865a081c.79a5f8","wires":[["ef96486b.1069b8"]]},{"id":"ef96486b.1069b8","type":"http request","name":"","method":"POST","ret":"txt","url":"","x":232,"y":183,"z":"865a081c.79a5f8","wires":[["62c44e09.9d3bb","5bc33d6.fa43cc4"]]}]

                        авторизация вроде проходит <response><state>ok</state></response>

                        но на следующую страницу не пускает.

                        Продолжение…

                        Выводит в дебаг непонятную кодировку

                        ! [msg.payload] : string
                        ! ��<ko�v������cr�i*?��)��6�����apԕę"u��� ���/�����Τi��o���/cy�$�i�d�="��!">%%���L�����s���s��=sf���ܸ���?&�\������>�t�p|��ϋ��ū��%�X"WuQ5dS�TQ)>��#\�4[�BaggG�Y4�^��O���T� ��T��Un�<���G�����qf��{��[/spoiler]</ko�v������cr�i*?��)��6�����apԕę"u���>

                        Высокий уровень Децибел вреден для здоровья!

                        http://blog.instalator.ru/

                        1 Antwort Letzte Antwort
                        0
                        • I Offline
                          I Offline
                          instalator
                          schrieb am zuletzt editiert von
                          #28

                          Как распарсить заголовок ответа от сервера??? sessionid оказывается надо брать после авторизации из заголовка ответа.

                          Получилось вытянть из заголовка Разные парраметры, но "set-cookie" никак не могу

                          { "topic": "", "payload": "\r\n<response>\r\n <state>captcha-needed</state>\r\n</response>\r\n\r\n", "_msgid": "f9ba9259.06457", "sessionid": "6E14E8C7BF3AFDE8E63FBF0EA015BFB4", "headers": { "date": "Sun, 24 May 2015 13:07:42 GMT", "server": "Apache/2.4.7 (Ubuntu)", "content-length": "100", "set-cookie": [ "JSESSIONID=61D7BF78F3FBE2665E9FAF0AC2BA1F93; Path=/lk/; Secure; HttpOnly" ], "keep-alive": "timeout=5, max=100", "connection": "Keep-Alive", "content-type": "text/plain" }, "url": "https://www.sistemagorod.ru/lk/auth?typ … x&pin=xxxx", "statusCode": 200 }

                          Bluefox выручай!!!

                          Высокий уровень Децибел вреден для здоровья!

                          http://blog.instalator.ru/

                          1 Antwort Letzte Antwort
                          0
                          • BluefoxB Offline
                            BluefoxB Offline
                            Bluefox
                            schrieb am zuletzt editiert von
                            #29

                            @instalator:

                            Передается ли заголовок?

                            ! [{"id":"b7d37336.482c9","type":"inject","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":94,"y":100,"z":"865a081c.79a5f8","wires":[["6368c27e.9c973c"]]},{"id":"6368c27e.9c973c","type":"http request","name":"","method":"GET","ret":"txt","url":"https://www.sistemagorod.ru/lk/":[["f057ea4b.0fa818"]]},{"id":"f057ea4b.0fa818","type":"function","name":"sessionid","func":"if (~msg.payload.indexOf('<link_text text="https://www.sistemagorod.ru/lk/auth?typ … pin=xxxx\n">https://www.sistemagorod.ru/lk/auth?type-auth=phone&answer-captcha=&phone=xxxx&pin=xxxx\n</link_text> msg.headers = {\n 'Origin': 'https://www.sistemagorod.ru',\n 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36',\n 'Content-Type': 'application/x-www-form-urlencoded',\n 'Referer': 'https://www.sistemagorod.ru/lk/%27,%5Cn 'Cookie': 'JSESSIONID=' + msg.sessionid\n }\n\n var url= "https://www.sistemagorod.ru/lk/auth?typ ... n\nmsg.url = url;\n\nreturn msg;","outputs":1,"valid":true,"x":93,"y":179,"z":"865a081c.79a5f8","wires":[["ef96486b.1069b8"]]},{"id":"ef96486b.1069b8","type":"http request","name":"","method":"POST","ret":"txt","url":"","x":232,"y":183,"z":"865a081c.79a5f8","wires":[["62c44e09.9d3bb","5bc33d6.fa43cc4"]]}]

                            авторизация вроде проходит <response><state>ok</state></response>

                            но на следующую страницу не пускает.

                            Продолжение…

                            Выводит в дебаг непонятную кодировку

                            ! [msg.payload] : string
                            ! ��<ko�v������cr�i*?��)��6�����apԕę"u��� ���/�����Τi��o���/cy�$�i�d�="��!">%%���L�����s���s��=sf���ܸ���?&�\������>�t�p|��ϋ��ū��%�X"WuQ5dS�TQ)>��#\�4[�BaggG�Y4�^��O���T� ��T��Un�<���G�����qf��{��[/spoiler]</ko�v������cr�i*?��)��6�����apԕę"u���>
                            Я не нашел в твоём flow вывода в дебаг.

                            Может стринг не в utf-8? При конвертировании в стринг можно указать кодировку.

                            'ascii' - for 7 bit ASCII data only. This encoding method is very fast, and will strip the high bit if set.
                            'utf8' - Multibyte encoded Unicode characters. Many web pages and other document formats use UTF-8.
                            'utf16le' - 2 or 4 bytes, little endian encoded Unicode characters. Surrogate pairs (U+10000 to U+10FFFF) are supported.
                            'ucs2' - Alias of 'utf16le'.
                            'base64' - Base64 string encoding.
                            'binary' - 
                            
                            

                            'hex' - Encode each byte as two hexadecimal characters. `

                            1 Antwort Letzte Antwort
                            0
                            • I Offline
                              I Offline
                              instalator
                              schrieb am zuletzt editiert von
                              #30

                              Да проблема сейчас в другом. Я не могу получить sessionid из ответного заголовка от сервера. Авторизоваться у меня получилось в ответ приходит заголовок с sessionid вот его надо как то вырвать для дальнейшей навигации по страницам. Помогай, мозг кипит…

                              Это ответ от сервера

                              ! { "topic": "", "payload": "\r\n<response>\r\n <state>ok</state>\r\n</response>\r\n\r\n", "_msgid": "c27391e4.3d8c7", "sessionid": "6E14E8C7BF3AFDE8E63FBF0EA015BFB4", "headers": { "date": "Sun, 24 May 2015 17:59:17 GMT", "server": "Apache/2.4.7 (Ubuntu)", "content-length": "88", "set-cookie": [ "JSESSIONID=6385A1C965987A3FAA6131DD153D2EE1; Path=/lk/; Secure; HttpOnly" ], "keep-alive": "timeout=5, max=100", "connection": "Keep-Alive", "content-type": "text/plain" }, "url": "https://www.sistemagorod.ru/lk/auth?typ … x&pin=xxxx", "statusCode": 200 }

                              Нужно как то получить JSESSIONID=6385A1C965987A3FAA6131DD153D2EE1 это валидный id

                              Высокий уровень Децибел вреден для здоровья!

                              http://blog.instalator.ru/

                              1 Antwort Letzte Antwort
                              0
                              • I Offline
                                I Offline
                                instalator
                                schrieb am zuletzt editiert von
                                #31
                                [{"id":"b7d37336.482c9","type":"inject","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":92,"y":81,"z":"865a081c.79a5f8","wires":[["b614a670.49eb58"]]},{"id":"b614a670.49eb58","type":"function","name":"Авторизация","func":"msg.sessionid = context.global.sessionid;\n msg.headers = {\n            'Host': 'www.sistemagorod.ru',\n            'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0',\n            'Accept': '*/*',\n            'Accept-Language': 'ru-RU,ru;q=0.8,en-US;q=0.5,en;q=0.3',\n            'Accept-Encoding': 'gzip, deflate',\n            'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',\n            'X-Requested-With': 'XMLHttpRequest',\n            'Referer': 'https://www.sistemagorod.ru/lk/',\n            'Cookie': 'JSESSIONID='+ msg.sessionid,\n            'Connection': 'keep-alive',\n            'Pragma': 'no-cache',\n            'Cache-Control': 'no-cache'\n        }\n        \n\n  var url= \"https://www.sistemagorod.ru/lk/auth?type-auth=phone&answer-captcha=&phone=xxxx&pin=xxxx\";\n\nmsg.url = url;\nreturn msg;","outputs":1,"valid":true,"x":132.55555725097656,"y":139.11111450195312,"z":"865a081c.79a5f8","wires":[["ef96486b.1069b8"]]},{"id":"ef96486b.1069b8","type":"http request","name":"","method":"POST","ret":"txt","url":"","x":309.7777900695801,"y":139.22221565246582,"z":"865a081c.79a5f8","wires":[["ad6096b4.529f68","62c44e09.9d3bb","a452cdcd.5bad3"]]},{"id":"ad6096b4.529f68","type":"debug","name":"","active":true,"console":"false","complete":"true","x":602.5555419921875,"y":209,"z":"865a081c.79a5f8","wires":[]}]
                                

                                Высокий уровень Децибел вреден для здоровья!

                                http://blog.instalator.ru/

                                1 Antwort Letzte Antwort
                                0
                                • I Offline
                                  I Offline
                                  instalator
                                  schrieb am zuletzt editiert von
                                  #32

                                  Кто нибудь помоги мне :cry:

                                  Высокий уровень Децибел вреден для здоровья!

                                  http://blog.instalator.ru/

                                  1 Antwort Letzte Antwort
                                  0
                                  • BluefoxB Offline
                                    BluefoxB Offline
                                    Bluefox
                                    schrieb am zuletzt editiert von
                                    #33

                                    @instalator:

                                    Кто нибудь помоги мне :cry: `
                                    Я не могу помочь, т.к. мне не хватает информации.

                                    Что это такое?

                                    { "topic": "", "payload": "\r\n<response>\r\n <state>ok</state>\r\n</response>\r\n\r\n", "_msgid": "c27391e4.3d8c7", "sessionid": "6E14E8C7BF3AFDE8E63FBF0EA015BFB4", "headers": { "date": "Sun, 24 May 2015 17:59:17 GMT", "server": "Apache/2.4.7 (Ubuntu)", "content-length": "88", "set-cookie": [ "JSESSIONID=6385A1C965987A3FAA6131DD153D2EE1; Path=/lk/; Secure; HttpOnly" ], "keep-alive": "timeout=5, max=100", "connection": "Keep-Alive", "content-type": "text/plain" }, "url": "https://www.sistemagorod.ru/lk/auth?type-auth=phone&answer-captcha=&phone=xxxx&pin=xxxx", "statusCode": 200 }
                                    

                                    Ответ от чего? Откуда все эти цифры?

                                    Если это какой то объект, то JSESSIONID извлекается так:

                                    [{"id":"185e8fcd.e7a17","type":"function","name":"Extract SessionID","func":"\nvar obj = { \"topic\": \"\", \"payload\": \"\\r\\n<response>\\r\\n <state>ok</state>\\r\\n</response>\\r\\n\\r\\n\", \"_msgid\": \"c27391e4.3d8c7\", \"sessionid\": \"6E14E8C7BF3AFDE8E63FBF0EA015BFB4\", \"headers\": { \"date\": \"Sun, 24 May 2015 17:59:17 GMT\", \"server\": \"Apache/2.4.7 (Ubuntu)\", \"content-length\": \"88\", \"set-cookie\": [ \"JSESSIONID=6385A1C965987A3FAA6131DD153D2EE1; Path=/lk/; Secure; HttpOnly\" ], \"keep-alive\": \"timeout=5, max=100\", \"connection\": \"Keep-Alive\", \"content-type\": \"text/plain\" }, \"url\": \"https://www.sistemagorod.ru/lk/auth?type-auth=phone&answer-captcha=&phone=xxxx&pin=xxxx\", \"statusCode\": 200 };\n\nvar cookies = obj.headers[\"set-cookie\"][0];\nvar m = cookies.match(/JSESSIONID=([\\w\\d]*)/);\nif (m) {\n    msg.payload = m[1];\n    return msg;\n}\n\n\n","outputs":1,"x":372,"y":367,"z":"e90d20bf.16f2e","wires":[["35779b1d.ca8864"]]},{"id":"35779b1d.ca8864","type":"debug","name":"","active":true,"console":"false","complete":"false","x":546,"y":366,"z":"e90d20bf.16f2e","wires":[]},{"id":"89d64003.7629c","type":"inject","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":214,"y":368,"z":"e90d20bf.16f2e","wires":[["185e8fcd.e7a17"]]}]
                                    
                                    
                                    1 Antwort Letzte Antwort
                                    0
                                    • I Offline
                                      I Offline
                                      instalator
                                      schrieb am zuletzt editiert von
                                      #34

                                      @Bluefox:

                                      @instalator:

                                      Кто нибудь помоги мне :cry: `
                                      Я не могу помочь, т.к. мне не хватает информации.

                                      Что это такое?

                                      { "topic": "", "payload": "\r\n<response>\r\n <state>ok</state>\r\n</response>\r\n\r\n", "_msgid": "c27391e4.3d8c7", "sessionid": "6E14E8C7BF3AFDE8E63FBF0EA015BFB4", "headers": { "date": "Sun, 24 May 2015 17:59:17 GMT", "server": "Apache/2.4.7 (Ubuntu)", "content-length": "88", "set-cookie": [ "JSESSIONID=6385A1C965987A3FAA6131DD153D2EE1; Path=/lk/; Secure; HttpOnly" ], "keep-alive": "timeout=5, max=100", "connection": "Keep-Alive", "content-type": "text/plain" }, "url": "https://www.sistemagorod.ru/lk/auth?type-auth=phone&answer-captcha=&phone=xxxx&pin=xxxx", "statusCode": 200 }
                                      

                                      Ответ от чего? Откуда все эти цифры? `
                                      Это ответ от сервера, точнее то что вывелось в дэбаг (как объект я понимаю).
                                      @Bluefox:

                                      Если это какой то объект, то JSESSIONID извлекается так:

                                      [{"id":"185e8fcd.e7a17","type":"function","name":"Extract SessionID","func":"\nvar obj = { \"topic\": \"\", \"payload\": \"\\r\\n<response>\\r\\n <state>ok</state>\\r\\n</response>\\r\\n\\r\\n\", \"_msgid\": \"c27391e4.3d8c7\", \"sessionid\": \"6E14E8C7BF3AFDE8E63FBF0EA015BFB4\", \"headers\": { \"date\": \"Sun, 24 May 2015 17:59:17 GMT\", \"server\": \"Apache/2.4.7 (Ubuntu)\", \"content-length\": \"88\", \"set-cookie\": [ \"JSESSIONID=6385A1C965987A3FAA6131DD153D2EE1; Path=/lk/; Secure; HttpOnly\" ], \"keep-alive\": \"timeout=5, max=100\", \"connection\": \"Keep-Alive\", \"content-type\": \"text/plain\" }, \"url\": \"https://www.sistemagorod.ru/lk/auth?type-auth=phone&answer-captcha=&phone=xxxx&pin=xxxx\", \"statusCode\": 200 };\n\nvar cookies = obj.headers[\"set-cookie\"][0];\nvar m = cookies.match(/JSESSIONID=([\\w\\d]*)/);\nif (m) {\n    msg.payload = m[1];\n    return msg;\n}\n\n\n","outputs":1,"x":372,"y":367,"z":"e90d20bf.16f2e","wires":[["35779b1d.ca8864"]]},{"id":"35779b1d.ca8864","type":"debug","name":"","active":true,"console":"false","complete":"false","x":546,"y":366,"z":"e90d20bf.16f2e","wires":[]},{"id":"89d64003.7629c","type":"inject","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":214,"y":368,"z":"e90d20bf.16f2e","wires":[["185e8fcd.e7a17"]]}]
                                      
                                      ```` `  
                                      

                                      Вот что в дебаге:

                                      ! 25.05.2015, 20:12:47[ad6096b4.529f68]
                                      ! [msg] : object
                                      ! { "topic": "", "payload": "\r\n<response>\r\n <state>ok</state>\r\n</response>\r\n\r\n", "_msgid": "ca7e0ab8.3581f8", "sessionid": "6E14E8C7BF3AFDE8E63FBF0EA015BFB4", "headers": { "date": "Mon, 25 May 2015 14:14:39 GMT", "server": "Apache/2.4.7 (Ubuntu)", "content-length": "88", "set-cookie": [ "JSESSIONID=284831E2FED469FC5B52751B6FC8960C; Path=/lk/; Secure; HttpOnly" ], "keep-alive": "timeout=5, max=100", "connection": "Keep-Alive", "content-type": "text/plain" }, "url": "https://www.sistemagorod.ru/lk/auth?typ … xx&pin=xxx", "statusCode": 200 }
                                      ! 25.05.2015, 20:12:47[SessionId]
                                      ! [msg.payload] : string
                                      ! <response><state>ok</state></response>
                                      Первое это ответ от сервера [msg] : object.

                                      Второе [msg.payload] (Этот же ответ).

                                      Как мне вставить объект в переменную var obj = { "topic": "", "payload": …...?

                                      var obj = msg.payload ( но в msg.payload только : <response><state>ok</state></response> и там нет заголовков....

                                      Если написать:

                                      var obj = msg.object

                                      то в дебаге вот что:

                                      TypeError: Cannot read property 'headers' of undefined (line 4, col 18)

                                      Высокий уровень Децибел вреден для здоровья!

                                      http://blog.instalator.ru/

                                      1 Antwort Letzte Antwort
                                      0
                                      • BluefoxB Offline
                                        BluefoxB Offline
                                        Bluefox
                                        schrieb am zuletzt editiert von
                                        #35

                                        Всё я уже голову сломал…

                                        Запости здесь ВСЮ цепочку. Телефон и пин в личку.

                                        Я не могу по отдельным цепочкам догадыватся, что где выводиться. Уходит ОЧЕНЬ много времени.

                                        1 Antwort Letzte Antwort
                                        0
                                        • I Offline
                                          I Offline
                                          instalator
                                          schrieb am zuletzt editiert von
                                          #36

                                          @Bluefox:

                                          Всё я уже голову сломал…

                                          Запости здесь ВСЮ цепочку. Телефон и пин в личку.

                                          Я не могу по отдельным цепочкам догадыватся, что где выводиться. Уходит ОЧЕНЬ много времени. `

                                          [{"id":"b7d37336.482c9","type":"inject","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":92,"y":81,"z":"865a081c.79a5f8","wires":[["b614a670.49eb58"]]},{"id":"b614a670.49eb58","type":"function","name":"Авторизация","func":"msg.sessionid = context.global.sessionid;\n msg.headers = {\n            'Host': 'www.sistemagorod.ru',\n            'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0',\n            'Accept': '*/*',\n            'Accept-Language': 'ru-RU,ru;q=0.8,en-US;q=0.5,en;q=0.3',\n            'Accept-Encoding': 'gzip, deflate',\n            'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',\n            'X-Requested-With': 'XMLHttpRequest',\n            'Referer': 'https://www.sistemagorod.ru/lk/',\n            'Cookie': 'JSESSIONID='+ msg.sessionid,\n            'Connection': 'keep-alive',\n            'Pragma': 'no-cache',\n            'Cache-Control': 'no-cache'\n        }\n        \n\n  var url= \"https://www.sistemagorod.ru/lk/auth?type-auth=phone&answer-captcha=&phone=xxx&pin=xxx\";\n\nmsg.url = url;\nreturn msg;","outputs":1,"valid":true,"x":128.55555725097656,"y":152.11111450195312,"z":"865a081c.79a5f8","wires":[["ef96486b.1069b8"]]},{"id":"ef96486b.1069b8","type":"http request","name":"","method":"POST","ret":"txt","url":"","x":284.7778015136719,"y":153.2222137451172,"z":"865a081c.79a5f8","wires":[["ad6096b4.529f68","62c44e09.9d3bb","a452cdcd.5bad3"]]},{"id":"62c44e09.9d3bb","type":"debug","name":"SessionId","active":true,"console":"false","complete":"payload","x":602.333366394043,"y":37.33333778381348,"z":"865a081c.79a5f8","wires":[]},{"id":"44e90f84.bb16f","type":"debug","name":"SessionId2","active":true,"console":"false","complete":"payload","x":445.5555191040039,"y":243.33333206176758,"z":"865a081c.79a5f8","wires":[]},{"id":"ad6096b4.529f68","type":"debug","name":"","active":true,"console":"false","complete":"true","x":602.5555419921875,"y":209,"z":"865a081c.79a5f8","wires":[]},{"id":"a452cdcd.5bad3","type":"function","name":"sessionid2","func":"\n//var obj = { \"topic\": \"\", \"payload\": \"\\r\\n<response>\\r\\n <state>ok</state>\\r\\n</response>\\r\\n\\r\\n\", \"_msgid\": \"c27391e4.3d8c7\", \"sessionid\": \"6E14E8C7BF3AFDE8E63FBF0EA015BFB4\", \"headers\": { \"date\": \"Sun, 24 May 2015 17:59:17 GMT\", \"server\": \"Apache/2.4.7 (Ubuntu)\", \"content-length\": \"88\", \"set-cookie\": [ \"JSESSIONID=6385A1C965987A3FAA6131DD153D2EE1; Path=/lk/; Secure; HttpOnly\" ], \"keep-alive\": \"timeout=5, max=100\", \"connection\": \"Keep-Alive\", \"content-type\": \"text/plain\" }, \"url\": \"https://www.sistemagorod.ru/lk/auth?type-auth=phone&answer-captcha=&phone=xxxx&pin=xxxx\", \"statusCode\": 200 };\nvar obj = msg.payload;\nvar cookies = obj.headers[\"set-cookie\"][0];\nvar m = cookies.match(/JSESSIONID=([\\w\\d]*)/);\nif (m) {\n    msg.payload = m[1];\n    return msg;\n}\n\n\n","outputs":"1","valid":true,"x":235.55560302734375,"y":284.2221984863281,"z":"865a081c.79a5f8","wires":[["44e90f84.bb16f","7a9fda5d.856024"]]},{"id":"7a9fda5d.856024","type":"debug","name":"SessionId2","active":true,"console":"false","complete":"true","x":446.66667556762695,"y":292.22221755981445,"z":"865a081c.79a5f8","wires":[]}]
                                          

                                          484_ytf6r.png
                                          484_hdjyfuk.png

                                          Высокий уровень Децибел вреден для здоровья!

                                          http://blog.instalator.ru/

                                          1 Antwort Letzte Antwort
                                          0
                                          Antworten
                                          • In einem neuen Thema antworten
                                          Anmelden zum Antworten
                                          • Älteste zuerst
                                          • Neuste zuerst
                                          • Meiste Stimmen


                                          Support us

                                          ioBroker
                                          Community Adapters
                                          Donate

                                          761

                                          Online

                                          32.5k

                                          Benutzer

                                          81.6k

                                          Themen

                                          1.3m

                                          Beiträge
                                          Community
                                          Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
                                          ioBroker Community 2014-2025
                                          logo
                                          • Anmelden

                                          • Du hast noch kein Konto? Registrieren

                                          • Anmelden oder registrieren, um zu suchen
                                          • Erster Beitrag
                                            Letzter Beitrag
                                          0
                                          • Home
                                          • Aktuell
                                          • Tags
                                          • Ungelesen 0
                                          • Kategorien
                                          • Unreplied
                                          • Beliebt
                                          • GitHub
                                          • Docu
                                          • Hilfe