Navigation

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

    Posts made by รอเรือ

    • RE: Moisture penetrates my outdoor enclosures...

      @FredC said in Moisture penetrates my outdoor enclosures...:

      @รอเร-อ 2 thoughts here....

      How is the box attached to the timber?

      Did you use the seal provided with the box?

      From what I recall these boxes are cheap chinese with a string of rubber like sealant that goes into the groove around the cover and base. There 'should' 4 holes that allow you to attach the box to the timber that sit outside the seal. If however you've drilled through the back of the box to screw into the timber, the chances are that moisture has got in that way.

      Looking at your picture the plastic seems to be degrading so the chances are the seals have too.

      I've recently seem a product on sale in electrical suppliers that is a waterproof gel (a bit like silicon) that is poured or injected into outdoor electrical junction boxes. It's called "Electical Waterproof Gel". I don't know whether it's got any RF implications, but it supposed to be IP68 rated and safe up to 1000v. Might be worth investigating.

      You are right about that, the box I used was of low quality and I should have put greater effort finding a more suitable and rated outdoor enclosure in the first place. Trying to improve it with silicone and other stuff won't last long so what happened was actually quite expected.

      I have ordered (will arrive today) some electric cast resin. I'll give it a try and I'll pay better attention to shield my outdoor enclosures in the future. Doing that needs some studying, it's not trivial.

      Cheers!

      posted in General Discussion
      รอเรือ
      รอเรือ
    • RE: Moisture penetrates my outdoor enclosures...

      I have managed to bring life to my old node after replacing the cables and the connectors. Now I'm planning to bake all the electronics into Bekateq Epoxy Resin... That includes the RF24 radio as well and I'm actually a little worried about how that will work. Radio modules are kind of sensitive but I will give it a try. Maybe someone tried that already?

      Cheers!

      posted in General Discussion
      รอเรือ
      รอเรือ
    • RE: Moisture penetrates my outdoor enclosures...

      @Jodaille said in Moisture penetrates my outdoor enclosures...:

      Hello @รอเร-อ

      I have never managed to build a box 100% waterproof.

      Water always find a path 🙂

      Maybe you could try to make a small hole at the bottom to let the condensation leaving.

      But then some spiders can go inside and shortcut some wires 🙂

      GreatScott has done some video about waterproofing, like this one:
      How to Waterproof Electronics || Nail Polish, Silicone, Potting Compound – 07:49
      — GreatScott!

      Thanks @Jodaille I'll have a look at that.

      posted in General Discussion
      รอเรือ
      รอเรือ
    • Moisture penetrates my outdoor enclosures...

      Hi there! I have a few moisture safe enclosures for outdoor sensor. At least, that's what I thought but inspecting one of them today due to failure (see attached image below) made me aware that they are not moisture safe at all. They even seem to suck moisture from the outside and store it inside the box.

      I guess that the plastic that the box is made of isn't moisture proof.

      If some of you guys have experience to share with me on this topic I'd appreciate it a lot. I'd like to rebuild this repeater node using an enclosure that does not allow moisture to enter it and eventually destroy the electronics. Stability of operation and an enclosure that resists the environmental challenges that it will face has a much higher priority than the cost of the enclosure.

      62caf6c3-0a95-4524-83dc-db853ac6009f-image.png

      Cheers!

      posted in General Discussion
      รอเรือ
      รอเรือ
    • RE: Detecting a sudden change

      @Yveaux Thanks!

      Nice graph. I will do something similar in Grafana. I think my MySensors device should also report every minute, perhaps using the highest sampled value. All values are sent to MQTT by my gateway and my Home Automation will store the time value pairs in influxdb. Right now I'm waiting for the hardware to arrive... 😀

      posted in Development
      รอเรือ
      รอเรือ
    • Detecting a sudden change

      Hello all!

      I'm building a PM2.5 particle matter sensor and I'm trying to figure out how I would go about to detect sudden changes of measured particles occurs.

      I expect that there is a background level of particle matters that vary very slowly maybe between 0 and 20 µg/m3. I'd want to be alerted if that level rises all off a sudden. That happens frequently here when the flue gases from my neighbors chimney flows towards the ground level and enters my mechanical ventilation intake. I'd like the alert to be active until "normal" levels have been reached and a new alert if it happens again after that.

      I'm putting my question here in hope that you might happen to know a "software design pattern" some reusable solution for a similar problem. I have seen a Lua Script for Humidity control that does a similar thing but a c++ code snippet to be inspired by would make things easier.

      Do you have any idea about how this should be done clean and beautifully?

      Thanks in advance. Cheers!

      posted in Development
      รอเรือ
      รอเรือ
    • RE: SPI conflict: nRF24L01+ wants the same pins as my MAX7219 LED dot matrix display

      @mfalkvidd Thanks a lot!

      I just made some tests and it looks promising. 😁 😁 😁

      posted in General Discussion
      รอเรือ
      รอเรือ
    • SPI conflict: nRF24L01+ wants the same pins as my MAX7219 LED dot matrix display

      Hello there!

      My MAX7219 LED dot matrix display is working great using hardware SPI using pin 11 for MOSI and pin 13 for SCK on a Arduino NANO.
      Now, I'd like to use a nRF24L01+ radio as well which also claims using the same ports 11 and 13 for MOSI and SCK.

      MAX7219 can use software SPI instead so that I can use any digital pins of the Arduino. The problem is that when using software SPI it turns out to be slower and it doesn't look well on my double height display (2x8 matrixes). The upper part of the double height display lags. Therefore I'd like to use pin 11 and pin 13 for the MAX7219 LED dot matrix display but AFAIK the radio must use the same pins.

      Any ideas how that can be solved?!

      Capture.PNG

      posted in General Discussion
      รอเรือ
      รอเรือ
    • RE: EV Charger (type 2) with RESTful API and Wifi recommendations?

      @rmh said in EV Charger (type 2) with RESTful API and Wifi recommendations?:

      @รอเร-อ btw Normal single phase type 2 charging on an EV is 32a = 7 Kw. If your ev can charge at 22Kw, then it will need a 3 phase supply. OpenEVSE can do this but you will need to put a 3 phase contactor in it.
      R

      Thanks a lot. That seems to be exactly what I'm looking for. I didn't order the kit though. I ordered the EmonEVSE WiFi Connected EV Charging Station IEC 60947-5 (Type-2)

      I'm very excited to get started. Ohh... I'll need an EV too... ha ha

      posted in General Discussion
      รอเรือ
      รอเรือ
    • EV Charger (type 2) with RESTful API and Wifi recommendations?

      Hi there!

      Time for me to invest in a EV Charger (type 2).

      Of course I'd like it to have a RESTful API and Wifi. Even better if it could connect to my MQTT server as well. 22 kW would be fine.

      I can't just install any "smart" charger that measures the used grid power because it can't determine the direction of the current. I export solar energy daytime which makes power flow outwards to the grid. I'd like to be able to set the max power depending on how much solar power I produce and how much I can import. If I can control when charging occurs I can also select the cheapest hours.

      BTW, I prefer to buy my EV charger in Europe.

      Cheers!

      posted in General Discussion
      รอเรือ
      รอเรือ
    • RE: CDEBYTE's new NRF24 modules are great! (and cheap)

      @yveaux

      I've managed to replace the SMD resistors according to your suggested hack described above. It wasn't easy though. Anyway, it seems to work well. Thanks!!!

      posted in General Discussion
      รอเรือ
      รอเรือ
    • RE: CDEBYTE's new NRF24 modules are great! (and cheap)

      @yveaux said in CDEBYTE's new NRF24 modules are great! (and cheap):

      This patch makes both regular and amplified nRF24 modules work correctly!

      Dear @Yveaux

      Thanks for all the work you've put into investigating this issue.

      I have a different brand of the Nano IO Shield but the quality is equally very low. I guess I'll need to inspect them carefully before I use them. I guess I have 10 of them and I will try to apply the HW patch you've suggested but I'm not sure I'll be able to make it, I don't have any SMD resistors and they are to small to work with for me. I'll need to give it a try anyway.

      Thanks again and merry christmas btw 🎅

      posted in General Discussion
      รอเรือ
      รอเรือ
    • RE: CDEBYTE's new NRF24 modules are great! (and cheap)

      @skywatch said in CDEBYTE's new NRF24 modules are great! (and cheap):

      What current rating is the power source you are using?

      I intend to run them on power level RF24_PA_MAX. I have tried other power levels in my efforts without any success.

      @yveaux said in CDEBYTE's new NRF24 modules are great! (and cheap):

      recently received the same Nano IO shields and discovered the IO lines to the nRF are fed through a voltage divider; levels are halved w.r.t. direct connection.
      According to Nordic's datasheet this should be ok (minimum HIGH level input voltage is 0.7 * VDD, so 0.7 * 3.3V = 2.31V) as long as your Arduino is fed with 5V this should just work, but it is tricky IMHO.
      You could measure the VCC of the Nano to see if it is below 5V, or try powering the board through the power jack and see if things improve.

      That's interesting. I'm powering it with USB only but i have tried to connect an additional power source as well but it made no difference, I will do some more tests and measure the voltage levels.

      @yveaux said in CDEBYTE's new NRF24 modules are great! (and cheap):

      Did you also try the shielded module with #define MY_RF24_PA_LEVEL RF24_PA_MIN ?

      From what I recall, I have tried RF24_PA_LOW. I will test RF24_PA_MIN too.

      @yveaux said in CDEBYTE's new NRF24 modules are great! (and cheap):

      Currently I'm out of Nanos, but as soon as the new batch comes in I can replicate your setup.

      I'd be happy to send you one from my batch. Please send me a PM if you'd like that.

      @alowhum said in CDEBYTE's new NRF24 modules are great! (and cheap):

      Since moving to these boards all my connection troubles have stopped. I'm very happy with them.

      Sounds very promising 😀

      posted in General Discussion
      รอเรือ
      รอเรือ
    • RE: CDEBYTE's new NRF24 modules are great! (and cheap)

      @yveaux

      I have spent 2 days trying to solve my various NRF24 related problems at my home.

      What I'd like to achieve is to make my serial gateway using a NRF24-transciever with an external antenna to extends it's range.

      CDEBYTE's new NRF24-transciever (the unshielded one) works in my serial gateway (built with a Nano IO Shield) and fed with USB power only. I can attach a separate power source if I want to but it seems to work well without it.

      However, CDEBYTE's new shielded NRF24-transciever (Shielded nRF24L01 PA+LNA) refuses to work. I get only NACKs in the log even if I attach a separate power source. I've also tried just connecting my Nano board directly to the radio with cables (without the IO shield) just like in the Build a serial gateway demo. (I've tried all kind of power settings) I also tried to power the radio with a battery. Those NACKs are resilient indeed. Of course I've tried all kind of decouple capacitors and several combinations of electrolytic and ceramic ones... No way.

      BUT, there is always a but isn't there? ... I have managed to get the CDEBYTE Shielded nRF24L01 PA+LNA to work stable on a battery powered node, a Pro Mini ATmega 328 (1.8V 1 MHz). I can't tell why that works while not working with the Nano.

      My current working solution is using the "old" unshielded nRF24L01 PA+LNA mounted on the Nano IO Shield fed with usb power only. #define MY_RF24_PA_LEVEL RF24_PA_MAX While this seems to work (at least for the moment) I can not just switch to using the shielded radio.

      So if someone succeeds using the CDEBYTE Shielded nRF24L01 PA+LNA connected to a Nano board I'm interested to hear how you made it work.

      The thing is that everything that I have tried gives so random results that it's driving me crazy. Whatever seems to work one minute stops to work the next minute.

      posted in General Discussion
      รอเรือ
      รอเรือ
    • RE: CDEBYTE's new NRF24 modules are great! (and cheap)

      @yveaux I'll investigate further today and report here afterwards. Thanks.

      posted in General Discussion
      รอเรือ
      รอเรือ
    • RE: CDEBYTE's new NRF24 modules are great! (and cheap)

      @alowhum said in CDEBYTE's new NRF24 modules are great! (and cheap):

      I've also ordered a shielded version that I'm still waiting for.

      Today, I've tried the unshielded one and the few that I've tried seem to work.

      However, I haven't been able to make the shielded one work on a IO Shield for Arduino Nano. I've used antennas from older traditional NRF24L01+PA+LNA Antenna version. No way. I will try different decoupling-Capacitors tomorrow.

      I feel I'm stuck in the NRF24-hell...

      posted in General Discussion
      รอเรือ
      รอเรือ
    • RE: Interrupted sleep

      @mfalkvidd Thanks a lot for your suggestion. I will think this through during the day. It might still be problems due to the dynamic nature of the rain.

      It would be hard for me to define a reasonable good value for MAX_NUMBER_OF_TRIPS_WITHOUT_SENSOR_REPORT when rain in the interval ranging from 11 mm per hour up to maybe as much as 240 mm per hour (extreme but not impossible) would disrupt the readings of other sensors.

      I also have a doubt that my sketch will work well in a case where the Arduino is already awake (handling other sensors) when the rain bucket tips. It's just a guess but I believe that the tipping will not be counted at all in such a scenario.

      What do you think? If so my sketch is badly designed (only myself to blame) and maybe I should consider giving the rain gauge it's own Arduino board. It would make things much cleaner. What do you think?

      @Yveaux, you are right.

      posted in Development
      รอเรือ
      รอเรือ
    • Interrupted sleep

      Hi guys.

      I have a sketch for a battery powered node that sleeps a certain amount of time, let's say 2 minutes. unsigned long SLEEP_TIME = 120000; // Wait time between reads (in milliseconds) When it wakes up, it will check a few sensors and report new values (if any) to the gateway. So far so good.

      However (there's always a but, isn't there?), the 2 minute sleep is allowed to be interrupted by the change of a pin. That pin is connected to a rain meter. Measuring the rain must be done instantly.

      Every time that the loop() function runs, other sensors are checked.

      That's OK if it rains normally but sometimes it rains like h*ll. I'm concerned that the rain meter will be tripped so frequently that there is no time to check other sensors and report them to the gateway.

      I'm useless when it comes to explain things. But I'd like the rain sensor to report whenever the rain sensor is tripped. I would like the other sensors to report at the 2 minutes interval regardless of the rain sensor. As it is now, every time the rain sensor interrupts the sleep, all sensors gets checked. I would like it to report the rain and go back to sleep the REMAINING SLEEP TIME. I understand if my explanation is beyond what ca be understood (it's worse than Kurt Olsson) so I add the source below:

      /**
       * WeatherStation
       * 
       * DESCRIPTION
       * Arduino BH1750FVI Light sensor
       * communicate using I2C Protocol
       * this library enable 2 slave device addresses
       * Main address  0x23
       * secondary address 0x5C
       * connect the sensor as follows :
       *
       *   VCC  >>> 5V
       *   Gnd  >>> Gnd
       *   ADDR >>> NC or GND  
       *   SCL  >>> A5
       *   SDA  >>> A4
       * http://www.mysensors.org/build/light
      
      
      https://forum.mysensors.org/topic/9359/soft-wdt-reset-on-esp8266-rfm69-gateway-after-find-parent/20
      Connecting the BME280 Sensor:
      Sensor              ->  Board
      -----------------------------
      Vin (Voltage In)    ->  3.3V
      Gnd (Ground)        ->  Gnd
      SDA (Serial Data)   ->  A4
      SCK (Serial Clock)  ->  A5
      
      
      For temperature measurements we've selected the standard Dallas DS18B20.
      
      */
      
      #define MY_NODE_ID 15
      #define SKETCH_NAME "Weather Station"
      #define SKETCH_VERSION "1.1"
      #define DWELL_TIME 200  // this allows for radio to come back to power after a transmission, ideally 0
      
      // Enable debug Serial.prints to serial monitor
      //#define MY_DEBUG 
      
      #if defined MY_DEBUG
      
      #define Sprintln(a) (Serial.println(a))
      #define Sprint(a) (Serial.print(a))
      #else 
      #define Sprintln(a)
      #define Sprint(a)
      #endif
      
      // Enable and select radio type attached
      #define MY_RADIO_NRF24
      //#define MY_RADIO_RFM69
      
      #include <SPI.h>                                  // A communication backbone, the Serial Peripheral Interface.
      #include <MySensors.h>                            // The MySensors library.
      #include <Wire.h>                                 // Enables the Wire communication protocol.
      #include <DallasTemperature.h>
      #include <OneWire.h>
      #include <BH1750.h>
      //#include <BME280I2C.h> // From Library Manager
      #include <Adafruit_Sensor.h>
      #include <Adafruit_BME280.h>
      #undef BME280_ADDRESS         // Undef BME280_ADDRESS from the BME280 library to easily override I2C address
      #define BME280_ADDRESS (0x76) // Low = 0x76 , High = 0x77 (default on adafruit and sparkfun BME280 modules, default for library)
      
      uint8_t tipSensorPin = 3; // Pin the tipping bucket is connected to. Must be interrupt capable pin
      
      #define CHILD_ID_LIGHT 0
      #define CHILD_ID_TEMP_1 1
      #define CHILD_ID_TEMP_2 2 // Dallas DS18B20
      #define CHILD_ID_HUM 3
      #define CHILD_ID_BARO 4
      #define CHILD_ID_RAIN 5
      
      unsigned long SLEEP_TIME = 120000; // Wait time between reads (in milliseconds)
      #define FORCE_TRANSMIT_CYCLE 30
      uint8_t cycleCountLux = 0;
      uint8_t cycleCountPressure = 0;
      uint8_t cycleCountTemp2 = 0;
      uint8_t cycleCountHum = 0;
      
      int8_t interruptedBy = -1;
      
      Adafruit_BME280 bme; // I2C
      BH1750 lightSensor;
      
      #define ONE_WIRE_BUS 5 // Digital pin where dallas sensor is connected 
      OneWire oneWire(ONE_WIRE_BUS); // Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs)
      DallasTemperature DS18B20sensor(&oneWire); // Pass the oneWire reference to Dallas Temperature. 
      
      uint16_t lastLux;
      float lastPressure;
      //float lastTemp1; // Temp from the BME280 Temp Hum Bar Sensor
      float lastTemp2; // Dallas DS18B20. Temp
      float lastHum;
      
      float tempThreshold = 0.2;                        // How big a temperature difference has to minimally  be before an update is sent. Makes the sensor less precise, but also less jittery, and can save battery.
      uint8_t humThreshold = 1;                         // How big a humidity difference has to minimally be before an update is sent. Makes the sensor less precise, but also less jittery, and can save battery.
      uint8_t presThreshold = 1;
      uint8_t luxThreshold = 1;
      
      MyMessage msgLight(CHILD_ID_LIGHT, V_LEVEL);  
      MyMessage msgTemp1(CHILD_ID_TEMP_1, V_TEMP);
      MyMessage msgTemp2(CHILD_ID_TEMP_2, V_TEMP);
      MyMessage msgHum(CHILD_ID_HUM, V_HUM);
      MyMessage msgPressure(CHILD_ID_BARO, V_PRESSURE);
      MyMessage msgRain(CHILD_ID_RAIN, V_TRIPPED);
      
      void setup()  
      {
        Wire.begin(); // Wire.begin(sda, scl) // starts the wire communication protocol, used to chat with the BME280 sensor.
        Sprint(SKETCH_NAME);
        Sprint(F(" version "));
        Sprint(SKETCH_VERSION);
        Sprint(F(" (using MY_NODE_ID: "));
        Sprint(MY_NODE_ID);
        Sprintln(F(") says hello!"));
        delay(500);// just in case
        Sprintln(F("Running bme.begin()"));
        if (!bme.begin())
         {
          Serial.println("BME init failed!");
         }
        else Sprintln("BME init success!");
        Sprintln(F("Running lightSensor.begin()"));
        lightSensor.begin();
        Sprintln(F("Running DS18B20sensor.begin()"));
        DS18B20sensor.begin(); // Startup up the OneWire library used for Dallas DS18B20 Temp
        DS18B20sensor.setWaitForConversion(false); // requestTemperatures() will not block current thread
        pinMode(tipSensorPin, INPUT); // sets the rain sensor digital pin as input
      }
      
      void presentation()  {
        // Send the sketch version information to the gateway and Controller
        sendSketchInfo(SKETCH_NAME, SKETCH_VERSION);
        wait(DWELL_TIME);
        // Register all sensors to gateway (they will be created as child devices)
        present(CHILD_ID_LIGHT, S_LIGHT_LEVEL);
        wait(DWELL_TIME);
        //present(CHILD_ID_TEMP_1, S_TEMP); //  Temp sensor on the BME280 multi sensor
        //wait(DWELL_TIME);
        present(CHILD_ID_TEMP_2, S_TEMP); // Dallas DS18B20. Temp
        wait(DWELL_TIME);
        present(CHILD_ID_HUM, S_HUM);
        wait(DWELL_TIME);
        present(CHILD_ID_BARO, S_BARO);
        wait(DWELL_TIME);
        present(CHILD_ID_RAIN, S_MOTION);
        wait(DWELL_TIME);
      }
      
      void loop()      
      {
        bool rainBucketTripped = (interruptedBy == digitalPinToInterrupt(tipSensorPin));
      
        wait(500); // Give radio some time to warm up
      
        cycleCountLux++;
        cycleCountPressure++;
        cycleCountTemp2++;
        cycleCountHum++;
      
        if (rainBucketTripped) {
          Sprintln("Tipping bucket rain sensor was tripped");
          send(msgRain.set(1));  // Send tripped value to gw
          wait(DWELL_TIME);
        }
      
        // Fetch temperature from Dallas DS18B20 Temp sensor
        DS18B20sensor.requestTemperatures();
      
        // query conversion time and sleep until conversion completed
        int16_t conversionTime = DS18B20sensor.millisToWaitForConversion(DS18B20sensor.getResolution());
        // sleep() call can be replaced by wait() call if node need to process incoming messages (or if node is repeater)
        sleep(conversionTime);
        // Fetch and round temperature to one decimal
        float temp2 = static_cast<float>(static_cast<int>((getControllerConfig().isMetric?DS18B20sensor.getTempCByIndex(0):DS18B20sensor.getTempFByIndex(0)) * 10.)) / 10.;
        if (isnan(temp2)) {
          Sprintln("Failed reading temp2");
        } else if (((abs(temp2 - lastTemp2) >= tempThreshold) or (cycleCountTemp2 >= FORCE_TRANSMIT_CYCLE)) && temp2 != -127.00 && temp2 != 85.00) {
          // Only send temp2 if it changed since the last measurement
          lastTemp2 = temp2;
          cycleCountTemp2 = 0;
          Sprint("Temperature: ");
          Sprint(temp2);
          Sprintln("°C");
          send(msgTemp2.set(temp2 ,1));
          wait(DWELL_TIME);
        }
      
        uint16_t lux = lightSensor.readLightLevel();// Get Lux value
        if (isnan(lux)) {
          Sprintln("Failed reading lux");
        } else if ((abs(lux - lastLux) >= luxThreshold) or  (cycleCountLux >= FORCE_TRANSMIT_CYCLE)){
          // Only send Lux if it changed since the last measurement
          lastLux = lux;
          cycleCountLux = 0;
          Sprint("Light: ");
          Sprint(lux);
          Sprintln(" Lux");
          send(msgLight.set(lux));
          wait(DWELL_TIME);
        }
      
        double pres, hum;
        pres=bme.readPressure()/100.0;
        hum=bme.readHumidity();
      
        if (isnan(hum)) {
          Sprintln("Failed reading humidity");
        } else {
          hum = round(hum);
          if ((abs(hum - lastHum) >= humThreshold) or (cycleCountHum >= FORCE_TRANSMIT_CYCLE)){
            // Only send humidity if it changed since the last measurement
            lastHum = hum;
            cycleCountHum = 0;
            Sprint("Humidity: ");
            Sprint(hum);
            Sprintln("% RH");
            send(msgHum.set(hum, 0));
            wait(DWELL_TIME);
          }
        }
      
        if (isnan(pres)) {
          Sprintln("Failed reading pressure");
        } else {
          pres = round(pres);
          if ((abs(pres - lastPressure) >= presThreshold) or (cycleCountPressure >= FORCE_TRANSMIT_CYCLE)) {
            // Only send pressure if it changed since the last measurement
            lastPressure = pres;
            cycleCountPressure = 0;
            Sprint("Pressure: ");
            Sprint(pres);
            Sprintln(" hPa");
            send(msgPressure.set(pres, 0));
            wait(DWELL_TIME);
          }
        }
      
        // Sleep until interrupt comes in on rain tip bucket sensor. Send update every SLEEP_TIME.
        Sprintln(F("Waiting ")); Sprint(SLEEP_TIME /1000); Sprintln(F(" seconds before next reading."));
        interruptedBy = sleep(digitalPinToInterrupt(tipSensorPin), CHANGE, SLEEP_TIME);
      }
      

      Another try to explain: When it rains heavily, I don't want to check and report humidity and temp. Humidity and temp should be reported in the interval that I've set in SLEEP_TIME.

      alt text

      Can it be done?

      posted in Development
      รอเรือ
      รอเรือ
    • RE: Misol rain gauge tipping bucket rain amount

      @hek

      I let 1126-202 grams water slowly flow into the 55 cm2 gauge and it generated 475 tips.

      That gives me 0.3537 mm/tip. I'll go with that. ☺

      posted in Hardware
      รอเรือ
      รอเรือ
    • RE: Misol rain gauge tipping bucket rain amount

      @hek Thanks! I just saw that while editing my first post. It sounds a little bit low.

      posted in Hardware
      รอเรือ
      รอเรือ
    • Misol rain gauge tipping bucket rain amount

      Has someone measured what amount of rain one "tip" of the tipping bucket of the MISOL rain gauge corresponds to? It would be great to know so I can calibrate my scripts.

      0_1533984020053_HTB1aTt9kDlYBeNjSszcq6zwhFXaK.jpg

      EDIT: I found this article that suggests it should be 0.0161 inches which is 0.40894 mm.

      EDIT2: Another source is suggesting 0.2794 mm.

      EDIT3: packetrat is suggesting 83.82 pulses per inch which should be 0,303030303 mm

      posted in Hardware
      รอเรือ
      รอเรือ
    • RE: Getting out of the box

      @zboblamont

      You are right, it will corrode sooner or later. It's a bad idea. I'll wait until it's time to change battery or it stops working (whatever comes first) and then I'll make it according to your suggestions.

      Would you like to show us with a photo how your nodes look like? Thanks!

      posted in My Project
      รอเรือ
      รอเรือ
    • Getting out of the box

      So you put your sensitive electronics inside a water sealed box (hopefully) you put it outside and unless you are interested to find out about the environment inside the box, you also connect some external sensors. That's where the water comes into the box, right?

      So how do you normally do that? I use to drill a hole, put the cable through and use hot glue to seal it. It kind of works but it's not very service friendly in a scenario where you don't want to remove the sensors from where they were fastened.

      I had a new idea today that I'll try. I'm sure that you guys have much better ideas about how to do this.

      What I want is a way to disconnect the sensors easily so I can take the box inside for exchanging batteries, replacing software or whatever. Then I'd like to reconnect the sensors again easily. There is probably nice connectors out there that can be bought but they must be reasonable priced for me to use them.

      0_1533887996674_DSC_1922.JPG

      posted in My Project
      รอเรือ
      รอเรือ
    • RE: Ethernet GW vs MQTT

      @soloam said in Ethernet GW vs MQTT:

      MySensors MQTT GW

      I would vote for MQTT serial gateway but there is no option for that. That's what I use for openHAB 2.3. Works like a charm. I'm not dependent of any special MySensors binding for openHAB. MQTT is the way to go! Serial binding is for people who doesn't like to spend time debugging hardware issues.

      posted in OpenHAB
      รอเรือ
      รอเรือ
    • RE: Repeater when available

      @alowhum

      I believe it's very important that a repeater has a good communication with the gateway. I can imagine that a repeater with less than optimal communication with the gateway could make things worse.

      posted in General Discussion
      รอเรือ
      รอเรือ
    • RE: NRF24L01+ range of only few meters

      I'm currently in the process of trying to figure out why one of my battery powered nodes isn't working very well with a newly purchased NRF24L01+PA+LNA module. I've shielded it as described in earlier posts. There is plenty of pure power in the batteries.

      Just as in the case for @pkjjneal it works well only if I'm touching the antenna with a finger.

      I decided to look inside the antenna:
      0_1533729640287_DSC_1916.JPG

      As you see above, it starts with an antenna cable that leads to a half wave dipole (where the antenna element is of about 1/4 wave length) and there is a "sleeve balun" going back over the cable . I can find no ground plane though. The problem that I can see is that the antenna length is 27 mm where it should optimally be 28.8 mm.

      Now, if I remove the antenna completely my node works quite well. At least better than if I use the original antenna unmodified.

      If I insert a wire (DIY antenna made by a paper clip) extending 121 mm out of the antenna sockets forming a full wave length antenna things work great.

      I also modified the original antenna so that the antenna element becomes 28.8 mm. It works a bit better but it's far from perfect and communication errors are shown in the log.

      As the final test, I added a nice ground plane to the original antenna and now it works really perfect!
      0_1533729823658_DSC_1917.JPG

      So what can I learn from this?

      My test rig is an EasyPCB powered with batteries. I'm quite sure that my NRF24L01+PA+LNA module used in another scenario, for example connected to a Arduino Nano fed by a FTDI connector could actually work. It's because it would create a different environment. The antenna will work in relation to what it's connected to, shielding the grounding, and surrounding objects. Capacitive and inductive reactances are involved in mysterious ways.

      Anyway. My conclusion is that the two original antennas I have are not working very good. They obviously have the wrong length just a little bit, and I'd say that the the way the antenna is constructed with the sleeve balun and no ground plane, doesn't seem to work well. At least not here.

      I'll do some more experimenting with making my own antennas. Starting with taking apart an original antenna is not so bad, I can solder anything (solderable) onto the cable.

      Cheers!

      From wikipedia:

      Sleeve balun
      At VHF frequencies, a sleeve balun can also be built to remove feeder radiation.

      Another narrow-band design is to use a λ/4 length of metal pipe. The coaxial cable is placed inside the pipe; at one end the braid is wired to the pipe while at the other end no connection is made to the pipe. The balanced end of this balun is at the end where no connection is made to the pipe. The λ/4 conductor acts as a transformer, converting the zero impedance at the short to the braid into an infinite impedance at the open end. This infinite impedance at the open end of the pipe prevents current flowing into the outer coax formed by the outside of the inner coax shield and the pipe, forcing the current to remain in the inside coax.

      posted in Hardware
      รอเรือ
      รอเรือ
    • RE: NRF24L01+ range of only few meters

      @epierre

      I'd be surprised if the existing on board antenna is anything else than a 1/4 wave length of the center frequency for the NRF24L01 module. Therefore I BELIEVE that the right thing would be to extend it with antother 3/4 to make it a full wave length.

      If you run it at the default MySensors frequency which is 2476 MHz, a full wave length is 121 mm. Therefore I'd assume that adding another 91 mm to the existing antenna would be the correct length. I haven't tried it yet though but I will.

      Cheers!

      posted in Hardware
      รอเรือ
      รอเรือ
    • RE: Build a reliable power supply chain

      Thanks @Mathea90 for bringing up this interesting subject.

      It's sure difficult I believe to find a power supply for various Arduino projects that's both reliable and has a low cost.

      @sundberg84 made a nice breakout PCB for the HLK-PM01, that "was considered at that time (2015-2017) the best AC to DC 5v module option (within reasonable price range)."

      I hesitate though to build them due to that they will not be certified and if I cause a fire at my home, my home insurance may not cover the damages that can arise. With that being said, I'm quite sure that the HLK-PM01-breakout-board is by far much more safer than many wall plug chargers marked with CE (China Export).

      It would be nice to have a breakout board that can turn the power from any random 5V wall plug charger into something that's clean and ripple free with a good margin to feed NRF24L01+ nodes with. With such a board I wouldn't have to be involved in working directly with 230V AC.

      Meanwhile I'll probably try to build me a couple of LC filters using prototype breadboards.

      Thanks again and keep up the good work!

      posted in Troubleshooting
      รอเรือ
      รอเรือ
    • My Wind Station

      I made a wind station using the two following sensors that I bought on e-bay.

      • Wind Sensor JL-FS2 Wind Direction Sensor (4-20mA, 0-5V) Signal Output
      • Wind Speed Sensor Anemometer Three Cups Aluminium Alloyed pulse signal output

      0_1533548833049_s-l500.jpg
      0_1533548847083_s-l1600.jpg

      I think they are quite nice. They are fed with 12V DC and are giving a 5V output signal. Therefore I'm using a 5V Arduino Mini Pro for the sketch.

      The following sketch is measuring the wind data once a second, storing it into an array and doing calculations to get the average wind speed, direction and gust for each minute, each other minute and each 10 minutes.

      Before getting the average the wind is split into it's vector components. Cool isn't it?

      I upload the average 10 minute wind data to Weather Underground. It looks very smooth.

      Here is the sketch:

      /**
       * WindMonitor
       * 
      
      About the windspeed sensor, have a look here:
      https://www.dfrobot.com/wiki/index.php/Wind_Speed_Sensor_Voltage_Type(0-5V)_SKU:SEN0170#Connection_Diagram
      
      */
      #define MY_NODE_ID 17
      
      #define SKETCH_NAME "Wind Station"
      #define SKETCH_VERSION "1.1.1"
      #define DWELL_TIME 1000  // this allows for radio to come back to power after a transmission, ideally 0
      
      //#define MY_DEBUG // Enable debug Serial.prints to serial monitor and arrays are smaller
      
      #if defined MY_DEBUG
      #define MY_BAUD_RATE 115200 // Sets the serial baud rate for console and serial gateway
      
      #define Sprintln(a) (Serial.println(a))
      #define Sprint(a) (Serial.print(a))
      const uint8_t num1mReadings = 2; // Use a low value to free memory for making debug possible
      const uint8_t num2mReadings = 2; // Use a low value to free memory for making debug possible
      const uint8_t num10mReadings = 2; // Use a low value to free memory for making debug possible
      const uint8_t FORCE_TRANSMIT_CYCLE = 10; // Force sending value even if hasn't changed after N cycles
      const uint16_t WAIT_TIME = 5000;
      #else 
      #define Sprintln(a)
      #define Sprint(a)
      const uint8_t num1mReadings = 60; //Defines number of reading to calculate average windspeed
      const uint8_t num2mReadings = 2;
      const uint8_t num10mReadings = 10;
      const uint8_t FORCE_TRANSMIT_CYCLE = 10; // Force sending value even if hasn't changed after N cycles
      const uint16_t WAIT_TIME = 1000;
      #endif
      
      // Enable and select radio type attached
      #define MY_RADIO_NRF24
      //#define MY_PARENT_NODE_ID 0
      //#define MY_PARENT_NODE_IS_STATIC
      #include <MySensors.h>
      
      #define LED_PIN 8
      #define ANEMOMETER_ANALOG_PIN 0
      #define WIND_VANE_ANALOG_PIN 1
      
      #define CHILD_ID_WIND 0
      #define CHILD_ID_WIND2M 1
      #define CHILD_ID_WIND10M 2
      #define CHILD_ID_GUST_DIR 3 // Specifically for wind gust direction
      #define CHILD_ID_GUST2M_DIR 4
      #define CHILD_ID_GUST10M_DIR 5
      
      
      #define FORCE_TRANSMIT_CYCLE 60 // Force sending value even if hasn't changed after N cycles
      uint8_t cycleCountWindSpeed = FORCE_TRANSMIT_CYCLE;
      uint8_t cycleCountWindGust = FORCE_TRANSMIT_CYCLE;
      uint8_t cycleCountWindGustDir = FORCE_TRANSMIT_CYCLE;
      uint8_t cycleCountWindDir = FORCE_TRANSMIT_CYCLE;
      uint8_t cycleCountWindSpeed2m = FORCE_TRANSMIT_CYCLE;
      uint8_t cycleCountWindGust2m = FORCE_TRANSMIT_CYCLE;
      uint8_t cycleCountWindGustDir2m = FORCE_TRANSMIT_CYCLE;
      uint8_t cycleCountWindDir2m = FORCE_TRANSMIT_CYCLE;
      uint8_t cycleCountWindSpeed10m = FORCE_TRANSMIT_CYCLE;
      uint8_t cycleCountWindGust10m = FORCE_TRANSMIT_CYCLE;
      uint8_t cycleCountWindGustDir10m = FORCE_TRANSMIT_CYCLE;
      uint8_t cycleCountWindDir10m = FORCE_TRANSMIT_CYCLE;
      
      float last_wspeed;
      float last_wgust;
      uint16_t last_wdirection;
      uint16_t last_wgustdirection;
      float last_wspeed2m;
      float last_wgust2m;
      uint16_t last_wdirection2m;
      uint16_t last_wgustdirection2m;
      float last_wspeed10m;
      float last_wgust10m;
      uint16_t last_wdirection10m;
      uint16_t last_wgustdirection10m;
      
      float windSpeedReadings[num1mReadings]; // the readings from the analog input
      float windSpeedReadings2m[num2mReadings]; // For 2 minute average wind speed
      float windSpeedReadings10m[num10mReadings]; // For 10 minute average wind speed
      float windDirReadings[num1mReadings]; // the readings from the analog input
      float windDirReadings2m[num2mReadings]; // For 2 minute average wind dir
      float windDirReadings10m[num10mReadings]; // For 10 minute average wind dir
      float windGustReadings2m[num2mReadings]; // For 2 minute wind gust
      float windGustDirReadings2m[num2mReadings]; // For 2 minute wind gust direction
      float windGustReadings10m[num10mReadings]; // For 10 minute wind gust
      float windGustDirReadings10m[num10mReadings]; // For 10 minute wind gust direction
      boolean got2mins = false;
      boolean got10mins = false;
      
      float windSpeed = 0.0; // Wind speed in meters per second (m/s)
      float windDir = 0; // Wind dir in degrees 0-360
      uint8_t readIndex = 0; // the index of the current reading
      uint8_t minute2Index = 0; // the index of the current reading
      uint8_t minute10Index = 0; // the index of the current reading
      uint16_t sensorValue = 0; //Variable stores the value direct from the analog pin
      const uint8_t wsMin = 22; // Mininum reading
      const uint16_t wsMax = 1023; // Maximum reading
      const uint8_t wdMin = 3; // Mininum reading
      const uint16_t wdMax = 941; // Maximum reading
      const uint8_t windSpeedMax = 30; // Wind speed in meters/sec corresponding to maximum voltage
      
      
      MyMessage msgWSpeed(CHILD_ID_WIND, V_WIND);
      MyMessage msgWGust(CHILD_ID_WIND, V_GUST);
      MyMessage msgWDirection(CHILD_ID_WIND, V_DIRECTION);
      MyMessage msgWSpeed2m(CHILD_ID_WIND2M, V_WIND);
      MyMessage msgWGust2m(CHILD_ID_WIND2M, V_GUST);
      MyMessage msgWDirection2m(CHILD_ID_WIND2M, V_DIRECTION);
      MyMessage msgWSpeed10m(CHILD_ID_WIND10M, V_WIND);
      MyMessage msgWGust10m(CHILD_ID_WIND10M, V_GUST);
      MyMessage msgWDirection10m(CHILD_ID_WIND10M, V_DIRECTION);
      MyMessage msgWGustDir(CHILD_ID_GUST_DIR, V_DIRECTION);
      MyMessage msgWGust2mDir(CHILD_ID_GUST2M_DIR, V_DIRECTION);
      MyMessage msgWGust10mDir(CHILD_ID_GUST10M_DIR, V_DIRECTION);
      
      void setup()  
      {
        Sprint(SKETCH_NAME);
        Sprint(F(" version "));
        Sprint(SKETCH_VERSION);
        Sprint(F(" (using MY_NODE_ID: "));
        Sprint(MY_NODE_ID);
        Sprintln(F(") says hello!"));
      
        // Initialize arrays
        for (readIndex = 0; readIndex < num1mReadings; readIndex++) {
          windSpeedReadings[readIndex] = 0;
          windDirReadings[readIndex] = 0;
        }
        for (minute2Index = 0; minute2Index < num2mReadings; minute2Index++) {
          windSpeedReadings2m[minute2Index] = 0;
          windDirReadings2m[minute2Index] = 0;
          windGustReadings2m[minute2Index] = 0;
          windGustDirReadings2m[minute2Index] = 0;
        }
        for (minute10Index = 0; minute10Index < num10mReadings; minute10Index++) {
          windSpeedReadings10m[minute10Index] = 0;
          windDirReadings10m[minute10Index] = 0;
          windGustReadings10m[minute10Index] = 0;
          windGustDirReadings10m[minute10Index] = 0;
        }
      }
      
      void presentation()  {
        // Send the sketch version information to the gateway and Controller
        sendSketchInfo(SKETCH_NAME, SKETCH_VERSION);
        wait(DWELL_TIME);
        // Register all sensors to gateway (they will be created as child devices)
        present(CHILD_ID_WIND, S_WIND);
        wait(DWELL_TIME);
        present(CHILD_ID_WIND2M, S_WIND);
        wait(DWELL_TIME);
        present(CHILD_ID_WIND10M, S_WIND);
        wait(DWELL_TIME);
        present(CHILD_ID_GUST_DIR, S_WIND);
        wait(DWELL_TIME);
        present(CHILD_ID_GUST2M_DIR, S_WIND);
        wait(DWELL_TIME);
        present(CHILD_ID_GUST10M_DIR, S_WIND);
        wait(DWELL_TIME);
      }
      
      struct speedAndDir {    
       float uv;
       float Dv;
      };
      
      struct speedAndDir windvec(float speedArr[], float dirArr[], uint8_t size) {
        /*
         *
         *       Function to calculate the wind vector from time series of wind speed and direction.
         *       
         *       Parameters:
         *           - u: array of wind speeds [m s-1].
         *           - D: array of wind directions [degrees from North].
         *           
         *       Returning speedAndDir struct values:
         *           - uv: Vector wind speed [m s-1].
         *           - Dv: Vector wind direction [degrees from North].
         *
         */
        struct speedAndDir o;
        float ve = 0.0; // define east component of wind speed
        float vn = 0.0; // define north component of wind speed
      
        for (int i = 0; i < size; ++i) {
          ve += speedArr[i] * sin(dirArr[i] * PI / 180.0); // calculate sum east speed components
          vn += speedArr[i] * cos(dirArr[i] * PI / 180.0); // calculate sum north speed components
        }
        ve = - ve / size; // determine average east speed component
        vn = - vn / size; // determine average north speed component
        o.uv = sqrt(ve * ve + vn * vn); // calculate wind speed vector magnitude
        // Calculate wind speed vector direction
        float vdir = atan2(ve, vn);
        vdir = vdir * 180.0 / PI; // Convert radians to degrees
        if (vdir < 180) {
          o.Dv = vdir + 180.0;
        }
        else {
          if (vdir > 180.0) {
            o.Dv = vdir - 180;
          }
          else {
            o.Dv = vdir;
          }
        }
        o.uv = ((int) (o.uv * 10.0 + 0.5) / 10.0); // Round to one decimal
        o.Dv = (o.uv == 0.0) ? 0 : ((int) (o.Dv + 0.5)); // Round to integer
        return o;
      }
      
      void loop()
      {
        readIndex++;
        if (readIndex >= num1mReadings) {
          readIndex = 0;
        }
      
        /* 
         * Wind speed reading 
         */
        sensorValue = analogRead(ANEMOMETER_ANALOG_PIN); //Get a value between 0 and 1023 from the analog pin connected to the anemometer
        sensorValue = (sensorValue < wsMin) ? wsMin : sensorValue;
        windSpeed = (float)(sensorValue - wsMin)*windSpeedMax/(wsMax - wsMin);
        windSpeedReadings[readIndex] = windSpeed;
      
        Sprint(F("Reading: "));
        Sprint(readIndex);
        Sprint(F(", Wind speed sensor value: "));
        Sprint(sensorValue);
        Sprint(F(", wind speed: "));
        Sprint(windSpeed);
        Sprint(F(" m/s."));
      
        /* 
         * Wind vane reading 
         */
        const float dirTable[] PROGMEM = {0.0, 22.5, 45.0, 67.5, 90.0, 112.5, 135.0, 157.5, 180.0, 202.5, 225.0, 247.5, 270.0, 292.5, 315.0, 337.5};
        sensorValue = (windSpeed > 0) ? analogRead(WIND_VANE_ANALOG_PIN) : wdMin; //Get a value between 0 and 1023 from the analog pin connected to the wind vane
        sensorValue = (sensorValue < wdMin) ? wdMin : sensorValue;
      
        windDir = (sensorValue - wdMin)*337.5/(wdMax - wdMin); // This will be close but not exact.
        // Find the closest of the 16 predefined wind directions
        for (int i = 0; i < 16; ++i)
        {
          if (windDir < (dirTable[i] + 11.25)) {
            windDir = dirTable[i];
            break;
          }
        }
        windDirReadings[readIndex] = windDir;
      
        Sprint(F("\tWind direction sensor value: "));
        Sprint(sensorValue);
        Sprint(F(", wind direction: "));
        Sprint(windDir);
        Sprintln(F("°"));
      
        if (readIndex == num1mReadings - 1) {
          minute2Index++;
          minute2Index = (minute2Index >= num2mReadings) ? 0 : minute2Index;
          minute10Index++;
          minute10Index = (minute10Index >= num10mReadings) ? 0 : minute10Index;
          got2mins = (minute2Index == num2mReadings-1) ? true : got2mins; // One time switch
          got10mins = (minute10Index == num10mReadings-1) ? true : got10mins;
      
          cycleCountWindSpeed++;
          cycleCountWindGust++;
          cycleCountWindGustDir++;
          cycleCountWindDir++;
          cycleCountWindSpeed2m++;
          cycleCountWindGust2m++;
          cycleCountWindGustDir2m++;
          cycleCountWindDir2m++;
          cycleCountWindSpeed10m++;
          cycleCountWindGust10m++;
          cycleCountWindGustDir10m++;
          cycleCountWindDir10m++;
      
          struct speedAndDir o;
          o = windvec(windSpeedReadings, windDirReadings, num1mReadings);
          Sprint(F("\nWind vector calculation results: Speed: "));
          Sprint(o.uv);
          Sprint(F(" m/s"));
          Sprint(F(" \tDirection: "));
          Sprint(o.Dv);
          Sprintln(F("°\n"));
      
          float gust = 0;
          uint16_t gustDir = 0;
          for (int i = 0; i < num1mReadings; ++i)
          {
            if (windSpeedReadings[i] > gust)
              gust = windSpeedReadings[i];
              gustDir = windDirReadings[i];
          }
          gust = ((int) (gust * 10.0 + 0.5) / 10.0);
      
          windSpeedReadings10m[minute10Index] = windSpeedReadings2m[minute2Index] = o.uv;
          windDirReadings10m[minute10Index] = windDirReadings2m[minute2Index] = o.Dv;
          windGustReadings10m[minute10Index] = windGustReadings2m[minute2Index] = gust;
          windGustDirReadings10m[minute10Index] = windGustDirReadings2m[minute2Index] = gustDir;
      
          if ((o.uv != last_wspeed) or (cycleCountWindSpeed >= FORCE_TRANSMIT_CYCLE)) {
            cycleCountWindSpeed = 0;
            last_wspeed = o.uv;
            Sprint(F("Sending wind speed: "));
            Sprint(o.uv);
            Sprintln(F(" m/s"));
            send(msgWSpeed.set(o.uv, 1));
            wait(DWELL_TIME);
          }
          if ((gust != last_wgust) or (cycleCountWindGust >= FORCE_TRANSMIT_CYCLE)) {
            cycleCountWindGust = 0;
            last_wgust = gust;
            Sprint(F("Sending wind gust speed: "));
            Sprint(gust);
            Sprintln(F(" m/s"));
            send(msgWGust.set(gust, 1));
            wait(DWELL_TIME);
          }
          if ((o.Dv != last_wdirection) or (cycleCountWindDir >= FORCE_TRANSMIT_CYCLE)) {
            cycleCountWindDir = 0;
            last_wdirection = o.Dv;
            Sprint(F("Sending wind direction: "));
            Sprint(o.Dv);
            Sprintln(F("°"));
            send(msgWDirection.set(o.Dv, 0));
            wait(DWELL_TIME);
          }
          if ((gustDir != last_wgustdirection) or (cycleCountWindGustDir >= FORCE_TRANSMIT_CYCLE)) {
            cycleCountWindGustDir = 0;
            last_wgustdirection = gustDir;
            Sprint(F("Sending wind gust direction: "));
            Sprint(gustDir);
            Sprintln(F("°"));
            send(msgWGustDir.set(gustDir, 0));
            wait(DWELL_TIME);
          }
          // Do the 2 minute average but only if we have been running for 2 minutes or more.
          if (got2mins) {
            o = windvec(windSpeedReadings2m, windDirReadings2m, num2mReadings);
            Sprint(F("\n==========2 minute wind vector calculation results: Speed: "));
            Sprint(o.uv);
            Sprint(F(" m/s"));
            Sprint(F(" \tDirection: "));
            Sprint(o.Dv);
            Sprintln(F("°\n"));
      
            gust = gustDir = 0;
            for (int i = 0; i < num2mReadings; ++i)
            {
              if (windGustReadings2m[i] > gust)
                gust = windGustReadings2m[i];
                gustDir = windDirReadings2m[i];
            }
            gust = ((int) (gust * 10.0 + 0.5) / 10.0);
      
            if ((o.uv != last_wspeed2m) or (cycleCountWindSpeed2m >= FORCE_TRANSMIT_CYCLE)) {
              cycleCountWindSpeed2m = 0;
              last_wspeed2m = o.uv;
              Sprint(F("Sending 2 min wind speed: "));
              Sprint(o.uv);
              Sprintln(F(" m/s"));
              send(msgWSpeed2m.set(o.uv, 1));
              wait(DWELL_TIME);
            }
            if ((gust != last_wgust2m) or (cycleCountWindGust2m >= FORCE_TRANSMIT_CYCLE)) {
              cycleCountWindGust2m = 0;
              last_wgust2m = gust;
              Sprint(F("Sending 2 min wind gust speed: "));
              Sprint(gust);
              Sprintln(F(" m/s"));
              send(msgWGust2m.set(gust, 1));
              wait(DWELL_TIME);
            }
            if ((o.Dv != last_wdirection2m) or (cycleCountWindDir2m >= FORCE_TRANSMIT_CYCLE)) {
              cycleCountWindDir2m = 0;
              last_wdirection2m = o.Dv;
              Sprint(F("Sending 2 min wind direction: "));
              Sprint(o.Dv);
              Sprintln(F("°"));
              send(msgWDirection2m.set(o.Dv, 0));
              wait(DWELL_TIME);
            }
            if ((gustDir != last_wgustdirection2m) or (cycleCountWindGustDir2m >= FORCE_TRANSMIT_CYCLE)) {
              cycleCountWindGustDir2m = 0;
              last_wgustdirection2m = gustDir;
              Sprint(F("Sending 2 min wind gust direction: "));
              Sprint(gustDir);
              Sprintln(F("°"));
              send(msgWGust2mDir.set(gustDir, 0));
              wait(DWELL_TIME);
            }
          }
      
          // Do the 10 minute average but only if we have been running for 10 minutes or more.
          if (got10mins) {
            o = windvec(windSpeedReadings10m, windDirReadings10m, num10mReadings);
            Sprint(F("\n#############10 minute wind vector calculation results: Speed: "));
            Sprint(o.uv);
            Sprint(F(" m/s"));
            Sprint(F(" \tDirection: "));
            Sprint(o.Dv);
            Sprintln(F("°\n"));
      
            gust = gustDir = 0;
            for (int i = 0; i < num10mReadings; ++i)
            {
              if (windGustReadings10m[i] > gust)
                gust = windGustReadings10m[i];
                gustDir = windDirReadings10m[i];
            }
            gust = ((int) (gust * 10.0 + 0.5) / 10.0);
      
            if ((o.uv != last_wspeed10m) or (cycleCountWindSpeed10m >= FORCE_TRANSMIT_CYCLE)) {
              cycleCountWindSpeed10m = 0;
              last_wspeed10m = o.uv;
              Sprint(F("Sending 10 min wind speed: "));
              Sprint(o.uv);
              Sprintln(F(" m/s"));
              send(msgWSpeed10m.set(o.uv, 1));
              wait(DWELL_TIME);
            }
            if ((gust != last_wgust10m) or (cycleCountWindGust10m >= FORCE_TRANSMIT_CYCLE)) {
              cycleCountWindGust10m = 0;
              last_wgust10m = gust;
              Sprint(F("Sending 10 min wind gust speed: "));
              Sprint(gust);
              Sprintln(F(" m/s"));
              send(msgWGust10m.set(gust, 1));
              wait(DWELL_TIME);
            }
            if ((o.Dv != last_wdirection10m) or (cycleCountWindDir10m >= FORCE_TRANSMIT_CYCLE)) {
              cycleCountWindDir10m = 0;
              last_wdirection10m = o.Dv;
              Sprint(F("Sending 10 min wind direction: "));
              Sprint(o.Dv);
              Sprintln(F("°"));
              send(msgWDirection10m.set(o.Dv, 0));
              wait(DWELL_TIME);
            }
            if ((gustDir != last_wgustdirection10m) or (cycleCountWindGustDir10m >= FORCE_TRANSMIT_CYCLE)) {
              cycleCountWindGustDir10m = 0;
              last_wgustdirection10m = gustDir;
              Sprint(F("Sending 10 min wind gust direction: "));
              Sprint(gustDir);
              Sprintln(F("°"));
              send(msgWGust10mDir.set(gustDir, 0));
              wait(DWELL_TIME);
            }
          }
        }
        
        wait(WAIT_TIME);
      }
      

      0_1533549913325_graph.png

      Feel free to improve the code if you want. It's occupying a great deal of dynamic memory. I guess that the wind directions could be stored in a uint16_t type instead (multiplied by 10) but I haven't done that.

      0_1533550317138_ws.JPG

      The arrangement above is temporary. I just used what I had available.

      posted in My Project
      รอเรือ
      รอเรือ
    • RE: Serial Gateway w/ MQTT using nodeJS

      @electrik

      There are already plenty of instructions on how you install Node.js and it would be beyond the scope of this topic to do so here. There are so many variables such as operating systems and so on to take into account.

      After installing Node.js you need to install the Node serialport and Node mqtt.

      pm2 is a very nice process manager for Node.js that you can use to make sure that your node scripts always is running. It's highly recommended and will make your life easier.

      In my own installation, I created a sub directory ~/node_modules/serialgwmqtt/ where I saved the app.js script file. Then cd ~/node_modules/serialgwmqtt/ followed by node app.js to make sure that everything works fine.

      When it does (works fine) you should make it autostart. I added my script to pm2 with the following command: pm2 start app.js --name "serialgwmqtt" (while still in the same directory). check hat it's working by issuing pm2 list

      I might have been running npm installor something similar also. I'm actually not so clever with these things and I'm sure my instructions can be simplified. The script should also be uploaded so some place to make it available for installing with a simple command. Maybe someone else more node.js-talented person want's to help here.

      I hope I have't forgotten anything, it's quite straight forward.

      Things are running rock solid here.

      posted in Development
      รอเรือ
      รอเรือ
    • RE: BME280 How to use it outdoors

      Anyway. My crappy BME280 clone that I bought on ebay for $8.98 (in December 2016) lasted only for 4 days.

      Now I will have to take down my weather station and repair it.

      I will now buy an original Adafruit BME280 for 289 SEK (32$) + postage. I hope that one will last.

      posted in Hardware
      รอเรือ
      รอเรือ
    • RE: Serial Gateway w/ MQTT using nodeJS

      Anyway, I put some effort in this because I think that the Serial-to-MQTT gateway is actually the ultimate gateway for MySensors. It's very easy to build and it's versatile because it uses MQTT which in many cases will eliminate the use of more or less buggy add-ons for different home automation systems. It's my hope that the team would like to consider to add it as a new gateway type.

      I used the code from @barduino as a starting point but there has been many changes to it. Here it goes:

      /* Serial Gateway w/ MQTT using nodeJS, originally written by barduino https://forum.mysensors.org/user/barduino
       * Rewritten by รอเรือ
       *
       * Copyright: Unknown
       *
       * MySensors forum topic: https://forum.mysensors.org/topic/3042/serial-gateway-w-mqtt-using-nodejs
       *
       * Using:
       *		serialport -npm: https://www.npmjs.com/package/serialport
       *		mqtt -npm: https://www.npmjs.com/package/mqtt#client
       */
      
      // Custom settings
      var serial_port = '/dev/ttyUSBmys';
      var serial_baud_rate = 115200;
      var mqtt_host     = 'XXXXXXXX';
      var mqtt_port     =  1883;
      var mqtt_subscribe_topic = 'mysensors-in';
      var mqtt_publish_topic = 'mysensors-out';
      var mqtt_username =  '';
      var mqtt_password =  '';
      var mqtt_client_id = 'mysensors_' + Math.random().toString(16).substr(2, 8);
      const DEBUG = false;
      
      // LIBS
      const SerialPort = require('serialport');
      const Readline = require('@serialport/parser-readline')
      const mqtt = require('mqtt');
      
      // MQTT CLIENT OPTIONS
      var mqtt_Options = {
      	port: mqtt_port,
      	keepalive: 60, //seconds, set to 0 to disable
      	clientId: mqtt_client_id,
      	protocolId: 'MQTT', //'MQTT', 'mqtts', 'tcp', 'tls', 'ws', 'wss'. 
      	//protocolVersion: 4,
      	clean: true, //set to false to receive QoS 1 and 2 messages while offline
      	reconnectPeriod: 5000, // milliseconds, interval between two reconnections
      	connectTimeout: 30 * 1000, //milliseconds, time to wait before a CONNACK is received
      	//username: mqtt_username, //the username required by your broker, if any
      	//password: mqtt_password, //the password required by your broker, if any
      	will: {topic: mqtt_publish_topic, payload: mqtt_client_id +' disconnected', qos: 1, retain: false }
      }
      
      // Define the port and a parser
      const port = new SerialPort(serial_port, { baudRate: serial_baud_rate });
      const parser = port.pipe(new Readline({ delimiter: '\n' }))
      
      // START MQTT
      if (DEBUG) console.log('Starting MQTT...');
      var mqtt_client = mqtt.connect('mqtt://'+mqtt_host, mqtt_Options);
      
      mqtt_client.on('connect', function () {
      	if (DEBUG) console.log('Subscribing MQTT...');
      	mqtt_client.subscribe(mqtt_subscribe_topic+'/#');
      
      	if (DEBUG) console.log('Publish MQTT...'); 
      	mqtt_client.publish(mqtt_publish_topic, 'mqtt client '+mqtt_client_id+' started at '+ new Date());
      })
      
      parser.on('data', function (data) {
      	if (DEBUG) console.log('Data:', data);
      	mqttPublish(data);
      });
      
      // MQTT INCOMING
      mqtt_client.on('message', function (topic, message) {
      	var m = topic.toString();
      	m = m.replace(mqtt_subscribe_topic, '');
      	m = m.split('/').join(';');
      	m = m + ';' + message.toString();
      	port.write('' + m + '\n', function(err) {
      		if (err) {
      		  return console.log('Error on write: ', err.message);
      		}
      		if (DEBUG) console.log('INCOMING MQTT: ' + topic + ':' + message.toString());
      	});
      });
      
      // MQTT OUTGOING
      function mqttPublish(data){
      	var topic = mqtt_publish_topic+'/';
      	var params = data.split(';');
      	topic = topic + params[0] + '/';
      	topic = topic + params[1] + '/';
      	topic = topic + params[2] + '/';
      	topic = topic + params[3] + '/';
      	topic = topic + params[4] + '';
      	var payload = params[5];
      	mqtt_client.publish(topic,payload);
      	if (DEBUG) console.log('OUTGOING MQTT: ' + topic + ' ' + payload);
      }
      

      Use pm2 to keep it running!

      Cheers!!

      Very simple hardware:

      0_1533390263234_DSC_1915.JPG

      posted in Development
      รอเรือ
      รอเรือ
    • RE: Serial Gateway w/ MQTT using nodeJS

      @barduino said in Serial Gateway w/ MQTT using nodeJS:

      Hi Folks

      While adding mqtt feature to my controller and inspired by @cranky and his node-red controller, I've created a simple nodejs app to do 2 things:

      • Get the information from the serial gateway and publish it to a broker
      • Subscribe from the broker and send it to the serial gateway.

      Here is the app.js

      // LIBS
      var com = require("serialport");
      var mqtt = require('mqtt');
      
      // SERIAL PORT SETTINGS
      var serial_port = '/dev/ttyACM0';
      // var serial_port = 'COM3'; // windows
      
      // MQTT SETTINGS
      var mqtt_host     = 'mqtts://m10.cloudmqtt.com';
      var mqtt_port     =  8883;
      var mqtt_username =  'user name';
      var mqtt_password =  'password';
      
      var KEY = 'yourkey';
      
      // publications will be made into /haall/yourkey/out/x/x/x/x
      // subcriptions will come from /haall/yourkey/in/x/x/x/
      // adjust as necessary
      
      // MQTT CLIENT OPTIONS
      var mqtt_Options = {
           port:              mqtt_port
          ,keepalive:         10                  //seconds, set to 0 to disable
          ,clientId:          'haall_' + KEY
          ,protocolId:        'MQTT'
          //,protocolVersion: 4
          ,clean:             false               //set to false to receive QoS 1 and 2 messages while offline
          ,reconnectPeriod:   1000                // milliseconds, interval between two reconnections
          ,connectTimeout:    30 * 1000           //milliseconds, time to wait before a CONNACK is received
          ,username:          mqtt_username       //the username required by your broker, if any
          ,password:          mqtt_password       //the password required by your broker, if any
          /*
          ,incomingStore: , // a Store for the incoming packets
          ,outgoingStore: , // a Store for the outgoing packets
          */
          //a message that will sent by the broker automatically when the client disconnect badly. The format is:
          ,will: {topic:  '/haall/'+KEY+'/out',                           // the topic to publish
                  payload:'Client haall_' + KEY +'has lost connection',   // the message to publish
                  qos:    1,                                              // the QoS
                  retain: false                                           // the retain flag 
          }    
      }
      
      // SERIAL PORT
      var serialPort = new com.SerialPort(serial_port, {
          baudrate: 115200,
      	parser: com.parsers.readline('\n')
        });
      
      // START SERIAL PORT 
      console.log('Opening Serial port...');
      serialPort.open(function (error) {
        if ( error ) {
          console.log('failed to open: '+error);
        } else {
          console.log('Serial port opened!');
        }
      });
      
      // START MQTT
      console.log('Starting MQTT...'); 
      var mqtt_client  = mqtt.connect(mqtt_host,mqtt_Options);
      
      console.log('Subscribing MQTT...'); 
      mqtt_client.subscribe('/haall/'+KEY+'/in/#');
      
      console.log('Publish MQTT...'); 
      mqtt_client.publish('/haall/'+KEY+'/out', 'HAALL mqtt client started at '+ new Date());
      
      // SERIAL PORT OUTGOING
      serialPort.on('data', function(data) {
      	
      	if (data.indexOf('0;0;3;0;9;') == 0) {
      		console.log('        I_LOG: '+data);
              mqttPublish(data);	
      	}
      	else{
      		console.log(data);
      		mqttPublish(data);
      	}
      });
      
      // MQTT INCOMING
      mqtt_client.on('message', function (topic, message) {
      	var m = topic.toString();
      	m = m.replace('/haall/'+KEY+'/in/','');
      	m = m.split('/').join(';');
      	m = m + ';' + message.toString();
      	serialPort.write('' + m + '\n');
      
        	console.log('INCOMING MQTT: ' + topic + ':' + message.toString());
      });
      
      // MQTT OUTGOING
      function mqttPublish(data){
      	var topic = '/haall/'+KEY+'/out/';
      	var params = data.split(';');
      	topic = topic + params[0] + '/';
      	topic = topic + params[1] + '/';
      	topic = topic + params[2] + '/';
      	topic = topic + params[3] + '/';
      	topic = topic + params[4] + '';
      	var payload = params[5];
      	mqtt_client.publish(topic,payload);
      	console.log('OUTGOING MQTT: ' + topic + ' Payload: ' + payload);
      }
      

      and the package.json

      {
        "name": "gw",
        "version": "0.0.2",
        "description": "Gateway Module for MySensors",
        "dependencies": {
          "serialport": "^1.4.5",
          "mqtt": "^1.7.0"
        },
        "main": "gw.js",
        "devDependencies": {},
        "scripts": {
          "test": "echo \"Error: no test specified\" && exit 1"
        },
        "author": "",
        "license": "ISC"
      }
      

      Cheers

      @barduino, this is great stuff, any chance that there is an updated version of app.js? I've been trying hard to get this working.

      Cheers!

      posted in Development
      รอเรือ
      รอเรือ
    • RE: Repeater when available

      @mfalkvidd

      Thanks!

      posted in General Discussion
      รอเรือ
      รอเรือ
    • Repeater when available

      Hi there.

      I've got a coffee brewer that currently acts as a repeater. If I go for a vacation, I'll probably unplug my coffee brewer. Would that impact my MySensors network badly (more bad than if there were never a repeater defined), that is, should I better remove the repeater function if I have the need to turn it off 2 weeks per year?

      Thanks!

      posted in General Discussion
      รอเรือ
      รอเรือ
    • RE: !TSM:FPAR:NO REPLY

      @alowhum Thanks for that solution.

      This is an old topic but I recently started to have these problems again.

      From the debug output:

      !TSM:FPAR:NO REPLY
      

      I've tried so many different capacitors without success. The funny thing is that if I touch the antenna, communication starts to work.

      Then I tried

      #define MY_PARENT_NODE_ID 0
      #define MY_PARENT_NODE_IS_STATIC
      

      And now it works. I suspect this is not a case of bad radio clones. It's something else. That's my guess.

      I use MySensors 2.3.0 on my node and on my gateway. I also have a repeater node, I believe it has MySensors version 2.2.0. (Arduino 1.8.5)

      You guys who know a lot, does this sound like that I've got a problem with my repeater node? Do you have any suggestions how I can find out what's the cause of the issue?

      Thanks!

      EDIT: One day after: The solution above stopped to work for some reason. I sound like an idiot, don't I? I have been working many hours trying to figure out what's the cause. Today nothing seemed to work (If touching the antenna it works but I can't do that all the time.) Anyway, I desoldered the radio and put a new one in. No change. I removed the power regulator and fed the radio with 3v battery, no change. I desoldered the radio again and put a socket so I can switch radio easily. I measured that the socket cnnections on the PCB works. Suddenly it works quite well with most radios that I've tried. I get a few NACK occasionally on some of the radios. Soldering additional capacitors on top of the radio doesn't seem to improve anything. It works quite well now but I can't accept that the socket is the solution that makes the radios work.

      posted in Troubleshooting
      รอเรือ
      รอเรือ
    • RE: Where to buy components now if you happen to live in Sweden

      @gohan , I cant say. However buying using Ebay is probably more safe.

      posted in General Discussion
      รอเรือ
      รอเรือ
    • RE: Where to buy components now if you happen to live in Sweden

      Sorry for the monologue!

      Today I found a seller on E-bay that has most of the things that I will need. The new strategy is to buy many items from a single seller in a single transaction. Kindly asking him to put everything inside one box (We'll see if GONG TAO manages to do that)

      The sellers store: https://www.ebay.com/str/modulefans

      There are many other stores too of course but I think the above mentioned is quite good.

      Cheers!

      posted in General Discussion
      รอเรือ
      รอเรือ
    • RE: My Slim 2AA Battery Node

      I have 29 panels of the latest version of the PCB. It's more than I can use. Please PM me if you are interested in them.

      posted in My Project
      รอเรือ
      รอเรือ
    • RE: Where to buy components now if you happen to live in Sweden

      I love this hobby but it's ridiculously expensive nowadays if wanting to buy just a few components.

      For example today I found out that I need a small (TO-92) power regulator 5V to 3.3V. I can of course buy one (I have time to wait) but whatever I do I can not get one without ending up paying 100 SEK. (10 Euro).

      Before I could just order a few (or even one) from Ali or whatever, paying almost nothing and a few weeks later I had one in my mailbox. I really wish that PostMord had put a value limit so that packages with a value below 100 SEK were excluded.

      It's ridiculously expensive to pay 75 SEK fee for a package with goods value 3 SEK. That's what I think.

      I also notice that PostMord needs another few weeks to deliver after that their fee has been paid. I can't see why they need to wait so long really.

      Proposal: Set up a forum on MySensors dedicated for swedes (Swedish people) who like to trade electronic components with each other. Wouldn't that be possible?

      Cheers!

      posted in General Discussion
      รอเรือ
      รอเรือ
    • RE: Solar Powered Mini-Weather Station

      My experience with using a "Micro USB 5V 1A 18650 Lithium Battery Charger Board With Protection Module" together with the "16 LED Solar Power Motion Sensor Security Lamp Outdoor Waterproof Light"s solar panel is that it's not charging the battery as well as the original built in PCB. Due to the varying voltage (up to 6V) of the solar panel it's not so well suited as a power source for "Micro USB 5V 1A 18650 Lithium Battery Charger Board With Protection Module". I experimented with diodes in serial (2 diodes gave best result) to lower the voltage. However using the original board allowed the battery to charge with a much higher current. I just cut of the motion sensor, and the power switch. It seems to work well. It's even charging a few mA now here when it's raining. My conclusion is that the "Micro USB 5V 1A 18650 Lithium Battery Charger Board With Protection Module" might be used but the original PCB makes a better job charging the battery.

      Cheers!

      posted in My Project
      รอเรือ
      รอเรือ
    • RE: 3.3v sensors on i2c bus using Pro mini 5v

      @zboblamont said in 3.3v sensors on i2c bus using Pro mini 5v:

      If you intend running the Arduino on reduced voltage this further shifts the capability.

      Thanks. I'm not planning to run my 5V Arduino on reduced voltage. It will be fed with 5V. I'm just looking to connect 3.3V devices to the i2c bus. (Only 3.3V devices)

      posted in General Discussion
      รอเรือ
      รอเรือ
    • RE: 3.3v sensors on i2c bus using Pro mini 5v

      There is a guy on a different forum suggesting that

      Put pullup resistors on the SDA and SCL lines to 3.3V; the voltage levels will be valid for both 3.3V and 5V devices. Just make sure you don't set those pins on the Arduino as outputs and drive them high, as this could indeed damage the devices powered by 3.3V."

      https://forum.sparkfun.com/viewtopic.php?t=25433#p116548

      He also says that

      I2C is an open-drain bus, which means the devices don't actually drive the lines high (that is achieved with a pull-up resistor). Devices on the bus actively pull the lines low, but not high. As stated, pulling up the lines to 3.3V with a pull-up resistor will still be read as a valid logic “1” by devices powered with 5V.

      Usually you will use an inbuilt I2C module in the microcontroller, which takes most of the hassle out of bit-bashing it. If you do need to bit-bash, you need to be very careful what you do with the registers controlling the pins. You first need to write a logic “0” to the pins used for I2C, and then DO NOT CHANGE IT. To write a logic “1” to a pin, you change the Data Direction Register for that pin to make it an INPUT – the pull-up resistor will then pull the line high. To write a logic “0” to the pin, you change the Data Direction Register for that pin to make it an OUTPUT.

      Hopefully that’s not too confusing…

      What do you guys say about that? Can I write a logic “0” to the pins used for I2C and pull them high with a physical resistor connected to 3.3V or as we say in sweden "Am I out bicycling now?" 😀

      posted in General Discussion
      รอเรือ
      รอเรือ
    • RE: 3.3v sensors on i2c bus using Pro mini 5v

      @yveaux
      Thanks for your reply. I don't have one of those at home so I think I will go for the 3.3V Arduino to start with. If things are moving to slow I'll consider your solution. Thanks again.

      posted in General Discussion
      รอเรือ
      รอเรือ
    • 3.3v sensors on i2c bus using Pro mini 5v

      Hi there!

      I will build a weather station using a Arduino Pro mini 5V but I see now that one of the sensors GY-BME280 can be fed at a maximum of 3.6V.

      I thought I was going to use the 5V version instead of the 3.3V version of Arduino Pro Mini because my weather station will handle a handful of sensors and I thought maybe I was going to need the extra processing power that comes with 16Mhz.

      Anyway, my question is if I should rather go with a 3.3V version of Arduino Pro Mini or if it's possible the use the 5V version without too much trouble. (I don't know how it should be done) Any thoughts on that? (Power consumption is not an issue, I will feed it with regulated 5V on RAW input pin)

      Thanks for helping me choose!

      posted in General Discussion
      รอเรือ
      รอเรือ
    • RE: 💬 Easy/Newbie PCB for MySensors

      Hello @sundberg84

      What if feeding a Pro Mini 3.3V (EasyPCB Nrf24l01+ edition rev 10) with regulated power on RAW. (I have 5 VDC). I guess I can feed the radio via the VCC terminal instead of using an external voltage regulator. Can the EasyPCB be used in such a setup?

      Edit: To answer my own question. I should RTFM 👊

      It states clearly that:

      "(If you are using regulated 3.3v, use 5v instructions but skip the voltage regulator and bypass this with a jumper between Vin and Vout"

      Thanks anyway!

      posted in OpenHardware.io
      รอเรือ
      รอเรือ
    • RE: BME280 How to use it outdoors

      @karl261 Any update on this topic?

      Are you still struggling with that your BME280s don't seem to last long time outdoors?

      posted in Hardware
      รอเรือ
      รอเรือ
    • RE: 💬 Soil Moisture Sensor

      Grafana graph
      0_1531117303097_hacken.jpg

      Tjo!

      Edit: Updated Graphana graph with watering events marked red. Red horizontal line is the automatic watering threshold (Which has been adjusted a few thimes)

      posted in Announcements
      รอเรือ
      รอเรือ
    • RE: 💬 Soil Moisture Sensor

      How would you guys protect one of these capacitive soil moisture sensors from moisture in case the probe shall be buried 20 cm deep in the soil outdoors.

      The way they are made now, they may only be used in a indoor flower pot and even then there is a risk that the probes electronic components will be drowned in water while watering your flowers. Ideally, they should be water proof from the beginning, that's what I think.

      Anyway, now I have a few of them and I intend to do a solar powered a multi depth soil moisture sensor using capacitive soil moisture sensors at various depths.

      So, how to protect them?

      I have an idea but I'm not sure it's working: Put it partly inside a plastic tube and cover the electronics with 2 component expoxy glue. ...

      EDIT 1 : maybe silicone rubber would work...
      EDIT 2 : Adding a photo of an untested prototype. Plastic housing filled with construction silicone rubber!
      0_1529322106621_sensor.jpg

      EDIT 3: Prototype sensor works great. (At least for the moment. I hope it will last several years.)
      Cheers!

      posted in Announcements
      รอเรือ
      รอเรือ
    • RE: 💬 Soil Moisture Sensor

      @alowhum

      How are your capacitive sensors wired to the board?

      posted in Announcements
      รอเรือ
      รอเรือ
    • RE: 💬 Soil Moisture Sensor

      @manutremo

      thanks

      here with my soil, it's different. Even at very little moisture it shows 100%. Maybe I have a lot of iron in the soil.

      posted in Announcements
      รอเรือ
      รอเรือ
    • RE: 💬 Soil Moisture Sensor

      @alowhum

      I've ordered 5 capacitive sensors from Aliexpress now. I need to find a way to protect them so I can bury them into the soil in the garden at different depths.

      What sketch are you using for capacitive sensors?

      EDIT: I just saw your sketch posted above. I will try it out. Thanks!

      posted in Announcements
      รอเรือ
      รอเรือ
    • RE: 💬 Soil Moisture Sensor

      @mfalkvidd , maybe you are using your resistive sensors indoors in soil consisting of 100% mold. (blomjord). I guess it works great. However I'm just curious if your sensors are also working on soil from outdoors. I guess not very well.

      posted in Announcements
      รอเรือ
      รอเรือ
    • RE: 💬 Soil Moisture Sensor

      I've found that measuring soil moisture by the electrical resistance is not a trivial task.

      If the probe is put into compact soil containing no mold, you'll typically get a high reading even at very low moisture levels. It will most likely always stay within the span of 90-100%.

      However if the probe is put into pure mold, the readings will range between 0% to 100%.

      My conclusion is that measuring directly in the soil is very unpredictable. A better solution might be to surround the probe with some material that adapts the ambient humidity from whatever kind of soil it's put into.

      posted in Announcements
      รอเรือ
      รอเรือ
    • RE: [ SOLVED ] MyS 2.2.0 - MY_DEBUG fails on certain bootloaders

      @gertsanders

      Thanks! Works great! I'm so happy!!! ☺ 😄

      posted in Troubleshooting
      รอเรือ
      รอเรือ
    • RE: 💬 Soil Moisture Sensor

      @robkuipers

      Your code will fail compiling in Arduino 1.8.5 (mysensors 2.2.0) with the following errors:

      /mnt/data/Dropbox/UTV/Arduino/SoilMoisture/SoilMoisture.ino: In function 'void before()':
      /mnt/data/Dropbox/UTV/Arduino/SoilMoisture/SoilMoisture.ino:112:114: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11
         sensors[0] = { SENSOR1_ROD1_DIGITAL, SENSOR1_ROD1_ANALOG, SENSOR1_ROD2_DIGITAL, SENSOR1_ROD2_ANALOG, -1, false };
                                                                                                                        ^
      /mnt/data/Dropbox/UTV/Arduino/SoilMoisture/SoilMoisture.ino:112:14: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11
         sensors[0] = { SENSOR1_ROD1_DIGITAL, SENSOR1_ROD1_ANALOG, SENSOR1_ROD2_DIGITAL, SENSOR1_ROD2_ANALOG, -1, false };
                    ^
      /mnt/data/Dropbox/UTV/Arduino/SoilMoisture/SoilMoisture.ino:116:114: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11
         sensors[1] = { SENSOR2_ROD1_DIGITAL, SENSOR2_ROD1_ANALOG, SENSOR2_ROD2_DIGITAL, SENSOR2_ROD2_ANALOG, -1, false };
                                                                                                                        ^
      /mnt/data/Dropbox/UTV/Arduino/SoilMoisture/SoilMoisture.ino:116:14: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11
         sensors[1] = { SENSOR2_ROD1_DIGITAL, SENSOR2_ROD1_ANALOG, SENSOR2_ROD2_DIGITAL, SENSOR2_ROD2_ANALOG, -1, false };
                    ^
      

      So the following code need tobe changed to something valid

      sensors[0] = { SENSOR1_ROD1_DIGITAL, SENSOR1_ROD1_ANALOG, SENSOR1_ROD2_DIGITAL, SENSOR1_ROD2_ANALOG, -1, false };
      
      	sensors[1] = { SENSOR2_ROD1_DIGITAL, SENSOR2_ROD1_ANALOG, SENSOR2_ROD2_DIGITAL, SENSOR2_ROD2_ANALOG, -1, false };
      
      

      I'm not a c++ guy so I can't tell what needs to be done. Maybe you or someone else would like to help out?

      Cheers!

      EDIT: After removing the file platform.txt for solving another problem (as suggested here) The problem above vanished. So strange. But it works now so... 😎 😎 😎

      posted in Announcements
      รอเรือ
      รอเรือ
    • RE: [ SOLVED ] MyS 2.2.0 - MY_DEBUG fails on certain bootloaders

      @GertSanders

      First, please forgive me for being such a NOOB when it comes to these things.

      I use your atmega328p.rar found here for my atmega328p based 28 pin DIL boards.

      Now I'm trying to compile in Arduino 1.8.5 (mysensors 2.2.0) I get a lot of compiler errors when #define MY_DEBUG is set.

      /home/XXX/Arduino/libraries/MySensors/core/MyTransport.cpp: In function 'void stInitUpdate()':
      /home/XXX/Arduino/libraries/MySensors/core/MyTransport.cpp:124:45: error: expected ')' before 'PRIu8'
          TRANSPORT_DEBUG(PSTR("TSM:INIT:STATID=%" PRIu8 "\n"),(uint8_t)MY_NODE_ID);
                                                   ^
      /home/XXX/Arduino/libraries/MySensors/MyConfig.h:1815:43: note: in definition of macro 'DEBUG_OUTPUT'
       #define DEBUG_OUTPUT(x,...)  hwDebugPrint(x, ##__VA_ARGS__) //!< debug
      etc etc...
      

      I understand that my boards definitions needs to be updated. Do you have a newer version of atmega328p.rar available or can you give me a hint about how to get them working?

      Thanks a million times!

      Cheers!

      posted in Troubleshooting
      รอเรือ
      รอเรือ
    • RE: Where to buy components now if you happen to live in Sweden

      I don't have Facebook (I'm one of the few). I've spent some hours finding where to buy a "Capacitive Soil Moisture Sensor" available in Europe but I can't seem to find one. Unless I'm willing to import one from China using Postnord of course.

      Cheers!

      posted in General Discussion
      รอเรือ
      รอเรือ
    • Where to buy components now if you happen to live in Sweden

      Until March 1 this year I used to buy various components with origin of China from Aliexpress and Ebay.

      From March 1, all mail items with a declared value that come from outside the EU Customs Union will have
      VAT applied and a fee of SEK 75 will be charged by Postnord.

      I don't say that I'd like to avoid VAT but the fees make it a bit expensive actually. I will probably stop my Hobby and begin with gardening or something else.

      I've heard that a delivery route using Holland or Germany can avoid the fees to be charged. I presume doing that is not illegal.

      What about you guys? Where do you buy your stuff nowadays?

      posted in General Discussion
      รอเรือ
      รอเรือ
    • RE: 💬 Building a MQTT Gateway

      I rebuilt my serial gateway to a MQTT gateway. FWIW I had to connect 5V to my WizNET (W5100) Ethernet module (3.3V did not work) I couldn't make DHCP work so I used a fixed IP. Finally I had to replace the capacitor over the radio power feed from 4.7 uF capacitor to a 100 uF capacitor (That made a big difference!). Works great now.

      posted in Announcements
      รอเรือ
      รอเรือ
    • RE: openHAB 2.0 binding

      I get this in my log sometimes:

      [WARN ] [.discovery.MySensorsDiscoveryService] - Cannot automatic discover thing node: 0, child: 255 please insert it manually
      

      I use MySensors Binding 2.3.0.201801160936 on a serial gateway with mysensors 2.2.0

      Where shall I insert the thing node and what should it look like?

      posted in OpenHAB
      รอเรือ
      รอเรือ
    • RE: openHAB 2.2 binding

      Hi there!

      Maybe someone would like to help me a bit?

      I'm on openHAB 2.2 with mysensors binding 2.3.0.201801160936. I'm using a serial gateway that I reflashed today using MySensors 2.2.0 library. I have turned off debugging in the sketch.

      The problem is that I encounter an exception each time OH starts up.

      2018-02-11 11:05:59.342 [WARN ] [rsAbstractConnection$MySensorsReader] - Exception on reading from connection
      java.io.IOException: Underlying input stream returned zero bytes
              at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:288) [?:?]
              at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326) [?:?]
              at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178) [?:?]
              at java.io.InputStreamReader.read(InputStreamReader.java:184) [?:?]
              at java.io.BufferedReader.fill(BufferedReader.java:161) [?:?]
              at java.io.BufferedReader.readLine(BufferedReader.java:324) [?:?]
              at java.io.BufferedReader.readLine(BufferedReader.java:389) [?:?]
              at org.openhab.binding.mysensors.internal.protocol.MySensorsAbstractConnection$MySensorsReader.run(MySensorsAbstractConnection.java:328) [255:org.openhab.binding.mysensors:2.3.0.201801160936]
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
              at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
              at java.lang.Thread.run(Thread.java:748) [?:?]
      

      Thing config:

      Bridge mysensors:bridge-ser:gateway [ serialPort="/dev/ttyUSBmys", baudRate=115200, sendDelay=200, startupCheckEnabled=false ]
      

      Everything seems to work otherwise. The problem is that the warning draws my attention every time and of course I need to check if it's something serious that I'd need to act upon. I'd rather see that I get no exceptions/warnings in case the "problem" can be ignored.

      My question to you guys is if there is anything that I can do about it? Thanks for your kind help.

      Cheers!

      posted in OpenHAB
      รอเรือ
      รอเรือ
    • RE: Repeater

      thank You @manutremo 😊

      posted in General Discussion
      รอเรือ
      รอเรือ
    • RE: !TSM:FPAR:NO REPLY

      My problem was caused by the fact that the radio was inserted into a socket. The 4.7uF stabilizing capacitor was put on the main board side of the socket. Moving the capacitor to the radio board or just soldering the radio to the main board (without using a socket) solved the problem. So, don't use a socket between the radio and the stabilizing capacitor.

      Another interesting thing is that by putting a finger onto the antenna also solved the problem. I could use that method for testing all my radios (using the socket) before permanently soldering them onto the main board.

      posted in Troubleshooting
      รอเรือ
      รอเรือ
    • RE: No new node possible

      And here is a 5th similar issue I believe: https://forum.mysensors.org/topic/6147/tsm-fpar-no-reply

      posted in Troubleshooting
      รอเรือ
      รอเรือ
    • RE: !TSM:FPAR:NO REPLY

      @gloob
      Thanks, I will follow Your thread. The problem looks similar.

      posted in Troubleshooting
      รอเรือ
      รอเรือ
    • !TSM:FPAR:NO REPLY

      Hi there!

      My new NRF24L01+ modules arrived today and I'm trying to test them.

      I had an unknown device listed in my Domoticz MySensors Gateway with USB so I deleted it in the Domoticz GUI. I thought it would be able to re-register with the Domoticz gateway but it fails. At least that's what I think. Anyway, I'm not able to get it back in the Domoticz device listing. I've restarted the gateway and tried the inclusion button etc but nothing seems to help. Below is the serial monitor debugging info. Any ideas?

      0 MCO:BGN:INIT NODE,CP=RNNNA--,VER=2.1.1
      32 TSM:INIT
      49 TSF:WUR:MS=0
      81 TSM:INIT:TSP OK
      98 TSF:SID:OK,ID=10
      114 TSM:FPAR
      180 TSF:MSG:SEND,10-10-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      2277 !TSM:FPAR:NO REPLY
      2293 TSM:FPAR
      2359 TSF:MSG:SEND,10-10-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      4456 !TSM:FPAR:NO REPLY
      4472 TSM:FPAR
      4538 TSF:MSG:SEND,10-10-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      6635 !TSM:FPAR:NO REPLY
      6651 TSM:FPAR
      6717 TSF:MSG:SEND,10-10-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      8814 !TSM:FPAR:FAIL
      8830 TSM:FAIL:CNT=1
      8847 TSM:FAIL:PDT

      posted in Troubleshooting
      รอเรือ
      รอเรือ
    • RE: Sleep() Caused Insomnia when assisted by interrupts

      @Nca78

      I checked the board. Pin 8 IRQ of the NRF24L01+ module is not connected.

      posted in Troubleshooting
      รอเรือ
      รอเรือ
    • RE: Sleep() Caused Insomnia when assisted by interrupts

      Hi guys!

      In the example above, it would be more appropriate using millis() in a loop than using sleep(50). It's also kind of wrong to use delay(50) I believe since it's taking up 100% of the CPU.

      Never mind. I'm just interested to understand how the sleep(50) inside the main loop would cause the "endless loop of interrupts" in my example. Actually I suspect it's a bug so it might be worth digging into it a bit.

      I've been experimenting with both strong and weak external pull-ups and I've also tried internal pull ups but it made no difference actually. I'm currently using an external resistor of 4,7M Ohm and it's working great (unless using sleep(50) inside the main loop of course).

      Hardware used is a Slim Node I never tried using a "pull down" instead of a "pull up" resistor.

      posted in Troubleshooting
      รอเรือ
      รอเรือ
    • Sleep() Caused Insomnia when assisted by interrupts

      Hi there!

      I feel I need to share this and I invite You to reflect upon this and share your ideas here.

      I've been working on a battery powered node with 2 push buttons. Normally it sleeps but it will wake up using two interrupts when one of the push buttons gets pressed.
      interruptReturn = sleep(PRIMARY_BUTTON_PIN-2, CHANGE, SECONDARY_BUTTON_PIN-2, CHANGE, ONE_DAY_SLEEP_TIME);

      I've spent many hours trying to figure out how to make this script work. I had problem with that once a push button was pressed it was generating and endless loop of interrupts. It never slept.

      It sounds weird but using the following line

      sleep(50); // Short delay to allow switch to properly settle
      

      instead of

      delay(50); // Short delay to allow switch to properly settle
      

      caused the never ending interrupt loop.

      Below is my final script.

      #define MY_BAUD_RATE 9600
      #define MY_RADIO_NRF24
      
      #include <SPI.h>
      #include <MySensors.h>
      #include <Vcc.h>
      const float VccMin   = 1.8;           // Minimum expected Vcc level, in Volts.
      const float VccMax   = 3.2;           // Maximum expected Vcc level, in Volts.
      const float VccCorrection = 1.0/1.0;  // Measured Vcc by multimeter divided by reported Vcc
      Vcc vcc(VccCorrection);
      
      #define NODE_ID 17
      #define SKETCH_NAME "2x Binary Switch Sleep"
      #define SKETCH_VERSION "3.2"
      
      #define CHILD_ID_1 0
      #define CHILD_ID_2 1
      #define PRIMARY_BUTTON_PIN 2 // Arduino Digital I/O pin for button/reed switch
      #define SECONDARY_BUTTON_PIN 3 // Arduino Digital I/O pin for button/reed switch
      
      #define BATTERY_REPORT_DAY 2
      #define BATTERY_REPORT_BY_IRT_CYCLE 10 // Adjust this according to usage frequency.
      #define ONE_DAY_SLEEP_TIME 86400000 // No wakeup timer at all
      
      int oldValue1=-1;
      int oldValue2=-1;
      int dayCounter = BATTERY_REPORT_DAY;
      int irtCounter = 0;
      int interruptReturn = MY_WAKE_UP_BY_TIMER;
      
      MyMessage msg1(CHILD_ID_1,V_TRIPPED);
      MyMessage msg2(CHILD_ID_2,V_TRIPPED);
      
      void setup()	
      {	
      	pinMode(PRIMARY_BUTTON_PIN,INPUT);
      	pinMode(SECONDARY_BUTTON_PIN,INPUT);
      	// We use external and very weak pull ups to save power
      	//digitalWrite(PRIMARY_BUTTON_PIN, HIGH);    // Enable internal pull-up
      	//digitalWrite(SECONDARY_BUTTON_PIN, HIGH);    // Enable internal pull-up
      }
      
      void presentation() {
      	sendSketchInfo(SKETCH_NAME, SKETCH_VERSION);
      	present(CHILD_ID_1, S_DOOR);
      	present(CHILD_ID_2, S_DOOR);
      }
      
      void loop() 
      {
      	if (interruptReturn == MY_WAKE_UP_BY_TIMER) { // Woke up by timer (or first run)
      		dayCounter++;
      		#ifdef MY_DEBUG
      		Serial.println("Woke up by timer (or first run)");
      		#endif
      		if (dayCounter >= BATTERY_REPORT_DAY) {
      			dayCounter = 0;
      			sendBatteryReport();
      		}
      	} else {    // Woke up by pin change
      		irtCounter++;
      		#ifdef MY_DEBUG
      		Serial.print("Woke up by pin change on pin D");Serial.println(interruptReturn+2);
      		#endif
      		if (interruptReturn == 0) {
      			delay(50); // Short delay to allow switch to properly settle
      			int value1 = digitalRead(PRIMARY_BUTTON_PIN);
      			if (value1 != oldValue1) {
      				send(msg1.set(value1==HIGH ? 0 : 1));
      				oldValue1 = value1;
      				Serial.print("Sent value: '"); Serial.print(value1==HIGH ? 0 : 1); Serial.println("'.");
      			}
      		} else {
      			delay(50); // Short delay to allow switch to properly settle
      			int value2 = digitalRead(SECONDARY_BUTTON_PIN);
      			if (value2 != oldValue2) {
      				send(msg2.set(value2==HIGH ? 0 : 1));
      				oldValue2 = value2;
      				Serial.print("Sent value: '"); Serial.print(value2==HIGH ? 0 : 1); Serial.println("'.");
      			}
      		}
      	}
      	if (irtCounter>=BATTERY_REPORT_BY_IRT_CYCLE) {
      		irtCounter = 0;
      		sendBatteryReport();
      	}
      	#ifdef MY_DEBUG
      	Serial.println("Zzzzzz");
      	#endif
      	delay(500); //delay to allow serial to fully print before sleep
      	// Sleep until something happens with the sensor, or one sleep_time has passed since last awake.
      	interruptReturn = sleep(PRIMARY_BUTTON_PIN-2, CHANGE, SECONDARY_BUTTON_PIN-2, CHANGE, ONE_DAY_SLEEP_TIME);
      }
      
      void sendBatteryReport() {
      	float v = vcc.Read_Volts();
      	float p = vcc.Read_Perc(VccMin, VccMax);
      	#ifdef MY_DEBUG
      	Serial.print("VCC = "); Serial.print(v); Serial.println(" Volts");
      	Serial.print("VCC = "); Serial.print(p); Serial.println(" %");
      	#endif
      	int batteryPcnt = static_cast<int>(p);
      	sendBatteryLevel(batteryPcnt);
      }
      

      The script above works now. (Arduino 1.6.13 and MySensors 2.1.0). It would be nice though to know why I can't use sleep(50) instead of delay(50) in my code. Any ideas?

      Cheers!

      posted in Troubleshooting
      รอเรือ
      รอเรือ
    • RE: NRF24L01+ some batches won't power down properly

      @Nca78 said:

      @รอเรือ said:

      I decided to test all my 20 sensors and found out that 3 out of 20 actually could power down. Starting the tedious work to un-solder the radios of the remaining sensors now.

      Using the link in the store, I ordered 30 new from Ebay http://www.ebay.com/itm/400594940658?rmvSB=true

      This vendor state that their radios will consume 1 uA in sleep mode. I will test all of them at arrival. I believe it's a bit more safe to buy radios on Ebay because it's easy to complain if something shouldn't work as expected.

      Cheers!

      Is it too late for you to open a dispute ? With pictures of your multimeter showing current for "normal" module and current for "failing" module + text explanations, it should be possible to get most of your money back.
      Also, put an evaluation about the radio. If like many people you put many stars before testing the product, you can still add additionnal feedback, that will be useful for the next users who will be tempted to buy from this seller.

      Hi! Unfortunately I did my review before testing them in sleep mode. I won't do that next time for sure. I will see if I can make an additional review. I have no hope to regain any money from them though. Thanks for the tip.

      posted in Hardware
      รอเรือ
      รอเรือ
    • RE: NRF24L01+ some batches won't power down properly

      I decided to test all my 20 sensors and found out that 3 out of 20 actually could power down. Starting the tedious work to un-solder the radios of the remaining sensors now.

      Using the link in the store, I ordered 30 new from Ebay http://www.ebay.com/itm/400594940658?rmvSB=true

      This vendor state that their radios will consume 1 uA in sleep mode. I will test all of them at arrival. I believe it's a bit more safe to buy radios on Ebay because it's easy to complain if something shouldn't work as expected.

      Cheers!

      posted in Hardware
      รอเรือ
      รอเรือ
    • NRF24L01+ some batches won't power down properly

      Hi there!

      I just received a batch of 20 NRF24L01+ that I bought from Great Wall Electronics on Ali Express. They are all bad. Unfortunately I used them building a batch of 20 "My Slim 2AA Battery Nodes" and now I will have to de-solder them and replace them by working ones. Unnecessary to say that I should have tested them before soldering them of course. That's a lesson I will not forget for sure.

      The NRF24L01+ that I bought works except from that while my nodes enter sleep mode, the nodes (including my SI7020 sensor with the power regulator removed) are using 800-900 uA instead of 5 uA measured on a working node.

      Where is safe places to buy working NRF24L01+ ? How can I tell if they will be working or not? When I write "working" I mean that they should be able to power down to just a few uA power consumption.

      The faulty one that I bought has no white print on the back side. Brand Name: TENSTAR ROBOT according to the vendor. Except from the missing print they look identical to the working ones that I bought earlier from another vendor. https://www.aliexpress.com/item/10PCS-PCS-LOT-nrf24l01-power-strengthen-edition-2-4g-wireless-module-nrf24l01-module/817000009.html

      (Arduino 1.6.13, MySensors 2.1.0)

      posted in Hardware
      รอเรือ
      รอเรือ
    • RE: Repeater

      Then I guess the following code will do just fine.

      #define MY_DEBUG 
      #define NODE_ID 7 // Set node ID here
      #define SKETCH_NAME "Repeater Node"
      #define SKETCH_VERSION "1.1"
      
      	
      // Enable and select radio type attached
      #define MY_RADIO_NRF24
      //#define MY_RADIO_RFM69
      
      // Enabled repeater feature for this node
      #define MY_REPEATER_FEATURE
      
      #include <SPI.h>
      #include <MySensors.h>
      
      void setup() {
        
      }
      
      void presentation()  
      {  
        //Send the sensor node sketch version information to the gateway
        sendSketchInfo(SKETCH_NAME, SKETCH_VERSION);
      }
      
      void loop() 
      {
      }
      posted in General Discussion
      รอเรือ
      รอเรือ
    • RE: Node behavior after connection lost

      @hek said:

      It takes a few failed transmission before it tries to "find new parent". Not sure what happended here without seeing the node log.

      @mfalkvidd said:

      @รอเรือ which version are you using? 2.0 has a problem with nodes that go back to sleep too soon after a failed send. This is fixed in the development version. See https://github.com/mysensors/MySensors/pull/558 for details.

      Thanks guys! Well, I'm on 2.0.0. I'm not the "adventurous type" so I'm not on the development version if You get my point (ha ha).

      It's good to know that there exists some healing mechanisms in the communication. I might wait for the next stable release or I might build me a dedicated "MySensor : RepeaterNode" with an external antenna to facilitate the communication with my upcoming battery powered nodes in my garden and for the lawn mower that really must be automated soon.

      Hej tjolahopp! (Cheers!)

      posted in General Discussion
      รอเรือ
      รอเรือ
    • Node behavior after connection lost

      I have a battery powered light sensor that was moved out of reach from the controllers range. Moving it back didn't make it reconnect. I had to reboot the sensor. Is that the behavior to expect in such conditions? Is there a way to make clients try to reconnect periodically in case the connection was lost?

      posted in General Discussion
      รอเรือ
      รอเรือ
    • RE: My Slim 2AA Battery Node

      Thanks @m26872

      That link didn't work either. However, by browsing all the shared PCBs I found this URL That link is accessible without logging in first.

      Cheers

      posted in My Project
      รอเรือ
      รอเรือ
    • RE: 💬 Light Level Sensor - BH1750

      Another important note... If doing it the way I suggested below, You will need to reconfigure the BH1750FVI before every reading. Something like this will do:

      lightSensor.configure(BH1750_ONE_TIME_HIGH_RES_MODE);
      delay(500); // Allow some time
      uint16_t lux = lightSensor.readLightLevel();// Get Lux value
      

      Cheers!

      posted in Announcements
      รอเรือ
      รอเรือ
    • RE: 💬 Light Level Sensor - BH1750

      Ohh... I forgot to mention that I unsoldered the power regulator on the BH1750FVI and bridged Volt In with Volt Out. By doing that I hope that the BH1750FVI will work on lower voltages than specified. Time will tell.

      posted in Announcements
      รอเรือ
      รอเรือ
    • RE: 💬 Light Level Sensor - BH1750

      Using a Arduino Pro Mini with BURNED FUSES, set to 1MHz I've built a low power battery sensor using the BH1750FVI. When using the statement "lightSensor.begin();" as in the example above, the BH1750FVI is set to continuous reading, hence will not sleep. Including the radio the measuread DC current when sleep() is 140μA and my 2 AA batteries will not last for more than maybe 1,5 years. However if I change that statement to "lightSensor.begin(BH1750_ONE_TIME_HIGH_RES_MODE);", the BH1750FVI device is automatically set to Power Down after measurement. I end up using about 6μA while sleeping which is a great improvement.My batteries will die due to old age and that's nice for the environment and to my wallet!

      posted in Announcements
      รอเรือ
      รอเรือ
    • RE: My Slim 2AA Battery Node

      Hi there! I need to buy some PCBs on Dirty PCBs but the URL http://dirtypcbs.com/view.php?share=13847&accesskey= seems broken. Any ideas? Thanks!

      posted in My Project
      รอเรือ
      รอเรือ
    • Connecting my Husqvarna Automower to the world using MySensors...

      I'd just love to see my new lawn mower, a Husqvarna Automower 420 to be able to exchange data with my Home Automation system (Which has a MySensors Gateway). I'd like to be able to read the status of the machine and to remote control it. It would also be nice to being able to set some parameters like the cutting schedule, cutting height etc. There is currently already a module sold by Husqvarna (Automower Connect) but it relies on GPRS communication (requires a SIM card), a paid service provided by HQ and it can AFAIK not be controlled by my Home Automation system.

      Some guys at [a french forum] (link http://automowerfans.free.fr/) has made some progress communicating with older models by embedding a router into the lawn mower. I'm hopeful that more people will be interested in this and that eventually someone with the right skills turns up.

      posted in Feature Requests
      รอเรือ
      รอเรือ