Navigation

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

    stress nero

    @stress nero

    0
    Reputation
    15
    Posts
    468
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    stress nero Follow

    Best posts made by stress nero

    This user hasn't posted anything yet.

    Latest posts made by stress nero

    • Vera luup engine rebooting.

      After adding the sensors to vera edge I started to get random luup engine reboots i am not sure what i need to do to fix that issue. I am using RPI3 ethernet gateway. can one of u seasoned veterans take a look and see if i need to make any adjustments on the code side please. it also says controller did not repond under ALTUI.

      #define MY_DEBUG 
      #define MY_RADIO_NRF24
      #include <SPI.h>
      #include <MySensors.h>
      #include <DHT.h>
      
      #define DIGITAL_INPUT_WATER_SENSOR 5 // Digital input did you attach your soil sensor.
      
      #define CHILD_ID_HUM 0
      #define CHILD_ID_TEMP 1
      #define CHILD_ID_MOT 2   // Id of the sensor child
      #define CHILD_ID_LIGHT 3
      #define CHILD_ID_WAT 4      // Child id for Motion
      
      #define LIGHT_SENSOR_PIN A0 //Ambient light sensor reading 
      #define WATER_LEAK_PIN 5
      #define HUMIDITY_SENSOR_DIGITAL_PIN 4
      #define DIGITAL_INPUT_SENSOR 3   // The digital input you attached your motion sensor.  (Only 2 and 3 generates interrupt!)
      #define INTERRUPT DIGITAL_INPUT_SENSOR-2 // Usually the interrupt = pin -2 (on uno/nano anyway)
      
      
      unsigned long SLEEP_TIME = 30000; // Sleep time between reads (in milliseconds)
      
      DHT dht;
      float lastTemp;
      float lastHum;
      boolean metric = true; 
      uint16_t lastlux;
      
      MyMessage msgHum(CHILD_ID_HUM, V_HUM);
      MyMessage msgTemp(CHILD_ID_TEMP, V_TEMP);
      MyMessage msgMot(CHILD_ID_MOT, V_TRIPPED);
      MyMessage msgWat(CHILD_ID_WAT, V_TRIPPED);
      MyMessage msgLight(CHILD_ID_LIGHT,  V_LIGHT_LEVEL);
      int lastWaterValue = -1; 
      int lastLightLevel;
      
      void setup()  
      { 
        dht.setup(HUMIDITY_SENSOR_DIGITAL_PIN); 
        pinMode(DIGITAL_INPUT_SENSOR, INPUT);      // sets the motion sensor digital pin as input
        pinMode(DIGITAL_INPUT_WATER_SENSOR, INPUT);
        pinMode(LIGHT_SENSOR_PIN, INPUT);   
      } 
       
       void presentation()
      {   
        // Send the Sketch Version Information to the Gateway
        sendSketchInfo("Humidity/Motion", "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, S_MOTION);
        present(CHILD_ID_WAT, S_MOISTURE);
        present(CHILD_ID_LIGHT, S_LIGHT_LEVEL);  
      }
      
      void loop()
      {
        // Read digital motion value
          bool tripped = digitalRead(DIGITAL_INPUT_SENSOR) == HIGH;
      
          Serial.println(tripped);
          send(msgMot.set(tripped?"1":"0"));  // Send tripped value to gw
      
         
        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));
          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;
            send(msgHum.set(humidity, 1));
            Serial.print("H: ");
            Serial.println(humidity);
        
      }
      
      int WaterValue = digitalRead(DIGITAL_INPUT_WATER_SENSOR); // 1 = Not triggered, 0 = In water
      if (WaterValue != lastWaterValue) {
      Serial.println(WaterValue);
      if (WaterValue==0)
      {
      Serial.println("Water!!!");
      send(msgWat.set("Water"));
      }
      else
      {
      Serial.println("No Water");
      send(msgWat.set("No Water")); // Send tripped when water detected
      lastWaterValue = WaterValue;
      
      }
           // Read lux from TEMT6000
         uint16_t lightLevel = analogRead(LIGHT_SENSOR_PIN);  // 1000/1024
        if (int(lightLevel - lastLightLevel) > 5 || int(lastLightLevel - lightLevel) > 5) {
            send(msgLight.setSensor(CHILD_ID_LIGHT).set(lightLevel,1));
           }
       }
       // Sleep until interrupt comes in on motion sensor. Send update every two minute.
          sleep(digitalPinToInterrupt(DIGITAL_INPUT_SENSOR), CHANGE, SLEEP_TIME);
      }
      
      
      posted in Vera
      stress nero
      stress nero
    • RE: how to query domoticz's security panel

      thank for the input

      posted in Development
      stress nero
      stress nero
    • RE: how to query domoticz's security panel

      @sundberg84 can you give me an example, and with lua will you be able to have a button that can toggle the armed and bypassed states.

      posted in Development
      stress nero
      stress nero
    • RE: how to query domoticz's security panel

      @sundberg84 said in how to query domoticz's security panel:

      I use lua:

      if (devicechanged['Motiondetector'] == 'On' and otherdevices['Security Panel'] == 'Arm Away') then

      is there a way to put the motion sensor in bypassed mode or does it have to be a combination of the security panel being armed. I have a vera controller and there is a button to arm and bypass when in bypassed i get no alerts, how can that be done in domticz.

      posted in Development
      stress nero
      stress nero
    • RE: ESP8266 and Start inclusion doesnt work

      @riochicken I figured it out, i am using rpi3 and apparently a couple files in the mysensors folder needed to be edited. Now since you use vera when building the sensors are you making any special edits or just using defaults from the sketches. I see some people have sleep times and other small adjustments.

      posted in Vera
      stress nero
      stress nero
    • Vera and rpi3 setup that worked for me

      After looking for days asking and questions in the forums i finally got my rpi3 and vera ui7 setup properly with working inclusion button.
      1.use the master branch
      2. Before you add your ./configure settings ( dont include--my-gateway=ethernet --my-controller-url-address=) or u will prob get ethernet connect error).
      use putty and do sudo nano /home/pi/MySensors/configure
      then scroll down to function detect_machine and change it to match the settings below. link below were i found the info.
      link text

      function detect_machine {
      ...
          case $hardware in
      ...
          BCM2835)
              soc="BCM2835"
              if [[ $machine == "Raspberry"* ]]; then
                  local rev=($(detect_rpi_revision))
                  if [[ $rev == "a02082" || $rev == "a22082" ]]; then
                      tp="RPi3"
                  else
                      tp="Rpi2"
                  fi
              fi
              ;;```
      
      

      If the radio is wired properly after you run make and sudo ./bin/mysgw -d you should get a success message like in the tutoriallink text
      3 To get the start/include button to work after you upload the files to vera from link text
      using putty again sudo nano /home/pi/MySensors/examples_linux/mysgw.cpp and add
      #define MY_INCLUSION_MODE_FEATURE after that reboot and it should work. forgot where i found the info.

      posted in Vera
      stress nero
      stress nero
    • RE: ESP8266 and Start inclusion doesnt work

      when i use that library i cant get the it to run it always fails after make but it runs when i use the beta? can you post your steps also for the ip address we supposed to use the veras ip correct?

      posted in Vera
      stress nero
      stress nero
    • RE: ESP8266 and Start inclusion doesnt work

      I am having the same issue with RPI 3 ethernet gateway, vera says connected but nothing happens when i hit the pair button, also MYScontroller i see sensor and they talking so i think the gateway and sensors are working.

      posted in Vera
      stress nero
      stress nero
    • RE: TMT6000

      @stress-nero the light values was fixed bad jump wire position,
      ![alt text](0_1500037741362_upload-bc52de37-cdbc-47f8-aed4-288746977651 image url)

      posted in Troubleshooting
      stress nero
      stress nero