Navigation

    • Register
    • Login
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. ferpando
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    ferpando

    @ferpando

    Hero Member

    28
    Reputation
    172
    Posts
    1688
    Profile views
    1
    Followers
    0
    Following
    Joined Last Online
    Location Madrid

    ferpando Follow
    Hero Member

    Best posts made by ferpando

    • 6 Way wall touch switch

      Hello,

      This weekend I've been busy with a prototype for a touch wall switch.
      So far is going pretty well and everything seems to work.
      I still need to integrate it with MySensors, but I hope this will be the easiest part.
      The only problem I found is with the sensitivity of the touch sensors when connected to external power.
      It works perfectly when using USB power, but not quite right then using AC power.

      Here's how it looks so far. Remember this is just a proof of concept and many things where just do as I go and probably will be a better way to do it.

      Any suggestions / comments will be greatly appreciated.

      This is the front plate made with a 2mm methacrylate plastic, with a printed paper behind.
      c100.jpg

      This is the back side with the touch controller
      c100-5.jpg

      And this is the actual node with the led driver and the buzzer
      c100-6.jpg

      And this is how it works for now
      c100b.mp4

      posted in My Project
      ferpando
      ferpando
    • Motion and lux meters combined in a single device

      Hello,

      I always wanted a motion sensor that could also detect light levels.
      Until now I used two sensors attached to one arduino to achieve that, but now I make a hardware combination that works and also looks more discreet.

      This is the device I used as a base, adding the light sensor.

      _DSC8283.jpg

      First of all I removed the white dome.
      Then a little adjustment was needed becasue the light sensor is too long so the sensor chip fits properly inside the dome.

      _DSC8284.jpg

      Also the white plastic needed some cutting to allow the circuit to enter the dome.

      _DSC8285.jpg

      The light sensor circuit has to be on the opposite side of this little metal pit in order to fit properly.

      _DSC8286.jpg

      Here is the assembly almos done, with the light sensing chip facing up inside the dome.

      _DSC8287.jpg

      Little hotglue on the corners to hold it toghether

      _DSC8290.jpg

      And that's all to it.

      _DSC8291.jpg

      Here's the code. Just a simple combine of the 2 sensors.

      #include <MySensor.h>  
      #include <SPI.h>
      #include <BH1750.h>
      #include <Wire.h> 
      
      #define CHILD_ID_LIGHT 0
      #define LIGHT_SENSOR_ANALOG_PIN 0
      unsigned long SLEEP_TIME = 30000; // Sleep time between reads (in milliseconds)
      
      #define DIGITAL_INPUT_SENSOR 3   // The digital input you attached your motion sensor.  (Only 2 and 3 generates interrupt!)
      #define INTERRUPT DIGITAL_INPUT_SENSOR-2 // Usually the interrupt = pin -2 (on uno/nano anyway)
      #define CHILD_ID 1   // Id of the sensor child
      
      BH1750 lightSensor;
      
      MySensor gw;
      // Initialize motion message
      MyMessage msg(CHILD_ID, V_TRIPPED);
      MyMessage msg2(CHILD_ID_LIGHT, V_LIGHT_LEVEL);
      uint16_t lastlux;
      
      void setup()  
      {  
        gw.begin();
      
        // Send the sketch version information to the gateway and Controller
        gw.sendSketchInfo("MotionLuxSensor", "1.0");
      
        pinMode(DIGITAL_INPUT_SENSOR, INPUT);      // sets the motion sensor digital pin as input
      
        // Register all sensors to gw (they will be created as child devices)
        gw.present(CHILD_ID, S_MOTION);
        gw.present(CHILD_ID_LIGHT, S_LIGHT_LEVEL);
      
        lightSensor.begin();
      }
      
      void loop()     
      {     
        // Read digital motion value
        boolean tripped = digitalRead(DIGITAL_INPUT_SENSOR) == HIGH; 
          
        Serial.println(tripped);
        gw.send(msg.set(tripped?"1":"0"));  // Send tripped value to gw 
      
        uint16_t lux = lightSensor.readLightLevel();// Get Lux value
        Serial.println(lux);
        if (lux != lastlux) {
            gw.send(msg2.set(lux));
            lastlux = lux;
        }
      
      
        // Sleep until interrupt comes in on motion sensor. Send update every two minute. 
        gw.sleep(INTERRUPT,CHANGE, SLEEP_TIME);
      }
      posted in Hardware
      ferpando
      ferpando
    • RE: 6 Way wall touch switch

      This is a rough integration of the code with MySensors.
      It sends messages back and forth, so if a button is touched it turns on the corresponding device on the controller and if the switch is turned on the controller, the touch leds are updated accordingly

      #include "mpr121.h"
      #include <Wire.h>
      #include "LedControlMS.h"
      #include <MySensor.h>
      #include <SPI.h>
      #include <MyBuffer.h>
      
      #define CHILD_ID1 1   // first child
      #define CHILD_NUM 6    // number of switches
      
      
      //define working pins
       #define BUZZER 7   // buzzer pin
       #define DIN    6   // pin 6 is connected to the DataIn 
       #define CLK    4   // pin 4 is connected to the CLK 
       #define LOD    8   // pin 8 is connected to LOAD 
       #define IRQ    3   // irq pin for touch control
       #define BAKLIT 5   // pin PWM for backlight leds
       
      // ********* MyBuffer ***********************************************************
      MyBuffer buffer;               // define a new buffer
      long previousMillis = 0;       // will store last time buffer was processed
      long interval = 1000;           // interval at which to check buffer
      // ******************************************************************************
      
      MySensor gw;
      
      //define a new led control
      LedControl lc=LedControl(DIN,CLK,LOD,1);
      
      //int irqpin = 3;  // Digital pin IRQ
      boolean touchStates[12]; //to keep track of the previous touch states
      boolean touchMemory[12]; //to keep track of the touch switch states
      
      // correspondence between touch and led pins
      int mapping[2][6]={{0,1,2,3,4,5}     // touch pins
                        ,{1,0,2,5,4,3}};   // led pins
      
      int sound = 500;
      int touchDelay=500;
      
      void setup(){
        // init LED backlight
        pinMode(BAKLIT, OUTPUT);
        analogWrite(BAKLIT, 5);
        
        pinMode(IRQ, INPUT);
        digitalWrite(IRQ, HIGH); //enable pullup resistor
        Wire.begin();
        pinMode(BUZZER, OUTPUT);
        
        for (int i=0; i < 12; i++){
          touchMemory[i]=false;
        }
        mpr121_setup();
        
        //initialize MAX72XX
        lc.shutdown(0,false);
        lc.setIntensity(0,15);
        lc.clearDisplay(0);
        
        gw.begin(incomingMessage, AUTO); //do not make relay node
        gw.sendSketchInfo("WallTouch", "1.0");
        for (int i=0; i<CHILD_NUM;i++) {
         
          gw.present(CHILD_ID1+i, S_LIGHT);
          
          // Set touch button leds to last known state (using eeprom storage) 
          touchMemory[i] = gw.loadState(i)?true:false;
          setLed(mapping[1][i],touchMemory[i]);
        }
      }
      
      void loop(){
        gw.process();
        //watch for touch events
        readTouchInputs();
        //check for buffer items once in a while
        checkTime();
      }
      
      void checkTime(){
         unsigned long currentMillis = millis();
         if(currentMillis - previousMillis > interval) {
              previousMillis = currentMillis;  
              processBuffer();    
            }
      }
      
      void incomingMessage(const MyMessage &message) {
        buffer.push(message.sensor,message.type,message.getString());
      }
      
      //gets message from buffer if exists
      void processBuffer(){
          if(!buffer.isEmpty()){
              String msg=buffer.pop();
              
              int mIndex = msg.indexOf(';');
              int secondmIndex = msg.indexOf(';', mIndex+1);
        
              String firstValue = msg.substring(0, mIndex);
              String secondValue = msg.substring(mIndex+1, secondmIndex);
              String thirdValue = msg.substring(secondmIndex+1);
              
              int sensor = firstValue.toInt();
              int type = secondValue.toInt();
              String data = thirdValue;
        
              Serial.println("    >> Process MSG: s:"+ firstValue +", t:"+secondValue+", d:"+thirdValue);
              
              processMsg(sensor, type, data);
          }
      }
      
      //process message from queue
      void processMsg(int sensor, int type, String data){
        boolean msg;
         switch(type){
              case V_LIGHT: 
                 //comando para 1 rele
                 
                 msg=data.toInt()?1:0;
                 // Store state in eeprom
                 gw.saveState(sensor, msg);      
                 // Write some debug info
                 Serial.print("--> Incoming change for child:");
                 Serial.print(sensor-1);
                 Serial.print(", New status: ");
                 Serial.println(msg);
                 setTouchButton(sensor-1);
                break;
      
            }
      }
      
      void setTouchButton(int pressed){
            MyMessage msg(CHILD_ID1+pressed,V_LIGHT);
            
            Serial.print("pin ");
            Serial.print(pressed);
            Serial.print(" was just touched");
            Serial.print(", turning: ");
            touchMemory[pressed]=touchMemory[pressed]?false:true;
            gw.saveState(pressed, touchMemory[pressed]);
            Serial.println(touchMemory[pressed]?"ON":"OFF");
            setLed(mapping[1][pressed],touchMemory[pressed]?true:false);
        
            gw.send(msg.set(touchMemory[pressed] ? 1 : 0));
            touchSound();
      }
      
      void setLed(int led, boolean lit){
        lc.setLed(0,0,led,lit);
      }
      
      void readTouchInputs(){
        if(!checkInterrupt()){
          
          //read the touch state from the MPR121
          Wire.requestFrom(0x5A,2); 
          
          byte LSB = Wire.read();
          byte MSB = Wire.read();
          
          uint16_t touched = ((MSB << 8) | LSB); //16bits that make up the touch states
      
          
          for (int i=0; i < 12; i++){  // Check what electrodes were pressed
            if(touched & (1<<i)){
            
              if(touchStates[i] == 0){
                 //pin i was just touched
                setTouchButton(i);  
                delay(touchDelay);
                }else if(touchStates[i] == 1){
                  //pin i is still being touched
                }  
            
              touchStates[i] = 1;      
            }else{
             /* if(touchStates[i] == 1){
                Serial.print("pin ");
                Serial.print(i);
              Serial.println(" is no longer being touched");
                
                //pin i is no longer being touched
             }*/
              
              touchStates[i] = 0;
            }
          
          }
        }
      }
      
      void touchSound(){
        tone(BUZZER, sound, 3);
      }
      
      
      void mpr121_setup(void){
      
        set_register(0x5A, ELE_CFG, 0x00); 
        
        // Section A - Controls filtering when data is > baseline.
        set_register(0x5A, MHD_R, 0x01);
        set_register(0x5A, NHD_R, 0x01);
        set_register(0x5A, NCL_R, 0x00);
        set_register(0x5A, FDL_R, 0x00);
      
        // Section B - Controls filtering when data is < baseline.
        set_register(0x5A, MHD_F, 0x01);
        set_register(0x5A, NHD_F, 0x01);
        set_register(0x5A, NCL_F, 0xFF);
        set_register(0x5A, FDL_F, 0x02);
        
        // Section C - Sets touch and release thresholds for each electrode
        set_register(0x5A, ELE0_T, TOU_THRESH);
        set_register(0x5A, ELE0_R, REL_THRESH);
       
        set_register(0x5A, ELE1_T, TOU_THRESH);
        set_register(0x5A, ELE1_R, REL_THRESH);
        
        set_register(0x5A, ELE2_T, TOU_THRESH);
        set_register(0x5A, ELE2_R, REL_THRESH);
        
        set_register(0x5A, ELE3_T, TOU_THRESH);
        set_register(0x5A, ELE3_R, REL_THRESH);
        
        set_register(0x5A, ELE4_T, TOU_THRESH);
        set_register(0x5A, ELE4_R, REL_THRESH);
        
        set_register(0x5A, ELE5_T, TOU_THRESH);
        set_register(0x5A, ELE5_R, REL_THRESH);
        /*
        set_register(0x5A, ELE6_T, TOU_THRESH);
        set_register(0x5A, ELE6_R, REL_THRESH);
        
        set_register(0x5A, ELE7_T, TOU_THRESH);
        set_register(0x5A, ELE7_R, REL_THRESH);
        
        set_register(0x5A, ELE8_T, TOU_THRESH);
        set_register(0x5A, ELE8_R, REL_THRESH);
        
        set_register(0x5A, ELE9_T, TOU_THRESH);
        set_register(0x5A, ELE9_R, REL_THRESH);
        
        set_register(0x5A, ELE10_T, TOU_THRESH);
        set_register(0x5A, ELE10_R, REL_THRESH);
        
        set_register(0x5A, ELE11_T, TOU_THRESH);
        set_register(0x5A, ELE11_R, REL_THRESH);
        */
        // Section D
        // Set the Filter Configuration
        // Set ESI2
       set_register(0x5A, FIL_CFG, 0x12);  //12 mas  menos
        
         //set_register(0x5A, FIL_CFG, 0x24);  //segundo filtro
       // set_register(0x5A, 0x5C, 0x28);    // primer filtro (mio)
        //ajuste de la corrente de carga de cada pin
         /*  set_register(0x5A, 0x5F, CDC_sensor[0]);   //el 0
            set_register(0x5A, 0x60, CDC_sensor[1]);   //el 1
            set_register(0x5A, 0x61, CDC_sensor[2]);   //el 2
            set_register(0x5A, 0x62, CDC_sensor[3]);   //el 3
            set_register(0x5A, 0x63, CDC_sensor[4]);   //el 4
            set_register(0x5A, 0x64, CDC_sensor[5]);   //el 5
        */
        
        
        // Section E
        // Electrode Configuration
        // Set ELE_CFG to 0x00 to return to standby mode
        set_register(0x5A, ELE_CFG, 0x0C);  // Enables all 12 Electrodes
        
        
        // Section F
        // Enable Auto Config and auto Reconfig
        /*set_register(0x5A, ATO_CFG0, 0x0B);
        set_register(0x5A, ATO_CFGU, 0xC9);  // USL = (Vdd-0.7)/vdd*256 = 0xC9 @3.3V   set_register(0x5A, ATO_CFGL, 0x82);  // LSL = 0.65*USL = 0x82 @3.3V
        set_register(0x5A, ATO_CFGT, 0xB5);*/  // Target = 0.9*USL = 0xB5 @3.3V
        
        set_register(0x5A, ELE_CFG, 0x0C);
        
      }
      
      
      boolean checkInterrupt(void){
        return digitalRead(IRQ);
      }
      
      
      void set_register(int address, unsigned char r, unsigned char v){
          Wire.beginTransmission(address);
          Wire.write(r);
          Wire.write(v);
          Wire.endTransmission();
      }
      
      posted in My Project
      ferpando
      ferpando
    • RE: PCB design and production

      Here is my first attemp at it.
      I just started with eagle, so maybe there is room for improvement.
      This is for a dimmer node, with some connector for motion detector and light sensor.
      It has an onboard 7805 regulator and a mosfet to PWM the leds.

      mynode.png

      Comments are welcome

      posted in Hardware
      ferpando
      ferpando
    • RE: 6 Way wall touch switch

      I got it finally installed.
      This is what it looks like.

      https://youtu.be/2AEMxA0ZxUc

      I'm working on a pcb smaller version. I'll keep you posted.

      posted in My Project
      ferpando
      ferpando
    • Nap machine / Scene controller

      Hello,

      It's been a while since a posted last. It's been really busy around here.

      I've been using a node with a button to start and stop nap time, and control some scene.

      My controller has been Vera for a long time, but now I think it's time for an upgrade.
      I installed openhab a few weeks back and started to play with it.

      Anyway, I thought it was time to make a new thing to control naps. That's how nap machine was born. But as I was building it, I thought it could do a lot more. Become a grown up scene controller.

      As you can see in the video, it has an oled display, a rotary encoder and a buzzer.
      It works with SPI displays, as well as I2C. It also has a radio to connect with MySensors gateway.
      The rotary encoder has a integrated button and 2 leds. The program can detect rotation, single click, double click and long click.

      Take a look at the video to see some options. Still in early stage, but it works and it's fully integrated with MySensors.
      I need now to integrate it with openhab, and in this regard I hope to find some help here.

      Feel free to comment or suggest new uses.
      In the following days I'll post the code as it is now, and some schematics for those interested.

      VIDEO:
      napMachine
      0_1504390432905_Captura de pantalla 2017-09-03 a las 0.13.12.png

      posted in My Project
      ferpando
      ferpando
    • RE: Using optocoupler as actuator in node

      @BulldogLowell
      I'm using 74HC595.
      I solved it changing the sketch from relay to servo, and them making some modifications to it.
      It works very nice now.

      posted in Hardware
      ferpando
      ferpando
    • Node freezing up

      Hello,

      I have a node that every once in a while just stops responding.
      I have to unplug it to get it back working.
      It is strange because it doesn't appear to be a reason.
      Anyone had issues like this before?

      posted in Troubleshooting
      ferpando
      ferpando
    • RE: 6 Way wall touch switch

      @Atman
      Yes it is all hand made.
      Next step would be to make a board to make it smaller and easier to make

      posted in My Project
      ferpando
      ferpando
    • RE: Scene too fast for gateway?

      @hek
      Here's a basic implementation of the sending queue I came up with.

      First I modified this functions:

      function sendCommandWithMessageType(altid, messageType, ack, variableId, value)
      
      	local cmd = altid..";".. msgType[messageType] .. ";" .. ack .. ";" .. variableId .. ";" .. value
      
      	-- only add to list if of SET type
      	if (messageType =="SET") then
      		addToMyQueue(cmd)
       	end
      
      	if (luup.io.write(cmd) == false)  then
      		task("Cannot send command - communications error", TASK_ERROR)
      		luup.set_failure(true)
      		return false
      	end
      
      	return true
      end
      
      function processIncoming(s)
      	local incomingData = s:split(";")
      	if (#incomingData >=4) then
      		-- check if msg is in the list to remove it
      		checkMyQueue(s);
      
      		local nodeId = incomingData[1]
      
      ...
      
      end
      

      And added this other functions:

      -- adds cmd msg to the list before sending
      function addToMyQueue(myCmd)
      
      	local isFound = inTable(MyMsgs, myCmd);
      	-- if not already in the list, add it
      	if (isFound == false) then
      		table.insert( MyMsgs, myCmd )
      	end
      	
      end
      
      -- check if msg is in the list to remove it
      function checkMyQueue(msg)
      	log(MyPrefix .. ">T> queue        : " .. printTable(MyMsgs) )
      	local isFound = inTable(MyMsgs, msg);
      	-- if msg found, remove it because has been executed
      	if (isFound ~= false) then
      		log("msg found in pos: "..isFound..". Removing from list...")
      		table.remove (MyMsgs , isFound) 
      		else
      
      			log("msg not found in list") 
      		end
      	log(MyPrefix .. ">T> queue updated: " .. printTable(MyMsgs) )
      end
      
      function inTable(tbl, item)
          for key, value in pairs(tbl) do
              if value == item then return key end
          end
          return false
      end
      

      It basically works but the problem with this is that processIncoming() is only processed when a new message arrives, so there is no way we could re-send lost messages when iddle.

      We need a function that could be executed at regular intervals to check if there are any messages left in the queue to be re-send.

      posted in Vera
      ferpando
      ferpando

    Latest posts made by ferpando

    • RE: ESP8266 MQTT gateway radio problem

      Thank you.
      I'll make some tests if I can find one

      posted in Troubleshooting
      ferpando
      ferpando
    • RE: Nap machine / Scene controller

      Hello,
      Here's a simple schematic of the project

      0_1504521460415_Captura de pantalla 2017-09-04 a las 12.34.32.png

      posted in My Project
      ferpando
      ferpando
    • RE: ESP8266 MQTT gateway radio problem

      Thank you.
      I'll keep trying some other things..

      posted in Troubleshooting
      ferpando
      ferpando
    • RE: ESP8266 MQTT gateway radio problem

      yes.. more or less the same

      posted in Troubleshooting
      ferpando
      ferpando
    • RE: Switching multiple lights

      Hello,

      I had a similar problem some time ago..
      Take a look at this to see if it might help

      https://forum.mysensors.org/topic/131/scene-too-fast-for-gateway

      posted in MyNodes.NET
      ferpando
      ferpando
    • RE: ESP8266 MQTT gateway radio problem

      Tried all sorts of things.
      Also tried the module with antenna and the one without..
      The problem is random.

      When it happens, I see the node sending data, and I see the gateway receiving it realtime, but the do not connect.
      That's what I don't understand.

      posted in Troubleshooting
      ferpando
      ferpando
    • RE: Nap machine / Scene controller

      I just draw them in photoshop, save then as monochrome gif, and then use an online service to generate the arrays to use on the code.

      Something like this:

      imageconverter.rest7.com

      posted in My Project
      ferpando
      ferpando
    • ESP8266 MQTT gateway radio problem

      Hello,
      I created an MQTT gateway a few days ago and a node to check communication.
      I'm on 2.1.1 and everything seems to work fine most of the time.

      But sometimes, when powering up the node, I get lots of fail massages.

      The gateway receives messages from the node, but for some reason the don't understand each other.

      Here is the log from the node:

      0 MCO:BGN:INIT NODE,CP=RNNNA--,VER=2.1.1
      3 TSM:INIT
      4 TSF:WUR:MS=0
      11 TSM:INIT:TSP OK
      12 TSM:INIT:STATID=50
      15 TSF:SID:OK,ID=50
      16 TSM:FPAR
      53 TSF:MSG:SEND,50-50-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      2060 !TSM:FPAR:NO REPLY
      2062 TSM:FPAR
      2098 TSF:MSG:SEND,50-50-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      4106 !TSM:FPAR:NO REPLY
      4108 TSM:FPAR
      4144 TSF:MSG:SEND,50-50-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      6152 !TSM:FPAR:NO REPLY
      6154 TSM:FPAR
      6190 TSF:MSG:SEND,50-50-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      8198 !TSM:FPAR:FAIL
      8199 TSM:FAIL:CNT=1
      8201 TSM:FAIL:PDT
      18204 TSM:FAIL:RE-INIT
      18206 TSM:INIT
      18213 TSM:INIT:TSP OK
      18215 TSM:INIT:STATID=50
      18217 TSF:SID:OK,ID=50
      18220 TSM:FPAR
      18256 TSF:MSG:SEND,50-50-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      20264 !TSM:FPAR:NO REPLY
      20267 TSM:FPAR
      20303 TSF:MSG:SEND,50-50-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      22311 !TSM:FPAR:NO REPLY
      22313 TSM:FPAR
      22350 TSF:MSG:SEND,50-50-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      24357 !TSM:FPAR:NO REPLY
      24359 TSM:FPAR
      24396 TSF:MSG:SEND,50-50-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      26403 !TSM:FPAR:FAIL
      26404 TSM:FAIL:CNT=2
      26406 TSM:FAIL:PDT
      

      And here is the log from the gateway:

      0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGE--,VER=2.1.1
      0;255;3;0;9;TSF:LRT:OK
      0;255;3;0;9;TSM:INIT
      0;255;3;0;9;TSF:WUR:MS=0
      scandone
      state: 0 -> 2 (b0)
      state: 2 -> 3 (0)
      state: 3 -> 5 (10)
      add 0
      aid 2
      cnt 
      0;255;3;0;9;TSM:INIT:TSP OK
      0;255;3;0;9;TSM:INIT:GW MODE
      0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0
      0;255;3;0;9;MCO:REG:NOT NEEDED
      f r0, scandone
      ..
      connected with setol, channel 6
      ip:192.168.1.135,mask:255.255.255.0,gw:192.168.1.1
      .IP: 192.168.1.135
      0;255;3;0;9;MCO:BGN:STP
      0;255;3;0;9;MCO:BGN:INIT OK,TSP=1
      IP: 192.168.1.135
      0;255;3;0;9;Attempting MQTT connection...
      0;255;3;0;9;MQTT connected
      0;255;3;0;9;Sending message on topic: mygateway1-out/0/255/0/0/18
      0;255;3;0;9;Message arrived on topic: mygateway1-in/50/1/1/0/19
      0;255;3;0;9;!TSF:MSG:SEND,0-0-50-50,s=1,c=1,t=19,pt=0,l=1,sg=0,ft=0,st=NACK:0
      pm open,type:2 0
      0;255;3;0;9;TSF:MSG:READ,50-50-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
      0;255;3;0;9;TSF:MSG:BC
      0;255;3;0;9;TSF:MSG:FPAR REQ,ID=50
      0;255;3;0;9;TSF:PNG:SEND,TO=0
      0;255;3;0;9;TSF:CKU:OK
      0;255;3;0;9;TSF:MSG:GWL OK
      0;255;3;0;9;!TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
      0;255;3;0;9;TSF:MSG:READ,50-50-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
      0;255;3;0;9;TSF:MSG:BC
      0;255;3;0;9;TSF:MSG:FPAR REQ,ID=50
      0;255;3;0;9;TSF:CKU:OK,FCTRL
      0;255;3;0;9;TSF:MSG:GWL OK
      0;255;3;0;9;!TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
      0;255;3;0;9;TSF:MSG:READ,50-50-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
      0;255;3;0;9;TSF:MSG:BC
      0;255;3;0;9;TSF:MSG:FPAR REQ,ID=50
      0;255;3;0;9;TSF:CKU:OK,FCTRL
      0;255;3;0;9;TSF:MSG:GWL OK
      0;255;3;0;9;!TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
      0;255;3;0;9;TSF:MSG:READ,50-50-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
      0;255;3;0;9;TSF:MSG:BC
      0;255;3;0;9;TSF:MSG:FPAR REQ,ID=50
      0;255;3;0;9;TSF:CKU:OK,FCTRL
      0;255;3;0;9;TSF:MSG:GWL OK
      0;255;3;0;9;!TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
      0;255;3;0;9;TSF:MSG:READ,50-50-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
      0;255;3;0;9;TSF:MSG:BC
      0;255;3;0;9;TSF:MSG:FPAR REQ,ID=50
      0;255;3;0;9;TSF:PNG:SEND,TO=0
      0;255;3;0;9;TSF:CKU:OK
      0;255;3;0;9;TSF:MSG:GWL OK
      0;255;3;0;9;!TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
      0;255;3;0;9;TSF:MSG:READ,50-50-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
      

      I tried the log parser but I don't see where is the problem.

      I'd appreciate any help.
      Thanks in advance

      posted in Troubleshooting
      ferpando
      ferpando
    • Nap machine / Scene controller

      Hello,

      It's been a while since a posted last. It's been really busy around here.

      I've been using a node with a button to start and stop nap time, and control some scene.

      My controller has been Vera for a long time, but now I think it's time for an upgrade.
      I installed openhab a few weeks back and started to play with it.

      Anyway, I thought it was time to make a new thing to control naps. That's how nap machine was born. But as I was building it, I thought it could do a lot more. Become a grown up scene controller.

      As you can see in the video, it has an oled display, a rotary encoder and a buzzer.
      It works with SPI displays, as well as I2C. It also has a radio to connect with MySensors gateway.
      The rotary encoder has a integrated button and 2 leds. The program can detect rotation, single click, double click and long click.

      Take a look at the video to see some options. Still in early stage, but it works and it's fully integrated with MySensors.
      I need now to integrate it with openhab, and in this regard I hope to find some help here.

      Feel free to comment or suggest new uses.
      In the following days I'll post the code as it is now, and some schematics for those interested.

      VIDEO:
      napMachine
      0_1504390432905_Captura de pantalla 2017-09-03 a las 0.13.12.png

      posted in My Project
      ferpando
      ferpando
    • RE: Code is required for 16-relays shift register actuator

      @tjay4x4 said:

      16 relay with arduino

      Hello,

      This <MyBuffer.h> is not really needed if you don't want to check if message is received on the node.

      Just remove that line and everything should work.

      posted in Troubleshooting
      ferpando
      ferpando