Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
engyE

engy

@engy
About
Posts
12
Topics
1
Shares
0
Groups
0
Followers
0
Following
1

Posts

Recent Best Controversial

  • Sonoff + MySensors mqtt gateway + Home-Assistant
    engyE engy

    Might be helpful for somebody... Things configuration for OpenHab2:

    Bridge mysensors:bridge-eth:gateway_2 [ ipAddress="192.168.178.50", tcpPort=5003, sendDelay=200, enableNetworkSanCheck=true ] {
            /** define things connected to that bridge here */
            light sonoff01 [ nodeId="0", childId="0", requestAck=true ]
    }
    
    My Project mqtt sonoff home assistant

  • JULA motion LED hack
    engyE engy

    Cool! What is the consumption of the node and how long batteries last?

    My Project

  • 💬 Building a Raspberry Pi Gateway
    engyE engy

    Thank you guys for prompt reaction. Indeed, Ethernet GW works flawlessly!

    Announcements

  • 💬 Building a Raspberry Pi Gateway
    engyE engy

    @gohan I'm sorry, MQTT is not supported by OpenHab MySensors binding. Ethernet Gateway is not supported on Raspberry PI.

    Announcements

  • 💬 Building a Raspberry Pi Gateway
    engyE engy

    @gohan Etherner Gareway is not supported by OpenHab MySensors binding.

    Announcements

  • 💬 Building a Raspberry Pi Gateway
    engyE engy

    Hello Masters,

    Could you please help me with setting up virtual serial port?

    I can't see the interface created under /dev.
    I'm using the instructions and finish with the setup with the following command:

    pi@raspberrypi:/tmp/MySensors $ ./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyMySensorsGateway
    [SECTION] Detecting target machine.
      [OK] machine detected: SoC=BCM2836, Type=Rpi2, CPU=armv7l.
    [SECTION] Detecting SPI driver.
      [OK] SPI driver detected:BCM.
    [SECTION] Detecting init system.
      [OK] init system detected: systemd.
    [SECTION] Saving configuration.
    [SECTION] Cleaning previous builds.
    [OK] Finished.
    
    pi@raspberrypi:/ $ sudo /usr/local/bin/mysgw -d
    mysgw: Starting gateway...
    mysgw: Protocol version - 2.1.1
    mysgw: MCO:BGN:INIT GW,CP=RNNG---,VER=2.1.1
    mysgw: TSF:LRT:OK
    mysgw: TSM:INIT
    mysgw: TSF:WUR:MS=0
    mysgw: TSM:INIT:TSP OK
    mysgw: TSM:INIT:GW MODE
    mysgw: TSM:READY:ID=0,PAR=0,DIS=0
    mysgw: MCO:REG:NOT NEEDED
    mysgw: Listening for connections on 0.0.0.0:5003
    mysgw: MCO:BGN:STP
    mysgw: MCO:BGN:INIT OK,TSP=1
    
    

    Everything seems to be OK. However, when I check /dev directory, the interface is not created.

    What could be an issue?
    Thank you in advacne!

    Announcements

  • Sleep mode/Read Vcc issue
    engyE engy

    The problem was faulty NRF24... another batch :(
    Just powered sensor in sleep mode is consuming as expected - a few uA.
    But later, after while, power consumption is increasing.
    Commenting Vcc was just coincidence.

    Received new NRFs batch from mysensors shop, and all the problems gone.
    Thanks!

    Troubleshooting

  • Sleep mode/Read Vcc issue
    engyE engy

    I'm not sure if it's related to DHT22, because sleep mode works fine when Vcc function is commented in the sketch.

    Troubleshooting

  • Sleep mode/Read Vcc issue
    engyE engy

    Hello,

    I'm made temp/hum sensor with slim node and DHT22.
    When Mysensors/HumiditySensor sketch is loaded, the sensor in sleep mode consumes 25uA.

    I also would like to report battery level.
    But when read vcc function is included in the sketch, the power consumtions after transmission remains ~ 0.1 - 0.2mA.

    Any ideas why sleep mode is not functioning correctly with sendBatteryReport()?
    Thank you in advance.

    Please see my updated sketch:

    #include <SPI.h>
    #include <MySensor.h>  
    #include <DHT.h>
    #include <Vcc.h>
    
    #define VCC_MIN 2.8
    #define VCC_MAX 3.3
    Vcc vcc;
    #define NODE_ID 2
    
    #define CHILD_ID_HUM 0
    #define CHILD_ID_TEMP 1
    #define HUMIDITY_SENSOR_DIGITAL_PIN 3
    unsigned long SLEEP_TIME = 120000; // Sleep time between reads (in milliseconds)
    
    MySensor gw;
    DHT dht;
    float lastTemp;
    float lastHum;
    boolean metric = true; 
    MyMessage msgHum(CHILD_ID_HUM, V_HUM);
    MyMessage msgTemp(CHILD_ID_TEMP, V_TEMP);
    
    
    void setup()  
    { 
      gw.begin(NULL, NODE_ID);
      dht.setup(HUMIDITY_SENSOR_DIGITAL_PIN); 
    
      // Send the Sketch Version Information to the Gateway
      gw.sendSketchInfo("Humidity", "1.0");
    
      // Register all sensors to gw (they will be created as child devices)
      gw.present(CHILD_ID_HUM, S_HUM);
      gw.present(CHILD_ID_TEMP, S_TEMP);
      
      metric = gw.getConfig().isMetric;
    }
    
    void loop()      
    {  
      sendBatteryReport();
      delay(dht.getMinimumSamplingPeriod());
    
      float temperature = dht.getTemperature();
      if (isnan(temperature)) {
          Serial.println("Failed reading temperature from DHT");
      } else if (temperature != lastTemp) {
        lastTemp = temperature;
        if (!metric) {
          temperature = dht.toFahrenheit(temperature);
        }
        gw.send(msgTemp.set(temperature, 1));
        Serial.print("T: ");
        Serial.println(temperature);
      }
      
      float humidity = dht.getHumidity();
      if (isnan(humidity)) {
          Serial.println("Failed reading humidity from DHT");
      } else if (humidity != lastHum) {
          lastHum = humidity;
          gw.send(msgHum.set(humidity, 1));
    
          Serial.print("H: ");
          Serial.println(humidity);
      }
    
      gw.sleep(SLEEP_TIME); //sleep a bit
    }
    
    void sendBatteryReport() {
              float p = vcc.Read_Perc(VCC_MIN, VCC_MAX, true);
              int batteryPcnt = static_cast<int>(p);
              gw.sendBatteryLevel(batteryPcnt);
    }
    
    
    Troubleshooting

  • Low Power: How much current? [Solved]
    engyE engy

    My problem was defected NRF24 radios. Had to order 3rd batch from ebay, and even though it contained a few defected modules.

    Hardware

  • Low Power: How much current? [Solved]
    engyE engy

    Hello guys,

    I'm reading your post, and that is amazing... you're fighting with u/nAmps.
    However, I'm concerned about mAmps :)

    The lowest what I can get with Atmega328 + NRF24 on breadboard is 1mA.

    What I've done:
    Flashed Atmega328p with ATmegaBOOT_168_atmega328_pro_8MHz.hex
    Uploaded BinarySwithchSleepSensor sketch with FDTI. Tried: API 1.4/1.5, IDE 1.0.6/1.6.5 (no difference)
    Powered the sensor directly with 2xAA
    Changed ext fuses to x07 (no BOD)
    Connected NRF24 according to MySensors instructions

    On the breadboard I have only:
    Atmega328p
    NRF24
    10k resistor on 1st/reset pin.

    With this set up minimum what I can get is:
    Atmega328p w/o NRF - 3pin con - 0.1mA /not con - 3.4mA
    Atmega328p with NRF - 3pin con - 1.09mA /not con - 1mA

    I'm using cheap multi-meter, however, with Gammon's J sketch - it shows 3uA without NRF.

    I'm struggling almost a week, and can't understand, why you guys achieving such a great results while using almost the same setup (Mini 8Mhz is based on Atmega328p).

    Your ideas and suggestions are most welcome. Thank you in advance!

    Hardware

  • MQTT Broker gateway
    engyE engy

    Hello,

    I have made this gateway with W5100.
    Everything looks OK, except random connection failures.
    Clients - MyMQTT (android), Openhab are loosing contact with the broker time after time.
    The issue can occur every 5 - 60 mins.

    Any ideas what could be the problem?

    Thank you in advance.

    Controllers
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular