Navigation

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

    Posts made by mortommy

    • Node wake up from sleep too early

      Hi,
      I'm on my 16th node with mysensors (2.2.0) library and first time with this kind of issue. I have a sensor on Arduino Nano and in order to save battery, as usual, I use the sleep function:

      sleep(sleep_seconds_between_measures);
      

      the variable value is 900000. The problem is, the node wake ups too early, the debug is:

      Sleep for seconds: 900000
      1116278 MCO:SLP:MS=900000,SMS=0,I1=255,M1=255,I2=255,M2=255
      1116288 TSF:TDI:TSL
      1116399 MCO:SLP:WUP=-1
      1116401 TSF:TRI:TSB
      

      so according to the log parser, values are correct and the node wakes up by the timer interrupt (1116399 MCO:SLP:WUP=-1), but it happens straight away after the sleep command.

      Any clue? Can be any flag that should be reset used by the timer?

      Thank you for your help.

      posted in Troubleshooting
      mortommy
      mortommy
    • RE: RFID sensor, no messages from MQTT GW (reboot on sending)

      ok, some news here:

      • first of all I fixed my issue with the gateway disabling the debug as suggested here.
      • I had anyway some messages lost. Looking at the mqtt broker I couldn't see any message telling me the gw was rebooting and not only messages from gw to sensor were lost also between sensor and gw. I tried to remove the decoupling capacitor and is everything working.

      thank you

      posted in My Project
      mortommy
      mortommy
    • RE: RFID sensor, no messages from MQTT GW (reboot on sending)

      @gohan , boards definition? The sensor type?
      Thank you.

      posted in My Project
      mortommy
      mortommy
    • RE: RFID sensor, no messages from MQTT GW (reboot on sending)

      No news, nothing changes. It happens only if I define a sensor with an id greather then 9

      posted in My Project
      mortommy
      mortommy
    • RE: RFID sensor, no messages from MQTT GW (reboot on sending)

      thank you for your support, yes the sensor is working. It is the first time I'm using the request status logic, I'll try something different to be sure it is not related to the issue.

      posted in My Project
      mortommy
      mortommy
    • RE: RFID sensor, no messages from MQTT GW (reboot on sending)

      thank you again @mfalkvidd .
      We are in the in the second case: in the gateway

      I run this test.

      • Enabled debug in gateway
      • powered on the gateway
      • sent a test message to a knew working sensor (ID 3, V_STATUS = 0)
      • sent a test message to a knew working sensor (ID 3, V_STATUS = 1)
      • powered on the rfid sensor (ID 10)
      • then the rfid sensor sent the request initial status to the gateway
      • the controller sent the message to the gateway (V_LOCK_STATUS = 0)
      • the gateway sent the message to the sensor and the sensor went to V_LOCK_STATUS = 0
      • I sent manually a new status to the rfid sensor using directly the mqtt broker (same mqtt message used by the controller)
      • the gateway receives the message but it reboot by itself!

      I saw in the past this behavior for power issue, but my gateway is working for a while now, and it is working with other sensors.

      here's the gateway log

      IP: 192.168.XXX.XX
      0;255;3;0;9;Attempting MQTT connection...
      0;255;3;0;9;MQTT connected
      0;255;3;0;9;Sending message on topic: mysensors/SI/0/255/0/0/18
      0;255;3;0;9;Sending message on topic: mysensors/SI/0/0/0/0/7
      0;255;3;0;9;Sending message on topic: mysensors/SI/0/1/0/0/6
      0;255;3;0;9;Message arrived on topic: mysensors/SO/3/0/1/0/2
      0;255;3;0;9;TSF:MSG:SEND,0-0-3-3,s=0,c=1,t=2,pt=0,l=1,sg=0,ft=0,st=OK:0
      0;255;3;0;9;TSF:MSG:READ,3-3-0,s=0,c=1,t=2,pt=2,l=2,sg=0:0
      0;255;3;0;9;Sending message on topic: mysensors/SI/3/0/1/0/2
      0;255;3;0;9;Message arrived on topic: mysensors/SO/3/0/1/0/2
      0;255;3;0;9;TSF:MSG:SEND,0-0-3-3,s=0,c=1,t=2,pt=0,l=1,sg=0,ft=0,st=OK:1
      0;255;3;0;9;TSF:MSG:READ,3-3-0,s=0,c=1,t=2,pt=2,l=2,sg=0:1
      0;255;3;0;9;Sending message on topic: mysensors/SI/3/0/1/0/2
      0;255;3;0;9;TSF:MSG:READ,10-10-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=10
      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-10-10,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
      0;255;3;0;9;TSF:MSG:READ,10-10-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
      0;255;3;0;9;TSF:MSG:PINGED,ID=10,HP=1
      0;255;3;0;9;TSF:MSG:SEND,0-0-10-10,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1
      0;255;3;0;9;TSF:MSG:READ,10-10-0,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
      0;255;3;0;9;TSF:MSG:SEND,0-0-10-10,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
      0;255;3;0;9;TSF:MSG:READ,10-10-0,s=255,c=0,t=17,pt=0,l=5,sg=0:2.1.1
      0;255;3;0;9;Sending message on topic: mysensors/SI/10/255/0/0/17
      0;255;3;0;9;TSF:MSG:READ,10-10-0,s=255,c=3,t=6,pt=1,l=1,sg=0:0
      0;255;3;0;9;Sending message on topic: mysensors/SI/10/255/3/0/6
      0;255;3;0;9;TSF:MSG:READ,10-10-0,s=255,c=3,t=11,pt=0,l=9,sg=0:RFID Lock
      0;255;3;0;9;Sending message on topic: mysensors/SI/10/255/3/0/11
      0;255;3;0;9;TSF:MSG:READ,10-10-0,s=255,c=3,t=12,pt=0,l=3,sg=0:2.0
      0;255;3;0;9;Sending message on topic: mysensors/SI/10/255/3/0/12
      0;255;3;0;9;TSF:MSG:READ,10-10-0,s=0,c=0,t=19,pt=0,l=0,sg=0:
      0;255;3;0;9;Sending message on topic: mysensors/SI/10/0/0/0/19
      0;255;3;0;9;TSF:MSG:READ,10-10-0,s=255,c=3,t=26,pt=1,l=1,sg=0:2
      0;255;3;0;9;TSF:MSG:SEND,0-0-10-10,s=255,c=3,t=27,pt=1,l=1,sg=0,ft=0,st=OK:1
      0;255;3;0;9;TSF:MSG:READ,10-10-0,s=0,c=2,t=36,pt=0,l=0,sg=0:
      0;255;3;0;9;Sending message on topic: mysensors/SI/10/0/2/0/36
      0;255;3;0;9;Message arrived on topic: mysensors/SO/10/0/1/0/36
      0;255;3;0;9;TSF:MSG:SEND,0-0-10-10,s=0,c=1,t=36,pt=0,l=1,sg=0,ft=0,st=OK:0
      0;255;3;0;9;Message arrived on topic: mysensors/SO/10/0/1/0/36
      0;255;3;0;9;!TSF:MSG:SEND,0-0-10-10,s=0,c=1,t=36,pt=0,l=1,sg=0,ft=0,st=NACK:1
      0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGA--,VER=2.1.1
      0;255;3;0;9;TSM:INIT
      0;255;3;0;9;TSF:WUR:MS=0
      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
      IP: 192.168.178.34
      0;255;3;0;9;MCO:BGN:STP
      Setup start...
      Reading temperature from HTU21D
      T: 25
      H: 55
      Setup end.
      0;255;3;0;9;MCO:BGN:INIT OK,TSP=1
      IP: 192.168.178.34
      0;255;3;0;9;Attempting MQTT connection...
      0;255;3;0;9;MQTT connected
      0;255;3;0;9;Sending message on topic: mysensors/SI/0/255/0/0/18
      0;255;3;0;9;Sending message on topic: mysensors/SI/0/0/0/0/7
      0;255;3;0;9;Sending message on topic: mysensors/SI/0/1/0/0/6
      

      thank you

      posted in My Project
      mortommy
      mortommy
    • RE: RFID sensor, no messages from MQTT GW (reboot on sending)

      hi @mfalkvidd ,
      yes that comment was from a different logic I had implemented, now I decided to send just the new status and don't request it to the controller (the new status will be sent anyway from the controller).

      The controller sends the status to the MQTT Gateway when it changes, I already verified that the mqtt broker receives the correct message from the controller (it the same message sent when the sensor requests the status in the initialization step). I have monitored the sensor, I can see log from the receive method only when the the sensor receives the first initialization message and then nothing.

      Thank you.

      posted in My Project
      mortommy
      mortommy
    • RFID sensor, no messages from MQTT GW (reboot on sending)

      hi guys,
      I'm trying to set up my rfid locker starting from the sketch in the examples. Instead of using the EEPROM I request the current status to the controller in the initialization step. The set up works fine, after the request to the controller the sensor receives the current status (so the radio module is ok). The sensor does read the rfid devices, and sends the the new status to the controller, but the sensor does not processes any incoming message, except for the first one after the request. here is my sketch:

      // Enable debug prints to serial monitor
      #define MY_DEBUG 
      
      // Enable and select radio type attached
      #define MY_RADIO_NRF24
      //#define MY_RADIO_RFM69
      
      #define MY_NODE_ID 10
      
      #include <SPI.h>
      #include <MySensors.h>  
      #include <Wire.h>
      #include <PN532_I2C.h>
      #include <PN532.h>
      
      
      // Add your valid rfid keys here. To find you your key just run sketch; hold your new RFID tag in fron ot the reader; 
      // and copy the key from serial output of this sketch.
      const uint8_t maxKeyLength = 7;
      uint8_t validKeys[][maxKeyLength] = {
                          { 0x64, 0x5F, 0x10, 0x2B, 0x00, 0x00, 0x00 },    // ADD YOUR KEYS HERE!
                          { 0xC6, 0xDD, 0x32, 0x5E, 0x00, 0x00, 0x00 }};
      int keyCount = sizeof validKeys / maxKeyLength; 
      
      
      #define CHILD_ID 0   // Id of the sensor child
      
      // Pin definition
      const int redLedPin = 4;          // (Digital 4)
      const int greenLedPin = 5;        // (Digital 5)
      const int speakerOut = 6;         // (PWM 6)
      
      bool initialazingMessageReceived = false;
      bool lockStatus;
      
      MyMessage lockMsg(CHILD_ID, V_LOCK_STATUS);
      PN532_I2C pn532i2c(Wire);
      PN532 nfc(pn532i2c);
      
      void setup() {
      
        pinMode(redLedPin, OUTPUT);
        pinMode(greenLedPin, OUTPUT);
        pinMode(speakerOut, OUTPUT);
      
        //at the begining led are switched off
        digitalWrite(redLedPin, LOW);
        digitalWrite(greenLedPin, LOW);
      
        nfc.begin();
        uint32_t versiondata = nfc.getFirmwareVersion();
        if (! versiondata) {
          Serial.print("Couldn't find PN53x board");
          while (1); // halt
        }
        Serial.print("Found NFC chip PN5"); Serial.println((versiondata>>24) & 0xFF, HEX); 
        Serial.print("Firmware ver. "); Serial.print((versiondata>>16) & 0xFF, DEC); 
        Serial.print('.'); Serial.println((versiondata>>8) & 0xFF, DEC);
        // Set the max number of retry attempts to read from a card
        // This prevents us from waiting forever for a card, which is
        // the default behaviour of the PN532.
        nfc.setPassiveActivationRetries(0x3);
      
        // configure board to read RFID tags
        nfc.SAMConfig();
      }
      
      void presentation()  {
        sendSketchInfo("RFID Lock", "2.0");
        present(CHILD_ID, S_LOCK);
      }
      
      void loop() {
      
        //the first time request current alarm system to the controller, during this process led blink
        
        if(!initialazingMessageReceived)
        {
            Serial.print("Requested alarm system current status to the Gateway for initializing.");
            request(CHILD_ID,V_LOCK_STATUS);
            
            digitalWrite(redLedPin, HIGH);
            digitalWrite(greenLedPin, HIGH);
            delay(1000);
            digitalWrite(redLedPin, LOW);
            digitalWrite(greenLedPin, LOW);
            delay(1000);
            digitalWrite(redLedPin, HIGH);
            digitalWrite(greenLedPin, HIGH);
            delay(1000);
            digitalWrite(redLedPin, LOW);
            digitalWrite(greenLedPin, LOW);
            delay(1000);
            digitalWrite(redLedPin, HIGH);
            digitalWrite(greenLedPin, HIGH);
            delay(1000);
            digitalWrite(redLedPin, LOW);
            digitalWrite(greenLedPin, LOW);
            delay(1000);
            digitalWrite(redLedPin, HIGH);
            digitalWrite(greenLedPin, HIGH);
            delay(1000);
            digitalWrite(redLedPin, LOW);
            digitalWrite(greenLedPin, LOW);
            delay(1000);
            digitalWrite(redLedPin, HIGH);
            digitalWrite(greenLedPin, HIGH);
            delay(1000);
            digitalWrite(redLedPin, LOW);
            digitalWrite(greenLedPin, LOW);
            delay(1000);
        }
        else
        {
          
          bool success;
          uint8_t key[] = { 0, 0, 0, 0, 0, 0, 0 };  // Buffer to store the returned UID
          uint8_t currentKeyLength;                 // Length of the UID (4 or 7 bytes depending on ISO14443A card type)
      
      
          // Wait for an ISO14443A type cards (Mifare, etc.).  When one is found
          // 'uid' will be populated with the UID, and uidLength will indicate
          // if the uid is 4 bytes (Mifare Classic) or 7 bytes (Mifare Ultralight)
          success = nfc.readPassiveTargetID(PN532_MIFARE_ISO14443A, &key[0], &currentKeyLength);
      
          if (success) {
            Serial.print("Found tag id: ");
            for (uint8_t i=0; i < currentKeyLength; i++) 
            {
              if (i>0) Serial.print(",");
              Serial.print("0x");Serial.print(key[i], HEX); 
            }
            for (uint8_t i=currentKeyLength; i < maxKeyLength; i++) 
            {
              Serial.print(",0x00"); 
            }
        
        
            Serial.println("");
        
            bool valid = false;
            // Compare this key to the valid once registered here in sketch 
            for (int i=0;i<keyCount && !valid;i++) {
              for (int j=0;j<currentKeyLength && !valid;j++) {
                if (key[j] != validKeys[i][j]) {
                  break;
                }
                if (j==currentKeyLength-1) {
                  valid = true;
                }
              }
            }
            if (valid) {
              // Switch lock status
              setLockState(!lockStatus, true);       
            }
        
            // Wait for card/tag to leave reader    
            while(nfc.readPassiveTargetID(PN532_MIFARE_ISO14443A, &key[0], &currentKeyLength));
          }//if success 
        }//else 
       
      }//loop 
      
      
      
      // Unlocks the door.
      void setLockState(bool state, bool doSend){
        
        if (!state) 
        {
           Serial.println("open lock");
           tone(speakerOut, 329, 500);
           wait(400);
           tone(speakerOut, 329, 500);
           digitalWrite(redLedPin, HIGH);
           digitalWrite(greenLedPin, LOW);
        }
        else
        {
           Serial.println("close lock");
           tone(speakerOut, 261, 500);
           wait(250);
           tone(speakerOut, 294, 500);
           digitalWrite(redLedPin, LOW);
           digitalWrite(greenLedPin, HIGH);
        }
      
        lockStatus = state;
      
        //send the new status to the controller and request the new status to the gateway
        if (doSend)
          send(lockMsg.set(state));    
      }
      
      void receive(const MyMessage &message) {
        // We only expect one type of message from controller. But we better check anyway.
       
        if (message.type==V_LOCK_STATUS) {
           setLockState(message.getBool(), false); 
           
           // Write some debug info
           Serial.print("Incoming lock status:");
           Serial.println(message.getBool());
      
           initialazingMessageReceived = true;
         } 
      }
      

      any idea? thank you for your help.

      posted in My Project
      mortommy
      mortommy
    • RE: ATMega328p 8Mhz internal, standalone, mysensors low power problem

      I have 4 sensors (temp/hum and contact switch) powered by 3V coin battery and with the library 1.5.4 they run for a year. I also decided to upgrade them to the library 2.1.1 and I got some issues. For example the binarysqwitchsleepsensor doesn't sleep. I also noticed that the initialization has many messages sending failure and that is a heavy blow for the battery, I went back to the 1.5.4.

      posted in Troubleshooting
      mortommy
      mortommy
    • RE: NRF24L01+PA+LNA msg send failure

      I had similar issues. I had a serial GW with a NRF24L01+PA+LNA and the option MY_RF24_PA_LEVEL to HIGH and worked for more than one year; than I decided to convert it to an Ethernet GW and I had many failure in sending messages. When I was out of ideas (after checking connection wiring and power issues, adding capacitor, making the ugly shield fix) I decided to play with the MY_RF24_PA_LEVEL, and it started to work again with the value MIN.

      posted in Hardware
      mortommy
      mortommy
    • RE: Low power battery Door/Window sketch nrf24l01

      I want also to specify that my sensor was running under library 1.5.4. At the moment I'm experiencing an issue under the library 2.1.1 that makes the sensor continuously wake up, so the battery discharges itself after few hours. Better under library 2.0.0 but the initialization process has many transmissions failure that give to the battery a heavy blow.

      posted in Development
      mortommy
      mortommy
    • RE: Low power battery Door/Window sketch nrf24l01

      Hi,
      I have some Door/window sensors, powered by a cr2032 coin battery and I was able to run them for 1 year. The sketch above it seems ok, but the secret it's not only the software, it depends on hardware too:

      • remove voltage regulator and led from the arduino
      • choose a ceramic decoupling capacitor for your radio module, and avoid electrolytic capacitors (they have a bigger leakage current)
      • I don't use any step-up converter, and use the battery to power both the radio module and arduino (reported both to work at 3V)
      • a capacitor (again ceramic) of 100uF across the cellโ€™s terminals could sustain a peak current load.

      It's also better to avoid messages sending in a short time, and put some sleep in the middle, but I don't see that situation in the sketch.

      posted in Development
      mortommy
      mortommy
    • RE: Lost Gateway

      yep ๐Ÿ˜ฅ

      posted in General Discussion
      mortommy
      mortommy
    • Lost Gateway

      Yesterday evening I was in my living-room when a bad, and well knew, from who works with electronic, smell came out. I suddenly thought that something was burning and after few minutes I found out that my gateway was not working anymore. Unfortunately I realized that one of the capacitor of my nano clone was completely burned. Now I'm without gateway and waiting for a new one (this time an original one).
      That's only to share my frustration.

      posted in General Discussion
      mortommy
      mortommy
    • RE: Radiator booster (heating)

      Hi,
      very interesting project. How did you choose the fan? Did you calculate the CFM or something else (f.i. why Silent 14 and not 12)? How do you assemble the fans, will you replicate any of the commercial solutions?
      Thank you.

      posted in My Project
      mortommy
      mortommy
    • RE: ๐Ÿ’ฌ MySensor Dioder (Ikea)

      Great news!

      Regarding OH, I didn't have the opportunity to play with the v2.0 yet, I'm still on 1.8.1.
      I have a serial mysensors gateway and this is my set up:

      OH (v1.8.1) <-> OH MQTT binding (as MQTT client) <-> Mosquitto (as MQTT server) <-> mosquitto to serial (python script that reverts messages with topic mysensors to the serial port and vice-versa) <-> serial gateway.

      So my items in OH are based on mqtt binding.

      I guess OH2 and mysensors openhab binding make everything easier.

      posted in OpenHardware.io
      mortommy
      mortommy
    • RE: ๐Ÿ’ฌ MySensor Dioder (Ikea)

      Which module are you using? if it is NRF24L01+ be sure it is the "plus" version.

      posted in OpenHardware.io
      mortommy
      mortommy
    • RE: Switch from hex to normal RGB

      Hi,
      you can try this:

      
      if (message.type==V_RGB)
      {
            char convBuffer[8];
            hexstring = strtol(message.getString(convBuffer),0,16);
            Serial.println(hexstring);
            r=(int)(hexstring>>16);
            g=(int)(hexstring>>8)& 0xFF;
            b=(int)(hexstring)& 0xFF;
      }
      

      Hope it helps.

      posted in General Discussion
      mortommy
      mortommy
    • RE: ๐Ÿ’ฌ MySensor Dioder (Ikea)

      ok, something is definitely wrong with the radio module. Can you check the connection according to this page?

      posted in OpenHardware.io
      mortommy
      mortommy
    • RE: ๐Ÿ’ฌ MySensor Dioder (Ikea)

      @pentti12 ,
      add the line

      #define MY_DEBUG
      

      at the begging of the sketch so via Serial Monitor you'll be able to see the messages pushed by the commands println. You can add other println commands in other point to see the steps covered.

      posted in OpenHardware.io
      mortommy
      mortommy
    • RE: ๐Ÿ’ฌ MySensor Dioder (Ikea)

      Hi @pentti12 ,
      please find the sketch 2.0.0 in the project. I couldn't test it yet, I have converted it following the guidance and I just verified that it compiles successfully.

      posted in OpenHardware.io
      mortommy
      mortommy
    • RE: ๐Ÿ’ฌ MySensor Dioder (Ikea)

      Delete the MySensors folder in libraries and download it again.

      posted in OpenHardware.io
      mortommy
      mortommy
    • RE: Transmission issues, looking for ideas

      Juts to leave a record about the issue. I changed the GW radio module with a NRF24L01 + PA + LNA one, powered by the AMS1117 and the ugly fix. Everything seems to working fine now.
      Thank you to every one.

      posted in Hardware
      mortommy
      mortommy
    • RE: Mysensor-ing a Roomba vacuum cleaner.

      Take a look to this.

      posted in My Project
      mortommy
      mortommy
    • RE: Mysensor-ing a Roomba vacuum cleaner.

      I just tried with a simple sketch proposed in many forum to send a clean command by IR led, and with a normal IR-led, 300 ohm resistor and an arduino uno, from 2 meter I was able to send the commands power and clean.
      to my 870 roomba.

      posted in My Project
      mortommy
      mortommy
    • RE: ๐Ÿ’ฌ MySensor Dioder (Ikea)

      Have you cleaned the folder MySensor within the folder libraries before to copy the 1.5.4 one?

      posted in OpenHardware.io
      mortommy
      mortommy
    • RE: Mysensor-ing a Roomba vacuum cleaner.

      Yes @emka it is not difficult, I have already wrote a sketch. The problem it is, as I said before, and as @vorowski said, an hardware problem, especially with the latest series 8 and 9. You cannot leave the electronics components outside and the space under the handle it is not enough. If you look for a solutions in the web you'll find even two commercial solutions to control roomba, but for the new series they propose some dirty fixes to fit the hardware.
      I'm thinking to control roomba via an IR send/receiver.

      posted in My Project
      mortommy
      mortommy
    • RE: ๐Ÿ’ฌ MySensor Dioder (Ikea)

      Hi,
      yes it happens sometimes. Try to import the library by Arduino IDE (Sketch -> Include Library -> MySensors). You'll have in the sketch two new lines:

      
      #include <MyConfig.h>
      #include <MySensors.h>
      
      

      and you can delete the same lines already included in the code.

      Remember that the sketch is based on mysensor library 1.5.4 it is not converted to 2.0 yet.

      Hope it helps.

      posted in OpenHardware.io
      mortommy
      mortommy
    • RE: wireless door / window sensor

      I built a window and a door sensor, just using a normal magnetic switch as proposed in this example. They are working quite well and are powered by a coin cell battery.

      posted in Hardware
      mortommy
      mortommy
    • RE: ๐Ÿ’ฌ MySensor Dioder (Ikea)

      Hi,

      if you are already using a gateway in Domoticz I guess so. From the mysensor point of view is a RGB sensor (or light switch or dimmer light) the source of the command sento to the serial gateway and then to the ikea mysensorized sensor it doesn't matter.

      posted in OpenHardware.io
      mortommy
      mortommy
    • RE: OpenHab and RGB led strip

      @andredts
      Sure. Just have a look at the code to grab some ideas.

      posted in OpenHAB
      mortommy
      mortommy
    • RE: OpenHab and RGB led strip

      Hi,
      I modified an Ikea Dioder and currently I'm controlling it by openhab. Here you can find items and rules.

      https://www.openhardware.io/view/80/MySensor-Dioder-Ikea#tabs-comments

      posted in OpenHAB
      mortommy
      mortommy
    • RE: Mysensor-ing a Roomba vacuum cleaner.

      Hi,
      I had started to analyze the communication protocol and the project. I found this site very useful. The problem is the sizing. I'd like to keep everything hided so a very small circuit is requested.

      posted in My Project
      mortommy
      mortommy
    • RE: ๐Ÿ’ฌ Connecting the Radio

      If you are powering the device by batteries, I'd suggest to avoid electrolytic decoupling capacitors and go for ceramic or film one since the latter have a smaller leakage current, avoiding battery drain.

      posted in Announcements
      mortommy
      mortommy
    • RE: ๐Ÿ’ฌ MySensor Dioder (Ikea)

      Hi @kevvette ,
      yes, my mistake, S3 goes to D4, I'll correct the post, thank you.
      Regarding the R20, it is just a jumper and first I thought I could use that point for some connection but at the end I didn't use it, so I reestablished the connection. It is not needed to remove the R20.

      posted in OpenHardware.io
      mortommy
      mortommy
    • RE: Transmission issues, looking for ideas

      some news here: I changed the GND jamper from the external regulator to the AMS117 because I noticed the Vin was less than 5V; now the Vin power went back to the expected value and the radio module has now a stable power of 3.3V. Unfortunately I didn't get normal communication from node to GW ๐Ÿ˜ฉ

      posted in Hardware
      mortommy
      mortommy
    • RE: Transmission issues, looking for ideas

      Thank you @scalz ,

      all modules are connected by dupont jamper, partially soldered. The external regulator is based on 78L05.
      But maybe I have something. After your post, I thought I had trusted too much my AMS117 module and I checked the voltage value between Radios' Vcc and Gnd and I found 2,42V, that it looked too small. I had another AMS117, and I switched with this new one and I have now 2.80V. It is a small value, isn't?

      posted in Hardware
      mortommy
      mortommy
    • RE: Transmission issues, looking for ideas

      4.7uF and 10uF

      posted in Hardware
      mortommy
      mortommy
    • RE: Transmission issues, looking for ideas

      Hi @TheoL ,
      the node has this kind of logic schema:

      0_1470916913456_node.PNG

      and the gateway:

      0_1470916932350_gw.PNG

      Yesterday after I saw this long discussion I tried this trick on GW but at the moment doesn't seem to be much better.
      As next step I was thinking to modify the GW not powering the radio module by the arduino regulator but via AMS1117.

      posted in Hardware
      mortommy
      mortommy
    • RE: Transmission issues, looking for ideas

      Unfortunately no luck with the radio module replacement, I still have same issues. I noticed that moving around the node it could be is a problem related to the position, because I get communication to the GW only if I place it in a highest place (10 cm more is enough). I moved down the GW and it looks better but as I said before I noticed some problem with another node. Should I try the radio module with antenna for the GW?

      posted in Hardware
      mortommy
      mortommy
    • RE: ๐Ÿ’ฌ MySensor Dioder (Ikea)

      I just updated the rules.

      posted in OpenHardware.io
      mortommy
      mortommy
    • RE: Transmission issues, looking for ideas

      Hi @TheoL ,
      thank you for your answer.
      I changed the radio module once, because I realized that a stock of new radios I bought from a new seller was not nice so I replaced with a new one I bought from the seller I used before. Just to exclude this option I'll try to change again the radio module.

      posted in Hardware
      mortommy
      mortommy
    • Transmission issues, looking for ideas

      Hi,
      I'm experiencing an issue in transmission and I'm looking for ideas to fix it.

      I have a GW implemented by a Nano (5V) powered via a USB connected to a PC and a NRF24L01+ Radio unit with no antenna and the classic decoupling capacitor; there are 6 nodes implemented by mini 3.3V and one mini 5V. The nodes are powered in different ways (button battery, AA batteries, power units) and I'm having trouble with just one: the 5V mini powered by a power unit and a step down converter (AMS1117) to power the NRF24L01+ Radio. The unit receives command from the GW but the GW seldom receive command from the node. The nodes is not in a difficult position is even better of others (I have one node outside and one inside a metallic cupboard and actually even if it gave me some troubles at the begging now is working).
      I already tried some shoots:

      • moving position, and I get better result if I move it in a highest position, but I'd like to not move it
      • connecting the step down converter directly to the main 5V voltage regulator and not to the Vcc arduino pin.
      • changing the unit radio.
      • changing the decoupling capacitor (also with greater values)
      • moving GW position, it looked better but I'm not sure if fixed the issue and I lost transmission with another node.

      I know NRF24L01+ needs nice power but I have some nodes powered by button battery with no issues and this one has a separated power unit, could be the AMS1117? The poor power affects only transmission? Do you have any ideas? I'm also thinking to change the GW unit radio with the antenna version, could it help?

      Thank you.

      posted in Hardware
      mortommy
      mortommy
    • RE: 2.0 Gateway with 1.5 sensors

      It is a while now I'm using my 2.0 GW (because I wanted to manage sensors connected directly to it) with 1.5 sensors node and everything is running fine.

      posted in Development
      mortommy
      mortommy
    • RE: ๐Ÿ’ฌ MySensor Dioder (Ikea)

      please find items and rules here: https://github.com/mortommy/MySensorDioder

      posted in OpenHardware.io
      mortommy
      mortommy
    • RE: ๐Ÿ’ฌ MySensor Dioder (Ikea)

      Hi,
      3 pins for RGB: R (AIN4) -> D3; G (AIN5) -> D6; B (AIN6) -> D5
      3 pins for buttons: S1(AIN3) -> D7; S2(CEN) -> D2; S3(AIN2) -> D4
      1 ground
      1 5V to Arduino's Vcc if it is 5V version or to RAW if it is 3,3V version
      1 color wheel (AIN7) -> A0

      posted in OpenHardware.io
      mortommy
      mortommy
    • RE: ๐Ÿ’ฌ MySensor Dioder (Ikea)

      I'll post items, rules and sitemap as soon as I'll have the stable version.

      posted in OpenHardware.io
      mortommy
      mortommy
    • RE: Glass Break Sensor as Switch

      Another way to use the sensor value is a voltage divider that commands a transistor used as switch, see the schema below:

      0_1466666782540_upload-15d99272-90cf-4ee0-8316-6214e87ccad3

      until the sensor's value is low, the voltage value applied to the transistor's base is low so it'll be OFF and at the collector we'll have Vdd, if connected to an arduino digital pin it is an HIGH digital value. When the sensor has an high value the voltage applied to the transistor's base will switch it on and since the transistor's emitter is connected to the ground the value seen at the collector is almost 0V, so LOW value at the arduino digital pin.

      posted in Hardware
      mortommy
      mortommy
    • RE: Air Quality: CO2 Sensor MH-Z14

      thank you guys. ๐Ÿ‘

      posted in My Project
      mortommy
      mortommy
    • RE: Air Quality: CO2 Sensor MH-Z14

      Hi @epierre ,
      the CO2 sensor is not available anymore in the store page. On aliexpress there are sensors from 25$ to 80$; did you test the cheapest one? Or in the meantime you have any other suggestion? I'd like to order one and make my CO2 sensor node.
      Thank you.
      Regards.

      posted in My Project
      mortommy
      mortommy
    • RE: Which are the *best* NRF24L01+ modules?

      I bought my first NRF24L01+ modules from cg market and I created some simple nodes (temp/hum and binary switch) using 3V coin battery, and they are up since last January. Than, I'm wondering why ๐Ÿ˜’, I bought other modules from another seller and I got a lot of problem: the binary switch (same of the other one in software and hardware) fails many times in sending communications to the gateway and after just 1 month I had to replace the battery; another node cannot even communicate at all if I move it in another room different from the gateway (of course I tried different values of decoupling-capacitors) ๐Ÿ˜ž
      I have to get new modules ๐Ÿ˜ข

      posted in Hardware
      mortommy
      mortommy
    • RE: ๐Ÿ’ฌ MySensor Dioder (Ikea)

      Thank you!

      posted in OpenHardware.io
      mortommy
      mortommy
    • RE: [SOLVED] Pro Mini 3.3 Voltage supply issue

      With an external regulator it has been running already for 24h ๐Ÿ™‚
      thank you.

      posted in Hardware
      mortommy
      mortommy
    • RE: [SOLVED] Pro Mini 3.3 Voltage supply issue

      Thank you @AWI . So with the 12V I'm on the limit edge...
      I'm not using physically a relay but a transistor based circuit connected to the digital output.

      posted in Hardware
      mortommy
      mortommy
    • [SOLVED] Pro Mini 3.3 Voltage supply issue

      Hi,
      I have an issue I'm struggling with and I'm looking for any suggestion to try to find out a solution.

      I'm trying to develop a relay like version of mysensor using the following:

      • arduino pro mini clone 3,3V 8Mhz
      • NRF24L01+

      the sensor communicates with another microcontroller board (no arduino) already running for several months through 2 digital pin configured as input and output to get or set a status; of course I have the electronic part in order to convert levels between the systems.

      I'd like to share the same 12V regulated power unit I'm using to power the no arduino system using the RAW pin; through the Vcc pins I'll power the radio module and give a fix reference for the other system open collector output.

      I'm not able to understand which regulator uses my pro-mini, I can see printed out on the case something like A20I, but since I read that most of the clones uses the LP2981 I was confident I could supply until 16V, but when I connect my pro-mini everything works for not more than 1 hour, the pro-min stops to work and after some investigation I can see that the mini -pro regulator is broken. I already fried two regulators. I checked the power unit voltage output and I have values around 12.04 / 12.08V.
      Do you thing the pro-mini clone regulator cannot manage 12V? Or it cannot supply the current requested from the radio module (but it should be around 15mA anyway)? Is it better to use an external voltage regulator to get 3,3V from the 12V or I could have the same issue and get fried also that one?
      Thank you in advance for any suggestion or idea.
      Regards.

      posted in Hardware
      mortommy
      mortommy
    • second hand / exchange market

      Hi guys,
      what do you think if we create on this forum a section about sell/exchange electronic spare parts? Probably we bought some 5 or 10 pieces packs from Chinese sellers and we don't use all of them, keeping stocked in our shells, but they can be useful for someone else. We could save time avoiding to wait shipping from China, like now I wold like to have in my hands an additional radio module but I have to wait at least 2 weeks.
      Regards.

      posted in General Discussion
      mortommy
      mortommy
    • RE: Connect sensors directly to the Gateway (again)

      @Mihai thank you! Looking at your example I was able to make my serial gateway with a HTU21D sensor reporting temperature/humidity and listening the other sensors.
      Thank you.

      posted in Development
      mortommy
      mortommy
    • RE: Connect sensors directly to the Gateway (again)

      Hi @hek,
      yes the example I posted is exactly from the development branch, I was wondering if someone already tried to make it working.
      thank you.

      posted in Development
      mortommy
      mortommy
    • Connect sensors directly to the Gateway (again)

      Hi guys!
      I know is something already discussed several times: is it possible to connect sensors directly to the gateway with no need of an additional separate arduino sensor? Since the gateway cannot listen itself and since the gateway is already busy with its work it seems difficult.
      But in the development branch there's an example that makes me think it's possible:

      void setup() { 
        // Setup locally attached sensors
      }
      
      void presentation() {
       // Present locally attached sensors 
      }
      
      void loop() { 
        // Send locally attached sensor data here 
      }
      

      has anyone got a gateway with sensors running successfully? Do you have any example or advise to follow?
      Thank you.
      Regards

      posted in Development
      mortommy
      mortommy
    • RE: How to add a sensor to the serial gateway

      Hi @hek , the link above it's broken. Is it yet available anywhere?
      Thank you.

      posted in Domoticz
      mortommy
      mortommy
    • RE: No communication between Sensor and Gateway

      Hi,
      I solved the issue. After reading many posts I went to check if my radio module was a real NRF24L01+ plus version, and I realized that one of the 5 modules I bought as one pack, the one connected to the serial gateway, is different. So I connected a real plus version and now is working!
      Thank you.

      posted in Troubleshooting
      mortommy
      mortommy
    • RE: No communication between Sensor and Gateway

      Hi @samuel235 , Yes, v1.5.
      I also connected the caps between the radio Vcc and GND connectors to exclude power issues, but I wanted to recycle some pieces I already had, so I used 3.3 uF, could be the problem?
      Thank you.

      posted in Troubleshooting
      mortommy
      mortommy
    • RE: No communication between Sensor and Gateway

      Hi,
      did you solve the issue?
      I have the same behavior between my Gateway (Arduino Nano 5V ) and just one sensor (Arduino Pro Mini 3.3V connected to PC USB port via Arduino UNO board). The Serial Monitor get just the same entries as yours.
      Thank you.

      posted in Troubleshooting
      mortommy
      mortommy