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
    23
    1
    1.3k

  • 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.
  • 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
                                    • H Offline
                                      H Offline
                                      Haus
                                      schrieb am zuletzt editiert von
                                      #24

                                      Bluefox помогай

                                      192.168.1.20/sec

                                      Это стандарт только ESP у которой 9(настраиваемых "pty" портов) + 1(всегда ADC и только на этом порту P9)

                                      Всё это у нас сделано на 90%

                                      При подключении устройств по I2C шине, на 192.168.1.20/sec появляются дополнительные устройства.

                                      –EXT-IO--

                                      (MCP23017) начиная с P10-...(mc=10;..) порты, все 15(настраиваемых "in" портов) могут быть IN(in=1)/OUT(in=0).

                                      --EXT-PWM--

                                      (PCA9685) начиная с P10-...(pc=10;..) порты, все 15 только PWM.

                                      --Ext-DS--

                                      (BMP085/180) начиная с P10 (bm=10)

                                      (BME280) начиная с P10 (be=10)

                                      (BH1750) начиная с P10 (bh=10)

                                      в конце всегда если подключён LCD (lcd=1), пока что неважно

                                      ! 443_megaesp.png
                                      html

                                      <title>MegaESP</title>MegaESP api by [ab-log.ru](http://ab-log.ru) (fw: 0.33b3)
                                      [Config](/sec/cfg/)
                                      -- Ports --
                                      [P0 - IN](/sec/?pt=0)
                                      [P1 - PWM_OUT](/sec/?pt=1)
                                      [P2 - SL_OUT](/sec/?pt=2)
                                      [P3 - DS](/sec/?pt=3)
                                      [P4 - DS](/sec/?pt=4)
                                      [P5 - SW_OUT](/sec/?pt=5)
                                      [P6 - WS281x](/sec/?pt=6)
                                      [P7 - I2C_SDA](/sec/?pt=7)
                                      [P8 - I2C_SCL](/sec/?pt=8)
                                      [P9 - ADC](/sec/?pt=9)
                                      -- ExtIO --
                                      [EXT - IO](/sec/?mc=1)
                                      [LCD](/sec/?lcd=1)
                                      
                                      

                                      –EXT-IO--

                                      ! 443_megaesp_extio.png
                                      html

                                      <title>MegaESP</title>[Back](/sec/)
                                      -- Ports --
                                      [P10 - IN](/sec/?mc=10)
                                      [P11 - IN](/sec/?mc=11)
                                      [P12 - IN](/sec/?mc=12)
                                      [P13 - OUT](/sec/?mc=13)
                                      [P14 - OUT](/sec/?mc=14)
                                      [P15 - OUT](/sec/?mc=15)
                                      [P16 - OUT](/sec/?mc=16)
                                      [P17 - OUT](/sec/?mc=17)
                                      [P18 - OUT](/sec/?mc=18)
                                      [P19 - OUT](/sec/?mc=19)
                                      [P20 - IN](/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)
                                      
                                      

                                      –EXT-IO--

                                      --Ext-DS--

                                      
                                          <title>MegaESP</title>
                                      
                                          MegaESP api by[ab-log.ru](http://ab-log.ru)(fw: 0.33b4)
                                      
                                          [Config](/sec/cfg/)
                                      
                                          -- Ports --
                                      
                                          [P0 - NC](/sec/?pt=0)
                                      
                                          [P1 - PWM_OUT](/sec/?pt=1)
                                      
                                          [P2 - NC](/sec/?pt=2)
                                      
                                          [P3 - WS281x](/sec/?pt=3)
                                      
                                          [P4 - DS](/sec/?pt=4)
                                      
                                          [P5 - DS](/sec/?pt=5)
                                      
                                          [P6 - NC](/sec/?pt=6)
                                      
                                          [P7 - I2C_SDA](/sec/?pt=7)
                                      
                                          [P8 - I2C_SCL](/sec/?pt=8)
                                      
                                          [P9 - ADC](/sec/?pt=9)
                                      
                                          -- ExtIO --
                                      
                                          [EXT - IO](/sec/?mc=1)
                                      
                                          [EXT - PWM](/sec/?pc=1)
                                      
                                          -- ExtDS --
                                      
                                          [BMP085/180](/sec/?bm=1)
                                      
                                          [BME280](/sec/?be=1)
                                      
                                          [BH1750](/sec/?bh=1)
                                      
                                      

                                      Отсюда вопрос

                                      1. Как ограничить опрос path: '/' + pass + '/?pt=' + port c 0 до 9 и продолжить опрос c 10…. path: '/' + pass + '/?mc=' + port , path: '/' + pass + '/?pc=' + port , path: '/' + pass + '/?bm=' + port , path: '/' + pass + '/?be=' + port , path: '/' + pass + '/?bh=' + port ?

                                      function detectPortConfig(ip, pass, length, callback, port, result) {
                                          if (port === undefined) {
                                              port = 0;
                                              result = [];
                                          } else {
                                              port++;
                                              if (port >= length) {
                                                  return callback(result);
                                              }
                                          }
                                      
                                          var parts = ip.split(':');
                                          var options = {
                                              host: parts[0],
                                              port: parts[1] || 80,
                                              path: '/' + pass + '/?pt=' + port
                                          };
                                      
                                          adapter.log.info('read config from port: http://' + ip + options.path);
                                          .......
                                      

                                      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
                                        #25

                                        Добавил MCP23017 v0.0.5 пока настройки не считывает( только 10 портов, астальное руками )

                                        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
                                        • BluefoxB Offline
                                          BluefoxB Offline
                                          Bluefox
                                          schrieb am zuletzt editiert von
                                          #26

                                          MegaD самая сложная система в принципе реализации конфигурации. У неё может быть 100 различных видов настроек. И никакой возможности считать эту конфигурацию, кроме, как парсить HTML страницы. Прошлый век..

                                          Я уже писал http://www.ab-log.ru/forum/viewtopic.ph … =80#p22955

                                          но они хотят оставаться в прошлом веке...

                                          Я понимаю, если действительно места в памяти нет. Но в esp то вроде больше всего.

                                          Почему не пропарсить главную страницу просто regexp?

                                          var m = body.match(/[](\/([^)
                                          ```` [Как результат:
                                          

                                          /sec/?pt=0
                                          /sec/?pt=1
                                          /sec/?pt=2
                                          /sec/?pt=3
                                          /sec/?pt=4
                                          /sec/?pt=5
                                          /sec/?pt=6
                                          /sec/?pt=7
                                          /sec/?pt=8
                                          /sec/?pt=9
                                          /sec/?mc=1
                                          /sec/?pc=1
                                          /sec/?bm=1
                                          /sec/?be=1
                                          /sec/?bh=1

                                          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

                                          565

                                          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