Navigation

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

    Posts made by r-nox

    • Vera/Ezlo

      Will there be support for the new line of Ezlo/Vera hubs?

      https://getvera.com/collections/hubs

      posted in Vera
      r-nox
      r-nox
    • RE: Killing Nanos, one after the other

      This is old but maybe?

      https://hackaday.com/2014/10/22/watch-that-windows-update-ftdi-drivers-are-killing-fake-chips/

      posted in Troubleshooting
      r-nox
      r-nox
    • RE: Getting Pin Change Interrupts working together with Timer interrupts / sleep(XX ms) on Arduino Pro Mini

      I think this is the same thing as you were trying to accomplish.

      Sleep for 6 minutes or when interrupted. I have a reed switch on pin 2

      pinMode(REED_SWITCH, INPUT);   // set the reed switch digital pin as input
      //digitalWrite(REED_SWITCH, HIGH);
      pinMode(REED_SWITCH, INPUT_PULLUP);
      
      
      sleep(digitalPinToInterrupt(REED_SWITCH), CHANGE, 360000); //3600000 hour
      
      posted in Troubleshooting
      r-nox
      r-nox
    • RE: Message Payload type

      @frits Thank you for catching that. I was just reworking and now it's sending proper values. 🙂

      posted in Development
      r-nox
      r-nox
    • RE: Message Payload type

      @mfalkvidd

      Sending as V_TEXT did not have the effect needed.

      void sendToReceiver(boolean reed_tripped)
      {
        char percent;
        
        Serial.print(" Light Status ");
        Serial.println(reed_tripped);
       
       switch (reed_tripped) {
        
        case 0:
        percent = "0";
        Serial.print(" Select case is ");
        Serial.println("0");
      
        send(msgDimmer_to_5.setDestination(5).setSensor(0).set(percent).setType(V_TEXT));
        //send(msgDimmer_to_5.setDestination(5).setSensor(0).set(percent));
        //send(msgDimmer_to_5.set(percent, 0));
        
        break;
        
        case 1:
        percent = "30";
        Serial.print(" Select case is ");
        Serial.println("30");
          
        send(msgDimmer_to_5.setDestination(5).setSensor(0).set(percent).setType(V_TEXT));
        //send(msgDimmer_to_5.setDestination(5).setSensor(0).set(percent));
        //send(msgDimmer_to_5.set(percent, 0));
        break;
        
       
      }
        
       
      }
      

      and the results

      3201 TSF:MSG:SEND,8-8-0-5,s=0,c=1,t=47,pt=2,l=2,sg=0,ft=0,st=OK:4
      

      Payload still shows as P_INT16 and payload is 4 but in fact should be 30

      This should be simple. I don't understand what's going wrong.

      posted in Development
      r-nox
      r-nox
    • RE: Message Payload type

      @frits

      I tried this. Here's the results. They are close but payload looks corrupted.

      char buf[MAX_PAYLOAD_SIZE+1];
      strcpy ( buf, percent );
      
      void sendToReceiver(boolean reed_tripped)
      {
        char percent;
        
        Serial.print(" Light Status ");
        Serial.println(reed_tripped);
       
       switch (reed_tripped) {
        
        case 0:
        percent = "0";
        Serial.print(" Select case is ");
        Serial.println("0");
        
      char buf[MAX_PAYLOAD_SIZE+1];
      strcpy ( buf, percent );
      
      send(msgDimmer_to_5.setDestination(5).setSensor(0).set(buf).setType(V_TEXT));
        
        break;
        
        case 1:
        percent = "30";
        Serial.print(" Select case is ");
        Serial.println("30");
        
      char buf2[MAX_PAYLOAD_SIZE+1];
      strcpy ( buf, percent );
      send(msgDimmer_to_5.setDestination(5).setSensor(0).set(buf2).setType(V_TEXT));
        
       
        break;
      
       
      }
      

      My results have had their molecules mixed during transport. I expected "30" but received :⸮

      4870 TSF:MSG:SEND,8-8-0-5,s=0,c=1,t=47,pt=0,l=3,sg=0,ft=0,st=OK:⸮
      
      

      Any further advice?

      posted in Development
      r-nox
      r-nox
    • Message Payload type

      I'm sending a message from node to node but when the message gets there it's the wrong type.
      I need to send as P_STRING but it's showing as P_INT16

      This is my send

      void sendToReceiver(boolean reed_tripped)
      {
       char percent;
       
       Serial.print(" Light Status ");
       Serial.println(reed_tripped);
      
      switch (reed_tripped) {
       
       case 0:
       percent = "0";
      
       send(msgDimmer_to_5.setDestination(5).setSensor(0).set(percent).setType(V_PERCENTAGE));
       //send(msgDimmer_to_5.setDestination(5).setSensor(0).set(percent));
       //send(msgDimmer_to_5.set(percent, 0));
       
       break;
       
       case 1:
       percent = "30";
      
       send(msgDimmer_to_5.setDestination(5).setSensor(0).set(percent).setType(V_PERCENTAGE));
       //send(msgDimmer_to_5.setDestination(5).setSensor(0).set(percent));
       //send(msgDimmer_to_5.set(percent, 0));
       break;
      
      }
       
      
      }
      

      and the message

      2836 !TSF:MSG:SEND,8-8-5-5,s=0,c=1,t=3,pt=2,l=2,sg=0,ft=0,st=NACK:4
      2842 !TSF:RTE:N2N FAIL
      2846 TSF:MSG:SEND,8-8-0-5,s=0,c=1,t=3,pt=2,l=2,sg=0,ft=0,st=OK:4
      2854 MCO:SLP:MS=360000,SMS=0,I1=0,M1=1,I2=255,M2=255
      2861 TSF:TDI:TSL
      

      What the heck am I doing wrong?

      posted in Development
      r-nox
      r-nox
    • Vera is getting a reboot.

      There's been a lot of complaints about Vera over the last few years. It looks like there's been a buy out or a buy in and as a result it's getting some much needed attention.

      http://forum.micasaverde.com/index.php/topic,102841.0/topicseen.html

      Sorry if this isn't exactly related but I figure it's a good place to update people. If not just delete it.

      posted in Vera
      r-nox
      r-nox
    • RE: ESP8266 gateway + WebServer = Awesome!

      @japio

      Where did this all end up?

      posted in Development
      r-nox
      r-nox
    • RE: Old user returning to Vera/MySensors

      I run a Vera also. I would go with An esp8266 for gateway. Look at the capacitor added to the radio.

      posted in Vera
      r-nox
      r-nox
    • RE: [SOLVED] MySensors and DHT22 - difficoulties in getting started

      @neo-mod said in [SOLVED] MySensors and DHT22 - difficoulties in getting started:

      @r-nox Thank you R-Nox! I finally figured it out, and I wrote my conclusions here. I hope it may be useful for other users. 🙂

      I'm glad you got it working. I too had the hardest time finding the right library. That's why I responded. You're write up should help other in the future too. Thank you.

      posted in Development
      r-nox
      r-nox
    • RE: [SOLVED] MySensors and DHT22 - difficoulties in getting started

      Look here perhaps.

      https://forum.mysensors.org/topic/4326/can-t-compile-humidity-sketch-2-0-what-dht-library-do-i-need/18

      posted in Development
      r-nox
      r-nox
    • S_RGB_LIGHT

      Using the code below I seem to be having trouble getting the control to show in the UI. When I include the device only the arduino node shows up.
      Where have I gone wrong?

       /*
      https://forum.mysensors.org/topic/7456/ws2812b-information-leds-blinking
      https://www.domoticz.com/forum/viewtopic.php?t=8039
      */
      // Enable debug prints
      #define MY_DEBUG
      
      // Enable and select radio type attached
      #define MY_RADIO_NRF24
      //#define MY_RADIO_RFM69
      
      // Set LOW transmit power level as default, if you have an amplified NRF-module and
      // power your radio separately with a good regulator you can turn up PA level.
      
      /**
       * @def MY_RF24_PA_LEVEL
       * @brief Default RF24 PA level. Override in sketch if needed.
       *
       * - RF24_PA_MIN = -18dBm
       * - RF24_PA_LOW = -12dBm
       * - RF24_PA_HIGH = -6dBm
       * - RF24_PA_MAX = 0dBm
       */
      #define MY_RF24_PA_LEVEL RF24_PA_LOW
      
      // ENABLE REPEATER MODE
      //#define MY_REPEATER_FEATURE
      
      // ENABLE LOOP EVEN IF RADIO FAILS.
      #define MY_TRANSPORT_WAIT_READY_MS 15000
      
      #include <MySensors.h>
      #include <SPI.h>
      #include <FastLED.h>
      
      
      const int stripPin = 4 ;                  // pin where 2812 LED strip is connected
      
      const int numPixel = 3 ;                  // set to number of pixels
      
      
      CRGB leds[numPixel];
      
      char actRGBvalue[] = "000000";               // Current RGB value
      uint16_t actRGBbrightness = 0xFF ;         // Controller Brightness 
      int actRGBonoff=0;                        // OnOff flag
      
      #define CHILD_ID 0
      
      
      
      
      MyMessage lastColorStatusMsg(CHILD_ID,V_VAR1);
      
      void setup() {
        FastLED.addLeds<NEOPIXEL, stripPin >(leds, numPixel); // initialize led strip
        
        // Flash the "hello" color sequence: R, G, B, black. 
        colorBars();
      
      
      }
      
      
      void presentation()
      {
      
       //begin(incomingMessage, NODE_ID, false);      // initialize MySensors
       sendSketchInfo("AWI RGB Light", "1.1");
       present(CHILD_ID, S_RGB_LIGHT, "RGB Strip");        // present to controller
      
        //Request the last stored colors settings
        request(CHILD_ID, V_VAR1);
      
      
      }
      
      
      
      
      void loop() {
      
        
        //gw.process();                       // wait for incoming messages
      
      
      }
      
      void colorBars()
      {
        SendColor2AllLEDs( CRGB::Red );   FastLED.show(); delay(500);
        SendColor2AllLEDs( CRGB::Green ); FastLED.show(); delay(500);
        SendColor2AllLEDs( CRGB::Blue );  FastLED.show(); delay(500);
        SendColor2AllLEDs( CRGB::Black ); FastLED.show(); delay(500);
      } 
      
      void SendColor2AllLEDs(const CRGB lcolor)
      {
        for(int i = 0 ; i < numPixel ; i++) {
          leds[i] = lcolor;
        }
      }
      
      void SendLastColorStatus()
      {
        String cStatus=actRGBvalue+String("&")+String(actRGBbrightness)+String("&")+String(actRGBonoff);
        send(lastColorStatusMsg.set(cStatus.c_str()));
      }
      
      String getValue(String data, char separator, int index)
      {
       int found = 0;
        int strIndex[] = {0, -1};
        int maxIndex = data.length()-1;
        for(int i=0; i<=maxIndex && found<=index; i++){
        if(data.charAt(i)==separator || i==maxIndex){
        found++;
        strIndex[0] = strIndex[1]+1;
        strIndex[1] = (i == maxIndex) ? i+1 : i;
        }
       }
        return found>index ? data.substring(strIndex[0], strIndex[1]) : "";
      }
      
      
      // ############################ INCOMING MESSAGE ###########################
      void incomingMessage(const MyMessage &message) {
        if (message.type == V_RGB) {            // check for RGB type
          actRGBonoff=1;
          strcpy(actRGBvalue, message.getString());    // get the payload
          SendColor2AllLEDs(strtol(actRGBvalue, NULL, 16));
          SendLastColorStatus();
        }
        else if (message.type == V_DIMMER) {           // if DIMMER type, adjust brightness
          actRGBonoff=1;
          actRGBbrightness = map(message.getLong(), 0, 100, 0, 255);
          FastLED.setBrightness( actRGBbrightness );
          SendLastColorStatus();
        }
        else if (message.type == V_STATUS) {           // if on/off type, toggle brightness
          actRGBonoff = message.getInt();
          FastLED.setBrightness((actRGBonoff == 1)?actRGBbrightness:0);
          SendLastColorStatus();
        }
        else if (message.type==V_VAR1) {            // color status
          String szMessage=message.getString();
          strcpy(actRGBvalue, getValue(szMessage,'&',0).c_str());
          actRGBbrightness=atoi(getValue(szMessage,'&',1).c_str());
          actRGBonoff=atoi(getValue(szMessage,'&',2).c_str());
          SendColor2AllLEDs(strtol(actRGBvalue, NULL, 16));
          FastLED.setBrightness((actRGBonoff == 1)?actRGBbrightness:0);
        }
        FastLED.show();
      }```
      posted in Vera
      r-nox
      r-nox
    • RE: MySensors-powered arcade game screen with wireless gamepad controller

      Great work. I'm going to build this for my back yard!

      posted in My Project
      r-nox
      r-nox
    • RE: How to remove a sensor from Vera (Newbie)

      When you include a sensor it creates an Arduino node and the sensor itself. Make sure to delete them both.

      posted in Vera
      r-nox
      r-nox
    • RE: Noob : Cant get Sensor talking to gateway

      Here's the clear eeprom sketch if you need it.

      https://github.com/mysensors/MySensors/blob/master/examples/ClearEepromConfig/ClearEepromConfig.ino

      posted in Troubleshooting
      r-nox
      r-nox
    • RE: Don't see my Arduino node device in Vera

      There you have it!

      posted in Vera
      r-nox
      r-nox
    • RE: Noob : Cant get Sensor talking to gateway

      If you have used this same sensors as a test in the past you may need to clear the eeprom data also.

      Just a guess...

      posted in Troubleshooting
      r-nox
      r-nox
    • RE: Don't see my Arduino node device in Vera

      @billgoolsby said in Don't see my Arduino node device in Vera:

      MySensors Plugin

      Did you go into the MySensors Plugin setting and include the new sensor?

      posted in Vera
      r-nox
      r-nox
    • RE: Reconnect after power failure

      @gohan

      I have an extra esp8266 laying around. I'll build one out tomorrow and see how it goes. Thanks for the suggestion.

      posted in Vera
      r-nox
      r-nox
    • Reconnect after power failure

      I'm experiencing an issue. After a power failure the gateway loses it's configuration and require manual intervention. I need to unplug the gateway and reload the engine. Then plug the gateway back in and reload again and then finally redo the gateways serial port configuration. It's getting tiresome.

      Is there a way circumvent this?

      posted in Vera
      r-nox
      r-nox
    • RE: IR remote control

      Is any of this code archived someplace? Any direction to get started? I want to shut off my tv via Vera Edge.

      posted in Hardware
      r-nox
      r-nox
    • RE: BME280 How to use it outdoors

      Time to try something else.

      posted in Hardware
      r-nox
      r-nox
    • RE: Vera Plus and ESP8266

      perhaps you need to set the duration?

      #define MY_INCLUSION_MODE_DURATION 60

      posted in Troubleshooting
      r-nox
      r-nox
    • RE: Showing N/A instead of last stored temperature

      Thank you

      posted in Vera
      r-nox
      r-nox
    • RE: Showing N/A instead of last stored temperature

      Where are you seeing the timestamp? I've yet to see them in the Vera ui.

      posted in Vera
      r-nox
      r-nox
    • RE: Showing N/A instead of last stored temperature

      It would be nice to have a timestamp available.

      posted in Vera
      r-nox
      r-nox
    • RE: Ceech-Board Buyers

      I purchased from him before and recieved my boards. He also helped me get them set up.

      posted in Hardware
      r-nox
      r-nox
    • RE: Brand new Vera controller

      As a side not I see Lib version is blank in the screen shot...

      posted in Vera
      r-nox
      r-nox
    • RE: Looking to buy a vera controller

      I purchased an Edge. Now that it's been a few months I would rather have purchased the Plus.

      I'm still happy to own an Edge.

      posted in General Discussion
      r-nox
      r-nox
    • RE: BME280 How to use it outdoors

      I don't know the specs for reading it off hand. Perhaps your housing is holding humidity. I plan to add a fan to mine. Spin the fan for a few moments before reading to cycle the air.

      posted in Hardware
      r-nox
      r-nox
    • RE: BME280 How to use it outdoors

      That's my line of thought.

      posted in Hardware
      r-nox
      r-nox
    • RE: BME280 How to use it outdoors

      Are you over working it? Is that even possible?

      posted in Hardware
      r-nox
      r-nox
    • RE: BME280 How to use it outdoors

      Seems short lived...

      posted in Hardware
      r-nox
      r-nox
    • RE: 3-in-1 Humidity Temp and Motion

      @kurniawan77

      This is HUM TEMP and PIR

      This is what I'm using and it runs in mysensors 2.0

      None battery powered. NO sleep mode and dirty code but it runs well enough for me right now.
      If you add or fix anything please post it for everyone.

      #define MY_DEBUG
      
      // Enable and select radio type attached
      #define MY_RADIO_NRF24
      //#define MY_RADIO_RFM69
      
      #include <SPI.h>
      #include <MySensors.h>  
      #include <DHT.h>  
      
      #define CHILD_ID_HUM 0
      #define CHILD_ID_TEMP 1
      
      #define CHILD_ID_MOT 2 //me
      
      
      
      #define HUMIDITY_SENSOR_DIGITAL_PIN 4
      
      #define DIGITAL_INPUT_SENSOR 2   // The digital input you attached your motion sensor.  (Only 2 and 3 generates interrupt!)
      
      
      DHT dht;
      float lastTemp;
      float lastHum;
      boolean metric = false; 
      
      unsigned long interval= 3000;//dht.getMinimumSamplingPeriod(); // the time we need to wait
      unsigned long previousMillis=0; // millis() returns an unsigned long.
      unsigned long SLEEP_TIME = 120000; // Sleep time between reports (in milliseconds)
      
      MyMessage msgHum(CHILD_ID_HUM, V_HUM);
      MyMessage msgTemp(CHILD_ID_TEMP, V_TEMP);
      MyMessage msgMot(CHILD_ID_MOT, V_TRIPPED); //me
      
      void setup()  
      { 
        dht.setup(HUMIDITY_SENSOR_DIGITAL_PIN); 
      
       // metric = getConfig().isMetric;
      
       pinMode(DIGITAL_INPUT_SENSOR, INPUT);      // sets the motion sensor digital pin as input
      }
      
      void presentation()  
      { 
        // Send the Sketch Version Information to the Gateway
        sendSketchInfo("3-1 Sensor", "1.0");
      
        // Register all sensors to gw (they will be created as child devices)
        present(CHILD_ID_HUM, S_HUM);
        present(CHILD_ID_TEMP, S_TEMP);
        present(CHILD_ID_MOT, V_TRIPPED); //me
      }
      
      void loop()      
      {  
        // Read digital motion value
        boolean tripped = digitalRead(DIGITAL_INPUT_SENSOR) == HIGH;
         
      // only run loop if time has passed. 
      unsigned long currentMillis = millis(); // grab current time       
      
       // check if "interval" time has passed
       if ((unsigned long)(currentMillis - previousMillis) >= interval) {
      
       
             send(msgMot.set(tripped?"1":"0")); 
                    
        
            #ifdef MY_DEBUG
             Serial.print("Motion: ");
             Serial.println(tripped);
            #endif
      
      
      
       
        
        // Fetch temperatures from DHT sensor
        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);
          }
          send(msgTemp.set(temperature, 1));
          #ifdef MY_DEBUG
          Serial.print("T: ");
          Serial.println(temperature);
          #endif
        }
       
        // Fetch humidity from DHT sensor
        float humidity = dht.getHumidity();
        if (isnan(humidity)) {
            Serial.println("Failed reading humidity from DHT");
        } else if (humidity != lastHum) {
            lastHum = humidity;
            send(msgHum.set(humidity, 1));
            #ifdef MY_DEBUG
            Serial.print("H: ");
            Serial.println(humidity);
            #endif
        }   
      
      
      
      
         // save the "current" time
         previousMillis = millis();
      
       }  
      
        // Sleep until interrupt comes in on motion sensor. Send update every two minute.
        //sleep(digitalPinToInterrupt(DIGITAL_INPUT_SENSOR), CHANGE, SLEEP_TIME);
      
      }```
      posted in My Project
      r-nox
      r-nox
    • RE: Can't compile Humidity sketch 2.0 .. What DHT library do I need?

      https://github.com/markruys/arduino-DHT/

      This one worked for me.

      What a frustrating time that was.

      posted in General Discussion
      r-nox
      r-nox
    • RE: Can't compile Humidity sketch 2.0 .. What DHT library do I need?

      @mfalkvidd

      I can't tell what I'm using anymore. Been at it all afternoon installing and un installing. I think I'm using these now (https://github.com/mysensors/MySensorsArduinoExamples/tree/master/libraries/DHT).

      Where do I start please?

      posted in General Discussion
      r-nox
      r-nox
    • RE: Can't compile Humidity sketch 2.0 .. What DHT library do I need?

      I'm dead in the water with the same issue. Downloading the lib from the location above yielded the same result.

      posted in General Discussion
      r-nox
      r-nox
    • RE: Plant moisture sensor - I give up...

      Water is heavy no? Use a weight sensor. Get weight after a fresh watering and run comparison. I guess it would depend on the size of your house plants.

      posted in Hardware
      r-nox
      r-nox
    • RE: BME280 How to use it outdoors

      @karl261 hopefully a longer time.

      posted in Hardware
      r-nox
      r-nox
    • RE: BME280 How to use it outdoors

      Here's a link

      http://www.affordablewindowscreens.com/products/custom-window-screens.html?page=shop.product_details&flypage=vmj_naru.tpl&product_id=40&category_id=1

      posted in Hardware
      r-nox
      r-nox
    • RE: BME280 How to use it outdoors

      Your fine then.

      Window screen is a mesh material that doesn't absorb water. It is sometimes made from metal.

      posted in Hardware
      r-nox
      r-nox
    • RE: BME280 How to use it outdoors

      @karl261

      You can use window screen from the hardware store.

      posted in Hardware
      r-nox
      r-nox
    • RE: Fire pit RGB striplight controller

      Nice work, looks fantastic!

      posted in My Project
      r-nox
      r-nox
    • RE: nRF24L01+PA+LNA MAX power

      @Fat-Fly said:

      alt text

      This ? Power from adapter, not from arduino.

      I have used this adapter and it works well.

      posted in General Discussion
      r-nox
      r-nox