Navigation

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

    edsteve

    @edsteve

    10
    Reputation
    42
    Posts
    792
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    edsteve Follow

    Best posts made by edsteve

    • RE: <SOLVED>Domoticz adds constantly new devices when using manual DeviceAddress for DS18B20

      Yeahaa. Thanks so much. I really appreciate it!
      Some small changes with temp4 and works like a charm. If you don't accept my offer. Then the transfer goes to mysensors community 🙂

      Here the working code IF someone need it or i loose mine 😉

      #define MY_RADIO_NRF24
      #define MY_DEBUG
      #include <MySensors.h>
      #include <SPI.h>
      #include <OneWire.h>
      #include <DallasTemperature.h>
      
      // Data wire is plugged into port 2 on the Arduino 
      #define ONE_WIRE_BUS 4 
      #define TEMPERATURE_PRECISION 10 
       
      // Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs) 
      OneWire oneWire(ONE_WIRE_BUS); 
      
      // Pass our oneWire reference to Dallas Temperature. 
      DallasTemperature sensors(&oneWire); 
      
      #define NODE_ID 1
      #define CHILD_ID_WIND 1
      #define CHILD_ID_TEMP1 3
      #define CHILD_ID_TEMP2 4
      #define CHILD_ID_TEMP3 5
      #define CHILD_ID_TEMP4 6
      #define CHILD_ID_TEMP5 7
      
      unsigned int val_wspeed;
      unsigned int val_wgust;
      unsigned int val_wdirection;
      
      
      unsigned int last_wspeed;
      unsigned int last_wgust;
      unsigned int last_wdirection;
      
      
      DeviceAddress  temp1 = { 0x28, 0xEE, 0xB6, 0xB1, 0x27, 0x16, 0x01, 0x1F };
      DeviceAddress  temp2 = { 0x28, 0xEE, 0xE1, 0x20, 0x28, 0x16, 0x01, 0xEA };
      DeviceAddress  temp3 = { 0x28, 0xEE, 0x0D, 0xAA, 0x24, 0x16, 0x02, 0x8A };
      DeviceAddress  temp4 = { 0x28, 0xEE, 0x7D, 0xA8, 0x24, 0x16, 0x02, 0xE0 };
      DeviceAddress  temp5 = { 0x28, 0xFF, 0xF6, 0x8F, 0x62, 0x16, 0x03, 0x7F };
      
      
      
      MyMessage msgWSpeed(CHILD_ID_WIND, V_WIND);
      MyMessage msgWGust(CHILD_ID_WIND, V_GUST);
      MyMessage msgWDirection(CHILD_ID_WIND, V_DIRECTION);
      MyMessage msg(0,V_TEMP);
      
      void setup(void) 
      {
        // start serial port
        Serial.begin(115200);
        Serial.println("Dallas Temperature IC Control Library Demo");
      
        // Start up the library
        sensors.begin();
      
        // report parasite power requirements
        Serial.print("Parasite power is: "); 
        if (sensors.isParasitePowerMode()) Serial.println("ON");
        else Serial.println("OFF");
      
        // set the resolution to 9 bit
        sensors.setResolution(temp1, TEMPERATURE_PRECISION);
        sensors.setResolution(temp2, TEMPERATURE_PRECISION);
        sensors.setResolution(temp3, TEMPERATURE_PRECISION);
        sensors.setResolution(temp4, TEMPERATURE_PRECISION);
        sensors.setResolution(temp5, TEMPERATURE_PRECISION);
      
      }
      
      void presentation()
      {
          present(CHILD_ID_WIND, S_WIND);
          present(CHILD_ID_TEMP1, S_TEMP);
          present(CHILD_ID_TEMP2, S_TEMP);
          present(CHILD_ID_TEMP3, S_TEMP);
          present(CHILD_ID_TEMP4, S_TEMP);
          present(CHILD_ID_TEMP5, S_TEMP);
      }
      
      void loop()
      {  
        // call sensors.requestTemperatures() to issue a global temperature 
        // request to all devices on the bus
        Serial.print("Requesting temperatures...");
        sensors.requestTemperatures();
        Serial.println("DONE");
      
        // print the device information
        float east = sensors.getTempC(temp1);
        Serial.print("East C: ");
        Serial.println(east);
        send(msg.setSensor(CHILD_ID_TEMP1).set(east,1));
      
        float north = sensors.getTempC(temp2);
        Serial.print("North  C: ");
        Serial.println(north);
        send(msg.setSensor(CHILD_ID_TEMP2).set(north,1));
      
        float west = sensors.getTempC(temp5);
        Serial.print("West  C: ");
        Serial.println(west);
        send(msg.setSensor(CHILD_ID_TEMP5).set(west,1));
      
        float south = sensors.getTempC(temp3);
        Serial.print("South C: ");
        Serial.println(south);
        send(msg.setSensor(CHILD_ID_TEMP3).set(south,1));
      
        float out = sensors.getTempC(temp4);
        Serial.print("Test  C: ");
        Serial.println(out); 
        send(msg.setSensor(CHILD_ID_TEMP4).set(out,1)); 
        
        // calculating wind direction form temperature differences
          if (north > south && north > west && north > east ) {
          Serial.println("SOUTH");
          unsigned int val_wdirection = 180; 
             send(msgWDirection.set(val_wdirection));
             Serial.print("WD: ");
             Serial.println(val_wdirection);
          }
      
          if (east > north && east > west && east > south ) {
          Serial.println("WEST");
          unsigned int val_wdirection = 280; 
             send(msgWDirection.set(val_wdirection));
             Serial.print("WD: ");
             Serial.println(val_wdirection);
          }
      
           if (south > north && south > west && south > east ) {
          Serial.println("NORTH");
          unsigned int val_wdirection = 0; 
             send(msgWDirection.set(val_wdirection));
             Serial.print("WD: ");
             Serial.println(val_wdirection);
          }
      
          if (west > north && west > south && west > east ) {
          Serial.println("EAST");
          unsigned int val_wdirection = 90; 
             send(msgWDirection.set(val_wdirection));
             Serial.print("WD: ");
             Serial.println(val_wdirection);
          }
        
        //domoticz must see speed and gust so i give random numbers for testing
        unsigned int val_wspeed = 17; 
          if(last_wspeed != val_wspeed)
          { 
             last_wspeed = val_wspeed;
             send(msgWSpeed.set(val_wspeed, 1));
             Serial.print("WS: ");
             Serial.println(val_wspeed);
          }
          
          unsigned int val_wgust = 5; 
          if(last_wgust != val_wgust)
          { 
             last_wgust = val_wgust;
             send(msgWGust.set(val_wgust, 1));
             Serial.print("WG: ");
             Serial.println(val_wgust);
          }
      
            delay (5000);
      }
      
      posted in Domoticz
      edsteve
      edsteve
    • RE: HC-SR04 (Distance) only sends data with connected serial converter?

      Thanks for your reply.
      I was dealing with it for 3 hours now. Grml. But as usual i figured it out right after this post. The trigger pin was connected to the wrong Arduino pin (4 instead of 6). Of course i didin't check it, because it still worked with connected serial converter. How strange.

      So i guess this post can be deleted due to waste of space.

      Cheeers
      ED

      posted in Troubleshooting
      edsteve
      edsteve
    • RE: Humidity and Temp examples. Where are they?

      Okay. So that means all the MySensor examples in the Arduino IDE only use Mysensors.h and no external library.

      Thx for the info. That explains it.

      posted in General Discussion
      edsteve
      edsteve
    • RE: [SOLVED] Long distance radios not working with mySensors code (nrf24l01+)

      Hey Vidd,

      Thanks for your perfect answer and the diagram. Useful info for newbie like me 🙂
      I tried external power for the radio and it worked right away. I got mislead from the fact that the radio worked with a simple test code but not with mysensors code.

      posted in Hardware
      edsteve
      edsteve
    • RE: <SOLVED> What is wrong with my S_Wind V_Direction value? Never changes...

      My mistake. I actually edit it right after i posted. But i think you were faster than me 🙂
      Yeah. I read about the magic number 16. Thats why i test with 15 😄
      If i understand that right Domoticz goes from 0 to 16 instead of 0 to 360. So 15 should do fine.
      So now i am out of guesses and clues 😕

      posted in Domoticz
      edsteve
      edsteve
    • RE: Two motion sensors on one Arduino. How?

      Thanks for your answer. Great that it is possible even-though it will take some time for me as a noob.
      But as usual: every problem has a solution. Just have to find (ask for) it 💃

      posted in Hardware
      edsteve
      edsteve
    • RE: Battery status does not show in Domoticz

      @gohan
      I also have that info from the domoticz forum and i tried it. Tailing the new log file... still no more details. I give up...
      Maaaybe... when i have motivation again i will try to read about @sunberg84 solution. But i am just not a linux expert.

      Grml... never like it to live with an unsolved problem. But thx for the effort everyone.

      Here is the link to the domoticz forum about the logging problem

      posted in Domoticz
      edsteve
      edsteve
    • RE: Domoticz V_TEXT sensor now bidirectional

      Thanks. Found it.

      posted in Domoticz
      edsteve
      edsteve

    Latest posts made by edsteve

    • RE: MOSFET as relay to keep ESP on until GPIO is low

      Thx for the link.
      For more info about the solution in this video perfectly explained:
      #101 Long lasting DIY "Amazon Dash Button" using an ESP8266 – 06:36
      — Andreas Spiess

      He uses a NDP6020 for Mosfet. The datasheet says:
      Vgs(th) (Max) @ id: 1V @250uA
      Gate Charge (Qg) @ Vgs:35nC @ 5V

      Is 1V the max i can connect to the Gate? That can't be true!?

      posted in Hardware
      edsteve
      edsteve
    • RE: MOSFET as relay to keep ESP on until GPIO is low

      @kimot
      Do you have a common P-Channel Mosfet in mind which works for this project? I am struggling finding the right one.

      posted in Hardware
      edsteve
      edsteve
    • RE: MOSFET as relay to keep ESP on until GPIO is low

      Hmm... it worked for a while with the 10K resistor but now not any more.
      I guess i have to change the Mosfet to a P-Channel version.

      posted in Hardware
      edsteve
      edsteve
    • RE: MOSFET as relay to keep ESP on until GPIO is low

      Thanks. I understand that my MOSFET is not the best choice. But that's the only one i have here right now.

      The 10K resistor solved my problem. Works great. Thanks for the tip.

      posted in Hardware
      edsteve
      edsteve
    • MOSFET as relay to keep ESP on until GPIO is low

      Hi,

      Aim:
      When a door contact reed switch is triggered it should turn ON the Wemos D1, send some data to IFTTT and turn itself OFF after that.

      Function:
      So the Wemos D1 is OFF all the time (to save battery) till the reed switch (SW) turns on the Wemos D1. When the Wemos is ON it triggers the MOSFET by setting GPIO5 to HIGH and keeps itself alive (even without the reed switch) until GIOP5 is set to LOW which turns off the Wemos.

      Problems:
      But i get strange behavior. In general it works. But after the GPIO is set to LOW the hole thing still draws 0,03Amps. And sometimes it draws 0.1Amps and i have no idea why.

      Did i use the right parts? Should i add a resistor somewhere?

      Here is my code (which only explains the function) and some schematics.

      int SWITCH = 5;
      
      void setup() {
      
        pinMode(SWITCH, OUTPUT);
        digitalWrite(SWITCH, HIGH);   // Trigger the MOSFET to stay ON
      
        // Do stuff.... for example send data to IFTT with the ESP8266_To_IFTTT 
      
        digitalWrite(SWITCH, LOW);    // Turn off the Wemos D1
      }
      
      // the loop function runs over and over again forever
      void loop() {
      yield();                      // do nothing
      }
      

      alt text

      posted in Hardware
      edsteve
      edsteve
    • RE: Domoticz V_TEXT sensor now bidirectional

      Thanks. Found it.

      posted in Domoticz
      edsteve
      edsteve
    • RE: Domoticz V_TEXT sensor now bidirectional

      Hey,

      yes. I think that has to do with this error i am getting since i updated Domoticz:

      2018-07-07 10:56:10.962 Error: MySensors: Text update received for unknown node_id: 2, child_id: 87
      2018-07-07 10:56:12.638 Error: MySensors: Text update received for unknown node_id: 2, child_id: 87
      2018-07-07 10:56:14.307 Error: MySensors: Text update received for unknown node_id: 2, child_id: 87
      2018-07-07 11:06:06.240 Error: MySensors: Text update received for unknown node_id: 2, child_id: 87
      2018-07-07 11:06:08.005 Error: MySensors: Text update received for unknown node_id: 2, child_id: 87
      2018-07-07 11:06:09.660 Error: MySensors: Text update received for unknown node_id: 2, child_id: 87
      2018-07-07 11:16:01.821 Error: MySensors: Text update received for unknown node_id: 2, child_id: 87
      2018-07-07 11:16:03.607 Error: MySensors: Text update received for unknown node_id: 2, child_id: 87
      2018-07-07 11:16:05.250 Error: MySensors: Text update received for unknown node_id: 2, child_id: 87
      2018-07-07 11:25:54.471 Error: MySensors: Text update received for unknown node_id: 2, child_id: 87
      2018-07-07 11:25:56.130 Error: MySensors: Text update received for unknown node_id: 2, child_id: 87
      2018-07-07 11:25:57.782 Error: MySensors: Text update received for unknown node_id: 2, child_id: 87
      2018-07-07 11:35:51.868 Error: MySensors: Text update received for unknown node_id: 2, child_id: 87
      2018-07-07 11:35:53.537 Error: MySensors: Text update received for unknown node_id: 2, child_id: 87
      2018-07-07 11:35:55.196 Error: MySensors: Text update received for unknown node_id: 2, child_id: 87
      2018-07-07 11:45:47.051 Error: MySensors: Text update received for unknown node_id: 2, child_id: 87
      2018-07-07 11:45:48.865 Error: MySensors: Text update received for unknown node_id: 2, child_id: 87
      2018-07-07 11:45:50.579 Error: MySensors: Text update received for unknown node_id: 2, child_id: 87
      2018-07-07 11:55:47.429 Error: MySensors: Text update received for unknown node_id: 2, child_id: 87
      2018-07-07 11:55:49.137 Error: MySensors: Text update received for unknown node_id: 2, child_id: 87
      2018-07-07 11:55:50.788 Error: MySensors: Text update received for unknown node_id: 2, child_id: 87
      

      I don't know which sensor is involved with that Error.
      How do i debug that if i don't know my node-ID's? 😉

      posted in Domoticz
      edsteve
      edsteve
    • RE: HC-SR04 (Distance) only sends data with connected serial converter?

      Thanks for your reply.
      I was dealing with it for 3 hours now. Grml. But as usual i figured it out right after this post. The trigger pin was connected to the wrong Arduino pin (4 instead of 6). Of course i didin't check it, because it still worked with connected serial converter. How strange.

      So i guess this post can be deleted due to waste of space.

      Cheeers
      ED

      posted in Troubleshooting
      edsteve
      edsteve
    • HC-SR04 (Distance) only sends data with connected serial converter?

      Hallo,

      Hardware:
      i have an Arduino pro mini 5V connected to a HC-SR04 sensor and using the standard mysensors code unchanged. It runs on a 3,7V battery with a stepUp Buck converter to 5V (LM2596) which i use in many projects. The data is sent via NRF24L01+ which has it's own converter.

      It works flawless when the USB to Serial adapter (FT232BL) is connected. Every 5 seconds a reading.
      But when i let the sensor "run by itself" i can see that the sensor gets registered in Domoticz, but Domoticz does not receive any data. When i plug in the serial converter. Domoticz gets all the data as it should be.

      I also unplugged the power wires from the serial converter to see if it is a power issue. But same result.
      I do actually get a reading sometimes. Maybe every 2 minutes or so instead of every 5 seconds. But even that has the wrong values (always 0cm)

      Drives me crazy. What is that?

      Thx for thinking with me
      ED

      posted in Troubleshooting
      edsteve
      edsteve
    • RE: Battery status does not show in Domoticz

      Sorry guys. Not at home lately. I will report if and what solved my problem when i am back.

      posted in Domoticz
      edsteve
      edsteve