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. Драйвер Mega-ESP

NEWS

  • Weihnachtsangebot 2025! 🎄
    BluefoxB
    Bluefox
    22
    1
    1.2k

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

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

Драйвер Mega-ESP

Geplant Angeheftet Gesperrt Verschoben ioBroker драйвера
37 Beiträge 7 Kommentatoren 10.2k 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.
  • H Offline
    H Offline
    Haus
    schrieb am zuletzt editiert von
    #4

    @Alex1808:

    @Haus:

    Драйвер Mega-ESP `

    Драйвер установился без проблем.

    Нажимаю на "Auto_Detekt", визуально ничего не происходит, только в логе видно что что-то читает `
    Alex па пробуйте без MCP23017 и PCA9685 только сама ESP, какая ESP у вас и прошивка?
    @Alex1808:

    @Haus:

    Драйвер Mega-ESP При добавлении портов не всё прописалось правильно, все прописались как вход. Но были и вход и выход и деактивированные.

    При добавлении портов в ручную настройки надо выбирать в ручную
    @Alex1808:

    @Haus:

    Драйвер Mega-ESP На аналоговом порту Р9 (у меня там висит датчик освещённости), в поле ****Typ**** не даёт ничего выбрать, это так и должно? Сам датчик работает и параметры в ioB отображает.
    Порт P9 может быть только ADC

    P.S. Скинь скриншот с подключённым MCP23017 и какие настройки в порте P10…

    js-controller: 1.5.7 / node.js: v8.15.1/ npm: 6.4.1

    admin: 3.6.0

    javascript: 4.1.10

    web: 2.4.1 vis: 1.1.10

    cloud: 2.6.2

    Server: DELL FX170 / linux: Debian 9.5 Stretch

    Adapter: MegaD-2561, Mega-ES…

    1 Antwort Letzte Antwort
    0
    • Alex1808A Offline
      Alex1808A Offline
      Alex1808
      schrieb am zuletzt editiert von
      #5

      @Haus:

      Alex па пробуйте без MCP23017 и PCA9685 только сама ESP, какая ESP у вас и прошивка? `

      Тест проводил на ESP8266 ESP-12E (Wemos D1), прошивка последняя (fw: 0.33b2).

      Без MCP23017 попробую сегодня вечером.

      > При добавлении портов в ручную настройки надо выбирать в ручную
      ясно. значит порты должны были добавится при сканировании в авто-режиме?

      > Порт P9 может быть только ADC
      Ну я так и понял, сам порт работает и шлёт данные.

      > P.S. Скинь скриншот с подключённым MCP23017 и какие настройки в порте P10…
      Здесь

      ! ![](</s><URL url=)<link_text text="http://image.prntscr.com/image/da081e63 ... 28f581.png">http://image.prntscr.com/image/da081e63795747c8bb9234aee628f581.png</link_text>" />
      !
      ![](</s><URL url=)<link_text text="http://image.prntscr.com/image/e5ef3864 ... 2d0afd.png">http://image.prntscr.com/image/e5ef3864335947febc2124e05e2d0afd.png</link_text>" />
      ! ![](</s><URL url=)<link_text text="http://image.prntscr.com/image/327bace1 ... 28a3ec.png">http://image.prntscr.com/image/327bace1ce1d4c208e1fb1d5ff28a3ec.png</link_text>" />~~~~ ~~~~~~Upd.

      Проверил без МСР23017, порты прописались автоматом

      ! ![](</s><URL url=)<link_text text="http://image.prntscr.com/image/68dbf234 ... f3a9f0.png">http://image.prntscr.com/image/68dbf23476014b96a667b42727f3a9f0.png</link_text>" />~~~~~~

      1 Antwort Letzte Antwort
      0
      • H Offline
        H Offline
        Haus
        schrieb am zuletzt editiert von
        #6

        @Alex1808:

        @Haus:

        > P.S. Скинь скриншот с подключённым MCP23017 и какие настройки в порте P10…
        Здесь

        ! ![](</s><URL url=)<link_text text="http://image.prntscr.com/image/da081e63 ... 28f581.png">http://image.prntscr.com/image/da081e63795747c8bb9234aee628f581.png</link_text>" />
        !
        ![](</s><URL url=)<link_text text="http://image.prntscr.com/image/e5ef3864 ... 2d0afd.png">http://image.prntscr.com/image/e5ef3864335947febc2124e05e2d0afd.png</link_text>" />
        ! ![](</s><URL url=)<link_text text="http://image.prntscr.com/image/327bace1 ... 28a3ec.png">http://image.prntscr.com/image/327bace1ce1d4c208e1fb1d5ff28a3ec.png</link_text>" />~~~~ ~~~~~~Извини мне бы html :)

        В принципе МСР23017 не должен мешать.~~~~~~

        js-controller: 1.5.7 / node.js: v8.15.1/ npm: 6.4.1

        admin: 3.6.0

        javascript: 4.1.10

        web: 2.4.1 vis: 1.1.10

        cloud: 2.6.2

        Server: DELL FX170 / linux: Debian 9.5 Stretch

        Adapter: MegaD-2561, Mega-ES…

        1 Antwort Letzte Antwort
        0
        • Alex1808A Offline
          Alex1808A Offline
          Alex1808
          schrieb am zuletzt editiert von
          #7

          @Haus:

          Извини мне бы html :)

          В принципе МСР23017 не должен мешать. `

          так?

          <title>MegaESP</title>[Back](/sec/)
          -- Ports --
          [P10 - IN](/sec/?mc=10)
          [P11 - IN](/sec/?mc=11)
          [P12 - IN](/sec/?mc=12)
          [P13 - IN](/sec/?mc=13)
          [P14 - IN](/sec/?mc=14)
          [P15 - IN](/sec/?mc=15)
          [P16 - IN](/sec/?mc=16)
          [P17 - IN](/sec/?mc=17)
          [P18 - OUT](/sec/?mc=18)
          [P19 - OUT](/sec/?mc=19)
          [P20 - OUT](/sec/?mc=20)
          [P21 - OUT](/sec/?mc=21)
          [P22 - OUT](/sec/?mc=22)
          [P23 - OUT](/sec/?mc=23)
          [P24 - OUT](/sec/?mc=24)
          [P25 - OUT](/sec/?mc=25)
          
          
          <title>MegaESP</title>[Back](/sec/?mc=1)
          (pin A0)
          P10/OFF
          
          <form action="/sec/">Type: <select name="in"><option value="0">OUT</option><option value="1" selected="">IN</option></select>
          mod <select name="pm"><option value="0">P</option><option value="1">P&R</option><option value="2" selected="">R</option></select> | <select name="rm"><option value="0" selected="">Default</option><option value="1">Act</option></select>
          Act: 
          </form>
          
          
          1 Antwort Letzte Antwort
          0
          • H Offline
            H Offline
            Haus
            schrieb am zuletzt editiert von
            #8

            @Alex1808:

            @Haus:

            Извини мне бы html :)

            В принципе МСР23017 не должен мешать. `

            так?

            <title>MegaESP</title>[Back](/sec/)
            -- Ports --
            [P10 - IN](/sec/?mc=10)
            [P11 - IN](/sec/?mc=11)
            [P12 - IN](/sec/?mc=12)
            [P13 - IN](/sec/?mc=13)
            [P14 - IN](/sec/?mc=14)
            [P15 - IN](/sec/?mc=15)
            [P16 - IN](/sec/?mc=16)
            [P17 - IN](/sec/?mc=17)
            [P18 - OUT](/sec/?mc=18)
            [P19 - OUT](/sec/?mc=19)
            [P20 - OUT](/sec/?mc=20)
            [P21 - OUT](/sec/?mc=21)
            [P22 - OUT](/sec/?mc=22)
            [P23 - OUT](/sec/?mc=23)
            [P24 - OUT](/sec/?mc=24)
            [P25 - OUT](/sec/?mc=25)
            
            
            <title>MegaESP</title>[Back](/sec/?mc=1)
            (pin A0)
            P10/OFF
            
            <form action="/sec/">Type: <select name="in"><option value="0">OUT</option><option value="1" selected="">IN</option></select>
            mod <select name="pm"><option value="0">P</option><option value="1">P&R</option><option value="2" selected="">R</option></select> | <select name="rm"><option value="0" selected="">Default</option><option value="1">Act</option></select>
            Act: 
            </form>
            
            ```` `  
            

            Да спасибо?

            js-controller: 1.5.7 / node.js: v8.15.1/ npm: 6.4.1

            admin: 3.6.0

            javascript: 4.1.10

            web: 2.4.1 vis: 1.1.10

            cloud: 2.6.2

            Server: DELL FX170 / linux: Debian 9.5 Stretch

            Adapter: MegaD-2561, Mega-ES…

            1 Antwort Letzte Antwort
            0
            • H Offline
              H Offline
              Haus
              schrieb am zuletzt editiert von
              #9

              @Alex1808:

              @Haus:

              Извини мне бы html :)

              В принципе МСР23017 не должен мешать. `

              так?

              <title>MegaESP</title>[Back](/sec/)
              -- Ports --
              [P10 - IN](/sec/?mc=10)
              [P11 - IN](/sec/?mc=11)
              [P12 - IN](/sec/?mc=12)
              [P13 - IN](/sec/?mc=13)
              [P14 - IN](/sec/?mc=14)
              [P15 - IN](/sec/?mc=15)
              [P16 - IN](/sec/?mc=16)
              [P17 - IN](/sec/?mc=17)
              [P18 - OUT](/sec/?mc=18)
              [P19 - OUT](/sec/?mc=19)
              [P20 - OUT](/sec/?mc=20)
              [P21 - OUT](/sec/?mc=21)
              [P22 - OUT](/sec/?mc=22)
              [P23 - OUT](/sec/?mc=23)
              [P24 - OUT](/sec/?mc=24)
              [P25 - OUT](/sec/?mc=25)
              
              
              <title>MegaESP</title>[Back](/sec/?mc=1)
              (pin A0)
              P10/OFF
              
              <form action="/sec/">Type: <select name="in"><option value="0">OUT</option><option value="1" selected="">IN</option></select>
              mod <select name="pm"><option value="0">P</option><option value="1">P&R</option><option value="2" selected="">R</option></select> | <select name="rm"><option value="0" selected="">Default</option><option value="1">Act</option></select>
              Act: 
              </form>
              
              ```` `  
              

              OUT html скинь.

              js-controller: 1.5.7 / node.js: v8.15.1/ npm: 6.4.1

              admin: 3.6.0

              javascript: 4.1.10

              web: 2.4.1 vis: 1.1.10

              cloud: 2.6.2

              Server: DELL FX170 / linux: Debian 9.5 Stretch

              Adapter: MegaD-2561, Mega-ES…

              1 Antwort Letzte Antwort
              0
              • Alex1808A Offline
                Alex1808A Offline
                Alex1808
                schrieb am zuletzt editiert von
                #10

                @Haus:

                OUT html скинь. `

                <title>MegaESP</title>[Back](/sec/?mc=1)
                (pin B0)
                P18/OFF
                [ON](/sec/?mc=18&cmd=18:1)
                
                <form action="/sec/">Type: <select name="in"><option value="0" selected="">OUT</option><option value="1">IN</option></select> | <select name="dm"><option value="0" selected="">OFF</option><option value="1">ON</option></select>
                </form>
                
                
                1 Antwort Letzte Antwort
                0
                • M Offline
                  M Offline
                  MSapogov
                  schrieb am zuletzt editiert von
                  #11

                  Спасибо за драйвер.

                  Никак не пойму что я делаю не так…

                  Мучая RGB

                  В объектах значение у порта PWM - true.

                  Когда меняю значение, то оно практически мгновенно возвращается снова в true.

                  В конфиге драйвера РОЛЬ указывал и value и level и пусто, все равно или true или false вместо значений от 0 до 255.

                  P9 с ADC выдает всегда как и нужно цифры.

                  PS: С MQTT работало хорошо.

                  1 Antwort Letzte Antwort
                  0
                  • H Offline
                    H Offline
                    Haus
                    schrieb am zuletzt editiert von
                    #12

                    @MSapogov:

                    Спасибо за драйвер.

                    Никак не пойму что я делаю не так…

                    Мучая RGB

                    В объектах значение у порта PWM - true.

                    Когда меняю значение, то оно практически мгновенно возвращается снова в true.

                    В конфиге драйвера РОЛЬ указывал и value и level и пусто, все равно или true или false вместо значений от 0 до 255.

                    P9 с ADC выдает всегда как и нужно цифры.

                    PS: С MQTT работало хорошо. `
                    Обновись на 0.0.2 но ещё пока не работает RGB сейчас как рас делаю, не выходит :x

                    cd /opt/iobroker
                    npm install https://github.com/ausHaus/ioBroker.megaesp/tarball/master/
                    iobroker upload megaesp
                    iobroker restart megaesp
                    
                    

                    js-controller: 1.5.7 / node.js: v8.15.1/ npm: 6.4.1

                    admin: 3.6.0

                    javascript: 4.1.10

                    web: 2.4.1 vis: 1.1.10

                    cloud: 2.6.2

                    Server: DELL FX170 / linux: Debian 9.5 Stretch

                    Adapter: MegaD-2561, Mega-ES…

                    1 Antwort Letzte Antwort
                    0
                    • H Offline
                      H Offline
                      Haus
                      schrieb am zuletzt editiert von
                      #13

                      Bluefox помоги, ни как команду с 'http://espIP/sec/?pt=3&r=25&g=180&b=164' вывести не могу в main.js sendCommandToRGB, то всё одного цвета то Send command "pt=2&r=undefined&g=undefined&b=128" to 192.168.1.20 :x

                      main.js "function sendCommandToRGB"

                      function sendCommandToRGB(port, value) {
                          //'http://espIP/sec/?pt=3&r=25&g=25&b=25'       //////////////////////////////
                          var data = 'pt=' + port + (value || 0);                   //////////////////////////////
                      
                          var parts = adapter.config.ip.split(':');
                      
                          var options = {
                              host: parts[0],
                              port: parts[1] || 80,
                              path: '/' + adapter.config.password + '/?' + data
                          };
                          adapter.log.debug('Send command "' + data + '" to ' + adapter.config.ip);
                          // Set up the request
                          http.get(options, function (res) {
                              var xmldata = '';
                              res.setEncoding('utf8');
                              res.on('error', function (e) {
                                  adapter.log.warn(e.toString());
                              });
                              res.on('data', function (chunk) {
                                  xmldata += chunk;
                              });
                              res.on('end', function () {
                                  adapter.log.debug('Response "' + xmldata + '"');
                              });
                          }).on('error', function (e) {
                              adapter.log.warn('Got error by post request ' + e.toString());
                          });
                      }
                      
                      

                      main.js "sendCommandToRGB"

                      adapter.on('stateChange', function (id, state) {
                          if (id && state && !state.ack) {
                              if (!ports[id]) {
                                  adapter.log.error('Unknown port ID ' + id);
                                  return;
                              ........
                              ........
                              if (parseFloat(state.val) == state.val) {
                                  // If number => set position
                                  state.val = parseFloat(state.val);
                                  if (state.val < 0) {
                                      adapter.log.warn(': invalid control value ' + state.val + '. Value must be positive');
                                      state.val = 0;
                                  }
                                  ........
                                  ........
                                  if (ports[id].common.type == 'string') {   ////////////////////////////////////////////////////
                      
                                  } else if (id.indexOf('_red') !== -1) {
                                      var red = (ports[id].native.red, state.val);
                                      adapter.log.debug('R: ' + red);
                      
                                  } else if (id.indexOf('_green') !== -1) {
                                      var green = (ports[id].native.green, state.val);
                                      adapter.log.debug('G: ' + green);
                      
                                  } else if (id.indexOf('_blue') !== -1) {
                                      var blue = (ports[id].native.blue, state.val);
                                      adapter.log.debug('B: ' + blue);
                      
                                      adapter.log.debug('RGB: ' + red + green + blue);
                                      state.val = ('&r=' + red + '&g=' + green + '&b=' + blue);
                                      sendCommandToRGB(ports[id].native.port, state.val);      //////////////////////////////////////////
                      
                                  } else {
                                      ports[id].native.offset = parseFloat(ports[id].native.offset || 0) || 0;
                                      ports[id].native.factor = parseFloat(ports[id].native.factor || 1) || 1;
                      
                                      state.val = (state.val - ports[id].native.offset) / ports[id].native.factor;
                                      state.val = Math.round(state.val);
                      
                                      sendCommand(ports[id].native.port, state.val);
                                  }
                              }
                          }
                      });
                      

                      log

                      megaesp.0	2016-08-23 02:27:58.730	debug	megaesp.0 Response "Back
                      P2
                      val. 0-255
                      megaesp.0	2016-08-23 02:27:58.730	debug	megaesp.0 Send command "pt=2&r=undefined&g=undefined&b=128" to 192.168.1.20
                      megaesp.0	2016-08-23 02:27:58.729	debug	megaesp.0 RGB: undefinedundefined128
                      megaesp.0	2016-08-23 02:27:58.729	debug	megaesp.0 B: 128
                      megaesp.0	2016-08-23 02:27:58.729	info	megaesp.0 try to control megaesp.0.p2_P2_blue with 128
                      megaesp.0	2016-08-23 02:27:58.729	debug	megaesp.0 G: 130
                      megaesp.0	2016-08-23 02:27:58.729	info	megaesp.0 try to control megaesp.0.p2_P2_green with 130
                      megaesp.0	2016-08-23 02:27:58.728	debug	inMem message megaesp.0.* megaesp.0.p2_P2_blue
                      megaesp.0	2016-08-23 02:27:58.728	debug	inMem message megaesp.0.* megaesp.0.p2_P2_green
                      megaesp.0	2016-08-23 02:27:58.686	debug	megaesp.0 R: 185
                      megaesp.0	2016-08-23 02:27:58.686	info	megaesp.0 try to control megaesp.0.p2_P2_red with 185
                      megaesp.0	2016-08-23 02:27:58.684	debug	inMem message megaesp.0.* megaesp.0.p2_P2_red
                      

                      js-controller: 1.5.7 / node.js: v8.15.1/ npm: 6.4.1

                      admin: 3.6.0

                      javascript: 4.1.10

                      web: 2.4.1 vis: 1.1.10

                      cloud: 2.6.2

                      Server: DELL FX170 / linux: Debian 9.5 Stretch

                      Adapter: MegaD-2561, Mega-ES…

                      1 Antwort Letzte Antwort
                      0
                      • M Offline
                        M Offline
                        MSapogov
                        schrieb am zuletzt editiert von
                        #14

                        @Haus:

                        Обновись на 0.0.2 но ещё пока не работает RGB сейчас как рас делаю, не выходит :x

                        cd /opt/iobroker
                        npm install https://github.com/ausHaus/ioBroker.megaesp/tarball/master/
                        iobroker upload megaesp
                        iobroker restart megaesp
                        
                        ```` `  
                        

                        Да у меня и так 0.0.2 версия.

                        Я использую три выхода как PWM, а не WS2811… Или можно RGB подключить по другому?

                        Что заметил, если использую Philips HUE и RGB color, то цвета регулируются... А если farbtastic то нет. А значения если смотреть - то true!!!

                        Объекты цветов прописываю во вкладке R.G.B.

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

                          @Haus:

                          Bluefox помоги, ни как команду с 'http://espIP/sec/?pt=3&r=25&g=180&b=164' вывести не могу в main.js sendCommandToRGB, то всё одного цвета то Send command "pt=2&r=undefined&g=undefined&b=128" to 192.168.1.20 :x

                          main.js "function sendCommandToRGB" `
                          Мне было бы проще, если бы код был на гите.

                          ! ```
                          `var rgbs = {};
                          ! ....
                          ! function sendCommandToRGB(rgbId) {
                          rgbs[rgbId].timer = null;
                          var port = ports[rgbId + '_blue'].native.port;

                          //'http://espIP/sec/?pt=3&r=25&g=25&b=25'
                          var data = 'pt=' + port + '&r=' + (rgbs[rgbId].red || 0) + '&g=' + (rgbs[rgbId].green || 0) + '&b=' + (rgbs[rgbId].blue || 0);
                          

                          ! var parts = adapter.config.ip.split(':');
                          ! var options = {
                          host: parts[0],
                          port: parts[1] || 80,
                          path: '/' + adapter.config.password + '/?' + data
                          };
                          adapter.log.debug('Send command "' + data + '" to ' + adapter.config.ip);
                          // Set up the request
                          http.get(options, function (res) {
                          var xmldata = '';
                          res.setEncoding('utf8');
                          res.on('error', function (e) {
                          adapter.log.warn(e.toString());
                          });
                          res.on('data', function (chunk) {
                          xmldata += chunk;
                          });
                          res.on('end', function () {
                          adapter.log.debug('Response "' + xmldata + '"');
                          });
                          }).on('error', function (e) {
                          adapter.log.warn('Got error by post request ' + e.toString());
                          });
                          }
                          ! .....
                          ! adapter.on('stateChange', function (id, state) {
                          ....
                          if (ports[id].common.type === 'string') { ////////////////////////////////////////////////////
                          ! } else if (id.match(/_red|_blue|green^/)) {
                          var pos = id.lastIndexOf('
                          ');
                          var rgbId = id.substring(0, pos);
                          var color = id.substring(pos + 1);

                          	rgbs[rgbId] = rgbs[rgbId] || {};
                          	rgbs[rgbId][color] = state.val;
                          	// stop timer if running
                          	if (rgbs[rgbId].timer) clearTimeout(rgbs[rgbId].timer);
                          	// if no more changes in 100 ms, send command to device
                          	rgbs[rgbId].timer = setTimeout(sendCommandToRGB, 100, rgbId);	
                          } else {
                          	...
                          }`[/color]
                          
                          1 Antwort Letzte Antwort
                          0
                          • H Offline
                            H Offline
                            Haus
                            schrieb am zuletzt editiert von
                            #16

                            @Bluefox:

                            @Haus:

                            Bluefox помоги, ни как команду с 'http://espIP/sec/?pt=3&r=25&g=180&b=164' вывести не могу в main.js sendCommandToRGB, то всё одного цвета то Send command "pt=2&r=undefined&g=undefined&b=128" to 192.168.1.20 :x

                            main.js "function sendCommandToRGB" `
                            Мне было бы проще, если бы код был на гите.

                            ! ```
                            `var rgbs = {};
                            ! ....
                            ! function sendCommandToRGB(rgbId) {
                            rgbs[rgbId].timer = null;
                            var port = ports[rgbId + '_blue'].native.port;

                            //'http://espIP/sec/?pt=3&r=25&g=25&b=25'
                            var data = 'pt=' + port + '&r=' + (rgbs[rgbId].red || 0) + '&g=' + (rgbs[rgbId].green || 0) + '&b=' + (rgbs[rgbId].blue || 0);

                            ! var parts = adapter.config.ip.split(':');
                            ! var options = {
                            host: parts[0],
                            port: parts[1] || 80,
                            path: '/' + adapter.config.password + '/?' + data
                            };
                            adapter.log.debug('Send command "' + data + '" to ' + adapter.config.ip);
                            // Set up the request
                            http.get(options, function (res) {
                            var xmldata = '';
                            res.setEncoding('utf8');
                            res.on('error', function (e) {
                            adapter.log.warn(e.toString());
                            });
                            res.on('data', function (chunk) {
                            xmldata += chunk;
                            });
                            res.on('end', function () {
                            adapter.log.debug('Response "' + xmldata + '"');
                            });
                            }).on('error', function (e) {
                            adapter.log.warn('Got error by post request ' + e.toString());
                            });
                            }
                            ! .....
                            ! adapter.on('stateChange', function (id, state) {
                            ....
                            if (ports[id].common.type === 'string') { ////////////////////////////////////////////////////
                            ! } else if (id.match(/_red|_blue|green^/)) {
                            var pos = id.lastIndexOf('
                            ');
                            var rgbId = id.substring(0, pos);
                            var color = id.substring(pos + 1);

                              rgbs[rgbId] = rgbs[rgbId] || {};
                              rgbs[rgbId][color] = state.val;
                              // stop timer if running
                              if (rgbs[rgbId].timer) clearTimeout(rgbs[rgbId].timer);
                              // if no more changes in 100 ms, send command to device
                              rgbs[rgbId].timer = setTimeout(sendCommandToRGB, 100, rgbId);	
                            

                            } else {
                            ...
                            }`
                            Спасибо, сейчас буду про бывать :)

                            ! Уже две недели там :roll: https://github.com/ausHaus/ioBroker.megaesp
                            ! P.S. Всё вроде неплохо но один цвет отправляет на "cmd"
                            ~~[code]~~megaesp-0 2016-08-23 17:52:39.516 debug Response for 192.168.1.20[all]: 155;255;80;temp:20.00/hum:79.60;temp:19.50;ON;RGB;NC;NC;33 megaesp-0 2016-08-23 17:52:39.420 debug getPortState http://192.168.1.20/sec/?cmd=all megaesp-0 2016-08-23 17:52:35.634 debug Response "Back P6 val. 0-255 megaesp-0 2016-08-23 17:52:35.615 debug Send command "pt=6&r=255&g=209&b=0" to 192.168.1.20 inMem 2016-08-23 17:52:35.591 debug message megaesp.0.* megaesp.0.p6_P6 val=null, ack=true, ts=1471963955585, q=0, from=system.adapter.megaesp.0, lc=1471961464774 megaesp-0 2016-08-23 17:52:35.568 debug Response "Done" megaesp-0 2016-08-23 17:52:35.547 debug Send command "cmd=6:43" to 192.168.1.20 megaesp-0 2016-08-23 17:52:35.546 info try to control megaesp.0.p6_P6_blue with 43 inMem 2016-08-23 17:52:35.541 debug message megaesp.0.* megaesp.0.p6_P6_blue val=43, ack=false, ts=1471963955507, q=0, from=system.adapter.socketio.0, lc=1471963954498 megaesp-0 2016-08-23 17:52:35.514 info try to control megaesp.0.p6_P6_green with 209 inMem 2016-08-23 17:52:35.511 debug message megaesp.0.* megaesp.0.p6_P6_green val=209, ack=false, ts=1471963955497, q=0, from=system.adapter.socketio.0, lc=1471963954490 megaesp-0 2016-08-23 17:52:35.486 info try to control megaesp.0.p6_P6_red with 255 inMem 2016-08-23 17:52:35.479 debug message megaesp.0.* megaesp.0.p6_P6_red val=255, ack=false, ts=1471963955466, q=0, from=system.adapter.socketio.0, lc=1471963952798[/code]
                            ! P.S.2 Добавил "....|blue|^..."
                            ~~[code]~~} else if (id.match(/_red|_green|_blue|_^/)) {[/code] работает нормально
                            443_rgb.png [/color]
                            ``` `

                            js-controller: 1.5.7 / node.js: v8.15.1/ npm: 6.4.1

                            admin: 3.6.0

                            javascript: 4.1.10

                            web: 2.4.1 vis: 1.1.10

                            cloud: 2.6.2

                            Server: DELL FX170 / linux: Debian 9.5 Stretch

                            Adapter: MegaD-2561, Mega-ES…

                            1 Antwort Letzte Antwort
                            0
                            • H Offline
                              H Offline
                              Haus
                              schrieb am zuletzt editiert von
                              #17

                              @MSapogov:

                              @Haus:

                              Что заметил, если использую Philips HUE и RGB color, то цвета регулируются… А если farbtastic то нет. А значения если смотреть - то true!!!

                              Объекты цветов прописываю во вкладке R.G.B.
                              Подправил, пробуй 0.0.3

                              cd /opt/iobroker
                              npm install https://github.com/ausHaus/ioBroker.megaesp/tarball/master/
                              iobroker upload megaesp
                              iobroker restart megaesp
                              

                              js-controller: 1.5.7 / node.js: v8.15.1/ npm: 6.4.1

                              admin: 3.6.0

                              javascript: 4.1.10

                              web: 2.4.1 vis: 1.1.10

                              cloud: 2.6.2

                              Server: DELL FX170 / linux: Debian 9.5 Stretch

                              Adapter: MegaD-2561, Mega-ES…

                              1 Antwort Letzte Antwort
                              0
                              • M Offline
                                M Offline
                                MSapogov
                                schrieb am zuletzt editiert von
                                #18

                                @Haus:

                                @MSapogov:

                                @Haus:

                                Что заметил, если использую Philips HUE и RGB color, то цвета регулируются… А если farbtastic то нет. А значения если смотреть - то true!!!

                                Объекты цветов прописываю во вкладке R.G.B.
                                Подправил, пробуй 0.0.3

                                cd /opt/iobroker
                                npm install https://github.com/ausHaus/ioBroker.megaesp/tarball/master/
                                iobroker upload megaesp
                                iobroker restart megaesp
                                ```` `  
                                

                                Спасибо!

                                Теперь норм.

                                PS: А у Вас P6 как сконфигурирован? Вопрос снят… понял что WS2811.

                                А кто встречал в продаже и где WS2811 в DIP корпусе, чтобы отдельно к нему усилители подключить можно было.

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

                                  @Haus:

                                  @Bluefox:

                                  @Haus:

                                  Bluefox помоги, ни как команду с 'http://espIP/sec/?pt=3&r=25&g=180&b=164' вывести не могу в main.js sendCommandToRGB, то всё одного цвета то Send command "pt=2&r=undefined&g=undefined&b=128" to 192.168.1.20 :x

                                  main.js "function sendCommandToRGB" `
                                  Мне было бы проще, если бы код был на гите.

                                  ! ```
                                  `var rgbs = {};
                                  ! ....
                                  ! function sendCommandToRGB(rgbId) {
                                  rgbs[rgbId].timer = null;
                                  var port = ports[rgbId + '_blue'].native.port;

                                  //'http://espIP/sec/?pt=3&r=25&g=25&b=25'
                                  var data = 'pt=' + port + '&r=' + (rgbs[rgbId].red || 0) + '&g=' + (rgbs[rgbId].green || 0) + '&b=' + (rgbs[rgbId].blue || 0);
                                  

                                  ! var parts = adapter.config.ip.split(':');
                                  ! var options = {
                                  host: parts[0],
                                  port: parts[1] || 80,
                                  path: '/' + adapter.config.password + '/?' + data
                                  };
                                  adapter.log.debug('Send command "' + data + '" to ' + adapter.config.ip);
                                  // Set up the request
                                  http.get(options, function (res) {
                                  var xmldata = '';
                                  res.setEncoding('utf8');
                                  res.on('error', function (e) {
                                  adapter.log.warn(e.toString());
                                  });
                                  res.on('data', function (chunk) {
                                  xmldata += chunk;
                                  });
                                  res.on('end', function () {
                                  adapter.log.debug('Response "' + xmldata + '"');
                                  });
                                  }).on('error', function (e) {
                                  adapter.log.warn('Got error by post request ' + e.toString());
                                  });
                                  }
                                  ! .....
                                  ! adapter.on('stateChange', function (id, state) {
                                  ....
                                  if (ports[id].common.type === 'string') { ////////////////////////////////////////////////////
                                  ! } else if (id.match(/_red|_blue|green^/)) {
                                  var pos = id.lastIndexOf('
                                  ');
                                  var rgbId = id.substring(0, pos);
                                  var color = id.substring(pos + 1);

                                    rgbs[rgbId] = rgbs[rgbId] || {};
                                    rgbs[rgbId][color] = state.val;
                                    // stop timer if running
                                    if (rgbs[rgbId].timer) clearTimeout(rgbs[rgbId].timer);
                                    // if no more changes in 100 ms, send command to device
                                    rgbs[rgbId].timer = setTimeout(sendCommandToRGB, 100, rgbId);	
                                  } else {
                                    ...
                                  }`
                                  

                                  Спасибо, сейчас буду про бывать :)

                                  ! Уже две недели там :roll: https://github.com/ausHaus/ioBroker.megaesp
                                  ! P.S. Всё вроде неплохо но один цвет отправляет на "cmd"
                                  ~~[code]~~megaesp-0 2016-08-23 17:52:39.516 debug Response for 192.168.1.20[all]: 155;255;80;temp:20.00/hum:79.60;temp:19.50;ON;RGB;NC;NC;33 megaesp-0 2016-08-23 17:52:39.420 debug getPortState http://192.168.1.20/sec/?cmd=all megaesp-0 2016-08-23 17:52:35.634 debug Response "Back P6 val. 0-255 megaesp-0 2016-08-23 17:52:35.615 debug Send command "pt=6&r=255&g=209&b=0" to 192.168.1.20 inMem 2016-08-23 17:52:35.591 debug message megaesp.0.* megaesp.0.p6_P6 val=null, ack=true, ts=1471963955585, q=0, from=system.adapter.megaesp.0, lc=1471961464774 megaesp-0 2016-08-23 17:52:35.568 debug Response "Done" megaesp-0 2016-08-23 17:52:35.547 debug Send command "cmd=6:43" to 192.168.1.20 megaesp-0 2016-08-23 17:52:35.546 info try to control megaesp.0.p6_P6_blue with 43 inMem 2016-08-23 17:52:35.541 debug message megaesp.0.* megaesp.0.p6_P6_blue val=43, ack=false, ts=1471963955507, q=0, from=system.adapter.socketio.0, lc=1471963954498 megaesp-0 2016-08-23 17:52:35.514 info try to control megaesp.0.p6_P6_green with 209 inMem 2016-08-23 17:52:35.511 debug message megaesp.0.* megaesp.0.p6_P6_green val=209, ack=false, ts=1471963955497, q=0, from=system.adapter.socketio.0, lc=1471963954490 megaesp-0 2016-08-23 17:52:35.486 info try to control megaesp.0.p6_P6_red with 255 inMem 2016-08-23 17:52:35.479 debug message megaesp.0.* megaesp.0.p6_P6_red val=255, ack=false, ts=1471963955466, q=0, from=system.adapter.socketio.0, lc=1471963952798[/code]
                                  ! P.S.2 Добавил "....|blue|^..."
                                  ~~[code]~~} else if (id.match(/_red|_green|_blue|_^/)) {[/code] работает нормально
                                  filename="RGB.png" index="0">~~
                                  Там ошибка была в regexp. Я тебе pull request отправил.[/color]
                                  ```

                                  1 Antwort Letzte Antwort
                                  0
                                  • H Offline
                                    H Offline
                                    Haus
                                    schrieb am zuletzt editiert von
                                    #20

                                    @Bluefox:

                                    @Haus:

                                    @Bluefox: Там ошибка была в regexp. Я тебе pull request отправил. `
                                    Спасибо, всё работает

                                    js-controller: 1.5.7 / node.js: v8.15.1/ npm: 6.4.1

                                    admin: 3.6.0

                                    javascript: 4.1.10

                                    web: 2.4.1 vis: 1.1.10

                                    cloud: 2.6.2

                                    Server: DELL FX170 / linux: Debian 9.5 Stretch

                                    Adapter: MegaD-2561, Mega-ES…

                                    1 Antwort Letzte Antwort
                                    0
                                    • H Offline
                                      H Offline
                                      Haus
                                      schrieb am zuletzt editiert von
                                      #21

                                      @MSapogov:

                                      @Haus:

                                      @MSapogov: `
                                      Подправил, пробуй 0.0.3

                                      cd /opt/iobroker
                                      npm install https://github.com/ausHaus/ioBroker.megaesp/tarball/master/
                                      iobroker upload megaesp
                                      iobroker restart megaesp
                                      ```` `  
                                      

                                      Спасибо!

                                      Теперь норм.

                                      PS: А у Вас P6 как сконфигурирован? Вопрос снят… понял что WS2811.

                                      А кто встречал в продаже и где WS2811 в DIP корпусе, чтобы отдельно к нему усилители подключить можно было. `
                                      Вариантов море https://www.google.com/search?q=WS2811+ … dlaMmvM%3A

                                      Если я правильно понимаю это сигнальная линия и на ленте к каждой WS2811 подключены три диода R,G,B, WS2812 там в диоде всё уже засунуто чип,R,G,B. Зачем усилитель?

                                      js-controller: 1.5.7 / node.js: v8.15.1/ npm: 6.4.1

                                      admin: 3.6.0

                                      javascript: 4.1.10

                                      web: 2.4.1 vis: 1.1.10

                                      cloud: 2.6.2

                                      Server: DELL FX170 / linux: Debian 9.5 Stretch

                                      Adapter: MegaD-2561, Mega-ES…

                                      1 Antwort Letzte Antwort
                                      0
                                      • M Offline
                                        M Offline
                                        MSapogov
                                        schrieb am zuletzt editiert von
                                        #22

                                        @Haus:

                                        Если я правильно понимаю это сигнальная линия и на ленте к каждой WS2811 подключены три диода R,G,B, WS2812 там в диоде всё уже засунуто чип,R,G,B. Зачем усилитель? `
                                        Это в том случае если хочется использывать уже имеющиеся световые линии RGB. У меня нет задачи управлять каждым диодом в линии.

                                        Просто экономия по GPIO получается.

                                        1 Antwort Letzte Antwort
                                        0
                                        • H Offline
                                          H Offline
                                          Haus
                                          schrieb am zuletzt editiert von
                                          #23

                                          @MSapogov:

                                          @Haus:

                                          Если я правильно понимаю это сигнальная линия и на ленте к каждой WS2811 подключены три диода R,G,B, WS2812 там в диоде всё уже засунуто чип,R,G,B. Зачем усилитель? `
                                          Это в том случае если хочется использывать уже имеющиеся световые линии RGB. У меня нет задачи управлять каждым диодом в линии.

                                          Просто экономия по GPIO получается. `
                                          Я думаю на этот случай есть и поддерживается прошивкой расширитель шим портов PCA9685. Кстати ещё можно заказать голую плату http://www.ab-log.ru/forum/viewtopic.ph … 180#p22605

                                          js-controller: 1.5.7 / node.js: v8.15.1/ npm: 6.4.1

                                          admin: 3.6.0

                                          javascript: 4.1.10

                                          web: 2.4.1 vis: 1.1.10

                                          cloud: 2.6.2

                                          Server: DELL FX170 / linux: Debian 9.5 Stretch

                                          Adapter: MegaD-2561, Mega-ES…

                                          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

                                          693

                                          Online

                                          32.5k

                                          Benutzer

                                          81.7k

                                          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