Navigation

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

    Mr_sensor

    @Mr_sensor

    3
    Reputation
    47
    Posts
    687
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    Mr_sensor Follow

    Best posts made by Mr_sensor

    • RE: DHT11 Arduino pro mini no temp readings

      🙂 Great! That helped a lot. I Kicked that out when reading the Converting a sketch from 1.5 to 2.x article.

      4911 TSF:MSG:SEND,2-2-0-0,s=1,c=1,t=0,pt=7,l=5,sg=0,ft=0,st=OK:20.4
      4954 TSF:MSG:SEND,2-2-0-0,s=0,c=1,t=1,pt=7,l=5,sg=0,ft=0,st=OK:50.2
      4962 MCO:SLP:MS=60000,SMS=0,I1=255,M1=255,I2=255,M2=255
      4968 MCO:SLP:TPD
      

      Now I only have to find out what to use for mqtt to read this sensor values. Thats still not very clear to me:
      Guess it would be something like:
      mygateway1-out/2/2/0/0/ or 2/2/0/0/1 ?

      Would it be possible to have something like this:

      mygateway-out/2/2/Temperature ?

      posted in Development
      Mr_sensor
      Mr_sensor
    • RE: 💬 Easy/Newbie PCB for MySensors

      @sundberg84 Well I tried that but did not get the measurement straight from the pcb si I decided t solder a new board using the right capacitor this time (0,1uf instead of 1uf) made sure using the right resistors as well and adding a capacitor after the booster. Than with the same mini pro from the other board tested again and wow it is working as intended.

      Child ID 2Battery Voltage: 3.44 V
      Battery Percent: 102 %
      2930 TSF:MSG:SEND,2-2-0-0,s=255,c=3,t=0,pt=1,l=1,sg=0,ft=0,st=OK:102
      2938 MCO:SLP:MS=60000,SMS=0,I1=255,M1=255,I2=255,M2=255
      2945 TSF:TDI:TSL
      2947 MCO:SLP:WUP=-1
      2949 TSF:TRI:TSB
      3065 TSF:MSG:SEND,2-2-0-0,s=1,c=1,t=0,pt=7,l=5,sg=0,ft=0,st=OK:998.0
      T: 998.00
      3178 TSF:MSG:SEND,2-2-0-0,s=0,c=1,t=1,pt=7,l=5,sg=0,ft=0,st=OK:998.0
      H: 998.00
      957
      Child ID 2Battery Voltage: 3.22 V
      Battery Percent: 95 %
      3690 TSF:MSG:SEND,2-2-0-0,s=255,c=3,t=0,pt=1,l=1,sg=0,ft=0,st=OK:95
      3698 MCO:SLP:MS=60000,SMS=0,I1=255,M1=255,I2=255,M2=255
      3704 TSF:TDI:TSL
      3706 MCO:SLP:WUP=-1
      3708 TSF:TRI:TSB
      3815 TSF:MSG:SEND,2-2-0-0,s=1,c=1,t=0,pt=7,l=5,sg=0,ft=0,st=OK:998.0
      T: 998.00
      3932 TSF:MSG:SEND,2-2-0-0,s=0,c=1,t=1,pt=7,l=5,sg=0,ft=0,st=OK:998.0
      H: 998.00
      955
      Child ID 2Battery Voltage: 3.21 V
      Battery Percent: 95 %
      4442 MCO:SLP:MS=60000,SMS=0,I1=255,M1=255,I2=255,M2=255
      4452 TSF:TDI:TSL
      4454 MCO:SLP:WUP=-1
      4456 TSF:TRI:TSB
      4560 TSF:MSG:SEND,2-2-0-0,s=1,c=1,t=0,pt=7,l=5,sg=0,ft=0,st=OK:998.0
      T: 998.00
      4673 TSF:MSG:SEND,2-2-0-0,s=0,c=1,t=1,pt=7,l=5,sg=0,ft=0,st=OK:998.0
      H: 998.00
      953
      Child ID 2Battery Voltage: 3.21 V
      Battery Percent: 95 %
      5185 MCO:SLP:MS=60000,SMS=0,I1=255,M1=255,I2=255,M2=255
      5193 TSF:TDI:TSL
      5195 MCO:SLP:WUP=-1
      5197 TSF:TRI:TSB
      5304 TSF:MSG:SEND,2-2-0-0,s=1,c=1,t=0,pt=7,l=5,sg=0,ft=0,st=OK:998.0
      T: 998.00
      5416 TSF:MSG:SEND,2-2-0-0,s=0,c=1,t=1,pt=7,l=5,sg=0,ft=0,st=OK:998.0
      H: 998.00
      952
      Child ID 2Battery Voltage: 3.20 V
      Battery Percent: 95 %
      5926 MCO:SLP:MS=60000,SMS=0,I1=255,M1=255,I2=255,M2=255
      5935 TSF:TDI:TSL
      5939 MCO:SLP:WUP=-1
      5941 TSF:TRI:TSB
      6045 TSF:MSG:SEND,2-2-0-0,s=1,c=1,t=0,pt=7,l=5,sg=0,ft=0,st=OK:998.0
      T: 998.00
      6158 TSF:MSG:SEND,2-2-0-0,s=0,c=1,t=1,pt=7,l=5,sg=0,ft=0,st=OK:998.0
      H: 998.00
      952
      Child ID 2Battery Voltage: 3.20 V
      Battery Percent: 95 %
      6670 MCO:SLP:MS=60000,SMS=0,I1=255,M1=255,I2=255,M2=255
      6678 TSF:TDI:TSL
      6680 MCO:SLP:WUP=-1
      6682 TSF:TRI:TSB
      6789 TSF:MSG:SEND,2-2-0-0,s=1,c=1,t=0,pt=7,l=5,sg=0,ft=0,st=OK:998.0
      T: 998.00
      6901 TSF:MSG:SEND,2-2-0-0,s=0,c=1,t=1,pt=7,l=5,sg=0,ft=0,st=OK:998.0
      H: 998.00
      952
      Child ID 2Battery Voltage: 3.20 V
      Battery Percent: 95 %
      7411 MCO:SLP:MS=60000,SMS=0,I1=255,M1=255,I2=255,M2=255
      7419 TSF:TDI:TSL
      7424 MCO:SLP:WUP=-1
      7426 TSF:TRI:TSB
      7530 TSF:MSG:SEND,2-2-0-0,s=1,c=1,t=0,pt=7,l=5,sg=0,ft=0,st=OK:998.0
      T: 998.00
      7643 TSF:MSG:SEND,2-2-0-0,s=0,c=1,t=1,pt=7,l=5,sg=0,ft=0,st=OK:998.0
      H: 998.00
      952
      Child ID 2Battery Voltage: 3.20 V
      Battery Percent: 95 %
      8155 MCO:SLP:MS=60000,SMS=0,I1=255,M1=255,I2=255,M2=255
      8163 TSF:TDI:TSL
      8165 MCO:SLP:WUP=-1
      8167 TSF:TRI:TSB
      8273 TSF:MSG:SEND,2-2-0-0,s=1,c=1,t=0,pt=7,l=5,sg=0,ft=0,st=OK:998.0
      T: 998.00
      8388 TSF:MSG:SEND,2-2-0-0,s=0,c=1,t=1,pt=7,l=5,sg=0,ft=0,st=OK:998.0
      H: 998.00
      955
      Child ID 2Battery Voltage: 3.21 V
      Battery Percent: 95 %
      8898 MCO:SLP:MS=60000,SMS=0,I1=255,M1=255,I2=255,M2=255
      8908 TSF:TDI:TSL
      8910 MCO:SLP:WUP=-1
      8912 TSF:TRI:TSB
      9021 TSF:MSG:SEND,2-2-0-0,s=1,c=1,t=0,pt=7,l=5,sg=0,ft=0,st=OK:998.0
      T: 998.00
      9132 TSF:MSG:SEND,2-2-0-0,s=0,c=1,t=1,pt=7,l=5,sg=0,ft=0,st=OK:998.0
      H: 998.00
      948
      Child ID 2Battery Voltage: 3.19 V
      Battery Percent: 94 %
      9646 TSF:MSG:SEND,2-2-0-0,s=255,c=3,t=0,pt=1,l=1,sg=0,ft=0,st=OK:94
      9654 MCO:SLP:MS=60000,SMS=0,I1=255,M1=255,I2=255,M2=255
      9660 TSF:TDI:TSL
      9662 MCO:SLP:WUP=-1
      9664 TSF:TRI:TSB
      9771 TSF:MSG:SEND,2-2-0-0,s=1,c=1,t=0,pt=7,l=5,sg=0,ft=0,st=OK:998.0
      T: 998.00
      9881 TSF:MSG:SEND,2-2-0-0,s=0,c=1,t=1,pt=7,l=5,sg=0,ft=0,st=OK:998.0
      H: 998.00
      952
      Child ID 2Battery Voltage: 3.20 V
      Battery Percent: 95 %
      10395 TSF:MSG:SEND,2-2-0-0,s=255,c=3,t=0,pt=1,l=1,sg=0,ft=0,st=OK:95
      10403 MCO:SLP:MS=60000,SMS=0,I1=255,M1=255,I2=255,M2=255
      10409 TSF:TDI:TSL
      10412 MCO:SLP:WUP=-1
      10414 TSF:TRI:TSB
      10520 TSF:MSG:SEND,2-2-0-0,s=1,c=1,t=0,pt=7,l=5,sg=0,ft=0,st=OK:998.0
      T: 998.00
      10635 TSF:MSG:SEND,2-2-0-0,s=0,c=1,t=1,pt=7,l=5,sg=0,ft=0,st=OK:998.0
      H: 998.00
      953
      Child ID 2Battery Voltage: 3.21 V
      Battery Percent: 95 %
      11147 MCO:SLP:MS=60000,SMS=0,I1=255,M1=255,I2=255,M2=255
      11155 TSF:TDI:TSL
      

      Now in mqtt I can see the percentage as:

      95
      qos : 0, retain : false, cmd : publish, dup : false, topic : **mygateway1-out/2/255/3/0/0**, messageId : , length : 30, Raw payload : 5753```
      
      But not the voltage?
      posted in OpenHardware.io
      Mr_sensor
      Mr_sensor
    • RE: What is loaded / running on the arduino?

      @mfalkvidd said in What is loaded / running on the arduino?:

      @mr_sensor you are correct that it is not possible to get the sketch from the Arduino.

      But all MySensors sketches have something like this:

      sendSketchInfo("TemperatureAndHumidity", "1.1");
      

      which identifies which type of sketch and the version of that sketch, every time the sensor is restarted. If you store your sketches in some version control system (git is most popular), keeping track of them becomes quite easy.

      See also https://forum.mysensors.org/topic/2203/method-to-reveal-sketch-inside-node-or-g-w for an earlier discussion on a similar topic.

      @mfalkvidd thanks for the reply. The sendSketchInfo is indeed helpfull will also read the link.

      posted in General Discussion
      Mr_sensor
      Mr_sensor

    Latest posts made by Mr_sensor

    • RE: 💬 Easy/Newbie PCB for MySensors

      I'm not sure if this is the right place to ask. But it seems right to me 🙂
      Hi I have e few of the Easy/Newbie-pcb working for some time with good effort. One of them even in a shed at 20 - 25 meters in the garden which is fairly good isolated. Sending Temp/Hum/battery level. And the Gateway is in the house on the first floor behind a door in a wardrobe.

      Now I have a second shed which is behind the fist shed. Also very good isolated. The pcb I have in there is not reaching the gateway (it did before until the battery was empty).
      Can I have the pcb in the first shed also working as an extender, so the second pcb will be able to send out topics to the gateway as well? What to add to my code to achieve that?

      posted in OpenHardware.io
      Mr_sensor
      Mr_sensor
    • RE: What is loaded / running on the arduino?

      @mfalkvidd said in What is loaded / running on the arduino?:

      @mr_sensor you are correct that it is not possible to get the sketch from the Arduino.

      But all MySensors sketches have something like this:

      sendSketchInfo("TemperatureAndHumidity", "1.1");
      

      which identifies which type of sketch and the version of that sketch, every time the sensor is restarted. If you store your sketches in some version control system (git is most popular), keeping track of them becomes quite easy.

      See also https://forum.mysensors.org/topic/2203/method-to-reveal-sketch-inside-node-or-g-w for an earlier discussion on a similar topic.

      @mfalkvidd thanks for the reply. The sendSketchInfo is indeed helpfull will also read the link.

      posted in General Discussion
      Mr_sensor
      Mr_sensor
    • What is loaded / running on the arduino?

      Just a question that is on my mind for some time now. When a sketch is loaded on a arduino (in my case a pro mini) how to see / find out what is on that board? Or is that even not possible?
      After some time running a node and building others in the mean time it is not always clear what is on the particular node. Dis I miss something basic here? Or is it just not possible getting the (sketch) info from the arduino?
      How are you dealing with it. Having a sketch named/ numbered for every node? Just wondering what is the best practise.

      posted in General Discussion
      Mr_sensor
      Mr_sensor
    • RE: Temperature sensor sketch only sending battery info to mqtt

      @gohan

      Well the NACKS are gone 🙂 by setting the RF_24_PA_HIGH but still I do not get any temperature after the first one while starting up:

      16 MCO:BGN:INIT NODE,CP=RNNNA---,VER=2.2.0
      26 TSM:INIT
      28 TSF:WUR:MS=0
      34 TSM:INIT:TSP OK
      36 TSM:INIT:STATID=4
      38 TSF:SID:OK,ID=4
      40 TSM:FPAR
      43 TSM:FPAR:STATP=0
      45 TSM:ID
      47 TSM:ID:OK
      47 TSM:UPL
      1730 !TSF:MSG:SEND,4-4-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=NACK:1
      3739 TSM:UPL
      5421 !TSF:MSG:SEND,4-4-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=1,st=NACK:1
      7430 TSM:UPL
      7452 TSF:MSG:SEND,4-4-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=2,st=OK:1
      7460 TSF:MSG:READ,0-0-4,s=255,c=3,t=25,pt=1,l=1,sg=0:1
      7467 TSF:MSG:PONG RECV,HP=1
      7471 TSM:UPL:OK
      7473 TSM:READY:ID=4,PAR=0,DIS=1
      7491 TSF:MSG:SEND,4-4-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
      7499 TSF:MSG:READ,0-0-4,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
      7512 TSF:MSG:SEND,4-4-0-0,s=255,c=0,t=17,pt=0,l=5,sg=0,ft=0,st=OK:2.2.0
      7530 TSF:MSG:SEND,4-4-0-0,s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=OK:0
      9545 TSF:MSG:SEND,4-4-0-0,s=255,c=3,t=11,pt=0,l=18,sg=0,ft=0,st=OK:Temperature Sensor
      9586 TSF:MSG:SEND,4-4-0-0,s=255,c=3,t=12,pt=0,l=3,sg=0,ft=0,st=OK:1.1
      9801 TSF:MSG:SEND,4-4-0-0,s=1,c=0,t=6,pt=0,l=0,sg=0,ft=0,st=OK:
      9840 TSF:MSG:SEND,4-4-0-0,s=2,c=0,t=30,pt=0,l=0,sg=0,ft=0,st=OK:
      9848 MCO:REG:REQ
      9861 TSF:MSG:SEND,4-4-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=OK:2
      9869 TSF:MSG:READ,0-0-4,s=255,c=3,t=27,pt=1,l=1,sg=0:1
      9875 MCO:PIM:NODE REG=1
      9877 MCO:BGN:STP
      9926 MCO:BGN:INIT OK,TSP=1
      911
      Child ID 2Battery Voltage: 3.06 V
      Battery Percent: 91 %
      10438 TSF:MSG:SEND,4-4-0-0,s=255,c=3,t=0,pt=1,l=1,sg=0,ft=0,st=OK:91
      10446 MCO:SLP:MS=30000,SMS=0,I1=255,M1=255,I2=255,M2=255
      10452 TSF:TDI:TSL
      10455 MCO:SLP:WUP=-1
      10457 TSF:TRI:TSB
      831
      Child ID 2Battery Voltage: 2.79 V
      Battery Percent: 83 %
      10967 TSF:MSG:SEND,4-4-0-0,s=255,c=3,t=0,pt=1,l=1,sg=0,ft=0,st=OK:83
      10975 MCO:SLP:MS=30000,SMS=0,I1=255,M1=255,I2=255,M2=255
      10981 TSF:TDI:TSL
      10983 MCO:SLP:WUP=-1
      10985 TSF:TRI:TSB
      830
      Child ID 2Battery Voltage: 2.79 V
      Battery Percent: 83 %
      11493 MCO:SLP:MS=30000,SMS=0,I1=255,M1=255,I2=255,M2=255
      11501 TSF:TDI:TSL
      11503 MCO:SLP:WUP=-1
      11505 TSF:TRI:TSB
      833
      Child ID 2Battery Voltage: 2.80 V
      Battery Percent: 83 %
      12013 MCO:SLP:MS=30000,SMS=0,I1=255,M1=255,I2=255,M2=255
      12021 TSF:TDI:TSL
      12023 MCO:SLP:WUP=-1
      12025 TSF:TRI:TSB
      830
      Child ID 2Battery Voltage: 2.79 V
      Battery Percent: 83 %
      12533 MCO:SLP:MS=30000,SMS=0,I1=255,M1=255,I2=255,M2=255
      12541 TSF:TDI:TSL```
      posted in Hardware
      Mr_sensor
      Mr_sensor
    • Temperature sensor sketch only sending battery info to mqtt

      I have a newbie-pcb board with a Dallas temperature sensor attached. I mixed some sketches together to make it work.
      When starting the sensor the first time I can see all the actions performed. Reading temperature and battery percentage. But than after sleeping it is only reading and sending battery percentage (no voltage)? No temperature action is visible any-more. So, there must be a fault in my sketch which makes it read the temperature part only once? Any advice on this? Thanks.

      [code]
      
      /**
       * The MySensors Arduino library handles the wireless radio link and protocol
       * between your home built sensors/actuators and HA controller of choice.
       * The sensors forms a self healing radio network with optional repeaters. Each
       * repeater and gateway builds a routing tables in EEPROM which keeps track of the
       * network topology allowing messages to be routed to nodes.
       *
       * Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
       * Copyright (C) 2013-2015 Sensnology AB
       * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
       *
       * Documentation: http://www.mysensors.org
       * Support Forum: http://forum.mysensors.org
       *
       * This program is free software; you can redistribute it and/or
       * modify it under the terms of the GNU General Public License
       * version 2 as published by the Free Software Foundation.
       *
       *******************************
       *
       * REVISION HISTORY
       * Version 1.0: Henrik EKblad
       * Version 1.1 - 2016-07-20: Converted to MySensors v2.0 and added various improvements - Torben Woltjen (mozzbozz)
       * 
       * DESCRIPTION
       * This sketch provides an example of how to implement a humidity/temperature
       * 
       * Dallas temperature sensor DS18B20
       *  
       * For more information, please visit:
       * http://www.mysensors.org/build/humidity
       * 
       HTU21D Humidity Sensor
       Hardware Connections (Breakoutboard to Arduino):
       -VCC = 3.3V
       -GND = GND
       -data  = D3 met pcb 470 uf resistor
       */
      
       
      #define MY_NODE_ID 4
      #define MY_PARENT_NODE_ID 0
      #define MY_PARENT_NODE_IS_STATIC
      
      // Enable debug prints
      #define MY_DEBUG
      
      // Enable and select radio type attached 
      #define MY_RADIO_NRF24
      //#define MY_RF24_PA_LEVEL RF24_PA_HIGH
      //#define MY_RADIO_RFM69
      //#define MY_RS485
       
      #include <MySensors.h> 
      //#include <Wire.h>
      #include <SPI.h>
      #include <OneWire.h>
      #include <DallasTemperature.h>
      
      
      // Force sending an update of the temperature after n sensor reads, so a controller showing the
      // timestamp of the last update doesn't show something like 3 hours in the unlikely case, that
      // the value didn't change since;
      // i.e. the sensor would force sending an update every 
      //UPDATE_INTERVAL*FORCE_UPDATE_N_READS [ms]
      //static const uint8_t FORCE_UPDATE_N_READS = 10;
      
      #define COMPARE_TEMP 0 // Send temperature only if changed? 1 = Yes 0 = No
      // arrays to hold device address
      DeviceAddress insideThermometer;
      
      #define ONE_WIRE_BUS 3 // Pin where dallas sensor is connected 
      #define MAX_ATTACHED_DS18B20 1
      unsigned long SLEEP_TIME = 30000; // Sleep time between reads (in milliseconds)
      OneWire oneWire(ONE_WIRE_BUS); // Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs)
      DallasTemperature sensors(&oneWire); // Pass the oneWire reference to Dallas Temperature. 
      
      
      float lastTemperature[MAX_ATTACHED_DS18B20];
      int numSensors=0;
      bool receivedConfig = true;
      bool metric = true;
      
      #define CHILD_ID_TEMP 1
      #define CHILD_ID_BATTERY 2
      #define CHILD_ID_VOLT 3
      //#define CHILD_ID_PRCNT 3
      
      float lastTemp;
      //float lastHum;
      
      uint8_t nNoUpdatesTemp;
      //uint8_t nNoUpdatesHum;
      //boolean metric = true;
      
      
      
      
      
      void presentation()  
      { 
       // Send the Sketch Version Information to the Gateway                                                                                                                     
        sendSketchInfo("Temperature Sensor", "1.1");      
         
       // Register all sensors to gw (they will be created as child devices)                                                                                                     
      //  present(CHILD_ID_HUM, S_HUM);                                                                                                                                          
        present(CHILD_ID_TEMP, S_TEMP);
         present(CHILD_ID_BATTERY, S_MULTIMETER);                                                                                                                                         
        metric = getControllerConfig().isMetric;
      
      // Fetch the number of attached temperature sensors  
        numSensors = sensors.getDeviceCount();
      
        // Present all sensors to controller
        for (int i=0; i<numSensors && i<MAX_ATTACHED_DS18B20; i++) {   
           present(i, S_TEMP);
        }
         
      }
      
      int BATTERY_SENSE_PIN = A0;  // select the input pin for the battery sense point
                                                                                                                                                        
      //unsigned long SLEEP_TIME = 60000; // Sleep time between reads (in milliseconds)  60000                                                                                           
      static int oldBatteryPcnt = 0;                                                                                                                                                                        
                                                                                                                                                                     
                                                                                                                                                                              
      //Create an instance of the object                                                                                                                                          
      
        MyMessage msg(0,V_TEMP);                                                                                                                                                                                                                                                                                                                           
      //MyMessage msgHum(CHILD_ID_HUM, V_HUM);                                                                                                                                      
      MyMessage msgTemp(CHILD_ID_TEMP, V_TEMP);                                                                                                                                   
      MyMessage msgBattery(CHILD_ID_BATTERY, V_VOLTAGE);
      //MyMessage msgBattery(CHILD_ID_BATTERY, V_PRC);
      
      
      void setup() {
          // Startup up the OneWire library
        sensors.begin();
      
           // use the 1.1 V internal reference
      #if defined(__AVR_ATmega2560__)
          analogReference(INTERNAL1V1);
      #else
          analogReference(INTERNAL);
      #endif
      
      // requestTemperatures() will not block current thread
        sensors.setWaitForConversion(false);
      
      } 
                                                                                                                                                                                                                                                                                                                                                       
      void loop()                                                                                                                                                                 
      {                                                                                                                                                                           
      
      
      // Fetch temperatures from Dallas sensors
        sensors.requestTemperatures();
      
        // query conversion time and sleep until conversion completed
        int16_t conversionTime = sensors.millisToWaitForConversion(sensors.getResolution());
        // sleep() call can be replaced by wait() call if node need to process incoming messages (or if node is repeater)
        sleep(conversionTime);
      
        // Read temperatures and send them to controller 
        for (int i=0; i<numSensors && i<MAX_ATTACHED_DS18B20; i++) {
      
          // Fetch and round temperature to one decimal
          float temperature = static_cast<float>(static_cast<int>((getControllerConfig().isMetric?sensors.getTempCByIndex(i):sensors.getTempFByIndex(i)) * 10.)) / 10.;
      
          // Only send data if temperature has changed and no error
          #if COMPARE_TEMP == 1
          if (lastTemperature[i] != temperature && temperature != -127.00 && temperature != 85.00) {
          #else
          if (temperature != -127.00 && temperature != 85.00) {
          #endif
      
            // Send in the new temperature
            send(msg.setSensor(i).set(temperature,1));
            // Save new temperatures for next compare
            lastTemperature[i]=temperature;
          }
        }
      
      
      // some delay here
        //delay(500);
      
         // get the battery Voltage
           
          int sensorValue = analogRead(BATTERY_SENSE_PIN);
          delay(500);
      #ifdef MY_DEBUG
          Serial.println(sensorValue);
      #endif
      
          // 1M, 470K divider across battery and using internal ADC ref of 1.1V
          // Sense point is bypassed with 0.1 uF cap to reduce noise at that point
          // ((1e6+470e3)/470e3)*1.1 = Vmax = 3.44 Volts
          // 3.44/1023 = Volts per bit = 0.003363075
          int batteryPcnt = sensorValue / 10;
      
      #ifdef MY_DEBUG
          float batteryV  = sensorValue * 0.003363075;
          Serial.print("Child ID ");
          Serial.print(CHILD_ID_BATTERY);
          Serial.print("Battery Voltage: ");
          Serial.print(batteryV);
          Serial.println(" V");
      
          Serial.print("Battery Percent: ");
          Serial.print(batteryPcnt);
          Serial.println(" %");
      #endif
      
          if (oldBatteryPcnt != batteryPcnt) {
              // Power up radio after sleep
                    
              sendBatteryLevel(batteryPcnt);
              oldBatteryPcnt = batteryPcnt;
          } 
                                                                                                                                                                            
        sleep(SLEEP_TIME); //sleep a bit  
                                                                                                                                             
      }
      [/code]```
      
      
      This is in the serial monitor:
      
      [code]```
      16 MCO:BGN:INIT NODE,CP=RNNNA---,VER=2.2.0
      26 TSM:INIT
      28 TSF:WUR:MS=0
      34 TSM:INIT:TSP OK
      36 TSM:INIT:STATID=4
      38 TSF:SID:OK,ID=4
      40 TSM:FPAR
      43 TSM:FPAR:STATP=0
      45 TSM:ID
      47 TSM:ID:OK
      47 TSM:UPL
      1730 !TSF:MSG:SEND,4-4-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=NACK:1
      3739 TSM:UPL
      5421 !TSF:MSG:SEND,4-4-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=1,st=NACK:1
      7430 TSM:UPL
      7477 TSF:MSG:SEND,4-4-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=2,st=OK:1
      7497 TSF:MSG:READ,0-0-4,s=255,c=3,t=25,pt=1,l=1,sg=0:1
      7503 TSF:MSG:PONG RECV,HP=1
      7507 TSM:UPL:OK
      7510 TSM:READY:ID=4,PAR=0,DIS=1
      7518 TSF:MSG:SEND,4-4-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
      7526 TSF:MSG:READ,0-0-4,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
      7536 TSF:MSG:SEND,4-4-0-0,s=255,c=0,t=17,pt=0,l=5,sg=0,ft=0,st=OK:2.2.0
      7557 TSF:MSG:SEND,4-4-0-0,s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=OK:0
      11247 !TSF:MSG:SEND,4-4-0-0,s=255,c=3,t=11,pt=0,l=18,sg=0,ft=0,st=NACK:Temperature Sensor
      12939 !TSF:MSG:SEND,4-4-0-0,s=255,c=3,t=12,pt=0,l=3,sg=0,ft=1,st=NACK:1.1
      14628 !TSF:MSG:SEND,4-4-0-0,s=1,c=0,t=6,pt=0,l=0,sg=0,ft=2,st=NACK:
      16318 !TSF:MSG:SEND,4-4-0-0,s=2,c=0,t=30,pt=0,l=0,sg=0,ft=3,st=NACK:
      16324 MCO:REG:REQ
      18010 !TSF:MSG:SEND,4-4-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=4,st=NACK:2
      21698 !TSF:MSG:SEND,4-4-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=5,st=NACK:2
      21706 !TSM:READY:UPL FAIL,STATP
      25389 !TSF:MSG:SEND,4-4-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=NACK:2
      29079 !TSF:MSG:SEND,4-4-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=1,st=NACK:2
      31088 MCO:BGN:STP
      31137 MCO:BGN:INIT OK,TSP=1
      31141 MCO:SLP:MS=94,SMS=0,I1=255,M1=255,I2=255,M2=255
      31148 TSF:TDI:TSL
      31150 MCO:SLP:WUP=-1
      31154 TSF:TRI:TSB
      903
      Child ID 2Battery Voltage: 3.04 V
      Battery Percent: 90 %
      31657 !TSF:MSG:SEND,4-4-0-0,s=255,c=3,t=0,pt=1,l=1,sg=0,ft=2,st=NACK:90
      31668 MCO:SLP:MS=30000,SMS=0,I1=255,M1=255,I2=255,M2=255
      31674 TSF:TDI:TSL
      31676 MCO:SLP:WUP=-1
      31678 TSF:TRI:TSB
      31682 MCO:SLP:MS=94,SMS=0,I1=255,M1=255,I2=255,M2=255
      31688 TSF:TDI:TSL
      31690 MCO:SLP:WUP=-1
      31692 TSF:TRI:TSB
      831
      Child ID 2Battery Voltage: 2.79 V
      Battery Percent: 83 %
      32202 TSF:MSG:SEND,4-4-0-0,s=255,c=3,t=0,pt=1,l=1,sg=0,ft=3,st=OK:83
      32208 MCO:SLP:MS=30000,SMS=0,I1=255,M1=255,I2=255,M2=255
      32217 TSF:TDI:TSL```
      posted in Hardware
      Mr_sensor
      Mr_sensor
    • RE: 💬 Easy/Newbie PCB (RFM69 HW/W edition) for MySensors

      @gohan said in 💬 Easy/Newbie PCB (RFM69 HW/W edition) for MySensors:

      but this is RFM69 radio pcb not NRF24
      I know but I am using the nrf24 pcb.

      Do I need to add something like this when using the AP version?

      #define MY_RADIO_NRF24

      #define MY_RF24_PA_LEVEL RF24_PA_HIGH

      Or just #define MY_RADIO_NRF24

      posted in OpenHardware.io
      Mr_sensor
      Mr_sensor
    • RE: 💬 Easy/Newbie PCB (RFM69 HW/W edition) for MySensors

      @gohan Ok, what do you mean by "define HW" in code" ? This in my code:
      #define MY_RADIO_NRF24

      posted in OpenHardware.io
      Mr_sensor
      Mr_sensor
    • RE: 💬 Easy/Newbie PCB (RFM69 HW/W edition) for MySensors

      @mr_sensor said in 💬 Easy/Newbie PCB (RFM69 HW/W edition) for MySensors:

      @sundberg84 @gohan Ok thanks for the input I will order some of the extended ones 🙂 and see if thing s will improve.

      The parts mentioned above arrived. I thought just swapping the radio's and see if there is any improvement. But it seems my devices are not happy with there new radio 🙂 ? So are these new devices coming with the same pin-out and are they using the same library as the non amplified radio"s ? Or do I need to alter my sketches or wiring for it to work?

      posted in OpenHardware.io
      Mr_sensor
      Mr_sensor
    • RE: 💬 Easy/Newbie PCB (RFM69 HW/W edition) for MySensors

      @sundberg84 @gohan Ok thanks for the input I will order some of the extended ones 🙂 and see if thing s will improve.

      posted in OpenHardware.io
      Mr_sensor
      Mr_sensor
    • RE: 💬 Easy/Newbie PCB (RFM69 HW/W edition) for MySensors

      @gohan said in 💬 Easy/Newbie PCB (RFM69 HW/W edition) for MySensors:

      I would get better quality nrf24 modules and using a PA LNA one on the gateway may also help. Sure the rfm69 at 433MHz can have a better wall penetration, but I think you can do with better radios. Look for CDEByte store on aliexpress, they have good radio modules. Also a poor quality power supply can reduce the effective range.
      If you want to try the RFM69 radios, you can "convert" the ones you have with this https://www.mysensors.org/hardware/nrf2rfm69

      So these would be better?
      https://nl.aliexpress.com/item/E01-ML01DP5-Ebyte-2-4GHz-20dBm-2100m-nRF24L01-SPI-Wireless-transceiver-module/32638720689.html?spm=a2g0s.13010208.99999999.336.T3AfNk
      https://nl.aliexpress.com/item/CDEBYTE-2PCS-Lot-E01-ML01D-Wireless-Transceiver-For-Arduino-nRF24L01-2-4GHz-Antenna-Module-For-Microcontroll/32803704874.html?spm=a2g0s.13010208.99999999.333.T3AfNk
      https://nl.aliexpress.com/item/CDEBYTE-2PCS-Lot-Special-promotions-1800-meter-long-distance-nRF24L01-PA-LNA-wireless-modules-with-PCB/32803720600.html?spm=a2g0s.13010208.99999999.330.T3AfNk

      If I use one with PA_LNA on my Gateway are the pin-out the same as for the nrf24l+ as in the mysensors gatweay example?
      Also there are models with nrf24l+PA what is the difference with the nrf24l+ ones?

      E01-ML01DP5 Long Range SPI nRF24L01P 2.4Ghz 100mW SMA Antenna IoT Wireless Transceiver Transmitter Receiver nRF24L01P RF Module

      $4.59

      E01-ML01D SPI nRF24L01P 2.4Ghz 1mW PCB Antenna IoT uhf Wireless Transceiver nRF24L01+ Transmitter Receiver Module

      $3.50

      E01-ML01DP4 Long Range SPI nRF24L01P 2.4Ghz 100mW PCB Antenna IoT uhf Wireless Transceiver nRF24L01+ Transmitter Receiver Module

      $2.73
      posted in OpenHardware.io
      Mr_sensor
      Mr_sensor