Navigation

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

    palande.vaibhav

    @palande.vaibhav

    11
    Reputation
    64
    Posts
    528
    Profile views
    0
    Followers
    2
    Following
    Joined Last Online

    palande.vaibhav Follow

    Best posts made by palande.vaibhav

    • RE: How to send message from one sensor to other or send message with different node and sensor ID?

      Got it after some trial and error with getters and setters.

      In case someone needs. I did following.

      MyMessage msg();  //Create a blank MyMessage instance. Do this before void setup()
      

      then when you want to send the message. Create a message on the fly like following.

      1. msg.setType(2);
      2. msg.setSensor(1);
      3. msg.setDestination(2);
      4. send(msg.set(1));
      

      This is what I am doing above:

      1. set message type ex. V_LIGHT is 2. Look at API for more
      2. Set sensor child ID of the sensor you want to change status of
      3. This is the destination node ID which has the sensor you are trying to reach
      4. Send the message just like you would usually.

      Hope this helps someone

      posted in Troubleshooting
      palande.vaibhav
      palande.vaibhav
    • RE: CRC doesn't match. File is corrupted. MySensors version 2.0

      @mfalkvidd
      I have extracted the zip from GitHub, renamed the folder to MySensors and pasted it into Documents\Arduino\libraries folder. I don't have MySensors stuff in Program Files(86)\Arduino\libraries folder.

      And it works. Arduino library manager now shows MySensors library version 2.0.0 as installed.

      posted in Troubleshooting
      palande.vaibhav
      palande.vaibhav
    • RE: Problem getting the code to run with MySensors library 2.0

      @ayo

      Oh I get it now. Now I understand. I must have a gateway and at least one sensor node running for this to work. If there is no gateway then sensor nodes don't work because of the constant loop trying to find a parent.

      My problem was I was trying to write and run the code with just the sensor node.

      I will also do the modifications you mentioned to the core files.

      Thanx a lot for your help. I really appreciate it. 👍

      posted in Troubleshooting
      palande.vaibhav
      palande.vaibhav
    • RE: 💬 Connecting the Radio

      @DiverAlpha said:

      Hi all,

      I'm using the Arduino Micro with al NRF24L01 radio. With the micro it's not posible to use the pin config of the Nano.
      I got it working with the connections below.

      NRF24 > Micro
      Miso > Miso
      Mosi > Mosi
      SCK > SCK
      CSN > Pin D7
      CE > Pin D8

      Thereby I put the code below in my arduino code before de "#include <SPI.h>"

      // Pin Confuguration for Arduino Micro
      #define MY_RF24_CE_PIN 8
      #define MY_RF24_CS_PIN 7

      Maybe this is helpful for some other users.

      Grtz Diver

      @DiverAlpha
      Thanx a lot for commenting with that information. I was having problems with the Arduino Mega. I connected the NRF24L01+ to the appropriate SPI pins on the Mega and then just defined the CE and CS pins in the code an now it works. Thanks again

      posted in Announcements
      palande.vaibhav
      palande.vaibhav
    • How does MySensors actually work

      Hello everyone,

      I know this is a very dumb question but I am very new to all this. My question is how does this thing work? I have seen the getting started videos and I have also read the whole getting started page on the website. Here is what I understood.

      1. I need to get the Arduino, radio and a sensor. Wire everything up as shown on the website and power up.

      What after that? I figure I need to connect to the internet using the radio. but after that how does this all connect up? What is vera? Do I need to have it? It looks like a router. Can I use my own router I already have at my home for this? How does the android app connect to the sensors?

      All the videos show how to make a gateway and how to wire up arduino and sensors but then after that they suddenly show the web interface and the android app and everything just starts working. I am having hard time connecting the dots here.

      I am very new to all this but I think I have read whats on the website and also watched the videos before posting this question. So can anyone guide me through the step by step process?

      Thank You

      posted in General Discussion
      palande.vaibhav
      palande.vaibhav
    • RE: 💬 Connecting the Radio

      @DiverAlpha
      I am no expert in this. But when I started using MySensors few months ago, I also had some problems. Not because there is a problem with MySensors but because I was doing the simplest of the mistakes and I needed to think simple and do simple things first.

      What I would suggest is just try the simplest of the code first. This post is considering that you are using MySensors library 2.0.

      This is what I did when I was trying out MySensors and I think you can try this too.

      Firstly connect Arduino you are using properly to the radio with the proper connections using the instructions here. If you are using Arduino Mega, the SPI pins are different. Here is the link for Arduino Mega: https://forum.mysensors.org/topic/4940/arduino-mega-nrf-wiring/3. Make sure you have decoupling capacitors attached between the VCC and GND pins of both the radios.

      After you make the connections upload the code for the gateway to one of the Arduinos. You can find the code in Arduino IDE, File > Examples > MySensors > GatewaySerial. Don't make any changes just upload the code.

      Then what I did the first time is just run the following motion sensor code to the other Arduino. I have made a few changes to make things simpler for the node to find the gateway.

      // Enable debug prints
      #define MY_DEBUG
      
      // Enable and select radio type attached
      #define MY_RADIO_NRF24
      //#define MY_RADIO_RFM69
      
      #define MY_NODE_ID 1
      
      #define MY_PARENT_NODE_ID 0
      
      #include <SPI.h>
      #include <MySensors.h>
      
      //unsigned long SLEEP_TIME = 120000; // Sleep time between reports (in milliseconds)
      #define DIGITAL_INPUT_SENSOR 3   // The digital input you attached your motion sensor.  (Only 2 and 3 generates interrupt!)
      #define CHILD_ID 0   // Id of the sensor child
      
      // Initialize motion message
      MyMessage msg(CHILD_ID, V_TRIPPED);
      
      void setup()  
      {  
        pinMode(DIGITAL_INPUT_SENSOR, INPUT);      // sets the motion sensor digital pin as input
      }
      
      void presentation()  {
        // Send the sketch version information to the gateway and Controller
        sendSketchInfo("Motion Sensor", "1.0");
      
        // Register all sensors to gw (they will be created as child devices)
        present(CHILD_ID, S_MOTION);
      }
      
      void loop()     
      {     
        // Read digital motion value
        boolean tripped = digitalRead(DIGITAL_INPUT_SENSOR) == HIGH; 
              
        Serial.println(tripped);
        send(msg.set(tripped?"1":"0"));  // Send tripped value to gw 
      
        // Sleep until interrupt comes in on motion sensor. Send update every two minute.
        //sleep(digitalPinToInterrupt(DIGITAL_INPUT_SENSOR), CHANGE, SLEEP_TIME);
      }
      

      Here, I have defined a NODE ID and defined the PARENT NODE ID for the node. Defining parent ID makes sure that the gateway that you have is the one, the node is supposed to connect to. I didn't even have motion sensor connected to the node here. This is just to make sure that first time you get everything working.

      If this is done correctly the node and gateway should talk to each other and gateway should have the motion sensor registered.

      Hope this helps.

      posted in Announcements
      palande.vaibhav
      palande.vaibhav
    • RE: 💬 Connecting the Radio

      @ZsoltZombori

      I had a problem of the LED on pin 13 glowing dim after some time of system running fine when I had 2 sensors connected to the Arduino and sensors had their own separate 5V power supply. So, I had a 5V power supply separate from the Arduino's 5V and that was supplying current to those sensors.

      I had the sensor's data pins connected to Arduino but I didn't have GND of power supply and Arduino connected. I solved the problem by connecting the GND of power supply to the GND of the Arduino.

      See if that is the case with you.

      Hope this helps.

      posted in Announcements
      palande.vaibhav
      palande.vaibhav

    Latest posts made by palande.vaibhav

    • RE: 💬 Connecting the Radio

      @ZsoltZombori
      Exactly that was a problem with my system too. When I had it connected to the computer using the serial cable everything would just run fine but as soon as I removed the serial cable from computer and let it run on its own with the power supply connected with a DC jack, everything would just fall apart the LED's would go dim and that's when I discovered the problem of the ground but you already have all the grounds connected so I'm out of clues here.
      I would suggest you to check the power supply connections again with a multimeter to make sure that everything is connected properly.

      posted in Announcements
      palande.vaibhav
      palande.vaibhav
    • RE: 💬 Connecting the Radio

      @ZsoltZombori

      I had a problem of the LED on pin 13 glowing dim after some time of system running fine when I had 2 sensors connected to the Arduino and sensors had their own separate 5V power supply. So, I had a 5V power supply separate from the Arduino's 5V and that was supplying current to those sensors.

      I had the sensor's data pins connected to Arduino but I didn't have GND of power supply and Arduino connected. I solved the problem by connecting the GND of power supply to the GND of the Arduino.

      See if that is the case with you.

      Hope this helps.

      posted in Announcements
      palande.vaibhav
      palande.vaibhav
    • RE: When requesting with request() function what reply should I expect?

      @sundberg84 As far as I understand by looking at the code you have sensor on the same node which is requesting the pulse count from the GW??

      OR you have reed switch on this node and sensor is on some other node? In the debug prints do you see a READ message in the serial monitor for your node which has reed switch?

      With me, I am sending the request() from node 1 to node 2. I can see SEND message in serial monitor of node 1 and READ message in the serial monitor of GW and also a SEND message in GW serial monitor and READ message in node 2. So the message is reaching node 2 successfully but my node 2 is not sending any reply to that message.

      So, node 1 is sending to GW, GW is receiving it and sending it to node 2, node 2 is receiving the message but node 2 is not replying. Is this what is supposed to happen? OR node 2 is actually supposed to send a reply back to node 1?

      posted in General Discussion
      palande.vaibhav
      palande.vaibhav
    • RE: When requesting with request() function what reply should I expect?

      @sundberg84
      Can you share your snippet of code where you have request() function?

      posted in General Discussion
      palande.vaibhav
      palande.vaibhav
    • RE: When requesting with request() function what reply should I expect?

      @sundberg84
      OK. And does your request() function looks just like mine?
      So, are you requesting V_VAR1 from the node?

      posted in General Discussion
      palande.vaibhav
      palande.vaibhav
    • RE: When requesting with request() function what reply should I expect?

      @sundberg84
      I have void receive() in node 2. But to code something I need to know what I am listening to.

      Is that just a bool message with the state of the switch saying its ON or OFF??

      What do you have in the void receive() function you are using?

      posted in General Discussion
      palande.vaibhav
      palande.vaibhav
    • RE: How to send message from one sensor to other or send message with different node and sensor ID?

      Got it after some trial and error with getters and setters.

      In case someone needs. I did following.

      MyMessage msg();  //Create a blank MyMessage instance. Do this before void setup()
      

      then when you want to send the message. Create a message on the fly like following.

      1. msg.setType(2);
      2. msg.setSensor(1);
      3. msg.setDestination(2);
      4. send(msg.set(1));
      

      This is what I am doing above:

      1. set message type ex. V_LIGHT is 2. Look at API for more
      2. Set sensor child ID of the sensor you want to change status of
      3. This is the destination node ID which has the sensor you are trying to reach
      4. Send the message just like you would usually.

      Hope this helps someone

      posted in Troubleshooting
      palande.vaibhav
      palande.vaibhav
    • When requesting with request() function what reply should I expect?

      Hello all,

      I am requesting the status of a switch with child ID 1 from another sensor node ID 2.

      I used request(uint8_t childSensorId, uint8_t variableType, uint8_t destination);
      In my case variable type is V_LIGHT so its request(1, 2, 2).

      I can see the sensor node 1 sending message and sensor node 2 receiving message in the debug log but sensor node doesn't send anything back to the requesting node.

      Now what kind of message should I expect from the node? OR I should write some code in the receiving node to create a response?

      Thank You

      posted in General Discussion
      palande.vaibhav
      palande.vaibhav
    • How to send message from one sensor to other or send message with different node and sensor ID?

      Hello all,

      I have pH sensor on node ID 1 and valve that controls pH on node ID 2. Now when the pH level falls below some value I want to open the valve. How can I send message from one node to other to open the valve

      OR

      How can I send message to domoticz from node ID 1 to open the valve on node ID 2?

      Thank You,
      Vaibhav

      posted in Troubleshooting
      palande.vaibhav
      palande.vaibhav
    • RE: DS18B20 ans SHT31-D show up as combined sensors on Domoticz

      @chrille
      I noticed it. Made the change and now it works. Thanx for your help.

      posted in Troubleshooting
      palande.vaibhav
      palande.vaibhav