Navigation

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

    Posts made by signal15

    • RE: Best way to mount long-range NRF radio to Pi Zero case?

      Looks like the Pi 1 used a linear regulator and it was limited to 50ma. Later Pi's all use a switching regulator that can apparently supply 500-800ma on the 3.3v output. We'll find out.

      posted in General Discussion
      signal15
      signal15
    • RE: Moving sensors to new gateway

      If I turn on signing on the GW, do I have to turn it on for all nodes, or can I use a mix of signed and non-signed nodes?

      posted in General Discussion
      signal15
      signal15
    • RE: Best way to mount long-range NRF radio to Pi Zero case?

      In reading the comments on one of those, someone noted that with the high power NRF radio, the raspberry pi 1 could not send data via the radio because it didn't have enough power. Am I going to run into the same problem with a Pi Zero W?

      posted in General Discussion
      signal15
      signal15
    • RE: 💬 Building a Raspberry Pi Gateway

      @gohan, there are two MQTT plugins for the Vera with varying capabilities. But, the mysensors plugin for Vera doesn't appear to support MQTT at all. I could probably get one of those MQTT plugins working, but I'm not sure how stable they are. I hate installing unstable plugins and having them crash LUUP. I need to maintain a positive WAF (Wife Acceptance Factor), and broken HA doesn't help with that. 🙂

      posted in Announcements
      signal15
      signal15
    • Best way to mount long-range NRF radio to Pi Zero case?

      I'm building a new gateway with a Pi Zero W. I don't have a case yet. I'm putting the long-range NRF24l01+ radio on it. What's the best way to mount this to the case without making it look like a bomb? Unfortunately, I don't have a 3d printer yet. The best I can come up with so far is to stick a mini breadboard to the top of it and plug the radio into that, but then I still have a bunch of wires sticking out everywhere.

      posted in General Discussion
      signal15
      signal15
    • Moving sensors to new gateway

      I have a bunch of sensors joined to an ESP8266 gateway. I'm building a new gateway using a Pi Zero W. Can I just shut down the old gateway and do the pairing process over again on the new one? Or, do I have to somehow disassociate the sensors from the old gateway first?

      posted in General Discussion
      signal15
      signal15
    • RE: 💬 Building a Raspberry Pi Gateway

      Is it possible to build a gateway that is MQTT, but also listens on port 5003? I want to send my data up to AWS IoT, but I also need port 5003 for Vera integration.

      posted in Announcements
      signal15
      signal15
    • RE: Freezer Temperature Alarm finished

      Just wanted to throw this out there as I was revisiting this post today. This could pretty easily be modified to have a digital display with buttons to adjust temperature, and a 5A solid state relay. This would allow you to completely replace the mechanical thermostat.

      My thermostat replacement was nearly $40 after shipping, and it's rated at 5A so those 5A relays should work just fine. This would be a cheaper replacement for the mechanical thermostat and would give you better temperature control. Maybe better temp control isn't needed if you're just using for a freezer, but if you're a home brewer and trying to keep fermenters at a constant temperature, this would be very useful. You could even add PID code to it.

      posted in My Project
      signal15
      signal15
    • Freezer Temperature Alarm finished

      I built a temp alarm for my big freezer after I lost about $1k worth of meat and other frozen foods due to a failed thermostat. If the thermostat fails again, I'll build an arduino based one with a screen to set temperatures and a relay to turn it on and off.

      I modified the example sketch for the temp sensor to support a buzzer and a mute button. I did this because my ESP8266 gateway doesn't seem to be very reliable, and neither do notifications on the Vera. At least this way, someone will hear it beeping if there's a problem. The device uses a button with a pulldown resistor to ensure that the pin stays LOW when the button is not pressed. When the temperature is >= to the alarmTemp, alarmState goes to true which sounds the buzzer and sets the SLEEP_TIME down to 1 second. If you press the button, it will mute the alarm. The alarmState and mute automatically resets when the temp goes below alarmReset. Note that the temps you set in the sketch will either be F or C depending on what your controller is set up for. I'm using F, and usually keep my freezer at -20F. So I set my alarmTemp to 10F and reset at 0F. If you're using C, you'll want to change this appropriately.

      I'm always amazed that you can build stuff like this for like $5.

      Note that drilling holes in a modern freezer can be a risky endeavor, because the hot side of the compressor lines run beneath the sides and/or back of the freezer. They aren't exposed anymore. I used my Seek thermal camera to determine exactly where the lines were before I drilled and used a dry erase marker to mark them.

      Code below,

      Photos here - https://goo.gl/photos/4inkTh6GVhCEupLa8

      /**
       * The MySensors Arduino library handles the wireless radio link and protocol
       * between your home built sensors/actuators and HA controller of choice.
       * The sensors forms a self healing radio network with optional repeaters. Each
       * repeater and gateway builds a routing tables in EEPROM which keeps track of the
       * network topology allowing messages to be routed to nodes.
       *
       * Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
       * Copyright (C) 2013-2015 Sensnology AB
       * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
       *
       * Documentation: http://www.mysensors.org
       * Support Forum: http://forum.mysensors.org
       *
       * This program is free software; you can redistribute it and/or
       * modify it under the terms of the GNU General Public License
       * version 2 as published by the Free Software Foundation.
       *
       *******************************
       *
       * DESCRIPTION
       *
       * Example sketch showing how to send in DS1820B OneWire temperature readings back to the controller
       * http://www.mysensors.org/build/temp
       */
      
      
      // Enable debug prints to serial monitor
      #define MY_DEBUG 
      
      // Enable and select radio type attached
      #define MY_RADIO_NRF24
      //#define MY_RADIO_RFM69
      
      #include <SPI.h>
      #include <MySensors.h>  
      #include <DallasTemperature.h>
      #include <OneWire.h>
      
      #define COMPARE_TEMP 1 // Send temperature only if changed? 1 = Yes 0 = No
      
      #define ONE_WIRE_BUS 3 // Pin where dallase sensor is connected
      #define BUZZER 5 
      const int buttonPin = 7; // Pin where the mute button is connected
      #define MAX_ATTACHED_DS18B20 16
      unsigned long SLEEP_TIME = 30000; // Sleep time between reads (in milliseconds)
      OneWire oneWire(ONE_WIRE_BUS); // Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs)
      DallasTemperature sensors(&oneWire); // Pass the oneWire reference to Dallas Temperature. 
      float lastTemperature[MAX_ATTACHED_DS18B20];
      int numSensors=0;
      int buttonState = 0;
      bool alarmState = false;
      bool muteAlarm = false;
      float alarmTemp = 10; // Temperature where our alarm goes off. Use F if your gateway is imperial, C if metric
      float alarmReset = 0; // Temperature where the alarm resets automatically
      bool receivedConfig = false;
      bool metric = true;
      // Initialize temperature message
      MyMessage msg(0,V_TEMP);
      
      void before()
      {
        // Startup up the OneWire library
        sensors.begin();
      }
      
      void setup()  
      { 
        // requestTemperatures() will not block current thread
        sensors.setWaitForConversion(false);
        pinMode(BUZZER, OUTPUT);
        pinMode(buttonPin, INPUT);
      }
      
      void presentation() {
        // Send the sketch version information to the gateway and Controller
        sendSketchInfo("Temperature Sensor", "1.1");
      
        // Fetch the number of attached temperature sensors  
        numSensors = sensors.getDeviceCount();
      
        // Present all sensors to controller
        for (int i=0; i<numSensors && i<MAX_ATTACHED_DS18B20; i++) {   
           present(i, S_TEMP);
        }
      }
      
      void loop()     
      {     
        if (alarmState == true && muteAlarm == false) {
          digitalWrite(BUZZER, HIGH);
          delay(1000);
          digitalWrite(BUZZER,LOW);
      
          buttonState = digitalRead(buttonPin);
      
          // check if the pushbutton is pressed.
          // if it is, the buttonState is HIGH and we mute the alarm
          if (buttonState == HIGH) {
            muteAlarm = true;
          } 
        }
      
      
        
        // Fetch temperatures from Dallas sensors
        sensors.requestTemperatures();
      
        // query conversion time and sleep until conversion completed
        int16_t conversionTime = sensors.millisToWaitForConversion(sensors.getResolution());
        // sleep() call can be replaced by wait() call if node need to process incoming messages (or if node is repeater)
        sleep(conversionTime);
      
        // Read temperatures and send them to controller 
        for (int i=0; i<numSensors && i<MAX_ATTACHED_DS18B20; i++) {
       
          // Fetch and round temperature to one decimal
          float temperature = static_cast<float>(static_cast<int>((getControllerConfig().isMetric?sensors.getTempCByIndex(i):sensors.getTempFByIndex(i)) * 10.)) / 10.;
          if (alarmState == false && temperature >= alarmTemp) {
            alarmState = true;
            SLEEP_TIME = 1000;  // Set our sleep from 30 seconds to 1 second to facilitate buzzer and intensive monitoring
          }
          if (alarmState == true && temperature <= alarmReset) {
            alarmState = false;
            muteAlarm = false;
            SLEEP_TIME = 30000;
          }
          // Only send data if temperature has changed and no error
          #if COMPARE_TEMP == 1
          if (lastTemperature[i] != temperature && temperature != -127.00 && temperature != 85.00) {
          #else
          if (temperature != -127.00 && temperature != 85.00) {
          #endif
       
            // Send in the new temperature
            send(msg.setSensor(i).set(temperature,1));
            // Save new temperatures for next compare
            lastTemperature[i]=temperature;
          }
        }
        sleep(SLEEP_TIME);
      }
      
      posted in My Project
      signal15
      signal15
    • Sensor sleep causing problems

      I'm using the Temp Sensor Example to build a freezer alarm. It has a beeper, and a button on it to silence the beeper.

      The code to make it beep is:

      digitalWrite(BUZZERPIN, HIGH);
      delay(500);
      digitalWrite(BUZZERPIN, LOW);
      delay(500);
      

      But, this temp sensor sketch has a built in delay of 30 seconds between reads. Which means that I get a couple of beeps, and then silence for 30 seconds. I also have a button that needs to be read, so if it's pressed, it sets a variable that silences the alarm. I'm pretty sure that cannot be read during sleep.

      'm guessing the answer is no, but is there a way to fork a thread that handles the buzzer, and another that looks for the button press? What is the solution to this? Do I just set the sleep to 1 second for the temp read and then just note that I have to hold the button until the button read happens and the buzzer stops?

      posted in Development
      signal15
      signal15
    • RE: Freezer temp monitor with buzzer, can I set the high temp limit via Vera?

      I am doing a buzzer because my sensors so far have been somewhat unreliable with connectivity to the Vera. I suspect it is due to my esp8266 gateway. I am going to build a Raspberry pi gateway though to see if that is more reliable.

      posted in Development
      signal15
      signal15
    • Freezer temp monitor with buzzer, can I set the high temp limit via Vera?

      After losing about $1k worth of meat in my freezer today, I've finally decided to get around to monitoring my freezer temps. I'm going to do a regular temp sensor, but add a piezo buzzer and a silencing button.

      Originally, my idea was to:

      • Monitor the temp
      • If it goes above 20F, sound the alarm
      • When the silence button is pushed, it mutes the buzzer
      • The mute is reset once the temperature dips below 20F again, so it's armed again.

      But, then I got to thinking, it would be nice to be able to set the temperature limit from Vera, and have it save to the eeprom so it would survive an arduino reboot. Is this even possible? Has anyone built something like this before?

      posted in Development
      signal15
      signal15
    • Do you have to clear EEPROM when moving gateway to new controller?

      I have an ESP8266 gateway. It was joined to a UI5 vera, and I've just moved it to a UI7 based controller. Do I need to clear the EEPROM on the gateway? What about the sensors?

      I'm trying to add a new sensor to the gateway, but it's not picking it up. If I do have to clear the EEPROM on the ESP8266, how do I go about that? I don't think the normal clear EEPROM code works on that board.

      posted in General Discussion
      signal15
      signal15
    • RE: Most of the UI7 files are 6 months to 3 years old... Are these for 2.0.0??

      @hek

      I know. I'm still waiting for them to approve my latest version of the Litetouch plugin, which I submitted months ago.

      So which branch should I be choosing for my UI7 VeraPlus? Are all of those files really that old for 2.0?

      posted in Vera
      signal15
      signal15
    • Most of the UI7 files are 6 months to 3 years old... Are these for 2.0.0??

      I just got a new Vera running UI7. I want to make sure I get the latest controller code on it, but when I look at the timestamps, all of the files are 6 months to 2 years old. What should I be grabbing? There are 3 branches, but they all have the same timestamps (UI7, development, and master).

      Why doesn't someone add these files to apps.mios.com? It makes it a heck of a lot easier for people to manage the plugin and update it, and they'll be sure to get the right ones.

      posted in Vera
      signal15
      signal15
    • RE: Vera crash loop on distance sensor update

      @hek

      I need to keep an eye on the distance for one of the sensors, not just track whether it goes below a certain distance. Eventually I need to write logic where if it's increasing at a certain rate, then it will need to alert me.

      Interestingly enough, I have MySensors set to Imperial units. However, when I go into the Distance Sensor devices on Vera to set up the alert, the label on it is in centimeters. I'm wondering if that divide by zero in the log is a result of it trying to convert to inches and some code not having 2.54 where the zero/nil is.

      posted in Vera
      signal15
      signal15
    • RE: Vera crash loop on distance sensor update

      @BartE

      There are no scenes linked to the distance sensor. However, I did put in an alert for when the distance goes above a certain amount for one sensor, and below a certain level for the other. Come to think of it, I started having problems when I put in this alert. I set the alert up for the cheapy sensor first, and then had the problem. And, the problems with the other sensor started when I put in the alert for that one.

      As for the sending rate, the distance for both of these sensors changes very slowly. And, it's supposed to only send when the distance changes. I set it to every second, because the Maxbotix sensor sends data every second, and I was concerned about data queuing in it over more than a second and causing the parsing not to work properly. Maybe that fear is unfounded since I haven't tried it with more of a delay.

      posted in Vera
      signal15
      signal15
    • RE: ESP8266 WiFi gateway port for MySensors

      @Anduril

      Can you point me to documentation on how the OTA update stuff works and what the capabilities are?

      posted in Development
      signal15
      signal15
    • RE: Vera crash loop on distance sensor update

      Here's my sketch:

      /*
       * The MySensors Arduino library handles the wireless radio link and protocol
       * between your home built sensors/actuators and HA controller of choice.
       * The sensors forms a self healing radio network with optional repeaters. Each
       * repeater and gateway builds a routing tables in EEPROM which keeps track of the
       * network topology allowing messages to be routed to nodes.
       *
       * Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
       * Copyright (C) 2013-2015 Sensnology AB
       * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
       *
       * Documentation: http://www.mysensors.org
       * Support Forum: http://forum.mysensors.org
       *
       * This program is free software; you can redistribute it and/or
       * modify it under the terms of the GNU General Public License
       * version 2 as published by the Free Software Foundation.
       *
       *******************************
       *
       * REVISION HISTORY
       * Version 1.0 - Jay Austad
       * 
       * DESCRIPTION
       * This sketch provides an example how to implement a distance sensor using Maxbotix sensor with RS232 output 
       * http://www.mysensors.org/build/xxx
       
       Receives from the hardware serial, sends to software serial.
       Receives from software serial, sends to hardware serial.
      
       The circuit:
       * RX is digital pin 3 (connect to RXD of MAX232)
       * TX is digital pin 4 (connect to TXD of MAX232)
      
       Note:
       Not all pins on the Mega and Mega 2560 support change interrupts,
       so only the following can be used for RX:
       10, 11, 12, 13, 50, 51, 52, 53, 62, 63, 64, 65, 66, 67, 68, 69
      
       Not all pins on the Leonardo support change interrupts,
       so only the following can be used for RX:
       8, 9, 10, 11, 14 (MISO), 15 (SCK), 16 (MOSI).
      
       This example uses code written by Henrik EKblad, Tom Igoe, Mikal Hart, and Jay Austad
       */
      
      #include <SoftwareSerial.h>
      #include <SPI.h>
      #include <MySensor.h>  
      #include <NewPing.h>
      
      #define CHILD_ID1 1
      #define CHILD_ID2 3
      
      #define TRIGGER_PIN  7  // Arduino pin tied to trigger pin on the ultrasonic sensor.
      #define ECHO_PIN     6  // Arduino pin tied to echo pin on the ultrasonic sensor.
      #define MAX_DISTANCE 200 // Maximum distance we want to ping for (in centimeters). Maximum sensor distance is rated at 400-500cm.
      unsigned long SLEEP_TIME = 1000; // Sleep time between reads (in milliseconds)
      
      MySensor gw;
      NewPing sonar(TRIGGER_PIN, ECHO_PIN, MAX_DISTANCE); // NewPing setup of pins and maximum distance.
      MyMessage msg1(CHILD_ID1, V_DISTANCE);
      MyMessage msg2(CHILD_ID2, V_DISTANCE);
      
      boolean metric = true; 
      SoftwareSerial mySerial(3, 4); // RX, TX
      float mm1;
      float cm1;
      float inches1;
      float dist1;
      float lastDist1;
      int lastDist2;
      
      
      void setup() {
        gw.begin();
      
        // Send the sketch version information to the gateway and Controller
        gw.sendSketchInfo("Distance Sensor", "1.0");
      
        // Register all sensors to gw (they will be created as child devices)
        gw.present(CHILD_ID1, S_DISTANCE);
        gw.present(CHILD_ID2, S_DISTANCE);
      
        metric = gw.getConfig().isMetric;
      
        Serial.println("Maxbotix RS232 Mysensors Sketch");
      
        // set the data rate for the SoftwareSerial port
        mySerial.begin(9600);
      }
      
      void loop() { // run over and over
        //Maxbotix sensor, child ID 1
        if (mySerial.available() > 0) {
          mm1 = mySerial.parseFloat();
          if (mm1 != 0) {
            inches1 = mm1/25.4;
            cm1 = mm1/10;
            dist1 = metric?cm1:inches1;
            Serial.print(dist1);
            Serial.println(metric?" cm":" in");
          }
        
          if (dist1 != lastDist1) {
            gw.send(msg1.set(dist1, 2));
            lastDist1 = dist1;
          }
        }
      //sonar sensor, child ID 2
        int uS = sonar.ping();
        if (uS==0)
        {
          Serial.println("MAX: resetting sensor");
          pinMode(ECHO_PIN, OUTPUT);
          delay(150);
          digitalWrite(ECHO_PIN, LOW);
          delay(150);
          pinMode(ECHO_PIN, INPUT);
          delay(150);
        } else {
          int dist2 = metric?sonar.ping_cm():sonar.ping_in();
          Serial.print("Ping: ");
          Serial.print(dist2); // Convert ping time to distance in cm and print result (0 = outside set distance range)
          Serial.println(metric?" cm":" in");
      
          if (dist2 != lastDist2) {
            gw.send(msg2.set(dist2));
            lastDist2 = dist2;
          }
        }
        gw.sleep(SLEEP_TIME);
        
      }
      
      posted in Vera
      signal15
      signal15
    • RE: Vera crash loop on distance sensor update

      @hek

      I don't think so. It sleeps for 1 second, and only sends an update on change. From the logs, it only appears to send one update before it crashes. I'll post my code when I get back to my computer.

      posted in Vera
      signal15
      signal15
    • RE: Vera crash loop on distance sensor update

      So it started doing it again. This particular node has 2 distance sensors on it. One is the standard cheap sonar one used in the examples, and the other is a $150 Maxbotix which talks via RS232. When this was happening above, it was happening when the cheapy sonar sensor sent an update. Instant LUA engine crash. To resolve it, I deleted that distance sensor device from the Vera.

      It was working fine for a couple of weeks, but it started crashing again. Now it crashes when the Maxbotix sensor sends an update. I just deleted the whole node from the Vera, and now it's not crashing anymore. But I no longer have the distance sensor data in Vera.

      I'm using the 1.5 vera plugin on UI5. Are there known issues with it?

      On the Micasaverde forums, someone said this:


      The "Sending" is likely the symptom.

      You likely are sending "Events" faster than some logic is "Consuming" the events.
      If the consumer, falls behind, when you queue the third (I think that's the number) of events for the consumer, it will trip a Vera "Deadlock" restart.


      Does anyone have any insight?

      As a side note, I've got a Vera Plus on the way so I can convert everything to UI7. Will the UI7 plugin for Mysensors be more stable?

      posted in Vera
      signal15
      signal15
    • Dimmer modules that work on 120v/15a or 20a circuits?

      Are there any out there I can control with Arduino? Even better would be a board with 6-8 of them mounted on it like they do with relays.

      posted in Hardware
      signal15
      signal15
    • Vera crash loop on distance sensor update

      I have two distance sensors. It appears that one of them is causing the LuaUPnP to crash and restart repeatedly. It seemed to be working fine for the past week. No changes were made. And today it just started going bananas. It always seems to crash right after this log entry:

      50	05/22/16 17:35:32.432	luup_log:194: Arduino: urn:micasaverde-com:serviceId:HaDevice1,LastUpdateHR, 05:35 PM, 205 <0x2f5b3680>
      50	05/22/16 17:35:32.491	luup_log:194: Arduino: Set variable: 2;3;1;0;13;28 <0x2f5b3680>
      50	05/22/16 17:35:32.492	luup_log:194: Arduino: Setting variable 'CurrentDistance' to value '28' <0x2f5b3680>
      50	05/22/16 17:35:32.492	luup_log:194: Arduino: urn:micasaverde-com:serviceId:DistanceSensor1,CurrentDistance, 28, 206 <0x2f5b3680>
      06	05/22/16 17:35:32.492	Device_Variable::m_szValue_set device: 206 service: urn:micasaverde-com:serviceId:DistanceSensor1 variable: CurrentDistance was: 27 now: 28 #hooks: 1 upnp: 0 v:(nil)/NONE duplicate:0 <0x2f5b3680>
      
      
      2016-05-22 17:35:32 - LuaUPnP Terminated with Exit Code: 245
      
      
      
      2016-05-22 17:35:32 - LuaUPnP crash
      

      Any ideas here?

      posted in Vera
      signal15
      signal15
    • RE: 2.0b gateway - do I have to upgrade sensors/controller also?

      @tbowmo

      Wouldn't there still be a way for the 2.0 gateway to identify messages coming from 1.5 sensors and still handle them appropriately, rather than breaking things? I have one sensor that is VERY difficult to get physical access to, and I'm sure some others have similar situations. It would be nice to not have to switch everything over at once.

      posted in Development
      signal15
      signal15
    • RE: 2.0b gateway - do I have to upgrade sensors/controller also?

      So, the answer appears to be that all is compatible. I upgraded the gateway to 2.0b, but sensors and Vera are still on 1.5. It all seems to work just fine.

      posted in Development
      signal15
      signal15
    • RE: Problem with adding sonar sensor to another sketch

      I upgraded the gateway to the 2.0b with the ESP8266OTA sketch. Problem solved. It does seem to work fine with the gateway on 2.0b, but sensors and controller on 1.5 code.

      posted in Development
      signal15
      signal15
    • 2.0b gateway - do I have to upgrade sensors/controller also?

      I have an ESP8266 gateway running 1.5. And everything else runs 1.5. I'm having a problem that upgrading to 2.0b will apparently fix on the gateway. Will I also have to upgrade my sensors to 2.0b? What about the 1.5 plugin on my Vera?

      posted in Development
      signal15
      signal15
    • RE: Problem with adding sonar sensor to another sketch

      @mfalkvidd

      ESP8266 gateway. 😕 See above, I found the threads on it.

      posted in Development
      signal15
      signal15
    • RE: Problem with adding sonar sensor to another sketch

      Interesting:

      https://forum.mysensors.org/topic/2934/solved-wifi-gateway-motion-sensor-value-1107296256-instead-of-tripped/2
      https://forum.mysensors.org/topic/2737/2-channel-relais-with-2-buttons-sending-strange-values-for-on-off/15

      Is this a bug in 1.5?

      If I update my gw to 2.0b, will it still read from 1.5 sensors? Do I need to upgrade the code on my Vera to the dev branch as well?

      posted in Development
      signal15
      signal15
    • RE: Problem with adding sonar sensor to another sketch

      @mfalkvidd

      Interesting. I changed the child ID of the problem sensor to one I haven't used yet. So here's what my sensor is sending (ignore the 37.xx readings, those are for the sensor that's working):

      Ping: 22 in
      send: 2-2-0-0 s=3,c=1,t=13,pt=2,l=2,sg=0,st=ok:22
      37.05 in
      send: 2-2-0-0 s=1,c=1,t=13,pt=7,l=5,sg=0,st=ok:37.05
      Ping: 23 in
      send: 2-2-0-0 s=3,c=1,t=13,pt=2,l=2,sg=0,st=ok:23
      37.05 in
      Ping: 22 in
      send: 2-2-0-0 s=3,c=1,t=13,pt=2,l=2,sg=0,st=ok:22

      And here's what I'm seeing on port 5003 on my gateway:
      2;3;1;0;13;1107296278
      2;1;1;0;13;37.05
      2;3;1;0;13;1107296279
      2;3;1;0;13;1107296278

      Why is my sensor sending 22, and the gateway is sending 1107296278 to my controller?

      posted in Development
      signal15
      signal15
    • RE: Problem with adding sonar sensor to another sketch

      When you include sensors, is the gateway notified whether the data being sent from the sensor is an int or a float? I'm wondering that maybe since I originally was declaring dist2 as a float, maybe the gateway still thinks this and it's somehow corrupting the number before it sends it to the controller.

      I need to go hook up the serial port to the sensor and the gw to see if I can figure out where the bad data is coming from.

      posted in Development
      signal15
      signal15
    • RE: Problem with adding sonar sensor to another sketch

      Very weird. I deleted the node from my controller, and then went into inclusion mode again because it didn't find the sensor. It found both of my distance sensor, but the controller is showing distances like this for the new sonar sensor: 1107296276 cm

      I have the parent device set to imperial, and the Maxbotix sensor is working as it should. The messages printed to the serial console show that it's sending the right distance... But the gateway is showing this (look at the 2;2;1 lines):

      2;1;1;0;13;36.42
      2;1;1;0;13;36.46
      2;2;1;0;13;1107296260
      3;0;1;0;0;80.9
      3;1;1;0;0;103.5
      2;2;1;0;13;1107296265
      2;1;1;0;13;36.42
      2;2;1;0;13;1107296263
      2;2;1;0;13;1107296277

      posted in Development
      signal15
      signal15
    • RE: Problem with adding sonar sensor to another sketch

      @mfalkvidd

      I fixed that, but it didn't make a difference. Interestingly, the ECHO pin was stuck at 2.5 volts. I don't know if that's right, but it didn't seem right to me. I did some searching and got it working. Here's the code I added to reset the sensor and the output below it. It's interesting that this fixes it, and it has to do it every time I reset the Arduino. Maybe the five for $5 sensors I got on Amazon were that cheap for a reason...

      int uS = sonar.ping();
        if (uS==0)
        {
          Serial.println("MAX: resetting sensor");
          pinMode(ECHO_PIN, OUTPUT);
          delay(150);
          digitalWrite(ECHO_PIN, LOW);
          delay(150);
          pinMode(ECHO_PIN, INPUT);
          delay(150);
        }
      

      sensor started, id=2, parent=0, distance=1
      send: 2-2-0-0 s=255,c=3,t=11,pt=0,l=15,sg=0,st=ok:Distance Sensor
      send: 2-2-0-0 s=255,c=3,t=12,pt=0,l=3,sg=0,st=ok:1.0
      send: 2-2-0-0 s=1,c=0,t=15,pt=0,l=0,sg=0,st=ok:
      send: 2-2-0-0 s=2,c=0,t=15,pt=0,l=0,sg=0,st=ok:
      Maxbotix RS232 Mysensors Sketch
      MAX: resetting sensor
      MAX: resetting sensor
      MAX: resetting sensor
      MAX: resetting sensor
      Ping: 77 in
      send: 2-2-0-0 s=2,c=1,t=13,pt=2,l=2,sg=0,st=ok:77
      Ping: 76 in
      send: 2-2-0-0 s=2,c=1,t=13,pt=2,l=2,sg=0,st=ok:76
      Ping: 76 in
      Ping: 77 in
      send: 2-2-0-0 s=2,c=1,t=13,pt=2,l=2,sg=0,st=ok:77
      Ping: 76 in
      send: 2-2-0-0 s=2,c=1,t=13,pt=2,l=2,sg=0,st=ok:76
      Ping: 77 in
      send: 2-2-0-0 s=2,c=1,t=13,pt=2,l=2,sg=0,st=ok:77
      Ping: 77 in
      Ping: 78 in
      send: 2-2-0-0 s=2,c=1,t=13,pt=2,l=2,sg=0,st=ok:78
      Ping: 76 in
      send: 2-2-0-0 s=2,c=1,t=13,pt=2,l=2,sg=0,st=ok:76
      Ping: 76 in
      Ping: 77 in

      posted in Development
      signal15
      signal15
    • Problem with adding sonar sensor to another sketch

      Code below. I got a Maxbotix distance sensor working over RS232. I added some code afterwards to support a second distance sensor, the standard one in the examples. I put it in inclusion mode (Vera) and it said one device found. However, it doesn't show up, and the serial.pring messages from the new sensor always shows 0cm. Am I missing something in this code???

      The Maxbotix sensor still works just fine. It's only the new one that doesn't show up in my controller and shows 0cm in the serial output.

      /*
       * The MySensors Arduino library handles the wireless radio link and protocol
       * between your home built sensors/actuators and HA controller of choice.
       * The sensors forms a self healing radio network with optional repeaters. Each
       * repeater and gateway builds a routing tables in EEPROM which keeps track of the
       * network topology allowing messages to be routed to nodes.
       *
       * Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
       * Copyright (C) 2013-2015 Sensnology AB
       * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
       *
       * Documentation: http://www.mysensors.org
       * Support Forum: http://forum.mysensors.org
       *
       * This program is free software; you can redistribute it and/or
       * modify it under the terms of the GNU General Public License
       * version 2 as published by the Free Software Foundation.
       *
       *******************************
       *
       * REVISION HISTORY
       * Version 1.0 - Jay Austad
       * 
       * DESCRIPTION
       * This sketch provides an example how to implement a distance sensor using Maxbotix sensor with RS232 output 
       * http://www.mysensors.org/build/xxx
       
       Receives from the hardware serial, sends to software serial.
       Receives from software serial, sends to hardware serial.
      
       The circuit:
       * RX is digital pin 3 (connect to RXD of MAX232)
       * TX is digital pin 4 (connect to TXD of MAX232)
      
       Note:
       Not all pins on the Mega and Mega 2560 support change interrupts,
       so only the following can be used for RX:
       10, 11, 12, 13, 50, 51, 52, 53, 62, 63, 64, 65, 66, 67, 68, 69
      
       Not all pins on the Leonardo support change interrupts,
       so only the following can be used for RX:
       8, 9, 10, 11, 14 (MISO), 15 (SCK), 16 (MOSI).
      
       This example uses code written by Henrik EKblad, Tom Igoe, Mikal Hart, and Jay Austad
       */
      
      #include <SoftwareSerial.h>
      #include <SPI.h>
      #include <MySensor.h>  
      #include <NewPing.h>
      
      #define CHILD_ID1 1
      #define CHILD_ID2 2
      
      #define TRIGGER_PIN  5  // Arduino pin tied to trigger pin on the ultrasonic sensor.
      #define ECHO_PIN     6  // Arduino pin tied to echo pin on the ultrasonic sensor.
      #define MAX_DISTANCE 300 // Maximum distance we want to ping for (in centimeters). Maximum sensor distance is rated at 400-500cm.
      unsigned long SLEEP_TIME = 1000; // Sleep time between reads (in milliseconds)
      
      MySensor gw;
      NewPing sonar(TRIGGER_PIN, ECHO_PIN, MAX_DISTANCE); // NewPing setup of pins and maximum distance.
      MyMessage msg1(CHILD_ID1, V_DISTANCE);
      MyMessage msg2(CHILD_ID2, V_DISTANCE);
      
      boolean metric = true; 
      SoftwareSerial mySerial(3, 4); // RX, TX
      float mm1;
      float cm1;
      float inches1;
      float dist1;
      float lastDist1;
      float mm2;
      float cm2;
      float inches2;
      float dist2;
      float lastDist2;
      
      
      void setup() {
        gw.begin();
      
        // Send the sketch version information to the gateway and Controller
        gw.sendSketchInfo("Distance Sensor", "1.0");
      
        // Register all sensors to gw (they will be created as child devices)
        gw.present(CHILD_ID1, S_DISTANCE);
        gw.present(CHILD_ID2, S_DISTANCE);
      
        metric = gw.getConfig().isMetric;
      
        Serial.println("Maxbotix RS232 Mysensors Sketch");
      
        // set the data rate for the SoftwareSerial port
        mySerial.begin(9600);
      }
      
      void loop() { // run over and over
        //Maxbotix sensor, child ID 1
        if (mySerial.available() > 0) {
          mm1 = mySerial.parseFloat();
          if (mm1 != 0) {
            inches1 = mm1/25.4;
            cm1 = mm1/10;
            dist1 = metric?cm1:inches1;
            Serial.print(dist1);
            Serial.println(metric?" cm":" in");
          }
        
          if (dist1 != lastDist1) {
            gw.send(msg1.set(dist1, 2));
            lastDist1 = dist1;
          }
        }
      //sonar sensor, child ID 2
        int dist2 = metric?sonar.ping_cm():sonar.ping_in();
        Serial.print("Ping: ");
        Serial.print(dist2); // Convert ping time to distance in cm and print result (0 = outside set distance range)
        Serial.println(metric?" cm":" in");
      
        if (dist2 != lastDist2) {
            gw.send(msg2.set(dist2));
            lastDist2 = dist2;
        }
      
        gw.sleep(SLEEP_TIME);
        
      }
      
      posted in Development
      signal15
      signal15
    • RE: Detecting backwash mode on rust filter and water softener?

      @NeverDie

      Hmm, now that I read the descriptions, it seems this will not work well. The descriptions say that need to avoid having debris going into it and it requires a filter. The backflush, especially on the rust filter, is filled with crap. There is a light coating of mud in those pipes. If I put a filter in there, it's likely restrictive enough to cause problems as these things are sensitive to backpressure in the backflush line. And, if I don't have a filter, I know the flow sensor is going to stop working properly.

      I could probably put a water sensor at the output of the backflush line, and if it remains wet for more than X minutes, I can have my controller throw an alert.

      posted in General Discussion
      signal15
      signal15
    • RE: Detecting backwash mode on rust filter and water softener?

      That's perfect. I didn't know they made cheap flow meters, looking at them now. Thanks!

      posted in General Discussion
      signal15
      signal15
    • RE: Maxbotix RS232 distance sensor - UPDATE - working

      @AWI

      I agree that it would be nice if it was up to the controller to handle it, and then the units for different measurements sent to it were standardized on (like mm for distance). Also, it would be nice if the controller would allow selection of metric/imperial either by device, or sensor type. For example, I want my distance sensors in mm, but my temperatures in F.

      posted in Hardware
      signal15
      signal15
    • Detecting backwash mode on rust filter and water softener?

      I have Kinetico equipment, which is all 100% mechanical. There are no electronics or timers which turn on the backwash/regen modes on my rust filter and water softener. A couple of weeks ago, my rust filter got stuck on backwash mode for who knows how long, and it filled my septic tank and saturated my drain field. I had to have it pumped.

      I'd like to sense when it's on backwash mode, so I can throw an alert with my controller when it's backwashing for more than X number of minutes. Any idea how to go about this?

      posted in General Discussion
      signal15
      signal15
    • RE: Maxbotix RS232 distance sensor - UPDATE - working

      Can anyone give insight to my questions in the previous post?

      posted in Hardware
      signal15
      signal15
    • RE: Maxbotix RS232 distance sensor - UPDATE - working

      Ok, I put in something to filter out the zero readings. Here's the code below, which is working. I have a couple of questions though:

      1. I used code from the DistanceSensor example. It sends in cm if metric, and inches if not. It appears the controller plugin for vera expects cm, as if I create a trigger for if the distance goes above or below, it asks for it in cm. Should I change this?
      2. The controller plugin ONLY gives the option to create a trigger in cm. If the sensor is sending in inches, I'm assuming the controller plugin will interpret this number in cm, instead of knowing to convert it. Is this true?

      Anyway, here's what I have as it sits. I'm almost thinking it might be better to just remove the non-metric code and only send in cm. Thoughts?

      /*
       * The MySensors Arduino library handles the wireless radio link and protocol
       * between your home built sensors/actuators and HA controller of choice.
       * The sensors forms a self healing radio network with optional repeaters. Each
       * repeater and gateway builds a routing tables in EEPROM which keeps track of the
       * network topology allowing messages to be routed to nodes.
       *
       * Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
       * Copyright (C) 2013-2015 Sensnology AB
       * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
       *
       * Documentation: http://www.mysensors.org
       * Support Forum: http://forum.mysensors.org
       *
       * This program is free software; you can redistribute it and/or
       * modify it under the terms of the GNU General Public License
       * version 2 as published by the Free Software Foundation.
       *
       *******************************
       *
       * REVISION HISTORY
       * Version 1.0 - Jay Austad
       * 
       * DESCRIPTION
       * This sketch provides an example how to implement a distance sensor using Maxbotix sensor with RS232 output 
       * http://www.mysensors.org/build/xxx
      
       The circuit:
       * RX is digital pin 3 (connect to RXD of MAX232)
       * TX is digital pin 4 (connect to TXD of MAX232)
      
       Note:
       Not all pins on the Mega and Mega 2560 support change interrupts,
       so only the following can be used for RX:
       10, 11, 12, 13, 50, 51, 52, 53, 62, 63, 64, 65, 66, 67, 68, 69
      
       Not all pins on the Leonardo support change interrupts,
       so only the following can be used for RX:
       8, 9, 10, 11, 14 (MISO), 15 (SCK), 16 (MOSI).
      
       This example uses code written by Henrik EKblad, Tom Igoe, Mikal Hart, and Jay Austad
       */
      
      #include <SoftwareSerial.h>
      #include <SPI.h>
      #include <MySensor.h>  
      
      #define CHILD_ID 1
      
      MySensor gw;
      MyMessage msg(CHILD_ID, V_DISTANCE);
      boolean metric = true; 
      SoftwareSerial mySerial(3, 4); // RX, TX
      float mm;
      float inches;
      float dist;
      float lastDist;
      
      void setup() {
        gw.begin();
      
        // Send the sketch version information to the gateway and Controller
        gw.sendSketchInfo("Distance Sensor", "1.0");
      
        // Register all sensors to gw (they will be created as child devices)
        gw.present(CHILD_ID, S_DISTANCE);
        metric = gw.getConfig().isMetric;
      
        Serial.println("Maxbotix RS232 Mysensors Sketch");
      
        // set the data rate for the SoftwareSerial port
        mySerial.begin(9600);
      }
      
      void loop() { // run over and over
        if (mySerial.available() > 0) {
          mm = mySerial.parseFloat();
          if (mm != 0) {
            inches = mm/25.4;
            dist = metric?mm:inches;
            Serial.print(dist);
            Serial.println(metric?" mm":" in");
          }
        
          if (dist != lastDist) {
            gw.send(msg.set(dist, 2));
            lastDist = dist;
          }
        }
      }
      
      posted in Hardware
      signal15
      signal15
    • RE: Maxbotix RS232 distance sensor - UPDATE - working

      Ok, I am making some progress. I connected the MAX232 to D3 and D4, and I'm able the read the output from the sensor. One thing to note is that the MAX232 module I bought requires a null modem cable if you're not connecting it to a PC. I just popped the plug apart on the end of my cable and swapped pins 2 and 3 and then it worked.

      But, I'm having an issue. When I read the values from the sensor, I get an alternating correct reading, followed by a reading of "0". The raw output does not have a 0 in it. Here's my code, followed by the output:

      void loop() { // run over and over
        if (mySerial.available() > 0) {
          mm = mySerial.parseFloat();
          inches = mm/25.4;
          Serial.print(mm);
          Serial.print(" mm, ");
          Serial.print(inches);
          Serial.println(" inches");
        }
      }
      

      And here's the output:
      Maxbotix RS232 Mysensors Sketch
      812.00 mm, 31.97 inches
      0.00 mm, 0.00 inches
      812.00 mm, 31.97 inches
      0.00 mm, 0.00 inches
      812.00 mm, 31.97 inches
      0.00 mm, 0.00 inches
      812.00 mm, 31.97 inches
      0.00 mm, 0.00 inches
      812.00 mm, 31.97 inches

      I know I can put an if statement to filter out the zero reading. But, I'm wondering what the root cause of this is and if I can fix it a better way.

      posted in Hardware
      signal15
      signal15
    • RE: Maxbotix RS232 distance sensor - UPDATE - working

      I've got a MAX232, which is apparently needed because the Maxbotix sensor has an inverted output. I've connected it to the TX and RX ports on my Nano. All of the SoftwareSerial examples I see use digital pins on the arduino, not the RX and TX lines.

      Should I connect the RX and TX on the MAX232 to digital ports instead, or is there a way to read the RX port with SoftwareSerial? Or, do I not need SoftwareSerial to read the RX port?

      posted in Hardware
      signal15
      signal15
    • RE: BME280 temp/humidity/pressure sensor

      @hek

      Let me know if you make a change and need me to test.

      posted in Hardware
      signal15
      signal15
    • RE: BME280 temp/humidity/pressure sensor

      Do you have to upgrade the files on the controller to 2.0b as well? I have a vera, and when I added this new sensor on 2.0b, all of my nodes stopped updating and the tiles for them on the Devices screen doesn't list anything about the sensor like it normally does.

      I get these errors in the Vera logs:

      02	05/06/16 18:54:40.167	Device_Service::MatchupUpnpServices no upnp service for urn:upnp-arduino-cc:serviceId:arduino1 <0x2ac17000>
      02	05/06/16 18:54:40.170	Device_Service::MatchupUpnpServices no upnp service for urn:upnp-arduino-cc:serviceId:arduinonode1 <0x2ac17000>
      02	05/06/16 18:54:40.171	Device_Service::MatchupUpnpServices no upnp service for urn:upnp-arduino-cc:serviceId:arduinonode1 <0x2ac17000>```
      

      Also, the MySensors parent device disappeared from my Devices page in Vera. If I telnet to my gateway on port 5003, I only see the new sensor reporting as well, not any of my other sensors. Did the 2.0b sensor do something bad to my gateway or the Vera plugin?

      Update: I deleted the new devices created from the 2.0b sensor in my Vera. This fixed it so the other node information showed up again, and the MySensors parent device showed up. But, my 1.5 sensors were no longer updating. I restarted them, and they started updating.

      If 2.0 sensors are designed to be backwards compatible with a 1.5 gateway and 1.5 controller code, then there's a problem somewhere. Maybe it's with the Vera code. But, like I said, I telneted to port 5003 on my gateway, and the only thing that the gateway was receiving was the data from my 2.0b sensor. Either the gateway was ignoring the 1.5 sensors, or the 1.5 sensors stopped sending for some reason.

      Thoughts?

      posted in Hardware
      signal15
      signal15
    • RE: BME280 temp/humidity/pressure sensor

      @emc2

      Oh, I thought that you had to upgrade the gateway as well. If that's the case, then I'll grab 2.0. Do I just go to the dev branch in github and hit download ZIP?

      posted in Hardware
      signal15
      signal15
    • RE: BME280 temp/humidity/pressure sensor

      @emc2

      Eh, looks like there's a lot more that I have to do to get this working, like moving the presentation into the setup() function.

      posted in Hardware
      signal15
      signal15
    • RE: BME280 temp/humidity/pressure sensor

      Ah, looks like I just need to add "gw." in front of all of these functions and "MySensor gw;" just after the includes.

      posted in Hardware
      signal15
      signal15
    • RE: BME280 temp/humidity/pressure sensor

      @emc2

      I'm getting some problems compiling the code you provided above. Is this for 1.6 or something? I'm on 1.5, do I need to change some function names?

      Arduino/Mysensors_BME280/Mysensors_BME280.ino: In function 'void setup()':
      Mysensors_BME280:252: error: 'getConfig' was not declared in this scope
         metric = getConfig().isMetric;
                            ^
      /Users/jay.austad/Documents/Arduino/Mysensors_BME280/Mysensors_BME280.ino: In function 'void presentation()':
      Mysensors_BME280:258: error: 'sendSketchInfo' was not declared in this scope
         sendSketchInfo("BME280 Sensor", "1.6");
                                              ^
      Mysensors_BME280:261: error: 'present' was not declared in this scope
         present(BARO_CHILD, S_BARO);
                                   ^
      /Users/jay.austad/Documents/Arduino/Mysensors_BME280/Mysensors_BME280.ino: In function 'void loop()':
      Mysensors_BME280:328: error: 'send' was not declared in this scope
           send(tempMsg.set(temperature, 1));
                                           ^
      Mysensors_BME280:335: error: 'send' was not declared in this scope
           send(humMsg.set(humidity, 1));
                                       ^
      Mysensors_BME280:341: error: 'send' was not declared in this scope
           send(pressureMsg.set(pressure, 2));
                                            ^
      Mysensors_BME280:347: error: 'send' was not declared in this scope
           send(forecastMsg.set(weather[forecast]));
                                                  ^
      Mysensors_BME280:351: error: 'sleep' was not declared in this scope
         sleep(SLEEP_TIME);
                         ^
      exit status 1
      'getConfig' was not declared in this scope```
      posted in Hardware
      signal15
      signal15
    • RE: BME280 temp/humidity/pressure sensor

      Awesome. I just got it working with a test sketch like 2 minutes ago. If I get a working sketch for MySensors, how can I get it uploaded to the site as an example?

      Also, if anyone has done it before, I'd appreciate any code you might have to save some time. I only get like 5 minutes here an there to work on this.

      posted in Hardware
      signal15
      signal15
    • BME280 temp/humidity/pressure sensor

      Has anyone built a node that uses the BME280 temp/humidity/pressure sensor?

      I'm guessing if I build it from scratch, the HumiditySensor example would probably be the best one to use. One thing I saw was that someone is working on an ESP8266 weather station gateway with this sensor, and in his comments, it appears that you have to do some funky stuff with moving the CE pin somewhere else or it interferes with the I2C communication for this chip. I would be doing this on a Nano, not an ESP. Are the pin changes the same?

      posted in Hardware
      signal15
      signal15
    • RE: Cannot detect my ds18b20 temp probes

      @gregl

      Through the Vera UI. But, I just got it working. I got a new power supply for the ESP board, and then I used tin foil to shield my gateway.

      posted in Troubleshooting
      signal15
      signal15
    • RE: Newbie questions

      Well, it's working now. I put a new power supply on it, and shielded the radio. Before I go dotting my house with sensors, is there anything I should do in MyConfig.h or anywhere else? It looks like debugging is turned on by default. Should I leave it?

      Also, even though I got it working, any insight to the above questions would certainly still be appreciated.

      0_1462224034376_IMG_20160502_161633.jpg

      posted in Hardware
      signal15
      signal15
    • Shielding an NRF24l01+PA

      Someone had a tutorial on how to shield them to improve reliability and range. It involved wrapping the board with something non-conductive like tape or plastic wrap, and then wrapping tin foil over it making sure it didn't touch anything it shouldn't.

      I've done this to mine, but, I have a question on grounding. The tutorial did not ground the shield. But, it's my understanding that shielding really only works when it's grounded. Can anyone confirm or deny this?

      posted in Hardware
      signal15
      signal15
    • Newbie questions

      I'm new to this and I'm really not getting anywhere. I have numerous problems, the most significant of which is sensors not showing up in inclusion mode. So, I want to take a step back and ask the questions I should have probably asked before I even got started. First, here's my setup:

      • Latest Arduino IDE, with libraries from GitHub Master branch of Mysensors (appears to be version 1.5)
      • ESP8266 board from amazon for the gateway with the higher output NRF with antenna, also tried with a regular NRF
      • 47uf caps added to all radios, adding shielding on the high power one later tonight.
      • Nano's for the sensors
      • Vera on UI5

      So, here are my questions:

      1. Am I using the version of the libraries I should be? Or, is something in the dev branch considered more stable or reliable?
      2. If I'm NOT using the correct version of the libraries, does that mean I will have to also update the version running on Vera?
      3. I see a lot of issues with the ESP8266 in the forums. Should I be building a W5100 ethernet gateway instead?
      4. I tried clearing the EEPROM in my ESP8266 using the clear EEPROM example code included with MySensors. I'm not sure if it worked, as I get nothing on the serial interface like I do when clearing a Nano. Should I be using a different sketch to clear the ESP?
      5. I see that someone has built a raspberry pi serial gateway. How easy would it be to make it into an ethernet gateway? Would that be a more reliable option?
      6. For the RF24 scanner code, it says to "// Set up nRF24L01 radio on SPI bus plus pins 9 & 10". What does this mean? There are 7 pins that are normally connected, do I only hook up a subset of these? https://maniacbug.github.io/RF24/scanner_8pde-example.html

      I know the high power radio needs an external power supply to work reliably. I get intermittent "radio init fail" if I try to power it from the ESP8266 3v3 pin, but I don't get these failures when I power it externally.

      Initially, I'm trying to do 2 things. I'm trying to do smart control of an attic fan, and monitor the depth in a septic tank which has the predisposition to overflow.

      If anyone has any info that will help me get going, I would be eternally grateful. I'm at the point now where I'm just spinning my wheels and not making any progress.

      posted in Hardware
      signal15
      signal15
    • RE: ESP8266 WiFi gateway port for MySensors

      Is anyone having luck running the ESP without problems at all? I'm on 1.5 and it's my first gateway, and I cannot get sensors to include. Should I try the development branch? Or, should I build a different gateway altogether? I just need something that works at this point.

      posted in Development
      signal15
      signal15
    • Maxbotix RS232 distance sensor - UPDATE - working

      I have a Maxbotix distance sensor that talks over RS232. Every second, it sends the distance in MM in this format: "Rxxx\n" where xxx is a number in MM.

      Can I make this work easily with RS232? The sensor also supports analog and pulse methods. However, the sensor is inside of a septic tank. And, to change it to pulse or analog, I would have to open up the tank and get the stinky sensor out of it, solder on another wire, and put it back. I really do not feel like trying to get thing thing out of the tank to modify it.

      posted in Hardware
      signal15
      signal15
    • Is the dev branch better than 1.5?

      I'm trying to use 1.5 on and ESP8266 for a gateway (with the NRF+ radio with antenna), and sensors with the standard NRF+ radio on Nanos. I cannot for the life of me get the sensors to include. I see the sensors sending data in the serial console on the gateway, but the do not include and the controller cannot see them. Lot's of st=bc instead of st=ok. It doesn't appear any of the sensors are getting assigned an ID.

      My controller is a Vera on UI5. If I did go to the dev branch or a beta, would I need to update the files on that as well?

      I've been messing with this actively for over 30 hours. I'm ready to throw in the towel.

      Any suggestions here?

      posted in Development
      signal15
      signal15
    • RE: Cannot detect my ds18b20 temp probes

      So I cleared EEPROM on both the sensor and gw. I deleted the Mysensors device in Vera and recreated it.

      Now, this is what I get on the sensor, and I can see all messages received on the gw. But, it seems my sensor is still not registering with the gateway/controller. Before I was occasionally getting st=ok on the sensor, now it's st=bc. Any thoughts?

      ind parent
      send: 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,st=bc:
      sensor started, id=255, parent=255, distance=255
      find parent
      send: 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,st=bc:
      find parent
      send: 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,st=bc:
      Found 1 devices.
      find parent
      send: 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,st=bc:
      find parent
      send: 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,st=bc:
      21.50
      
      posted in Troubleshooting
      signal15
      signal15
    • RE: Inclusion mode not reliably starting

      Seems to be fixed. I cleared the EEPROM and reloaded the firmware.

      posted in Troubleshooting
      signal15
      signal15
    • RE: Cannot detect my ds18b20 temp probes

      This is what it says in the gw serial console when I manage to get it into inclusion mode and restart my sensor:

      Client 0: 0;0;3;0;5;1
      
      0;0;3;0;5;1
      0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0,sg=0:
      255;255;3;0;3;
      Client 0: 255;255;3;0;4;103
      
      0;0;3;0;9;send: 0-0-255-255 s=255,c=3,t=4,pt=0,l=3,sg=0,st=bc:103
      0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0,sg=0:
      255;255;3;0;3;
      Client 0: 255;255;3;0;4;104
      
      0;0;3;0;9;send: 0-0-255-255 s=255,c=3,t=4,pt=0,l=3,sg=0,st=bc:104
      0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0,sg=0:
      255;255;3;0;3;
      Client 0: 255;255;3;0;4;105
      
      0;0;3;0;9;send: 0-0-255-255 s=255,c=3,t=4,pt=0,l=3,sg=0,st=bc:105
      0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0,sg=0:
      255;255;3;0;3;
      Client 0: 255;255;3;0;4;106
      
      0;0;3;0;9;send: 0-0-255-255 s=255,c=3,t=4,pt=0,l=3,sg=0,st=bc:106
      0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0,sg=0:
      255;255;3;0;3;
      Client 0: 255;255;3;0;4;107
      
      0;0;3;0;9;send: 0-0-255-255 s=255,c=3,t=4,pt=0,l=3,sg=0,st=bc:107
      0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0,sg=0:
      255;255;3;0;3;
      Client 0: 255;255;3;0;4;108
      
      0;0;3;0;9;send: 0-0-255-255 s=255,c=3,t=4,pt=0,l=3,sg=0,st=bc:108
      0;0;3;0;5;0
      0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0,sg=0:
      255;255;3;0;3;
      Client 0: 255;255;3;0;4;109
      
      0;0;3;0;9;send: 0-0-255-255 s=255,c=3,t=4,pt=0,l=3,sg=0,st=bc:109
      0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0,sg=0:
      255;255;3;0;3;
      Client 0: 255;255;3;0;4;110
      
      0;0;3;0;9;send: 0-0-255-255 s=255,c=3,t=4,pt=0,l=3,sg=0,st=bc:110
      0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0,sg=0:
      255;255;3;0;3;
      Client 0: 255;255;3;0;4;111
      
      0;0;3;0;9;send: 0-0-255-255 s=255,c=3,t=4,pt=0,l=3,sg=0,st=bc:111
      0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0,sg=0:
      255;255;3;0;3;
      Client 0: 255;255;3;0;4;112
      
      0;0;3;0;9;send: 0-0-255-255 s=255,c=3,t=4,pt=0,l=3,sg=0,st=bc:112
      

      The Vera didn't find any devices. Is it a problem with the gateway maybe not requesting the ID from the sensor?

      posted in Troubleshooting
      signal15
      signal15
    • Inclusion mode not reliably starting

      I built the ESP8266 wifi gateway and connected it to my Vera. Communication is working fine between them, but the gateway will only intermittently go into inclusion mode. When I click the Start button in Vera, I can see the data being sent to the gateway to start inclusion mode, both in the Vera logs, and in the serial console:

      Client 0: 0;0;3;0;5;1
      
      0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0,sg=0:
      255;255;3;0;3;
      Client 0: 255;255;3;0;4;58
      
      0;0;3;0;9;send: 0-0-255-255 s=255,c=3,t=4,pt=0,l=2,sg=0,st=bc:58
      Client 0: 0;0;3;0;5;1
      
      

      Sometimes it will go into inclusion mode. But, when it doesn't, I have to reboot the gateway and try again. Sometimes inclusion mode will continue to work for 3 or 4 more tries, or, it will not and I will have to reboot to get it working again.

      Any thoughts? I've tried 2 different radios. One of the normal tiny ones, and then the version of it with the SMA connector and antenna on it. Same results with both.

      posted in Troubleshooting
      signal15
      signal15
    • RE: Cannot detect my ds18b20 temp probes

      Yes, they work. So I went back to the example code provided on mysensors.org, and I added some Serial.print commands. Here's the output when I start the sensor now:

      sensor started, id=255, parent=0, distance=1
      req id
      send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=ok:
      req id
      send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=ok:
      Found 1 devices.
      req id
      send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=ok:
      req id
      send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=ok:
      25.00
      

      It says it found one device, and that 25.00 is the temp in C for it. So, it IS finding it. It just seems inclusion is not working, even it appears my gateway is seeing data from the sensor when I look at it in the serial monitor.

      posted in Troubleshooting
      signal15
      signal15
    • Cannot detect my ds18b20 temp probes

      I built a wifi gateway to work with the Vera. I can see in the Vera logs where it goes into inclusion mode, but nothing is detected.

      My sensor that I'm trying to include is a Nano, with a single ds18b20 remote probe connected to it. It has red, green, and yellow wires. I have tried using both the green and the yellow as data, and it doesn't make a difference. There's a 4.7k resistor across VCC and data. VCC is plugged into 5v. I'm using the DallasTemperatureSensor example code, with the only change being COMPARE_TEMP set to 0.

      When I power up the sensor, I can see in the serial console on the gateway data being received from it:

      0;0;3;0;9;send: 0-0-255-255 s=255,c=3,t=4,pt=0,l=2,sg=0,st=bc:49
      0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0,sg=0:
      255;255;3;0;3;
      Client 0: 255;255;3;0;4;50
      
      0;0;3;0;9;send: 0-0-255-255 s=255,c=3,t=4,pt=0,l=2,sg=0,st=bc:50
      0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0,sg=0:
      255;255;3;0;3;
      Client 0: 255;255;3;0;4;51
      
      0;0;3;0;9;send: 0-0-255-255 s=255,c=3,t=4,pt=0,l=2,sg=0,st=bc:51
      0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0,sg=0:
      255;255;3;0;3;
      Client 0: 255;255;3;0;4;52
      
      0;0;3;0;9;send: 0-0-255-255 s=255,c=3,t=4,pt=0,l=2,sg=0,st=bc:52```
      

      Is there any way to issue a serial command to the sensor to see if it's even detecting it? I've checked and rechecked nearly everything and cannot figure this out. Is there any code I can put into the sensor to give more verbose troubleshooting?

      posted in Troubleshooting
      signal15
      signal15