Navigation

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

    Best posts made by Puneit Thukral

    • RE: GUIDE - NRF5 / NRF51 / NRF52 for beginners

      @ncollins It is possible to use NRF51822 for gateways with serial. I am using it for many months now. We need USB to serial adapter.
      Also, I do not use JLink or ST-Link for flashing the NRF51 chips. I use raspberry pi with OpenOCD.
      OpenOCD setup can be overwhelming (it was for me) but I have been able to make it work and replicate for a while now. If someone needs inputs, I am happy to help. Ask here or reach out to me on discord @ Puneit#2433

      For the very reason you stated - hardware bugs in NR51 chips leading to high power-consumption - they make compact repeater nodes / powered nodes with repeaters.

      posted in Development
      Puneit Thukral
      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: Where did everyone go?

      I have said this before (I do not know where) but here it is again.
      One of the reasons that MySensors didn't become as popular as other frameworks is because it somewhat matured before YouTubers were popular. Today, fewer people like to read, and most like to watch a YouTube video sitting on the toilet. The YouTubers not only provide step by step instructions, they do live streams and then there are Discord servers.

      I myself manage a small discord server on Home Automation and I see everyday newbies coming in and they are looking for a magical cheap solution which somehow works.
      The barrier for entry into MySensors is big (involves a lot more wires, it does not seem sexy, no one talks about it on YouTube). On the other hand, everyone has an ISP given All-In-One router+AP+DHCP server and ESPs simply connect to them. Everyday Amazon, AliExpress etc are flooding the market with Wifi based products, so the time for feeling of gratification is very small. You buy, plug in, use the app and it works

      That said, we do have a dedicated MySensors channel on our discord server and I have been pushing (literally) people to try MySensors. Serious DIYers are still interested and I have successfully introduced 4 people to it, 2 have started using it.

      I won't call the Mysensors a stagnant or dying breed but the concept of forums in my opinion is. Forums are still the most structured support system (I am not saying otherwise) but many people want instant answers, - they do not want to make the effort asking a good question. And across many forums which have been there for a few years, a common answer is "search before you ask".

      This is my two cents on this topic

      posted in General Discussion
      Puneit Thukral
      Puneit Thukral
    • RE: [Answered] Any recommended load-and-go VM or Docker images for mysensors?

      Home assistant has a docker container which talks nicely with a mysensors serial gateway connected via USB on a Dell machine.

       homeassistant:
          container_name: hass
          image: homeassistant/home-assistant:stable
          volumes:
            - /home/server/homeassistant/:/config
            - /etc/localtime:/etc/localtime:ro
            - /var/run/docker.sock:/var/run/docker.sock
          restart: unless-stopped
          devices:
            - /dev/ttyUSB0:/dev/ttyUSB0:rwm
          healthcheck:
            test: ["CMD", "curl", "-f", "http://127.0.0.1:8123"]
            interval: 30s
            timeout: 10s
            retries: 6
          network_mode: host
          depends_on: 
            - mosquitto
      

      the following line enables serial gateway into HA and then in the latest release 2021.3 one can add Mysensors from UI

      devices:
            - /dev/ttyUSB0:/dev/ttyUSB0:rwm
      
      posted in Controllers
      Puneit Thukral
      Puneit Thukral
    • RE: [Answered] Any recommended load-and-go VM or Docker images for mysensors?

      @jkandasa I am yet to use to Serial2Mqtt in order to test this out without breaking my current setup.. I will do it and share my feedback. I would definitely want to run Mycontroller in parallel to HA.

      posted in Controllers
      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: Doorbell detection

      Thank you so much! 💯 👍

      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: [Answered] Any recommended load-and-go VM or Docker images for mysensors?

      @ncollins Yes, it is very easy to (re)deploy a whole system using the docker compose files.
      I have 4 splits --- one being my core containers , Homeassistant, Nodered, Mosquitto, etc and then one of them being "applications that I don't need but have".. I recently had to redeploy and my core stack was running in under 10 minutes..

      It is a very powerful tool.

      posted in Controllers
      Puneit Thukral
      Puneit Thukral
    • RE: Newbie question about Sending sensor data with an nRF52832 module to my sensors

      @tBS I think I am in the same boat as you. Well, I started with MySensors few years ago and then shifted most of my stuff to Esp8266 - Tasmota and ESPHome. I am rebooting this project personally for me.

      Yet, I feel somehow MySensors is a better implementation in terms of its mesh capabilities and repeater function.
      And it is easier to make MySensors battery operated. NRF24 or NRF5x are more efficient power wise as compared to ESP8266 or ESP32.
      That said, I think what we lack in this project (and if I am unable to find, maybe someone can point it out) are YouTubers like Drzzs of Home Assistant.

      I have a Telegram group of Home Automation users in India and off-late I have been pushing this project on my group. We are in the midst of a lockdown, hence we cannot source parts for now.
      That said, I think while you could be late in the game - a lot of development has happened and bugs were ironed out.
      I am extremely happy to help as much as I can. I am no expert - so most likely I won't have the answers. I believe two heads are better than one so we can work things out together.

      Cheers!

      posted in Hardware
      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: đź’¬ 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: [Answered] Any recommended load-and-go VM or Docker images for mysensors?

      @NeverDie While I never used proxmox or VM, I did use the supervised install on Linux and then moved away from it. The advantage of supervised install is that you get the addon store but the disadvantage is that Supervisors starts to complain and moan as you install more containers on the host system.
      It then stops you from upgrading to latest versions and prevents addons to be updated. At that stage I decided to move away from a supervised install.

      posted in Controllers
      Puneit Thukral
      Puneit Thukral
    • RE: Newbie question about Sending sensor data with an nRF52832 module to my sensors

      @tBS Hi, so there are two separate topics. Let us address them one by one. I will pickup the NRF5x communication with NRF24 .

      I too am using an esp8266 based gateway which has an nRF24 radio attached. The gateway compiles and starts without a problem.
      On the sensor node side, I am using an NRF51822 radio. Now, these devices (to best of my understanding) do not communicate over Bluetooth with the NRF24 or Mysensors.
      You need to flash a MySensors sketch with the radio option for NRF5 on your NRF52 or NRF51 chip and then this chip will start talking to your Gateway. Use the radio option and

      #define MY_RADIO_NRF5_ESB
      
      

      disable other radios. For testing you could pickup the Mocksensors sketch, change the radio for match the NRF5. Of course you need to install the boards and the libraries. Follow this NRF5 Beginner Guide.
      For me this works fine as well. I can see MQTT messages flowing via the ESP8266 Gateway to my broker. I have not yet added this to my HomeAssistant.
      Now, coming to your second topic

      Your struggles with OpenHab. I haven't used OpenHab in years, so I am not the right person for it. However, I suggest that you use a MQTT ESP8266 Gateway and use an MQTT broker to see the messages flowing back to the broker.

      Hope this helps you.
      Cheers.

      posted in Hardware
      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
    • RE: đź’¬ Battery Powered Sensors

      Adding on to this.. If we use a map function to convert the battery level like this, then it shows up as an attribute in HomeAssistant and Homekit

      Map function works and not the percent. The percent always shows as zero in Homekit.
      Hope this helps someone!

      void battery()
      {
        long batteryMillivolts = hwCPUVoltage();
        int batteryV =batteryMillivolts /1000 + 0.5;
        auto batteryLevel = map(batteryV,EMPTY_BATTERY, FULL_BATTERY, 0, 100);
        if (batteryLevel > 100) 
        {batteryLevel=100;}
      
      #ifdef MY_DEBUG
        Serial.print("Battery voltage: ");
        Serial.print(batteryMillivolts / 1000.0);
        Serial.println("V");
        Serial.print("Battery Level ");
        Serial.print(batteryLevel);
        Serial.println(" %");
      #endif
      
        if (oldBatteryLevel != batteryLevel) {
          sendBatteryLevel(batteryLevel);
          send(msgV.set(batteryV,2));
          oldBatteryLevel = batteryLevel;
        }
      }
      

      ![Home Assistant](812c9e02-8b21-44dc-ab8d-04559bf38462-image.png image url)

      IHomeKit

      posted in Announcements
      Puneit Thukral
      Puneit Thukral
    • RE: [Answered] Any recommended load-and-go VM or Docker images for mysensors?

      @NeverDie VM install is one with the supervisor.. yes this is what I was referring to. VM is one of the supported methods, I guess

      posted in Controllers
      Puneit Thukral
      Puneit Thukral
    • RE: Reed Switch normally open or normally closed

      @zboblamont Thanks.. this is promising.. Of course, I was trying to complicate this way too much than needed. I will work with the regular reed switch.

      posted in Hardware
      Puneit Thukral
      Puneit Thukral
    • RE: Advisory: put IOT devices on a separate LAN/vLAN for better security

      @NeverDie creating VLANs and restricting access of the IOT devices to must have access is the method I follow.

      posted in General Discussion
      Puneit Thukral
      Puneit Thukral
    • RE: đź’¬ NRF52 Recessed Vibration+Contact sensor for door/window

      @scalz May I request you to share your code for it please. Thanks.

      posted in OpenHardware.io
      Puneit Thukral
      Puneit Thukral
    • RE: [Answered] Any recommended load-and-go VM or Docker images for mysensors?

      @NeverDie MySensors via UI came in this release 2021.3. Prior to that it was through an entry (very simple one) in configuration.yaml.

      If you have cameras, 3D printer (running Klipper) - all that can come into HA. And Homekit via HA works great as well.

      posted in Controllers
      Puneit Thukral
      Puneit Thukral
    • RE: Newbie question about Sending sensor data with an nRF52832 module to my sensors

      @tBS You should try the low power sketches by @NeverDie or @berkseo - They are available on openhardware.io

      posted in Hardware
      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: Best password manager?

      I moved from keepass to Bitwarden self hosted. For a while I used both in parallel and now I have fully moved to Bitwarden self hosted. It integrates very well with everything- iOS, Safari on Mac and other browsers

      posted in General Discussion
      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
    • RE: Your suggestions to choose naming for "sensor" and "variable"

      Hello @jkandasa
      This is looking very good. Nomenclarture wise - I am of the opnion that users adapt but if you ask me I like sensor over element (but I can live with element as well).

      In future will it be possible port this to mobile apps for iOS and Android?

      One integration I would request is for HomeKit.

      Thank you

      posted in MyController.org
      Puneit Thukral
      Puneit Thukral
    • RE: GUIDE - NRF5 / NRF51 / NRF52 for beginners

      @monte Could you please share the custom sleep function?

      posted in Development
      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: V_UNIT_PREFIX not working/recognised for Air Quality sensor CSS811

      Hi @Sebex , I followed @BearWithBeard advise (thank you) and customised the entity in home assistant. And now it shows as numbers. 39b5668a-ba4f-4bca-b6b0-1115e7f7eb11-image.png

      posted in Troubleshooting
      Puneit Thukral
      Puneit Thukral