Navigation

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

    Posts made by ThomasDr

    • RE: WiFi Gateway (ESP8266) - reconnect to wifi router

      Hello,

      i try to build new Gateway for my Problem and Upload the same sketch, but the new Gateway do not connect to the router. I reminded the China NodeMCU have problems with Serial.begin and with WIFI.beginn. It need a delay after.
      I found the WIFI.begin in the "MyGatewayTransportEthernet.cpp" file and see a wait(500). See my last post wait/delay, so I changed from wait to delay and the Gateway connect.
      If you can try to change it too or change from 500 to 1000.
      But i use the 2.2.0 dev.

      regards
      Thomas

      posted in Troubleshooting
      ThomasDr
      ThomasDr
    • RE: WiFi Gateway (ESP8266) - reconnect to wifi router

      Hello,

      The NodeMCU looks like my.
      and your ESP8266 Arduino version?
      maybe there is a new version.
      What Router or Access Point do you use?

      regards
      ThomasD

      posted in Troubleshooting
      ThomasDr
      ThomasDr
    • RE: WiFi Gateway (ESP8266) - reconnect to wifi router

      @pihome Hello,

      and what type of ESP8266 you have?
      Can you try a other one?
      I have some NodeMCU V0.9 with TCP and UDP in client mode with AVM Router and Repeater.
      Without problems.

      regards
      ThomasD

      posted in Troubleshooting
      ThomasDr
      ThomasDr
    • RE: WiFi Gateway (ESP8266) - reconnect to controller

      Hello,

      there is a possibility to check the connection.
      I will test with receive command from controller to the gateway and write a timeout to reset the ESP with ESP.reset or ESP.restart.

      regards
      ThomasD

      posted in Troubleshooting
      ThomasDr
      ThomasDr
    • RE: WiFi Gateway (ESP8266) - reconnect to wifi router

      Hello,

      do you use only the Gateway Code or is there anybody else in your code?
      If you do anybody else you need delays in the code.
      I think the Arduino "delay()" not the "wait()".
      Wait do Mysensors things.
      Delay do WIFI things.

      regards
      ThomasDr

      posted in Troubleshooting
      ThomasDr
      ThomasDr
    • WiFi Gateway (ESP8266) - reconnect to controller

      Hello,

      in contrast to the topic "WiFi Gateway (ESP8266) - reconnect to Router", I have the problem with reconnecting to the controller.
      The Gateway is made of the nodeMCU V0.9 and the NRF24L01+ in TCP Client Mode.
      I try to reboot the Router, the Gateway connects easily, switch the AP, also no problem. Restart the Controller. But the Gateway does not reconnect.
      After rebooting the Gateway the connection stays immediately.
      Is there a solution for this?

      regards
      ThomasDr

      posted in Troubleshooting
      ThomasDr
      ThomasDr
    • RE: Connenct a RS485 Network to a NodeMCU Gateway?

      @rejoe2
      I'm assuming the Wifi is the best solution, but if RF868 would be better I'll look at it again.

      I also have a couple Xbee module Series 1, could you start something else?

      Perhaps also an idea add Xbee to the Mysensor API.

      regards
      ThomasD

      posted in Troubleshooting
      ThomasDr
      ThomasDr
    • RE: Connenct a RS485 Network to a NodeMCU Gateway?

      @rejoe2 said in Connenct a RS485 Network to a NodeMCU Gateway?:

      Just some guesses:

      Btw: What is your motivation to build a wired network and then connect the whole thing wirelessly to your controller? (I personally try to get rid of all RF transmissions, so this is why I use RS485 as preferred transport layer and connect the whole thing via USB...)

      Hello,

      i will build a few Sensors in the yard and i thing the best way to connect these Sensor Array to the Controller is WIFI.

      regards
      ThomasD

      posted in Troubleshooting
      ThomasDr
      ThomasDr
    • Connenct a RS485 Network to a NodeMCU Gateway?

      Hello,

      where connect the Pins DI, DE, RE, RO on the NodeMCU?
      And how do I define the pins in the sketch?

      regards
      ThomasD

      posted in Troubleshooting
      ThomasDr
      ThomasDr
    • RE: Doubt about a concept in GatewayESP8266

      Hello,

      i send a command at git, can any one test this fix?

      regards
      ThomasD

      posted in Troubleshooting
      ThomasDr
      ThomasDr
    • RE: Gas Meter Reading Using a Magnetometer

      @gohan Hello,
      My thought is simpler.
      The original sensor is too expensive.
      With a Reedcontact I must find the right position.
      The magnetometer I could simply attach somewhere in the proximity.

      regards
      ThomasD

      posted in My Project
      ThomasDr
      ThomasDr
    • RE: Gas Meter Reading Using a Magnetometer

      @Yveaux Sorry, it is 1 puls at 0.01 m3
      That depends on the gas meter you use, the BK4 gives a magnetic pulse per 0.01 m3.
      For this puls you can use a reed contact or a magnetometer.
      0_1486857534669_IMG_20170212_005723_649.jpg

      regards
      ThomasD

      posted in My Project
      ThomasDr
      ThomasDr
    • RE: Gas Meter Reading Using a Magnetometer

      Hello,

      here my sketch to form a puls:

      /***************************************************************************
        This is a library example for the HMC5883 magnentometer/compass
      
        Designed specifically to work with the Adafruit HMC5883 Breakout
        http://www.adafruit.com/products/1746
       
        *** You will also need to install the Adafruit_Sensor library! ***
      
        These displays use I2C to communicate, 2 pins are required to interface.
      
        Adafruit invests time and resources providing this open source code,
        please support Adafruit andopen-source hardware by purchasing products
        from Adafruit!
      
        Written by Kevin Townsend for Adafruit Industries with some heading example from
        Love Electronics (loveelectronics.co.uk)
       
       This program is free software: you can redistribute it and/or modify
       it under the terms of the version 3 GNU General Public License as
       published by the Free Software Foundation.
       
       This program is distributed in the hope that it will be useful,
       but WITHOUT ANY WARRANTY; without even the implied warranty of
       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
       GNU General Public License for more details.
      
       You should have received a copy of the GNU General Public License
       along with this program.  If not, see <http://www.gnu.org/licenses/>.
      
       ***************************************************************************/
      
      #include <Wire.h>
      #include <Adafruit_Sensor.h>
      #include <Adafruit_HMC5883_U.h>
      
      /* Assign a unique ID to this sensor at the same time */
      Adafruit_HMC5883_Unified mag = Adafruit_HMC5883_Unified(12345);
      
      unsigned long t = 0;
      unsigned long counter = 0;
      bool trigger = 0;
      float out = 0.0;
      
      void setup(void) 
      {
        Serial.begin(115200);
        //Serial.println("HMC5883 Magnetometer Test"); Serial.println("");
        
        /* Initialise the sensor */
        if(!mag.begin())
        {
          /* There was a problem detecting the HMC5883 ... check your connections */
          Serial.println("Ooops, no HMC5883 detected ... Check your wiring!");
          while(1);
        }
        
        /* Display some basic information on this sensor */
        // displaySensorDetails();
      }
      
      void loop(void) 
      {
        /* Get a new sensor event */ 
        sensors_event_t event; 
        mag.getEvent(&event);
       
        /* Display the results (magnetic vector values are in micro-Tesla (uT)) */
        out = event.magnetic.y;
        if (out > -0.7 && trigger == 0)
        {
        trigger = 1;
        Serial.println(trigger);
        }
        if (out < -110.5 && trigger == 1)
        {
        trigger = 0;
        counter++;
        Serial.println(trigger);
        }
        
        if (millis() > (t+5000))
         {
         Serial.println(trigger);
         t = millis();
         }
       
        
        delay(250);
      }
      

      And here the Output, 1 Puls is 0.001 m3, first at slow flow and then with my max.

      0_1486850133246_gas-002.png

      regards
      ThomasD

      posted in My Project
      ThomasDr
      ThomasDr
    • RE: Gas Meter Reading Using a Magnetometer

      Hello,

      i have the same Project, i use a HMC5983 magnetometer.
      i'm testing now, but it looks good.

      regards
      ThomasD
      0_1486845404196_IMG_20170211_213140~2.jpg

      posted in My Project
      ThomasDr
      ThomasDr
    • Gateway in Client Mode and 2 Controller?

      Hallo,

      can a Gateway in Client Mode connect to 2 Controller?

      regards
      ThomasD

      posted in General Discussion
      ThomasDr
      ThomasDr
    • RE: Error after upload new sketch.

      Hello,

      I think I have found the error.
      I use a 15sec. loop in the sketch and i thing a intern watchdog reset the Node.

      regards
      Thomas

      posted in Troubleshooting
      ThomasDr
      ThomasDr
    • RE: Error after upload new sketch.

      Hello,

      !TSM:FPAR:FAIL
      

      the FAQ say this means a gateway / controller problem.
      I can see the gateway hang. After reboot the gateway, the Node do the presentation
      and reboot.
      I can't find info's for "MC0"

      0 MCO:BGN:INIT REPEATER,CP=RNNRA--,VER=2.1.1
      3 TSM:INIT
      4 TSF:WUR:MS=0
      11 TSM:INIT:TSP OK
      13 TSM:INIT:STATID=11
      15 TSF:SID:OK,ID=11
      17 TSM:FPAR
      53 TSF:MSG:SEND,11-11-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      602 TSF:MSG:READ,0-0-11,s=255,c=3,t=8,pt=1,l=1,sg=0:0
      607 TSF:MSG:FPAR OK,ID=0,D=1
      1015 TSF:MSG:READ,2-2-11,s=255,c=3,t=8,pt=1,l=1,sg=0:1
      2060 TSM:FPAR:OK
      2061 TSM:ID
      2062 TSM:ID:OK
      2064 TSM:UPL
      2067 TSF:MSG:SEND,11-11-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=OK:1
      2076 TSF:MSG:READ,0-0-11,s=255,c=3,t=25,pt=1,l=1,sg=0:1
      2081 TSF:MSG:PONG RECV,HP=1
      2084 TSM:UPL:OK
      2085 TSM:READY:ID=11,PAR=0,DIS=1
      2091 TSF:MSG:SEND,11-11-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
      2098 TSF:MSG:READ,0-0-11,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
      2105 TSF:MSG:SEND,11-11-0-0,s=255,c=0,t=18,pt=0,l=5,sg=0,ft=0,st=OK:2.1.1
      2113 TSF:MSG:SEND,11-11-0-0,s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=OK:0
      4121 TSF:MSG:SEND,11-11-0-0,s=255,c=3,t=11,pt=0,l=15,sg=0,ft=0,st=OK:Soundlevel Node
      4130 TSF:MSG:SEND,11-11-0-0,s=255,c=3,t=12,pt=0,l=3,sg=0,ft=0,st=OK:1.0
      4139 TSF:MSG:SEND,11-11-0-0,s=0,c=0,t=30,pt=0,l=0,sg=0,ft=0,st=OK:
      4196 TSF:MSG:SEND,11-11-0-0,s=1,c=0,t=33,pt=0,l=0,sg=0,ft=0,st=OK:
      4253 TSF:MSG:SEND,11-11-0-0,s=2,c=0,t=33,pt=0,l=0,sg=0,ft=0,st=OK:
      4311 TSF:MSG:SEND,11-11-0-0,s=3,c=0,t=23,pt=0,l=0,sg=0,ft=0,st=OK:
      4317 MCO:REG:REQ
      4320 TSF:MSG:SEND,11-11-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=OK:2
      4327 TSF:MSG:READ,0-0-11,s=255,c=3,t=27,pt=1,l=1,sg=0:1
      4332 MCO:PIM:NODE REG=1
      4334 MCO:BGN:STP
      4336 MCO:BGN:INIT OK,TSP=1
      
      
      posted in Troubleshooting
      ThomasDr
      ThomasDr
    • Error after upload new sketch.

      Hello,

      i use a Arduino Nano with mybootloader V13pre and the NRF24 Radio.
      This Node works and i try to upload a new sketch.
      First time the Node run in to a bootloop and i upload the sketch again.
      The Node start, but i get this error.
      I use the cleaneprom sketch to without result.

      0 MCO:BGN:INIT REPEATER,CP=RNNRA--,VER=2.1.1
      3 TSM:INIT
      4 TSF:WUR:MS=0
      11 TSM:INIT:TSP OK
      13 TSM:INIT:STATID=11
      15 TSF:SID:OK,ID=11
      17 TSM:FPAR
      53 TSF:MSG:SEND,11-11-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      2060 !TSM:FPAR:NO REPLY
      2062 TSM:FPAR
      2098 TSF:MSG:SEND,11-11-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      2281 TSF:MSG:READ,7-7-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
      2285 TSF:MSG:BC
      4106 !TSM:FPAR:NO REPLY
      4108 TSM:FPAR
      4144 TSF:MSG:SEND,11-11-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      5836 TSF:MSG:READ,2-2-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
      5840 TSF:MSG:BC
      6152 !TSM:FPAR:NO REPLY
      6154 TSM:FPAR
      6190 TSF:MSG:SEND,11-11-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      7878 TSF:MSG:READ,2-2-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
      7883 TSF:MSG:BC
      8198 !TSM:FPAR:FAIL
      8199 TSM:FAIL:CNT=1
      8201 TSM:FAIL:PDT
      18204 TSM:FAIL:RE-INIT
      18206 TSM:INIT
      18213 TSM:INIT:TSP OK
      18215 TSM:INIT:STATID=11
      18217 TSF:SID:OK,ID=11
      18220 TSM:FPAR
      18256 TSF:MSG:SEND,11-11-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      18482 TSF:MSG:READ,7-7-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
      18487 TSF:MSG:BC
      20264 !TSM:FPAR:NO REPLY
      20267 TSM:FPAR
      20302 TSF:MSG:SEND,11-11-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      20549 TSF:MSG:READ,7-7-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
      20554 TSF:MSG:BC
      22311 !TSM:FPAR:NO REPLY
      22313 TSM:FPAR
      22350 TSF:MSG:SEND,11-11-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      24023 TSF:MSG:READ,2-2-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
      24028 TSF:MSG:BC
      24357 !TSM:FPAR:NO REPLY
      24359 TSM:FPAR
      24396 TSF:MSG:SEND,11-11-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      26065 TSF:MSG:READ,2-2-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
      26071 TSF:MSG:BC
      26403 !TSM:FPAR:FAIL
      26404 TSM:FAIL:CNT=2
      26406 TSM:FAIL:PDT
      36409 TSM:FAIL:RE-INIT
      36411 TSM:INIT
      36418 TSM:INIT:TSP OK
      36420 TSM:INIT:STATID=11
      36422 TSF:SID:OK,ID=11
      36424 TSM:FPAR
      36461 TSF:MSG:SEND,11-11-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      36774 TSF:MSG:READ,7-7-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
      36780 TSF:MSG:BC
      38468 !TSM:FPAR:NO REPLY
      38470 TSM:FPAR
      38507 TSF:MSG:SEND,11-11-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      38842 TSF:MSG:READ,7-7-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
      38847 TSF:MSG:BC
      40514 !TSM:FPAR:NO REPLY
      40516 TSM:FPAR
      40553 TSF:MSG:SEND,11-11-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      42208 TSF:MSG:READ,2-2-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
      42213 TSF:MSG:BC
      42560 !TSM:FPAR:NO REPLY
      42562 TSM:FPAR
      42599 TSF:MSG:SEND,11-11-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      44251 TSF:MSG:READ,2-2-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
      44256 TSF:MSG:BC
      44606 !TSM:FPAR:FAIL
      
      posted in Troubleshooting
      ThomasDr
      ThomasDr
    • RE: Humidity Sketch causes Vera App to crash

      Hello,

      i see this is a old posting, but i have the same problem. But i found an error.
      I use

      send(summsg.set(sum));
      

      but this work:

      send(summsg.set(sum,5));
      

      regards
      ThomasD

      posted in Troubleshooting
      ThomasDr
      ThomasDr
    • RE: IO Broker Comprehension problem.

      Hello,

      I found the mistake, I had to set the gateway as a client.

      regards
      ThomasD

      posted in IOBroker
      ThomasDr
      ThomasDr
    • IO Broker Comprehension problem.

      Hello,

      so far i use 2 programs MYSControler for config the Nodes and a other that simply receive the Sensors. I connect to a W5100 Ethernet Gateway with API 2.
      Now i try to use io Brocker and i don't know how it work.
      I discover that i can connect with MYSController to IO Broker, but the only i receive in MYSController is:
      get metric
      force presentation
      force restart
      IO Broker log:

      mysensors.0	2016-11-12 10:03:09.152	debug	mysensors.0 Sent to 192.168.0.128 0;0;3;0;13;force restart
      mysensors.0	2016-11-12 10:03:09.150	debug	mysensors.0 Send raw data: 0;0;3;0;13;force restart
      mysensors.0	2016-11-12 10:03:07.658	debug	inMem message mysensors.0.* mysensors.0.info.connection
      mysensors.0	2016-11-12 10:03:07.658	debug	mysensors.0 Sent to 192.168.0.128 0;0;3;0;19;force presentation
      mysensors.0	2016-11-12 10:03:07.658	debug	mysensors.0 Sent to 192.168.0.128 0;0;3;0;6;get metric
      mysensors.0	2016-11-12 10:03:07.657	debug	mysensors.0 Send raw data: 0;0;3;0;19;force presentation
      mysensors.0	2016-11-12 10:03:07.657	debug	mysensors.0 Send raw data: 0;0;3;0;6;get metric
      mysensors.0	2016-11-12 10:03:07.652	info	mysensors.0 Connected 192.168.0.128:37756
      mysensors.0	2016-11-12 10:02:51.806	debug	inMem message mysensors.0.* mysensors.0.info.connection  
      

      How do I get this to work

      regards ThomasD

      posted in IOBroker
      ThomasDr
      ThomasDr
    • Relay skech API 2.0 Port?

      Hello,

      can any one tell me what to change in this sketch for API 2.0?
      Relay example in the Build section.

      regards
      Thomas

      posted in Development
      ThomasDr
      ThomasDr
    • RE: Monitor if an outlet has power - send email

      Hello,

      Measure A socket directly is always a risk.
      just take a power adapter, power the Mysensors Note and send a Life Bit to your Application.
      Is the Outlet power down the Note send no Life Bit and your Application can send a E-Mail.

      regards
      Thomas

      posted in General Discussion
      ThomasDr
      ThomasDr
    • Burglary and tamper detector for door and window

      Hello,

      I develop for some time sensors for this purpose.
      And I think now I have a variant found.
      The technology is nothing special.
      I simple use a MMA8452 connect to a Mysensors Note.
      The evaluation does the Sketch.
      Here my Sketch:

      /******************************************************************************
      MMA8452Q_Basic.ino
      SFE_MMA8452Q Library Basic Example Sketch
      Jim Lindblom @ SparkFun Electronics
      Original Creation Date: June 3, 2014
      https://github.com/sparkfun/MMA8452_Accelerometer
      
      This sketch uses the SparkFun_MMA8452Q library to initialize the
      accelerometer, and stream values from it.
      
      Development environment specifics:
      	IDE: Arduino 1.0.5
      	Hardware Platform: Arduino Uno
      	
      	**Updated for Arduino 1.6.4 5/2015**
      
      This code is beerware; if you see me (or any other SparkFun employee) at the
      local, and you've found our code helpful, please buy us a round!
      
      Distributed as-is; no warranty is given.
      ******************************************************************************/
      #include <Wire.h> // Must include Wire library for I2C
      #include <SparkFun_MMA8452Q.h> // Includes the SFE_MMA8452Q library
      #include <MySensor.h>  
      #include <Vcc.h>
      
      const float VccMin   = 0.0;           // Minimum expected Vcc level, in Volts.
      const float VccMax   = 5.5;           // Maximum expected Vcc level, in Volts.
      const float VccCorrection = 5.0/5.0;  // Measured Vcc by multimeter divided by reported Vcc
      
      unsigned int countr = 0;
      float peakMax0 = -1000.0;
      float peakMax1 = -1000.0;
      float peakMax2 = -1000.0;
      unsigned long startMillis = 0;
      Vcc vcc(VccCorrection);
      
      #define CHILD_ID_BATT 0
      #define CHILD_ID_MAXX 1
      #define CHILD_ID_MAXY 2
      #define CHILD_ID_MAXZ 3
      
      MySensor gw;
      MyMessage battmsg(CHILD_ID_BATT, V_VOLTAGE);
      MyMessage maxxmsg(CHILD_ID_MAXX, V_LEVEL);
      MyMessage maxymsg(CHILD_ID_MAXY, V_LEVEL);
      MyMessage maxzmsg(CHILD_ID_MAXZ, V_LEVEL);
      
      
      MMA8452Q accel;
      
      void setup()
      {
        Serial.begin(115200);
        accel.init(SCALE_2G, ODR_800);
        gw.begin(NULL, AUTO, true);
      
        // Send the sketch version information to the gateway and Controller
        gw.sendSketchInfo("MMA8452", "1.0");
      
        // Register all sensors to gateway (they will be created as child devices)
        gw.present(CHILD_ID_BATT, S_POWER);
        gw.present(CHILD_ID_MAXX, S_VIBRATION);
        gw.present(CHILD_ID_MAXY, S_VIBRATION);
        gw.present(CHILD_ID_MAXZ, S_VIBRATION);
      }
      
      void loop()
      {     
             countr = 0;
             float peakToPeak0 = 0.0;   // peak-to-peak level
             float peakToPeak1 = 0.0;   // peak-to-peak level
             float peakToPeak2 = 0.0;   // peak-to-peak level
             
             float signalMax0 = -100.0000;
             float signalMin0 = 100.0000;
             float signalMax1 = -100.0;
             float signalMin1 = 100.0;
             float signalMax2 = -100.0;
             float signalMin2 = 100.0;
           
             
             while (countr < 20)
                 {
                  gw.process();
                if (accel.available())
                   {
                    accel.read();
                    delay(2);
                    double accxx = accel.cx;
                    double accyy = accel.cy;
                    double acczz = accel.cz;
                       //--------------------------------------------------
                       if (accxx > signalMax0)
                        {
                           signalMax0 = accxx;  // save just the max levels
                        }
                       if (accxx < signalMin0)
                        {
                           signalMin0 = accxx;  // save just the min levels
                        }
                       //--------------------------------------------------
                       if (accyy > signalMax1)
                        {
                           signalMax1 = accyy;  // save just the max levels
                        }
                        
                       if (accyy < signalMin1)
                        {
                           signalMin1 = accyy;  // save just the min levels
                        }
                       //-------------------------------------------------
                       if (acczz > signalMax2)
                        {
                          signalMax2 = acczz;  // save just the max levels
                        }
                        
                       if (acczz < signalMin2)
                        {
                          signalMin2 = acczz;  // save just the min levels
                        }
                        countr = countr + 1;
                   }
               }
                   //------------------------------------------------------
                   peakToPeak0 = signalMax0 - signalMin0;
                   peakToPeak1 = signalMax1 - signalMin1;
                   peakToPeak2 = signalMax2 - signalMin2;
                   //-----------------------------------------------------
                   //------------------------------------------------------
                   if (peakToPeak0 > peakMax0)
                   {
                      peakMax0 = peakToPeak0;  // save just the max levels
                   }
                   if (peakToPeak1 > peakMax1)
                   {
                      peakMax1 = peakToPeak1;  // save just the max levels
                   }
                   if (peakToPeak2 > peakMax2)
                   {
                      peakMax2 = peakToPeak2;  // save just the max levels
                   }
                   //-----------------------------------------------------
                   
       if (millis() > startMillis)
       {
       float v = vcc.Read_Volts();
        gw.send(battmsg.set(v,2));
        gw.send(maxxmsg.set(peakMax0,4));
        gw.send(maxymsg.set(peakMax1,4));
        gw.send(maxzmsg.set(peakMax2,4));
        
       peakMax0 = -1.0;
       peakMax1 = -1.0;
       peakMax2 = -1.0;
       startMillis= millis() + 15000;
       }
       
      }
      

      Improvements and suggestions are welcome.

      regards
      Thomas

      posted in My Project
      ThomasDr
      ThomasDr
    • RE: No reconnect after power down.

      Hello,

      I think you were right, I had tried it without a cap, it worked, but it works better with cap.

      regards
      Thomas

      posted in Troubleshooting
      ThomasDr
      ThomasDr
    • No reconnect after power down.

      Hallo,
      i have a ethernet gateway and 2 sensors, after power up the sensor, the sensor don't connect to the gateway. After i push the reset button on the sensor i recive the data from the sensor. The same when I turn the sensor off and on again.

      regards
      Thomas

      posted in Troubleshooting
      ThomasDr
      ThomasDr
    • RE: Windows GUI/Controller for MySensors

      Hello,

      for Linux, it works with wine, with TCP and serial.

      regards
      Thomas

      posted in Controllers
      ThomasDr
      ThomasDr