Navigation

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

    Puneit Thukral

    @Puneit Thukral

    18
    Reputation
    74
    Posts
    439
    Profile views
    1
    Followers
    9
    Following
    Joined Last Online
    Location India

    Puneit Thukral Follow

    Best posts made by Puneit Thukral

    • RE: Looking for a door monitor setup/circuit

      @jamzm From what I understood is that a Fing box is an interface device which adds to your router and it is something related to the WiFi network.

      I am no expert - -still loads to learn but then I think there is some disconnect. While the Mysensors network does work on the 2.4GHz frequency range (through the NRF24 or NRF5 radios), the network is an ISM band network and not a WiFi standard. Therefore you need to add a gateway from the door sensor to your network.

      Take a look at the Getting Started and Build pages.

      The minimum you need is a arduino board of your choice with a radio of your choice for the sensor; an arduino/esp8266 of your choice and the same radio for the gateway and a controller of your choice as well.

      Had I been starting and someone asked me to choose a bunch of stuff, I would get scared. So I will tell you what I use.. its just one of the implementations.

      For the sensors I use arduino pro mini 3.3v with NRF24L01 and I am experimenting with NRF51822 (stay away from these)
      For the gateway, I use an arduino uno with NRF24l01 with an ethernet shield running MQTT gateway
      For the controller I use Home Assistant.

      Now for the sensor itself - if you want to DIY the same, then I would do it this way (again different people would have different methods)

      Use arduino pro-mini with NRF24l01 and a reed-switch. 3D print the case for it and use it.

      I hope I was able to help in some manner.

      posted in General Discussion
      Puneit Thukral
      Puneit Thukral
    • RE: đź’¬ Relay

      @sundberg84 I used a 3904 transistor between the relay and arduino and it works just fine with 3.3 V Arduino pro mini 8 HMz.
      (2N2222 also works, but I have many pieces of 3904 and just a few 2N2222, hence using 3904)

      posted in Announcements
      Puneit Thukral
      Puneit Thukral
    • RE: Nrf5x on NodeManager

      @Francisco_Elias Not using node manager but this sketch. See if it helps you

      //#define MY_DEBUG //Debug Disabled in production
      #define MY_RADIO_NRF5_ESB
      //#define MY_NODE_ID 10 // change this for every node
      #define SKETCH_NAME "Door Sensor" // this can be changed as well
      #define SKETCH_VERSION "V1"
      #define MY_SMART_SLEEP_WAIT_DURATION 500 //activate smart sleep
      #define MY_SLEEP_TRANSPORT_RECONNECT_TIMEOUT_MS  10000 //wait for 10 seconds to reconnect in case of transport problems
      #define MY_TRANSPORT_WAIT_READY_MS 30000  //try connecting for 30 seconds
      //#define MY_PARENT_NODE_ID 0
      //#define MY_PARENT_NODE_IS_STATIC
      
      
      
      #define DIGITAL_INPUT_SENSOR 2       // The digital input you attached your Door/Window sensor.
      #define CHILD_ID_DOOR 1            // Id of the door/window sensor child.
      #define CHILD_ID_BATTERY 254      // ID of the battery sensor
      #define BATTERY_FULL          3    // 
      #define BATTERY_EMPTY         1.8    // NRF51822 does not work below 1.8V
      float BATTERY_FULL_PCNT=100;    // 
      float BATTERY_EMPTY_PCNT=0;    // NRF51822 does not work below 1.8V
      #include <MySensors.h>
      
      
      
      #ifdef MY_DEBUG
      uint32_t SLEEP_TIME = 30000; // when debugging, sleep time is 30 seconds
      #endif
      #ifndef MY_DEBUG
      
        uint32_t SLEEP_TIME = 60000 * 1440 ; // when deployed, sleep time is 30 minutes
      #endif
      
      #define SHORT_WAIT 500  
      
      bool oldValueDoor = -1;
      float batteryVoltage = 0;
      //bool tripped=2;
      // Initialize door/window message
      MyMessage msgDoor(CHILD_ID_DOOR, V_TRIPPED); //Door/Window.
      
      MyMessage msgBattery(CHILD_ID_BATTERY, V_VOLTAGE);
      int batteryPcnt=-1;
      void setup()
      {
      
        pinMode(DIGITAL_INPUT_SENSOR, INPUT_PULLUP);  // sets the door/window sensor digital pin as input
        digitalWrite(DIGITAL_INPUT_SENSOR, HIGH);
      }
      void presentation()
      {
      
        sendSketchInfo(SKETCH_NAME, SKETCH_VERSION);
      
        present(CHILD_ID_DOOR, S_DOOR, "Door");
        wait(SHORT_WAIT);
        present(CHILD_ID_BATTERY, S_MULTIMETER, "DoorBatt");
      
      }
      
      void loop()
      {
        
        bool tripped = digitalRead(DIGITAL_INPUT_SENSOR)==HIGH;
      
        if (tripped != oldValueDoor)
        {
      
      
          send(msgDoor.set(tripped ? "1" : "0"), true); // Send door/window tripped value to gw
      
          oldValueDoor = tripped;
        }
         
      
          batteryVoltage = ((float)hwCPUVoltage()) / 1000.0;
          
          send(msgBattery.set(batteryVoltage, 2)); //this creates a voltage sensor
          batteryPcnt = round((batteryVoltage - BATTERY_EMPTY) *100.0 / (BATTERY_FULL - BATTERY_EMPTY));
          if (batteryPcnt > 100) {batteryPcnt = 100;}
         if (batteryPcnt <= 0) {batteryPcnt = 0;} 
          sendBatteryLevel(batteryPcnt, true); // this adds attribute to the door sensor
          sendHeartbeat();
              batteryPcnt=0;
      
          smartSleep(digitalPinToInterrupt(DIGITAL_INPUT_SENSOR), CHANGE, SLEEP_TIME);
          
      
      }
      
      posted in NodeManager
      Puneit Thukral
      Puneit Thukral
    • RE: Doorbell detection

      Thank you so much! 💯 👍

      posted in General Discussion
      Puneit Thukral
      Puneit Thukral
    • RE: đź’¬ Battery Powered Sensors

      @Sebex Will this help
      https://grabcad.com/library/arduino-pro-mini-1
      and should we move this conversation to another topic /PM as this is not relevant to this thread.

      posted in Announcements
      Puneit Thukral
      Puneit Thukral
    • RE: DHT22 on Arduino Pro Mini 8Mhz 3.3V - Failed

      @mfalkvidd
      The diagnosis solved the issue. The Arduino pro mini 3.3V 8 MHz sold to me was actually a 5v 16 MHz. No more Failed reading temperature from DHT!. However, there are still a few st:fail during initialisation but later goes away.
      Should I work towards eliminating these or would it be fine. The Openhab2 still is not reading from this node and shows NaN (even though the sensor is online).

      Thanks for your continued help.

      TSM:FPAR
      TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
      TSM:FPAR
      TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
      TSP:MSG:READ 0-0-1 s=255,c=3,t=8,pt=1,l=1,sg=0:0
      TSP:MSG:FPAR RES (ID=0, dist=0)
      TSP:MSG:PAR OK (ID=0, dist=1)
      TSM:FPAR:OK
      TSM:ID
      TSM:CHKID:OK (ID=1)
      TSM:UPL
      TSP:PING:SEND (dest=0)
      TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=ok:1
      TSP:MSG:READ 0-0-1 s=255,c=3,t=25,pt=1,l=1,sg=0:1
      TSP:MSG:PONG RECV (hops=1)
      TSP:CHKUPL:OK
      TSM:UPL:OK
      TSM:READY
      TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=ok:0100
      !TSP:MSG:SEND 1-1-0-0 s=255,c=0,t=17,pt=0,l=5,sg=0,ft=0,st=fail:2.0.0
      !TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=6,pt=1,l=1,sg=0,ft=1,st=fail:0
      !TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=11,pt=0,l=22,sg=0,ft=2,st=fail:TemperatureAndHumidity
      TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=12,pt=0,l=3,sg=0,ft=3,st=ok:1.1
      TSP:MSG:SEND 1-1-0-0 s=0,c=0,t=7,pt=0,l=0,sg=0,ft=0,st=ok:
      TSP:MSG:SEND 1-1-0-0 s=1,c=0,t=6,pt=0,l=0,sg=0,ft=0,st=ok:
      Request registration...
      TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=ok:2
      TSP:MSG:READ 0-0-1 s=255,c=3,t=27,pt=1,l=1,sg=0:1
      Node registration=1
      Init complete, id=1, parent=0, distance=1, registration=1
      TSP:MSG:SEND 1-1-0-0 s=1,c=1,t=0,pt=7,l=5,sg=0,ft=0,st=ok:24.6
      T: 24.60
      TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=1,pt=7,l=5,sg=0,ft=0,st=ok:41.9
      H: 41.90
      TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=1,pt=7,l=5,sg=0,ft=0,st=ok:42.0
      H: 42.00
      
      posted in Troubleshooting
      Puneit Thukral
      Puneit Thukral
    • Reboot!

      Hello.
      I dipped my toes into the world of home automation and discovered mysensors a couple of years ago. Then, I built (successfully) couple of relay actuators and stopped. Reason: I was in a rented apartment and couldn’t do anything permanent as such. Now, I have my own apartment and we have more or less settled in.
      I would like to make our home a wee bit smarter- turn on/off lights , put a timer on a washing machine power source, humidity detection , gas leak detection , door sensors etc.
      I have Arduinos pro mini and nrf24 radios with me from earlier.
      My questions are the following

      1. I used domoticz earlier but now more inclined towards openahb2. Is it advisable to make a switch ?
      2. I read about zigbee and zwave. But I don’t have any existing hardware of these protocols but the only advantage I have so far read is that these protocols are “stable” or “safer”. I am in India and as far as I know there are no regulations as such when it comes to tinkering with home electricals (I still don’t want to burn down the house). In my scenario , will Mysensors be a stable solution?
      3. I want some kind of redundancy in the setup - if my home network fails or is down, I should still be able to get things running. Hence, shall I also consider building a scene controller which can control the relays if a phone is unavailable or Alexa is down etc. basically it should be SO friendly or a guest friendly.
        I am planning to start tomorrow and looking for advice. Thanks.
      posted in General Discussion
      Puneit Thukral
      Puneit Thukral
    • RE: Newbie question about Sending sensor data with an nRF52832 module to my sensors

      You can upload Mysensors sketch to NRF5 modules and that way it can speak to mysensors network and then communicate to your controller through the gateway

      posted in Hardware
      Puneit Thukral
      Puneit Thukral
    • RE: DHT22 on Arduino Pro Mini 8Mhz 3.3V - Failed

      @TimO Thanks, it's finally working! Time to add more nodes.

      posted in Troubleshooting
      Puneit Thukral
      Puneit Thukral
    • RE: Total Novice - art of the possible

      Two thoughts come to mind depending on what you prefer

      1. Remove the manual function and rely on a relay ; I would make it a binary heater with two values - ON at full heat and OFF. Then we can use a temperature sensor placed at a good location to as a feedback mechanism to turn the relay On & Off

      2. You may consider putting a motor based actuator (maybe find one on Aliexpress - something like this Actuator Arm or you can DIY using a stepper motor and 3D printer.

      Some images of the device you want to manipulate will be nice

      Hope this helps
      Cheers

      posted in General Discussion
      Puneit Thukral
      Puneit Thukral

    Latest posts made by Puneit Thukral

    • RE: Professional grade: Canique Temperature Sensor & Heat Control

      You mentioned that it’s running on single AA battery and in the text input voltage is 5V. I am not clear on this part.
      Which microcontroller are you using. My limited knowledge tells me that arduino can go only as low as 1.8v input voltage to work. How are you running the board with single AA battery. I am very interested to know.

      posted in My Project
      Puneit Thukral
      Puneit Thukral
    • RE: Nrf5x on NodeManager

      @Francisco_Elias Not using node manager but this sketch. See if it helps you

      //#define MY_DEBUG //Debug Disabled in production
      #define MY_RADIO_NRF5_ESB
      //#define MY_NODE_ID 10 // change this for every node
      #define SKETCH_NAME "Door Sensor" // this can be changed as well
      #define SKETCH_VERSION "V1"
      #define MY_SMART_SLEEP_WAIT_DURATION 500 //activate smart sleep
      #define MY_SLEEP_TRANSPORT_RECONNECT_TIMEOUT_MS  10000 //wait for 10 seconds to reconnect in case of transport problems
      #define MY_TRANSPORT_WAIT_READY_MS 30000  //try connecting for 30 seconds
      //#define MY_PARENT_NODE_ID 0
      //#define MY_PARENT_NODE_IS_STATIC
      
      
      
      #define DIGITAL_INPUT_SENSOR 2       // The digital input you attached your Door/Window sensor.
      #define CHILD_ID_DOOR 1            // Id of the door/window sensor child.
      #define CHILD_ID_BATTERY 254      // ID of the battery sensor
      #define BATTERY_FULL          3    // 
      #define BATTERY_EMPTY         1.8    // NRF51822 does not work below 1.8V
      float BATTERY_FULL_PCNT=100;    // 
      float BATTERY_EMPTY_PCNT=0;    // NRF51822 does not work below 1.8V
      #include <MySensors.h>
      
      
      
      #ifdef MY_DEBUG
      uint32_t SLEEP_TIME = 30000; // when debugging, sleep time is 30 seconds
      #endif
      #ifndef MY_DEBUG
      
        uint32_t SLEEP_TIME = 60000 * 1440 ; // when deployed, sleep time is 30 minutes
      #endif
      
      #define SHORT_WAIT 500  
      
      bool oldValueDoor = -1;
      float batteryVoltage = 0;
      //bool tripped=2;
      // Initialize door/window message
      MyMessage msgDoor(CHILD_ID_DOOR, V_TRIPPED); //Door/Window.
      
      MyMessage msgBattery(CHILD_ID_BATTERY, V_VOLTAGE);
      int batteryPcnt=-1;
      void setup()
      {
      
        pinMode(DIGITAL_INPUT_SENSOR, INPUT_PULLUP);  // sets the door/window sensor digital pin as input
        digitalWrite(DIGITAL_INPUT_SENSOR, HIGH);
      }
      void presentation()
      {
      
        sendSketchInfo(SKETCH_NAME, SKETCH_VERSION);
      
        present(CHILD_ID_DOOR, S_DOOR, "Door");
        wait(SHORT_WAIT);
        present(CHILD_ID_BATTERY, S_MULTIMETER, "DoorBatt");
      
      }
      
      void loop()
      {
        
        bool tripped = digitalRead(DIGITAL_INPUT_SENSOR)==HIGH;
      
        if (tripped != oldValueDoor)
        {
      
      
          send(msgDoor.set(tripped ? "1" : "0"), true); // Send door/window tripped value to gw
      
          oldValueDoor = tripped;
        }
         
      
          batteryVoltage = ((float)hwCPUVoltage()) / 1000.0;
          
          send(msgBattery.set(batteryVoltage, 2)); //this creates a voltage sensor
          batteryPcnt = round((batteryVoltage - BATTERY_EMPTY) *100.0 / (BATTERY_FULL - BATTERY_EMPTY));
          if (batteryPcnt > 100) {batteryPcnt = 100;}
         if (batteryPcnt <= 0) {batteryPcnt = 0;} 
          sendBatteryLevel(batteryPcnt, true); // this adds attribute to the door sensor
          sendHeartbeat();
              batteryPcnt=0;
      
          smartSleep(digitalPinToInterrupt(DIGITAL_INPUT_SENSOR), CHANGE, SLEEP_TIME);
          
      
      }
      
      posted in NodeManager
      Puneit Thukral
      Puneit Thukral
    • RE: Ds18b20/ nodemcu fluctuations in temp

      @mjdula
      This is not a support forum for Tasmota. You should try their Discord

      posted in Hardware
      Puneit Thukral
      Puneit Thukral
    • RE: Question about MySensors features

      @IronFelix
      I would not combine so many inputs and outputs in one sketch. But I think if there is enough memory for variables ; then it is possible to go for sensing (step by step) for a combination of sensors.
      Similarly for buttons, actuators, use a separate hardware.

      posted in My Project
      Puneit Thukral
      Puneit Thukral
    • RE: sending an image without wifi / envoi d'une image hors wifi

      Very interesting requirement. In the world of amateur radio, this is possible using SSTV (Slow Scan TV ) on frequency bands like VHF or UHF. But then this is not encrypted and anyone with a receiver and hardware can receive and decode these signals.

      https://en.wikipedia.org/wiki/Slow-scan_television

      Now, if it can be done with NRF24l01 or with RFM69, I do not know. Back in the day, people were sending multimedia over Bluetooth so maybe that works for you.

      posted in Hardware
      Puneit Thukral
      Puneit Thukral
    • RE: pinout for waveshare 1.54 inch e-paper on fanstel BT832X

      Hello
      Have a look at this
      https://forum.mysensors.org/post/88732

      posted in Hardware
      Puneit Thukral
      Puneit Thukral
    • RE: Ethernet Gateway and FOTA

      @Jan-Spies
      From what I know - MySController only works with serial and/or Ethernet. Mqtt is not supported. May you can try with Ethernet only gateway.

      posted in Troubleshooting
      Puneit Thukral
      Puneit Thukral
    • RE: đź’¬ Battery Powered Sensors

      @Sebex Will this help
      https://grabcad.com/library/arduino-pro-mini-1
      and should we move this conversation to another topic /PM as this is not relevant to this thread.

      posted in Announcements
      Puneit Thukral
      Puneit Thukral
    • RE: SCT013 50A - Low current

      I think you can try this

      posted in Hardware
      Puneit Thukral
      Puneit Thukral
    • RE: đź’¬ Battery Powered Sensors

      @Sebex Do share the STL - it will be great and if you use Fusion360, then may I request for the F3D file.. I am semi-skilled when it comes to designing

      posted in Announcements
      Puneit Thukral
      Puneit Thukral