Navigation

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

    Posts made by itbeyond

    • RE: openHab 2.5.0 Message from Gateway ID 255

      @TimO thanks for the pointers. All my nodes were working ok but via a lot of playing around I found a repeater node that also runs a light dimmer (which the light dimmer worked fine and so did all of the repeating functions) was constantly sending an ID request. I disabled the repeater function and flashed it back and it is now not sending these requests. I then deployed another (better) repeater node into the same area and did not catch anymore ID requests so it would appear the repeater was causing the issue. I did flash it again with repeater on but it went bad again so gave that away and now have a different repeater serving that part of the property and no more weird ID requests. Thanks again for your help and continuing work on the binding.

      PS: Is there somewhere that we can always get the latest JAR files from, I find I have to troll posts to find links?

      posted in OpenHAB
      itbeyond
      itbeyond
    • RE: openHab 2.5.0 Message from Gateway ID 255

      @TimO There is no given_ids.cached file - there is a given_ids_mysensors_bridge-eth_gateway.cached file and it contains:

      [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254]

      I have fixed ID on all my nodes and have not changed anything for a long time.

      posted in OpenHAB
      itbeyond
      itbeyond
    • openHab 2.5.0 Message from Gateway ID 255

      I have just upgraded my Docker based RPI Openhab to 2.5.6 and updated the jar to org.openhab.binding.mysensors-2.5.0-SNAPSHOT.jar

      Since I did this and tail the openhab log file I get this:

      2020-07-28 16:24:38.576 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 255;255;3;0;3;0
      2020-07-28 16:24:38.580 [INFO ] [rs.internal.gateway.MySensorsGateway] - ID Request received
      2020-07-28 16:24:38.588 [ERROR] [rs.internal.gateway.MySensorsGateway] - No more IDs available for this node, you could try cleaning cache file
      

      My Node:3 is a multi function, Humidity, Temp, Light, Rain and Barometric sensor. I believe 255 is used for some other comms as per the docs it is not recommended to be used for nodes. So why this being constantly logged, do I need to add a dummy node 255 or something?

      Oh and I have tried doing what it says and cleaning the cache file, I deleted both files in the userdata/logs/mysensors/cache and restarted my docker container.

      posted in OpenHAB
      itbeyond
      itbeyond
    • RE: BMP/E atmospheric pressure

      @mfalkvidd My thoughts are change the Buying Guide and related text to the BME it is a much better sensor with Humidity included and is only slightly more $. I have ordered some BME's and will be testing the provided sketch in due course.

      posted in Development
      itbeyond
      itbeyond
    • RE: BME280 node connecting but not showing data

      @mfalkvidd Yes seems right but the most confusing part and the one I stumbled on is that on the page https://www.mysensors.org/build/pressure for the sensor the Shopping Guide points you at the BMP280 which as we are identifying is not the relevant item for the project - I followed the provided link and purchased the sensor (after waiting for weeks for delivery) only to find it does not work at all (as I suspect my be the case for @Andrew-Maynard as the sensors does not init and the loop does not run) and hence my code was needed to run the node using the item shown in the shopping guide.

      posted in Troubleshooting
      itbeyond
      itbeyond
    • RE: BME280 node connecting but not showing data

      I could not make the example BME280 sketch work either and upon investigation the code is not for the standard BME280 it is for the BME280 library by Embedded Adventures - https://github.com/embeddedadventures/BME280. This device is not the same as the cheaper standard BME280 as linked on the forum page. The Embedded Adventure one has humidity, the standard BME280 does not.

      Anyway I researched and converted some other BME280 code I found from the SFE_BMP180 library, coupled the Forecast code and created the following sketch for the BME280. You will need to install the SFE_BMP180.h library using library manager

      /**
       * 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
       * 
       */
      
      // Enable debug prints
      #define MY_DEBUG
      
      // Enable and select radio type attached 
      #define MY_RADIO_NRF24
      // #define MY_RF24_CHANNEL 82
      
      // #define MY_NODE_ID 22 //uncomment this line to assign a static ID
      
      #include <MySensors.h>  
      
      #define CHILD_ID_BARO  0
      #define CHILD_ID_TEMP 1
      
      static bool metric = true;
      
      // Sleep time between sensor updates (in milliseconds)
      unsigned long UPDATE_INTERVAL = 60000;
      
      #define ALTITUDE 28.0 // Altitude  in meters
      
      #define GENERATE_FORECAST
      
      #define CONVERSION_FACTOR (1.0/10.0)     // used by forecast algorithm to convert from Pa to kPa, by dividing hPa by 10.
      #ifdef GENERATE_FORECAST      //  Below you will find a lot of variables used by the forecast algorithm.
        const char *weather[] = { "stable", "sunny", "cloudy", "unstable", "thunderstorm", "unknown" };
        enum FORECAST
        {
          STABLE = 0,             // "Stable Weather Pattern"
          SUNNY = 1,              // "Slowly rising Good Weather", "Clear/Sunny "
          CLOUDY = 2,             // "Slowly falling L-Pressure ", "Cloudy/Rain "
          UNSTABLE = 3,           // "Quickly rising H-Press",     "Not Stable"
          THUNDERSTORM = 4,       // "Quickly falling L-Press",    "Thunderstorm"
          UNKNOWN = 5             // "Unknown (More Time needed)
        };
        int lastForecast = -1;        // Stores the previous forecast, so it can be compared with a new forecast.
        const int LAST_SAMPLES_COUNT = 5;
        float lastPressureSamples[LAST_SAMPLES_COUNT];
        int minuteCount = 0;        // Helps the forecst algorithm keep time.
        bool firstRound = true;       // Helps the forecast algorithm recognise if the sensor has just been powered up.
        float pressureAvg;        // Average value is used in forecast algorithm.
        float pressureAvg2;       // Average after 2 hours is used as reference value for the next iteration.
        float dP_dt;          // Pressure delta over time
      #endif
      
      #include <SFE_BMP180.h>
      
      static SFE_BMP180 pressure;
      
      static MyMessage msgBaro(CHILD_ID_BARO, V_PRESSURE );
      static MyMessage msgTemp(CHILD_ID_TEMP, V_TEMP);
      #ifdef GENERATE_FORECAST
        MyMessage msgForecast(CHILD_ID_BARO, V_FORECAST);
      #endif
      
      void presentation()  
      { 
        // Send the sketch info to the gateway
        sendSketchInfo("TemperatureAndPressure", "1.0");
      
        // Present sensors as children to gateway
        present(CHILD_ID_BARO, S_BARO, "Pressure");
        wait(50);
        present(CHILD_ID_TEMP, S_TEMP, "Temperature");
        wait(50);
        metric = getControllerConfig().isMetric;
      }
      
      void setup()
      {
        pressure.begin();
      }
      
      
      void loop()      
      {  
        char status;
        double T,P,p0,a;
        unsigned long currentMillis = millis();
      
        status = pressure.startTemperature();
        if (status != 0) { wait(status); }
        status = pressure.getTemperature(T);
        if (status != 0)
        {
          // Print out the measurement:
          Serial.print("temperature: ");
          Serial.print(T,2);
          Serial.print(" deg C, ");
          Serial.print((9.0/5.0)*T+32.0,2);
          Serial.println(" deg F");
          send(msgTemp.set(T, 2));
        }
        // Start a pressure measurement:
        // The parameter is the oversampling setting, from 0 to 3 (highest res, longest wait).
        // If request is successful, the number of ms to wait is returned.
        // If request is unsuccessful, 0 is returned.
        status = pressure.startPressure(3);
        if (status != 0) { wait(status); }
        status = pressure.getPressure(P,T);
        if (status != 0)
        {
          // Print out the measurement:
          Serial.print("absolute pressure: ");
          Serial.print(P,2);
          Serial.print(" mb, ");
          Serial.print(P*0.0295333727,2);
          Serial.println(" inHg");
          send(msgBaro.set(P, 2));        
        }
        
      #ifdef GENERATE_FORECAST      
          int forecast = sample(P);            // Run the forecast function with a new pressure update.
      
          // Send forecast
          if (forecast != lastForecast) {
            Serial.println("BME280 - Sending the latest forecast to the gateway.");      
            send(msgForecast.set(weather[forecast]));
            lastForecast = forecast;
          }
      #endif
      
        // Sleep until next update to save energy but check for how long to sleep based on delays in getting data
        unsigned long sleeptime = UPDATE_INTERVAL  - (millis() - currentMillis); // How much time has passed already during the calculating? Subtract that from the intended interval time.
        wait(sleeptime); 
      }
      
      
      
      #ifdef GENERATE_FORECAST
      // These functions are only included if the forecast function is enables. The are used to generate a weater prediction by checking if the barometric pressure is rising or falling over time.
      
      float getLastPressureSamplesAverage()
      {
        float lastPressureSamplesAverage = 0;
        for (int i = 0; i < LAST_SAMPLES_COUNT; i++) {
          lastPressureSamplesAverage += lastPressureSamples[i];
        }
        lastPressureSamplesAverage /= LAST_SAMPLES_COUNT;
      
        return lastPressureSamplesAverage;
      }
      
      
      // Forecast algorithm found here
      // http://www.freescale.com/files/sensors/doc/app_note/AN3914.pdf
      // Pressure in hPa -->  forecast done by calculating kPa/h
      int sample(float pressure) {
        // Calculate the average of the last n minutes.
        int index = minuteCount % LAST_SAMPLES_COUNT;
        lastPressureSamples[index] = pressure;
      
        minuteCount++;
        if (minuteCount > 185) {
          minuteCount = 6;
        }
      
        if (minuteCount == 5) {
          pressureAvg = getLastPressureSamplesAverage();
        }
        else if (minuteCount == 35) {
          float lastPressureAvg = getLastPressureSamplesAverage();
          float change = (lastPressureAvg - pressureAvg) * CONVERSION_FACTOR;
          if (firstRound) { // first time initial 3 hour 
            dP_dt = change * 2; // note this is for t = 0.5hour
          }
          else {
            dP_dt = change / 1.5; // divide by 1.5 as this is the difference in time from 0 value.
          }
        }
        else if (minuteCount == 65) {
          float lastPressureAvg = getLastPressureSamplesAverage();
          float change = (lastPressureAvg - pressureAvg) * CONVERSION_FACTOR;
          if (firstRound) { //first time initial 3 hour
            dP_dt = change; //note this is for t = 1 hour
          }
          else {
            dP_dt = change / 2; //divide by 2 as this is the difference in time from 0 value
          }
        }
        else if (minuteCount == 95) {
          float lastPressureAvg = getLastPressureSamplesAverage();
          float change = (lastPressureAvg - pressureAvg) * CONVERSION_FACTOR;
          if (firstRound) { // first time initial 3 hour
            dP_dt = change / 1.5; // note this is for t = 1.5 hour
          }
          else {
            dP_dt = change / 2.5; // divide by 2.5 as this is the difference in time from 0 value
          }
        }
        else if (minuteCount == 125) {
          float lastPressureAvg = getLastPressureSamplesAverage();
          pressureAvg2 = lastPressureAvg; // store for later use.
          float change = (lastPressureAvg - pressureAvg) * CONVERSION_FACTOR;
          if (firstRound) { // first time initial 3 hour
            dP_dt = change / 2; // note this is for t = 2 hour
          }
          else {
            dP_dt = change / 3; // divide by 3 as this is the difference in time from 0 value
          }
        }
        else if (minuteCount == 155) {
          float lastPressureAvg = getLastPressureSamplesAverage();
          float change = (lastPressureAvg - pressureAvg) * CONVERSION_FACTOR;
          if (firstRound) { // first time initial 3 hour
            dP_dt = change / 2.5; // note this is for t = 2.5 hour
          } 
          else {
            dP_dt = change / 3.5; // divide by 3.5 as this is the difference in time from 0 value
          }
        }
        else if (minuteCount == 185) {
          float lastPressureAvg = getLastPressureSamplesAverage();
          float change = (lastPressureAvg - pressureAvg) * CONVERSION_FACTOR;
          if (firstRound) { // first time initial 3 hour
            dP_dt = change / 3; // note this is for t = 3 hour
          } 
          else {
            dP_dt = change / 4; // divide by 4 as this is the difference in time from 0 value
          }
          pressureAvg = pressureAvg2; // Equating the pressure at 0 to the pressure at 2 hour after 3 hours have past.
          firstRound = false; // flag to let you know that this is on the past 3 hour mark. Initialized to 0 outside main loop.
        }
      
        int forecast = UNKNOWN;
        if (minuteCount < 35 && firstRound) { //if time is less than 35 min on the first 3 hour interval.
          forecast = UNKNOWN;
        }
        else if (dP_dt < (-0.25)) {
          forecast = THUNDERSTORM;
        }
        else if (dP_dt > 0.25) {
          forecast = UNSTABLE;
        }
        else if ((dP_dt > (-0.25)) && (dP_dt < (-0.05))) {
          forecast = CLOUDY;
        }
        else if ((dP_dt > 0.05) && (dP_dt < 0.25))
        {
          forecast = SUNNY;
        }
        else if ((dP_dt >(-0.05)) && (dP_dt < 0.05)) {
          forecast = STABLE;
        }
        else {
          forecast = UNKNOWN;
        }
      
        // uncomment when debugging
        //Serial.print(F("BME280 - Forecast at minute "));
        //Serial.print(minuteCount);
        //Serial.print(F(" dP/dt = "));
        //Serial.print(dP_dt);
        //Serial.print(F("kPa/h --> "));
        //Serial.println(weather[forecast]);
      
        return forecast;
      }
      #endif
      
      posted in Troubleshooting
      itbeyond
      itbeyond
    • RE: 💬 Serial Protocol - 2.x

      I am investigating a problem I have found with I think openHAB but I am not sure if this issue is not related to the Gateway code of 2.3.0.
      When a node performs a requestTime() I am seeing this reported:

      2018-10-09 10:47:13.337 [INFO ] [rs.internal.gateway.MySensorsGateway] - I_TIME request received from 2, answering...

      Looks perfect and the node receives the time however I was curious as to why sometimes the node would receive GMT and at other times my local timezone GMT+8. I decided to run the gateway via MYSContoller so I could monitor and log the traffic and I have found the problem. When the Gateway receives the request it responds twice within a few ms of each other, for what reason I do not know but the first response send the local time zone response (GMT+8) and the second is a GMT response. The logs from MYSController for the above report are as follows:

      318857 9/10/2018 10:47:19 RX 2 - Irrigation Ctrl (2) INTERNAL C_INTERNAL NO I_TIME
      318858 9/10/2018 10:47:19 TX 2 - Irrigation Ctrl (2) INTERNAL C_INTERNAL NO I_TIME 1539082039
      318859 9/10/2018 10:47:19 TX 2 - Irrigation Ctrl (2) INTERNAL C_INTERNAL NO I_TIME "1539053233

      "
      Note the quotes where picked up in the copy and paste (I did this several times) so it looks like the body was changed to a string type but I also caught this in the MYSController Debug:
      9/10/2018 10:47:19 RX 2;255;3;0;1;
      9/10/2018 10:47:19 INFO Reply time request
      9/10/2018 10:47:19 TX 2;255;3;0;1;1539082039
      9/10/2018 10:47:19 FWD 2;255;3;0;1;1539053233
      9/10/2018 10:47:19 TX 2;255;3;0;1;1539053233

      So I am curious as to where the FWD comes from and why the response body has changed between the TX, FWD & TX?

      posted in Announcements
      itbeyond
      itbeyond
    • RE: openHab binding 2.4.0 Variable Problem ( 2.4.0.201806211605)

      @itbeyond said in openHab binding 2.4.0 Variable Problem ( 2.4.0.201806211605):

      Bug reported to Github issues at: https://github.com/tobof/openhab2-addons/issues/126

      posted in OpenHAB
      itbeyond
      itbeyond
    • RE: openHAB binding 2.4.0 I_TIME Duplicates & Wrong Times

      @itbeyond said in openHAB binding 2.4.0 I_TIME Duplicates & Wrong Times:

      Bug report submitted in issues https://github.com/tobof/openhab2-addons/issues/125

      posted in OpenHAB
      itbeyond
      itbeyond
    • RE: MySensors binding - confusion with things configuration

      I also use the lookup in PaperUI to be sure but it looks like you have added the thing in PaperUI from the inbox. What I would do is delete from PaperUI both nodes. If it is as you say setup in the .things files correctly you will not be able to delete it from PaperUI it will report a problem with any things that are setup in the manual things files.

      posted in OpenHAB
      itbeyond
      itbeyond
    • openHAB binding 2.4.0 I_TIME Duplicates & Wrong Times

      I have been using the 2.4.0 binding for a few months now and was going to report this issue a while back however I have now seen exactly what is going on. When a node performs a requestTime() I am seeing this reported in the logtail correctly as:

      2018-10-09 09:00:01.310 [INFO ] [rs.internal.gateway.MySensorsGateway] - I_TIME request received from 3, answering...

      Looks perfect and the node receives the time however I was curious as to why sometimes the node would receive GMT and at other times my local timezone GMT+8. I decided to run the gateway via MYSContoller so I could monitor and log the traffic and I have found the problem. When the Gateway receives the request it responds twice within a few ms of each other, for what reason I do not know but the first response send the local time zone response (GMT+8) and the second is a GMT response. The logs for the above logtail report are as follows:

      314155 9/10/2018 9:00:06 RX 3 - Rain Gauge (3) INTERNAL C_INTERNAL NO I_TIME
      314156 9/10/2018 9:00:06 TX 3 - Rain Gauge (3) INTERNAL C_INTERNAL NO I_TIME 1539075607
      314163 9/10/2018 9:00:07 TX 3 - Rain Gauge (3) INTERNAL C_INTERNAL NO I_TIME "1539046801"

      Now the above is a copy and paste so not even sure where the quotes came from (cannot see them in MYSController - but they copied from the GMT response only). I was not quick enough the capture the details in the MYSController Debug area. However you will see the two sets of results returned from the one request within a few ms of each other. If you do the maths you will note that they are 28806 ms apart - 8 hours and some 6 seconds. This is the difference between GMT and my local time so it sends Local first then GMT which does an override in my node. In my nodes I have coded to add 28800 to the received time to try to get around the problem however if my node misses the second send it will be ahead by 8 hours.

      Anyway I am not sure why this is occurring and it does seem a lot like a bug of some sort.

      For completeness my bridge binding is as follows:

      Bridge mysensors:bridge-eth:gateway [ ipAddress="192.168.100.136", tcpPort=5003, sendDelay=200,  startupCheckEnabled=true,  networkSanCheckEnabled=true, networkSanCheckInterval=1, networkSanCheckConnectionFailAttempts=1 ] {
        light       Courtyard_Pond_Pump      "Courtyard Pond Pump" @ "Courtyard"      [ nodeId=1, childId=1 ] 
        light       Courtyard_Garden_Lights  "Courtyard Garden Lights" @ "Courtyard"  [ nodeId=1, childId=2 ]
        
        light       Water_All_Zones  "Water - All Zones"  @ "Backyard"    [ nodeId=2, childId=0 ] 
        light       Water_Zone_1     "Water - Zone 1"     @ "Backyard"    [ nodeId=2, childId=1 ]
        light       Water_Zone_2     "Water - Zone 2"     @ "Backyard"    [ nodeId=2, childId=2 ]
        light       Water_Zone_3     "Water - Zone 3"     @ "Backyard"    [ nodeId=2, childId=3 ]  
        light       Water_Zone_4     "Water - Zone 4"     @ "Backyard"    [ nodeId=2, childId=4 ]
        light       Water_Zone_5     "Water - Zone 5"     @ "Backyard"    [ nodeId=2, childId=5 ]
        light       Water_Zone_6     "Water - Zone 6"     @ "Backyard"    [ nodeId=2, childId=6 ]
      
        humidity    Courtyard_Outside_Humidity      "Courtyard Outside Humidity" @ "Courtyard" [ nodeId=3, childId=0 ]
        temperature Courtyard_Outside_TempDHT       "Courtyard Outside Temp"     @ "Courtyard" [ nodeId=3, childId=1 ]
        light-level Courtyard_Outside_Light         "Courtyard Outside Light"    @ "Courtyard" [ nodeId=3, childId=2 ]
        rain        Courtyard_Outside_Rain          "Courtyard Outside Rain"     @ "Courtyard" [ nodeId=3, childId=3 ]  
        motion      Courtyard_Outside_RainDetected  "Courtyard Rain Detected"    @ "Courtyard" [ nodeId=3, childId=4 ]
        baro        Courtyard_Outside_Baro          "Courtyard Outside Baro"     @ "Courtyard" [ nodeId=3, childId=5 ] 
        temperature Courtyard_Outside_Temp          "Courtyard Outside Temp"     @ "Courtyard" [ nodeId=3, childId=6 ] 
      
        cover       Courtyard_Door_Blind  "Courtyard Door Blind"  @ "Courtyard" [ nodeId=4, childId=1 ]
        cover       Office_Front_Blinds   "Office Front Blinds"   @ "Office"    [ nodeId=4, childId=2 ]
        cover       Office_Side_Blinds    "Office Side Blinds"    @ "Office"    [ nodeId=4, childId=3 ]
        cover       Courtyard_LHS_Blinds   "Courtyard LHS Blinds" @ "Courtyard" [ nodeId=4, childId=4 ]
        cover       Courtyard_RHS_Blinds   "Courtyard RHS Blinds" @ "Courtyard" [ nodeId=4, childId=5 ]
        
        power       Power_Phase1  "Energy Phase 1"  @ "Garage"  [ nodeId=5, childId=0 ]
        power       Power_Phase2  "Energy Phase 2"  @ "Garage"  [ nodeId=5, childId=1 ]
        power       Power_Phase3  "Energy Phase 3"  @ "Garage"  [ nodeId=5, childId=2 ]
        power       Power_Main    "Energy Main"     @ "Garage"  [ nodeId=5, childId=8 ]
      
        scene       MasterBedroom_SceneController_8Way  "MasterBedroom_SceneController_8Way" @ "Bedroom"  [ nodeId=6, childId=0 ]
      
        light       Entry_FrontGarden_Lights    "Power Socket Relay" @ "Entry"  [ nodeId=7, childId=1 ]
      
        dimmer      Lounge_Front_Lights   "Lounge Front Lights"   @ "Lounge"  [ nodeId=8, childId=0 ] 
        dimmer      Lounge_Centre_Lights  "Lounge Centre Lights"  @ "Lounge"  [ nodeId=8, childId=1 ]
        dimmer      Lounge_Left_Lights    "Lounge Left Lights"    @ "Lounge"  [ nodeId=8, childId=2 ]
        dimmer      Lounge_Right_Lights   "Lounge Right Lights"   @ "Lounge"  [ nodeId=8, childId=3 ]
      
        light       MasterBedroom_Main_Light    "Bedroom Main Light"          @ "Bedroom" [ nodeId=9, childId=0 ]
        light       MasterBedroom_Robe_Light    "MBedroom Robe Light"         @ "Bedroom" [ nodeId=9, childId=1 ]
        light       MasterBedroom_Bedside_David "MasterBedroom Bedside David" @ "Bedroom" [ nodeId=9, childId=2 ]  
        light       MasterBedroom_Bedside_Shel  "MasterBedroom Bedside Shel"  @ "Bedroom" [ nodeId=9, childId=3 ]
        temperature MasterBedroom_Roof_Temp     "MasterBedroom Roof Temp"     @ "Bedroom" [ nodeId=9, childId=4 ]
      
        motion      Garage_Landcruiser    "Garage Landcruiser"  @ "Garage" [ nodeId=10, childId=1 ]
        motion      Garage_CLA250         "Garage CLA250"       @ "Garage" [ nodeId=10, childId=2 ]
        light       Garage_Door           "Garage Door"         @ "Garage" [ nodeId=10, childId=3 ] 
        temperature Garage_Internal_Temp  "Garage Temp"         @ "Garage" [ nodeId=10, childId=4 ]
        
        light       Backyard_Pool_Pump      "Backyard Pool Pump"     @ "Backyard" [ nodeId=11, childId=1 ]
        light       Backyard_Garden_Lights  "Backyard Garden Lights" @ "Backyard" [ nodeId=11, childId=2 ]
      
        dimmer      MasterBedroom_Ensuite_Light "MasterBedroom Ensuite Light" @ "Bedroom"  [ nodeId=12, childId=0 ] 
        light       MasterBedroom_Ensuite_Fan   "MasterBedroom Ensuite Fan"   @ "Bedroom" [ nodeId=12, childId=1 ]
        light       MasterBedroom_Ensuite_Heat1 "MasterBedroom Ensuite Heat1" @ "Bedroom" [ nodeId=12, childId=2 ]
        light       MasterBedroom_Ensuite_Heat2 "MasterBedroom Ensuite Heat2" @ "Bedroom" [ nodeId=12, childId=3 ]
      
        light       Office_Door   "Office Door Controller" @ "Office"  [ nodeId=13, childId=1 ]
      
        light       Bathroom_Main_TowelRail    "Power Socket Relay" @ "Bathroom"  [ nodeId=14, childId=1 ]
      
        light       Hallway_Bedroom_Lights    "Hallway_Bedroom_Lights"  @ "Hallways"  [ nodeId=15, childId=0 ]
        light       Backyard_PoolSpot_Light   "Backyard PoolSpot Light" @ "Backyard"  [ nodeId=15, childId=1 ]
        light       Kitchen_Pantry_Lights     "Kitchen Pantry Lights"   @ "Kitchen"   [ nodeId=15, childId=2 ]
        light       Hallway_FrontDoor_Lights "Hallway_FrontDoor_Lights" @ "Hallways"  [ nodeId=15, childId=3 ]
        temperature Kitchen_Roof_Temp       "Kitchen Roof Temp"         @ "Kitchen"   [ nodeId=15, childId=4 ]
      
        dimmer      Kitchen_WineRack_Lights   "Kitchen WineRack Lights" @ "Kitchen"  [ nodeId=16, childId=0 ] 
      
        light       Bathroom_Ensuite_TowelRail    "Power Socket Relay" @ "Bathroom"  [ nodeId=18, childId=1 ]
      
        dimmer      Alfresco_Outer_Lights "Alfresco Outer Lights" @ "Alfresco"  [ nodeId=19, childId=0 ] 
        dimmer      Alfresco_Inner_Lights "Alfresco Inner Lights" @ "Alfresco"  [ nodeId=19, childId=1 ]
        dimmer      Backyard_Eve_Lights   "Backyard Eve Lights"   @ "Backyard"  [ nodeId=19, childId=2 ]
        dimmer      Kitchen_Main_Lights   "Kitchen Main Lights"   @ "Kitchen"   [ nodeId=19, childId=3 ]
        
        dimmer      Kitchen_Island_Light  "Kitchen Island Light" @ "Kitchen" [ nodeId=20, childId=0 ] 
        dimmer      Kitchen_Swirl_Light   "Kitchen Swirl Light"  @ "Kitchen" [ nodeId=20, childId=1 ]
      
        light       Desktop_Debug_Light   "Power Socket Relay" @ "Office"  [ nodeId=27, childId=1 ]
      
        motion      Kitchen_Pantry_PIR    "Kitchen Pantry PIR" @ "Kitchen" [ nodeId=100, childId=0 ]
      
        motion      MasterBedroom_Robe_PIR      "MasterBedroom Robe PIR"    @ "Bedroom" [ nodeId=101, childId=0 ]
        motion      MasterBedroom_Ensuite_PIR   "MasterBedroom Ensuite PIR" @ "Bedroom" [ nodeId=102, childId=0 ]
      }
      

      I have a number of nodes as you can see and 2, 4 & 9 all use time and have the same exact problem. If I reboot or setup a test case I always get two times returned from the one request and it always is Local followed by GMT. I guess a node based work around would be to trash the second result if received within 30 seconds or something but when playing with time it is not a simple method as millis() may change between loading.

      Anyone else see this or now how to fix it?

      posted in OpenHAB
      itbeyond
      itbeyond
    • RE: Problem with dimmable LED actuator with encoder

      @vladimir I really think you need to look at this in the serial monitor and add some serial.print lines in the associated places in the code to see what is going on.

      posted in Development
      itbeyond
      itbeyond
    • openHab binding 2.4.0 Variable Problem ( 2.4.0.201806211605)

      @TimO I posted something in the thread https://forum.mysensors.org/topic/9346/getting-mysensors-mqtt-gateway-working-on-openhab-2-2-stable/40 but just did another full round of testing to be sure so adding a new thread to get the conversation started. I have just set a test node that sits on my desk and have added the var1 item to an already well working test node - it is a switch and was not using any vars etc. So I editted the node code and added a loop request for var1 every 30 seconds.

      Here is the code for this node

      /**
       * 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 - Henrik Ekblad
       *
       * DESCRIPTION
       * Example sketch showing how to control physical relays.
       * This example will remember relay state after power failure.
       * http://www.mysensors.org/build/relay
       */
      
      // Enable debug prints to serial monitor
      #define MY_DEBUG
      
      // Enable and select radio type attached
      #define MY_RADIO_NRF24
      #define MY_RF24_CHANNEL 82
      #define MY_RF24_IRQ_PIN 2
      #define MY_RX_MESSAGE_BUFFER_FEATURE
      
      #define MY_NODE_ID 27  // Set this to fix your Radio ID or use Auto
      
      // Enable repeater functionality for this node
      //#define MY_REPEATER_FEATURE
      #define MY_TRANSPORT_SANITY_CHECK
      
      #include <MySensors.h>
      
      #define RELAY_1  3  // Arduino Digital I/O pin number for first relay (second on pin+1 etc)
      #define NUMBER_OF_RELAYS 1 // Total number of attached relays
      #define RELAY_ON 0  // GPIO value to write to turn on attached relay
      #define RELAY_OFF 1 // GPIO value to write to turn off attached relay
      #define RELAY_UNKNOWN 2
      
      int CurrentState[] = {RELAY_UNKNOWN, RELAY_UNKNOWN, RELAY_UNKNOWN, RELAY_UNKNOWN};
      int SetState[] = {RELAY_OFF, RELAY_OFF, RELAY_OFF, RELAY_OFF};
      
      unsigned long requestVar1Last = millis();
      unsigned long requestVar1Time = 30000;
      
      MyMessage relayMsg(0, V_STATUS);
      
      void before() {
        wdt_enable(WDTO_2S);
      }
      
      void setup()
      {
        for (int sensor=1, pin=RELAY_1; sensor<=NUMBER_OF_RELAYS; sensor++, pin++) {
          // Then set relay pins in output mode
          pinMode(pin, OUTPUT);
          SetState[sensor] = RELAY_OFF;
          request(sensor, V_STATUS);
          delay(50); 
          request(sensor, V_VAR1);
        }
      }
      void presentation()
      {
        // Send the sketch version information to the gateway and Controller
        sendSketchInfo("Power Socket (7)", "4.1");
      
        for (int sensor=1; sensor<=NUMBER_OF_RELAYS; sensor++) {
          // Register all sensors to gw (they will be created as child devices)
          present(sensor, S_BINARY);
        }
      }
      
      void loop()
      {
        wdt_reset();
        
        for (int sensor=1, pin=RELAY_1; sensor<=NUMBER_OF_RELAYS; sensor++, pin++) {
            if (CurrentState[sensor] != SetState[sensor] && SetState[sensor] != RELAY_UNKNOWN) {
              digitalWrite(pin, SetState[sensor]?RELAY_ON:RELAY_OFF);
              CurrentState[sensor] = SetState[sensor];   
              resend(relayMsg.setSensor(sensor).set(CurrentState[sensor]), 5);  
            }
          }
      
        if (requestVar1Last + requestVar1Time < millis()) {
           request(1, V_VAR1);
           requestVar1Last = millis();
        }
      }
      
      void resend(MyMessage &msg, int repeats)
      {
        int repeat = 1;
        int repeatdelay = 0;
        boolean sendOK = false;
      
        while ((sendOK == false) and (repeat < repeats)) {
          if (send(msg)) {
            sendOK = true;
          } else {
            sendOK = false;
            Serial.print("Send Failed: ");
            Serial.println(repeat);
            repeatdelay += 50;
          } repeat++; wait(repeatdelay);
        }
      }
      
      void receive(const MyMessage &message)
      {
        int sensor = message.sensor;
        // We only expect one type of message from controller. But we better check anyway.
        if (message.type==V_STATUS) {
          // Change relay state
          SetState[sensor] = message.getBool();
      
          // Write some debug info
          Serial.print(F("Incoming change for sensor:"));
          Serial.print(message.sensor);
          Serial.print(F(", New status: "));
          Serial.println(message.getBool());
        }
        if (message.type == V_VAR1) {
          int variable1 = atoi(message.data);// RUN_ALL_ZONES time
          Serial.print(F("Recieved variable1: "));
          Serial.println(variable1);     
        }
      }
      

      I added the item to openHab ad follows:

      Switch   Desktop_Debug_Light "Desktop Debug Light" <light> (gDevices,gRoom_Office) [ "iss:type:DevSwitch", "iss:room:Entry" ]  {channel="mysensors:light:gateway:Desktop_Debug_Light:status"}
      Number  Desktop_Debug_Var1 "Desktop Debug Light- Var1 [%d]" <selfruntime>  (gDevices,gRoom_Office)   {channel="mysensors:light:gateway:Desktop_Debug_Light:var1"}
      

      I used Paper UI and set the variable to 10 - this pushed the update to the node correctly. I then rebooted openHab which using persistance restores the variable 1 value back to 10 however when the node requests var1 from the controller after the reboot it receives 0. I have found this to be the same if I do an postUpdate. The var1 container on openHab has the 10 value in it I have confirmed this with a Rest API commnd the GET the item.

      Here is the logs from the openHab log:tail and also the node I have added comments where the reboot happened and you will see the results:

      2018-08-28 08:23:22.581 [.ItemChannelLinkAddedEvent] - Link 'Desktop_Debug_Var1-mysensors:light:gateway:Desktop_Debug_Light:var1' has been added.
      2018-08-28 08:24:08.812 [ome.event.ItemCommandEvent] - Item 'Desktop_Debug_Var1' received command 10
      2018-08-28 08:24:08.829 [vent.ItemStateChangedEvent] - Desktop_Debug_Var1 changed from NULL to 10
      REBOOTED THE OPENHAB SERVER
      2018-08-28 08:27:40.145 [temChannelLinkRemovedEvent] - Link 'Desktop_Debug_Var1 => mysensors:light:gateway:Desktop_Debug_Light:var1' has been removed.
      2018-08-28 08:28:57.469 [.ItemChannelLinkAddedEvent] - Link 'Desktop_Debug_Var1-mysensors:light:gateway:Desktop_Debug_Light:var1' has been added.
      2018-08-28 08:29:08.389 [vent.ItemStateChangedEvent] - Desktop_Debug_Var1 changed from NULL to 10.0
      
      2280 TSF:MSG:SEND,27-27-0-0,s=1,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK:
      2286 MCO:BGN:INIT OK,TSP=1
      2290 TSF:MSG:SEND,27-27-0-0,s=1,c=1,t=2,pt=2,l=2,sg=0,ft=0,st=OK:1
      2317 TSF:MSG:READ,0-0-27,s=1,c=1,t=2,pt=0,l=1,sg=0:1
      Incoming change for sensor:1, New status: 1
      2521 TSF:MSG:READ,0-0-27,s=1,c=1,t=24,pt=0,l=2,sg=0:10
      Recieved variable1: 10
      30002 TSF:MSG:SEND,27-27-0-0,s=1,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK:
      30026 TSF:MSG:READ,0-0-27,s=1,c=1,t=24,pt=0,l=2,sg=0:10
      Recieved variable1: 10
      ***** REBOOT OF OPENHAB SERVER *******
      60010 TSF:MSG:SEND,27-27-0-0,s=1,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK:
      90018 TSF:MSG:SEND,27-27-0-0,s=1,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK:
      120026 TSF:MSG:SEND,27-27-0-0,s=1,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK:
      150038 TSF:MSG:SEND,27-27-0-0,s=1,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK:
      ***** OPENHAB UP AGAIN ********
      150090 TSF:MSG:READ,0-0-27,s=1,c=1,t=24,pt=0,l=1,sg=0:0
      Recieved variable1: 0
      180046 TSF:MSG:SEND,27-27-0-0,s=1,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK:
      180071 TSF:MSG:READ,0-0-27,s=1,c=1,t=24,pt=0,l=1,sg=0:0
      Recieved variable1: 0
      210054 TSF:MSG:SEND,27-27-0-0,s=1,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK:
      210073 TSF:MSG:READ,0-0-27,s=1,c=1,t=24,pt=0,l=1,sg=0:0
      Recieved variable1: 0
      
      

      You can see the PaperUI update at 2018-08-28 08:24:08.829 which corresponds with the 30026 TSF:MSG:READ,0-0-27,s=1,c=1,t=24,pt=0,l=2,sg=0:10. I then rebooted and the server restored the value of 10 but the node continues to receive 0 and does so for ever - it never gets the value 10.

      Here is the output of the item using the REST API which is taken well after the reboot and after many request(1,V_VAR1)'s is still reporting 0.

      http://openhabianpi:8080/rest/items/Desktop_Debug_Var1
      {
        "link": "http://openhabianpi:8080/rest/items/Desktop_Debug_Var1",
        "state": "10.0",
        "stateDescription": {
          "pattern": "%d",
          "readOnly": false,
          "options": []
        },
        "editable": false,
        "type": "Number",
        "name": "Desktop_Debug_Var1",
        "label": "Desktop Debug Light- Var1",
        "category": "selfruntime",
        "tags": [],
        "groupNames": [
          "gDevices",
          "gRoom_Office"
        ]
      }
      
      http://openhabianpi:8080/rest/items/Desktop_Debug_Var1/state
      10.0
      

      As mentioned the variable received at the node never updates also if we use a postUpdate in openHab it will continue to receive 0 until we issue a sendCommand at which time it will update until the next postUpdate or server reboot.

      posted in OpenHAB
      itbeyond
      itbeyond
    • RE: Repeater drops nodes

      @titvs I have tested a repeater and it is still working ok after 48 hours using the CE timing modified code.

      posted in Troubleshooting
      itbeyond
      itbeyond
    • RE: nrf24 : transmission of data works fine, but constant NACK's produced

      @yveaux The comment above the section indicates that TX starts after 10us, and setting CE high also enables PA+LNA mode - so I wonder why would we be trying to set it low after 10us - seems like a conflicting set of statements. Then the statement datasheet: Pulse CE at least 10us - it is confusing - Does this mean for at least 10us or after 10us and should the pulse be a set of LOW then HIGH > 10us. If I read these statements without the datasheet I would be holding it UP for at least 10us then pulse it quickly LOW/HIGH until the status updates as we need to be high to enable the PA+LNA mode. Anyway I am only looking at a very small part of the code and reading peoples comments. I would need more time to cross check the datasheet. But the removal of the 10us set it LOW is still working.

      posted in Troubleshooting
      itbeyond
      itbeyond
    • RE: Repeater drops nodes

      @titvs my testing seems to show that this updated version from @tekka does resolve the problem. I have added some questions about the release details etc in the post https://forum.mysensors.org/topic/9642/nrf24-transmission-of-data-works-fine-but-constant-nack-s-produced/12

      posted in Troubleshooting
      itbeyond
      itbeyond
    • RE: nrf24 : transmission of data works fine, but constant NACK's produced

      @tekka I think you have solved it - I had a look at the code changes you made removing the 10ms pulse and wonder how it could be but without reading the rest of the code and understanding the specs of the card I am only guessing. So can this version of the code still work well with the regular nrf24 modules or will this pulse adjustment have a different impact on them? At present i have only loaded this on the 2 nodes I have mentioned. Will this modification be released as a point release update to the community as something like 2.3.1 or how will this be migrated to a stable release?

      Great work by the way and thanks for fixing it.

      posted in Troubleshooting
      itbeyond
      itbeyond
    • RE: nrf24 : transmission of data works fine, but constant NACK's produced

      @tekka Loaded onto my MEGA based Ethernet gateway connected to openHab using a E01-ML01DP5 with 9db antenna - this previously lasted less than 6 hours. Will advise as testing goes ahead. I do not send much with this unit more receive but have some test nodes I will code to toggle back and forth - I am unable to add my signed nodes to this as yet!

      I will also grab my MEGA based repeater on a different network and see what happens this is a nrf24l01+ with pa + lna.

      posted in Troubleshooting
      itbeyond
      itbeyond
    • RE: nrf24 : transmission of data works fine, but constant NACK's produced

      @tekka have downloaded and will look at this and report shortly. Yes most of my Gateway & Repeater nodes are nrf24l01+ with pa + lna but I have also been using and seen the problem with E01-ML01DP5 but I think this is the same underlying technology.

      posted in Troubleshooting
      itbeyond
      itbeyond
    • RE: nrf24 : transmission of data works fine, but constant NACK's produced

      @rzylius thanks for that testing - it follows almost exactly the same problems I have seen since the release of 2.3.0 and is the reason I do not use 2.3.0 anymore and have reverted my entire network to 2.2.0. Sorry @mfalkvidd this is another example of the same 2.3.0 problems, I feel I am looking like a problem to the community but I did extensive testing on 2.3.0 - made posts in the release page - received nothing in reply and it seems the errors are continuing. The above logs are very similar in aspect to the testing I did so not sure what other logs you may need but I am happy to try to help if there is something I can do, but it is hard to diagnose anything when the radio network just starts NACK'ing and then eventually the node stops working?

      posted in Troubleshooting
      itbeyond
      itbeyond
    • RE: nrf24 : transmission of data works fine, but constant NACK's produced

      What version you using 2.3.0 or 2.2.0 - if 2.3.0 please try 2.2.0 and report?

      posted in Troubleshooting
      itbeyond
      itbeyond
    • RE: Repeater drops nodes

      @sundberg84 I understand about the logs but after spending several days trying to make 2.3.0 work on these nodes and just going to NACK NACK NACK for every send either repeater or gateway I reverted. I can enable it again if you like but all you will see is good data for a period then without any warning or reason constant NACK for every send. I did add wait(50)s on my nodes and these seem to be better but no go on Gateways and Repeaters cannot inject a wait of course. I can report that on Gateways trying 2.3.0 I used Vera/Ethernet - openHab/MQTT and openHab/Ethernet and all did the exact same thing and now on 2.2.0 I have zero problems.

      Coupled with this testing the openHab network was and is still new so had limited nodes installed and everything was 2.3.0 when the troubles occurred so I did have a full 2.3.0 network using channel 82.

      posted in Troubleshooting
      itbeyond
      itbeyond
    • RE: Getting MySensors MQTT Gateway working on OpenHAB 2.2 (Stable)

      I have a strange issue now when I am trying to bring my irrigation controller over from Vera to openHab. I setup the Ethernet Gateway and have several nodes working ok. I then configured the binding to have the irrigation controller as follows:

      Bridge mysensors:bridge-eth:gateway [ ipAddress="192.168.100.63", tcpPort=5003, sendDelay=150,  startupCheckEnabled=true,  networkSanCheckEnabled=true, networkSanCheckInterval=1, networkSanCheckConnectionFailAttempts=1 ] {
        light     Water_All_Zones "Water - All Zones" @ "Backyard"    [ nodeId=2, childId=0 ]
        light     Water_Zone1     "Water - Veg Garden" @ "Backyard"   [ nodeId=2, childId=1 ]
        light     Water_Zone2     "Water - Rear Garden" @ "Backyard"  [ nodeId=2, childId=2 ]
        light     Water_Zone3     "Water - Side Garden" @ "Backyard"  [ nodeId=2, childId=3 ]  
        light     Water_Zone4     "Water - Verge Grass" @ "Backyard"  [ nodeId=2, childId=4 ]
        light     Water_Zone5     "Water - Front Grass" @ "Backyard"  [ nodeId=2, childId=5 ]
        light     Water_Zone6     "Water - Front Garden" @ "Backyard" [ nodeId=2, childId=6 ]
        
        cover     Courtyard_Door_Blind  "Door Blind" @ "Courtyard" [ nodeId=4, childId=1 ]
        cover     Office_Front_Blinds   "Front Blinds" @ "Office" [ nodeId=4, childId=2 ]
        cover     Office_Side_Blinds    "Side Blinds" @ "Office" [ nodeId=4, childId=3 ]
        cover     Courtyard_LHS_Blinds   "LHS Blinds" @ "Courtyard" [ nodeId=4, childId=4 ]
        cover     Courtyard_RHS_Blinds   "RHS Blinds" @ "Courtyard" [ nodeId=4, childId=5 ]
        
        power     Power_Phase1  "Energy Phase 1" @ "Garage"  [ nodeId=5, childId=0 ]
        power     Power_Phase2  "Energy Phase 2" @ "Garage"  [ nodeId=5, childId=1 ]
        power     Power_Phase3  "Energy Phase 3" @ "Garage"  [ nodeId=5, childId=2 ]
        power     Power_Main    "Energy Main" @ "Garage"  [ nodeId=5, childId=8 ]
      
        light     Entry_FrontGarden_Lights    "Power Socket Relay" @ "Entry"  [ nodeId=7, childId=1 ]
      
        light     Office_Door   "Door Controller" @ "Office"  [ nodeId=13, childId=1 ]
      
        light     Desktop_Debug_Light   "Power Socket Relay" @ "Office"  [ nodeId=27, childId=1 ]
      }
      

      So far so good, I then setup the items as follows:

      Switch  Water_All_Zones     "Water All Zones" <selfwater> (gDevices,gRoom_Backyard) [ "iss:type:DevSwitch", "iss:room:Backyard" ]  {channel="mysensors:light:gateway:Water_All_Zones:status"}
      Switch  Water_Veg_Garden    "Water - Veg Garden" <selfwater> (gDevices,gRoom_Backyard) [ "iss:type:DevSwitch", "iss:room:Backyard" ]  {channel="mysensors:light:gateway:Water_Zone1:status"}
      Switch  Water_Rear_Garden   "Water - Rear Garden" <selfwater> (gDevices,gRoom_Backyard) [ "iss:type:DevSwitch", "iss:room:Backyard" ]  {channel="mysensors:light:gateway:Water_Zone2:status"}
      Switch  Water_Side_Garden   "Water - Side Garden" <selfwater> (gDevices,gRoom_Backyard) [ "iss:type:DevSwitch", "iss:room:Backyard" ]  {channel="mysensors:light:gateway:Water_Zone3:status"}
      Switch  Water_Verge_Grass   "Water - Verge Grass" <selfwater> (gDevices,gRoom_Backyard) [ "iss:type:DevSwitch", "iss:room:Backyard" ]  {channel="mysensors:light:gateway:Water_Zone4:status"}
      Switch  Water_Front_Grass   "Water - Front Grass" <selfwater> (gDevices,gRoom_Backyard) [ "iss:type:DevSwitch", "iss:room:Backyard" ]  {channel="mysensors:light:gateway:Water_Zone5:status"}
      Switch  Water_Front_Garden  "Water - Front Garden" <selfwater> (gDevices,gRoom_Backyard) [ "iss:type:DevSwitch", "iss:room:Backyard" ] {channel="mysensors:light:gateway:Water_Zone6:status"}
      
      Number  Water_Zone1_AllTime "Water - Zone 1 - All Time [%d]" <selfruntime>  (gDevices,gRoom_Backyard)   {channel="mysensors:light:gateway:Water_Zone1:var1"}
      Number  Water_Zone2_AllTime "Water - Zone 2 - All Time [%d]" <selfruntime>  (gDevices,gRoom_Backyard)   {channel="mysensors:light:gateway:Water_Zone2:var1"}
      Number  Water_Zone3_AllTime "Water - Zone 3 - All Time [%d]" <selfruntime>  (gDevices,gRoom_Backyard)   {channel="mysensors:light:gateway:Water_Zone3:var1"}
      Number  Water_Zone4_AllTime "Water - Zone 4 - All Time [%d]" <selfruntime>  (gDevices,gRoom_Backyard)   {channel="mysensors:light:gateway:Water_Zone4:var1"}
      Number  Water_Zone5_AllTime "Water - Zone 5 - All Time [%d]" <selfruntime>  (gDevices,gRoom_Backyard)   {channel="mysensors:light:gateway:Water_Zone5:var1"}
      Number  Water_Zone6_AllTime "Water - Zone 6 - All Time [%d]" <selfruntime>  (gDevices,gRoom_Backyard)   {channel="mysensors:light:gateway:Water_Zone6:var1"}
      
      Number  Water_Zone1_Time    "Water - Zone1 - Time [%d]" <selfruntime>  (gDevices,gRoom_Backyard)   {channel="mysensors:light:gateway:Water_Zone1:var2"}
      Number  Water_Zone2_Time    "Water - Zone2 - Time [%d]" <selfruntime>  (gDevices,gRoom_Backyard)   {channel="mysensors:light:gateway:Water_Zone2:var2"}
      Number  Water_Zone3_Time    "Water - Zone3 - Time [%d]" <selfruntime>  (gDevices,gRoom_Backyard)   {channel="mysensors:light:gateway:Water_Zone3:var2"}
      Number  Water_Zone4_Time    "Water - Zone4 - Time [%d]" <selfruntime>  (gDevices,gRoom_Backyard)   {channel="mysensors:light:gateway:Water_Zone4:var2"}
      Number  Water_Zone5_Time    "Water - Zone5 - Time [%d]" <selfruntime>  (gDevices,gRoom_Backyard)   {channel="mysensors:light:gateway:Water_Zone5:var2"}
      Number  Water_Zone6_Time    "Water - Zone6 - Time [%d]" <selfruntime>  (gDevices,gRoom_Backyard)   {channel="mysensors:light:gateway:Water_Zone6:var2"}
      
      String  Water_Zone1_Name    "Water - Zone1 - Name [%s]"  (gDevices,gRoom_Backyard)   {channel="mysensors:light:gateway:Water_Zone1:var3"}
      String  Water_Zone2_Name    "Water - Zone2 - Name [%s]"  (gDevices,gRoom_Backyard)   {channel="mysensors:light:gateway:Water_Zone2:var3"}
      String  Water_Zone3_Name    "Water - Zone3 - Name [%s]"  (gDevices,gRoom_Backyard)   {channel="mysensors:light:gateway:Water_Zone3:var3"}
      String  Water_Zone4_Name    "Water - Zone4 - Name [%s]"  (gDevices,gRoom_Backyard)   {channel="mysensors:light:gateway:Water_Zone4:var3"}
      String  Water_Zone5_Name    "Water - Zone5 - Name [%s]"  (gDevices,gRoom_Backyard)   {channel="mysensors:light:gateway:Water_Zone5:var3"}
      String  Water_Zone6_Name    "Water - Zone6 - Name [%s]"  (gDevices,gRoom_Backyard)   {channel="mysensors:light:gateway:Water_Zone6:var3"}
      

      As the Irrigation project uses 3 vars to manage time and names I setup a System Started rule as follows:

      rule "System started"
      when
          System started
      then
          createTimer(now.plusSeconds(180)) [ |
              logInfo("Watering", "System started")
      
              if (Water_Zone1_AllTime.state == NULL) Water_Zone1_AllTime.sendCommand(5 as Number) 
              if (Water_Zone2_AllTime.state == NULL) Water_Zone2_AllTime.sendCommand(8 as Number)
              if (Water_Zone3_AllTime.state == NULL) Water_Zone3_AllTime.sendCommand(8 as Number)
              if (Water_Zone4_AllTime.state == NULL) Water_Zone4_AllTime.sendCommand(12 as Number)
              if (Water_Zone5_AllTime.state == NULL) Water_Zone5_AllTime.sendCommand(12 as Number)
              if (Water_Zone6_AllTime.state == NULL) Water_Zone6_AllTime.sendCommand(10 as Number)
      
              if (Water_Zone1_Time.state == NULL) Water_Zone1_Time.sendCommand(5 as Number)
              if (Water_Zone2_Time.state == NULL) Water_Zone2_Time.sendCommand(8 as Number)
              if (Water_Zone3_Time.state == NULL) Water_Zone3_Time.sendCommand(8 as Number)
              if (Water_Zone4_Time.state == NULL) Water_Zone4_Time.sendCommand(12 as Number)
              if (Water_Zone5_Time.state == NULL) Water_Zone5_Time.sendCommand(12 as Number)
              if (Water_Zone6_Time.state == NULL) Water_Zone6_Time.sendCommand(10 as Number)
      
              if (Water_Zone1_Name.state == NULL) Water_Zone1_Name.sendCommand("Veg Garden")
              if (Water_Zone2_Name.state == NULL) Water_Zone2_Name.sendCommand("Rear Garden")
              if (Water_Zone3_Name.state == NULL) Water_Zone3_Name.sendCommand("Side Garden")
              if (Water_Zone4_Name.state == NULL) Water_Zone4_Name.sendCommand("Verge Grass")
              if (Water_Zone5_Name.state == NULL) Water_Zone5_Name.sendCommand("Front Grass")
              if (Water_Zone6_Name.state == NULL) Water_Zone6_Name.sendCommand("Front Garden")
           ]
      end
      

      This all loaded up nicely (for interest I tried postUpdate as well as sendCommand) shows the right stuff in PaperUI - Control can see all the numbers and string however I have had several issues with the setup.

      Firstly when my controller requests the time from the gateway it receives UTC and is showing the wrong time on the LCD display. I have checked that my controller is configured for the right timezone and is showing the right time but everytime I reset the Irrigation controller and it requests the time it is getting UTC. (I did work once and got the right time but not sure how this occurred) I rebooted the openhabianpi unit and it is still delivering UTC, but the fact it did it right once means I cannot just adjust the timezone in the node as it may get it right somehow and then be adjusted wrong! I would have thought the gateway should deliver the correct system time.

      Secondly I cannot get the Irrigation Controller to read the var3 String value - when this is requested from from the Irrigation controller it only gets a 0 (numeric). This seems to indicate that the var's can only handle a Number - is this true and how does one get around this if this is the case? I tried changing the value in PaperUI and it changes but nothing gets sent to the node but changing the numeric values in var1 & 2 update to the node - all updates are shown in the logtail.

      For the record here is the Serial boot log from the node:

      
       __  __       ____
      |  \/  |_   _/ ___|  ___ _ __  ___  ___  _ __ ___
      | |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __|
      | |  | | |_| |___| |  __/ | | \__ \  _  | |  \__ \
      |_|  |_|\__, |____/ \___|_| |_|___/\___/|_|  |___/
              |___/                      2.2.0
      
      16 MCO:BGN:INIT NODE,CP=RNNNA---,VER=2.2.0
      25 TSM:INIT
      26 TSF:WUR:MS=0
      33 TSM:INIT:TSP OK
      35 TSM:INIT:STATID=2
      37 TSF:SID:OK,ID=2
      39 TSM:FPAR
      75 TSF:MSG:SEND,2-2-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      81 TSF:MSG:READ,0-0-2,s=255,c=3,t=8,pt=1,l=1,sg=0:0
      87 TSF:MSG:FPAR OK,ID=0,D=1
      2082 TSM:FPAR:OK
      2083 TSM:ID
      2084 TSM:ID:OK
      2086 TSM:UPL
      2089 TSF:MSG:SEND,2-2-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=OK:1
      2100 TSF:MSG:READ,0-0-2,s=255,c=3,t=25,pt=1,l=1,sg=0:1
      2105 TSF:MSG:PONG RECV,HP=1
      2107 TSM:UPL:OK
      2109 TSM:READY:ID=2,PAR=0,DIS=1
      2113 TSF:MSG:SEND,2-2-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
      2120 TSF:MSG:READ,0-0-2,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
      2127 TSF:MSG:SEND,2-2-0-0,s=255,c=0,t=17,pt=0,l=5,sg=0,ft=0,st=OK:2.2.0
      2137 TSF:MSG:SEND,2-2-0-0,s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=OK:0
      2156 TSF:MSG:READ,0-0-2,s=255,c=3,t=6,pt=0,l=1,sg=0:M
      2163 TSF:MSG:SEND,2-2-0-0,s=255,c=3,t=11,pt=0,l=19,sg=0,ft=0,st=OK:Irrigation Ctrl (2)
      2173 TSF:MSG:SEND,2-2-0-0,s=255,c=3,t=12,pt=0,l=3,sg=0,ft=0,st=OK:4.0
      2182 TSF:MSG:SEND,2-2-0-0,s=0,c=0,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
      2189 TSF:MSG:SEND,2-2-0-0,s=1,c=0,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
      2196 TSF:MSG:SEND,2-2-0-0,s=2,c=0,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
      2204 TSF:MSG:SEND,2-2-0-0,s=3,c=0,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
      2211 TSF:MSG:SEND,2-2-0-0,s=4,c=0,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
      2219 TSF:MSG:SEND,2-2-0-0,s=5,c=0,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
      2227 TSF:MSG:SEND,2-2-0-0,s=6,c=0,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
      2232 MCO:REG:REQ
      2236 TSF:MSG:SEND,2-2-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=OK:2
      2242 TSF:MSG:READ,0-0-2,s=255,c=3,t=27,pt=1,l=1,sg=0:1
      2247 MCO:PIM:NODE REG=1
      2249 MCO:BGN:STP
      Initialising...
      Turning All Valves Off...
      Checking EEPROM for stored date:
      Retreiving last run time from EEPROM...
      Sensor Presentation Complete
      Ready...
      2907 TSF:MSG:SEND,2-2-0-0,s=255,c=3,t=1,pt=0,l=0,sg=0,ft=0,st=OK:
      Requesting time from Gateway:
      2932 TSF:MSG:READ,0-0-2,s=255,c=3,t=1,pt=0,l=10,sg=0:1534904507
      Time value received and updated...
      Clock updated....
      Sensor's time currently set to: 02:21am ***** Should be 10:21am GMT +8 *******
      8/22/2018
      Wednesday 
      Calling for Valve 1 Data...
      3946 TSF:MSG:SEND,2-2-0-0,s=1,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK:
      3966 TSF:MSG:READ,0-0-2,s=1,c=1,t=24,pt=0,l=1,sg=0:5
      Recieved variable1 valve:1 = 5
      New Zone Times Recieved...
      Zone 1 individual time: 0 group time: 5 name: Zone 1
      Zone 2 individual time: 0 group time: 0 name: Zone 2
      Zone 3 individual time: 0 group time: 0 name: Zone 3
      Zone 4 individual time: 0 group time: 0 name: Zone 4
      Zone 5 individual time: 0 group time: 0 name: Zone 5
      Zone 6 individual time: 0 group time: 0 name: Zone 6
      4005 TSF:MSG:SEND,2-2-0-0,s=1,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK:
      4065 TSF:MSG:SEND,2-2-0-0,s=1,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK:
      4116 TSF:MSG:READ,0-0-2,s=1,c=1,t=25,pt=0,l=1,sg=0:5
      Recieved variable2 valve:1 = 5
      New Zone Times Recieved...
      Zone 1 individual time: 5 group time: 5 name: Zone 1
      Zone 2 individual time: 0 group time: 0 name: Zone 2
      Zone 3 individual time: 0 group time: 0 name: Zone 3
      Zone 4 individual time: 0 group time: 0 name: Zone 4
      Zone 5 individual time: 0 group time: 0 name: Zone 5
      Zone 6 individual time: 0 group time: 0 name: Zone 6
      4152 TSF:MSG:SEND,2-2-0-0,s=1,c=2,t=26,pt=0,l=0,sg=0,ft=0,st=OK:
      4212 TSF:MSG:SEND,2-2-0-0,s=1,c=2,t=26,pt=0,l=0,sg=0,ft=0,st=OK:
      4267 TSF:MSG:READ,0-0-2,s=1,c=1,t=25,pt=0,l=1,sg=0:5
      Recieved variable2 valve:1 = 5
      Calling for Valve 2 Data...
      4303 TSF:MSG:SEND,2-2-0-0,s=2,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK:
      4363 TSF:MSG:SEND,2-2-0-0,s=2,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK:
      4417 TSF:MSG:READ,0-0-2,s=1,c=1,t=26,pt=0,l=1,sg=0:0
      Recieved variable3 valve: 1 = 0
      4425 TSF:MSG:SEND,2-2-0-0,s=2,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK:
      4484 TSF:MSG:SEND,2-2-0-0,s=2,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK:
      4543 TSF:MSG:SEND,2-2-0-0,s=2,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK:
      4567 TSF:MSG:READ,0-0-2,s=1,c=1,t=26,pt=0,l=1,sg=0:0
      Recieved variable3 valve: 1 = 0
      4602 TSF:MSG:SEND,2-2-0-0,s=2,c=2,t=26,pt=0,l=0,sg=0,ft=0,st=OK:
      4662 TSF:MSG:SEND,2-2-0-0,s=2,c=2,t=26,pt=0,l=0,sg=0,ft=0,st=OK:
      4717 TSF:MSG:READ,0-0-2,s=2,c=1,t=24,pt=0,l=1,sg=0:8
      Recieved variable1 valve:2 = 8
      New Zone Times Recieved...
      Zone 1 individual time: 5 group time: 5 name: 0
      Zone 2 individual time: 0 group time: 8 name: Zone 2
      Zone 3 individual time: 0 group time: 0 name: Zone 3
      Zone 4 individual time: 0 group time: 0 name: Zone 4
      Zone 5 individual time: 0 group time: 0 name: Zone 5
      Zone 6 individual time: 0 group time: 0 name: Zone 6
      Calling for Valve 3 Data...
      4781 TSF:MSG:SEND,2-2-0-0,s=3,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK:
      4839 TSF:MSG:SEND,2-2-0-0,s=3,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK:
      4868 TSF:MSG:READ,0-0-2,s=2,c=1,t=24,pt=0,l=1,sg=0:8
      Recieved variable1 valve:2 = 8
      4898 TSF:MSG:SEND,2-2-0-0,s=3,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK:
      4957 TSF:MSG:SEND,2-2-0-0,s=3,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK:
      5016 TSF:MSG:SEND,2-2-0-0,s=3,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK:
      5022 TSF:MSG:READ,0-0-2,s=2,c=1,t=25,pt=0,l=1,sg=0:8
      Recieved variable2 valve:2 = 8
      New Zone Times Recieved...
      Zone 1 individual time: 5 group time: 5 name: 0
      Zone 2 individual time: 8 group time: 8 name: Zone 2
      Zone 3 individual time: 0 group time: 0 name: Zone 3
      Zone 4 individual time: 0 group time: 0 name: Zone 4
      Zone 5 individual time: 0 group time: 0 name: Zone 5
      Zone 6 individual time: 0 group time: 0 name: Zone 6
      5075 TSF:MSG:SEND,2-2-0-0,s=3,c=2,t=26,pt=0,l=0,sg=0,ft=0,st=OK:
      5135 TSF:MSG:SEND,2-2-0-0,s=3,c=2,t=26,pt=0,l=0,sg=0,ft=0,st=OK:
      5168 TSF:MSG:READ,0-0-2,s=2,c=1,t=25,pt=0,l=1,sg=0:8
      Recieved variable2 valve:2 = 8
      Calling for Valve 4 Data...
      5222 TSF:MSG:SEND,2-2-0-0,s=4,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK:
      5281 TSF:MSG:SEND,2-2-0-0,s=4,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK:
      5318 TSF:MSG:READ,0-0-2,s=2,c=1,t=25,pt=0,l=1,sg=0:8
      Recieved variable2 valve:2 = 8
      5340 TSF:MSG:SEND,2-2-0-0,s=4,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK:
      5399 TSF:MSG:SEND,2-2-0-0,s=4,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK:
      5458 TSF:MSG:SEND,2-2-0-0,s=4,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK:
      5474 TSF:MSG:READ,0-0-2,s=2,c=1,t=26,pt=0,l=1,sg=0:0
      Recieved variable3 valve: 2 = 0
      5518 TSF:MSG:SEND,2-2-0-0,s=4,c=2,t=26,pt=0,l=0,sg=0,ft=0,st=OK:
      5577 TSF:MSG:SEND,2-2-0-0,s=4,c=2,t=26,pt=0,l=0,sg=0,ft=0,st=OK:
      5619 TSF:MSG:READ,0-0-2,s=2,c=1,t=26,pt=0,l=1,sg=0:0
      Recieved variable3 valve: 2 = 0
      Calling for Valve 5 Data...
      5663 TSF:MSG:SEND,2-2-0-0,s=5,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK:
      5722 TSF:MSG:SEND,2-2-0-0,s=5,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK:
      5770 TSF:MSG:READ,0-0-2,s=3,c=1,t=24,pt=0,l=1,sg=0:8
      Recieved variable1 valve:3 = 8
      New Zone Times Recieved...
      Zone 1 individual time: 5 group time: 5 name: 0
      Zone 2 individual time: 8 group time: 8 name: 0
      Zone 3 individual time: 0 group time: 8 name: Zone 3
      Zone 4 individual time: 0 group time: 0 name: Zone 4
      Zone 5 individual time: 0 group time: 0 name: Zone 5
      Zone 6 individual time: 0 group time: 0 name: Zone 6
      5805 TSF:MSG:SEND,2-2-0-0,s=5,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK:
      5865 TSF:MSG:SEND,2-2-0-0,s=5,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK:
      5931 TSF:MSG:SEND,2-2-0-0,s=5,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK:
      5952 TSF:MSG:READ,0-0-2,s=3,c=1,t=24,pt=0,l=1,sg=0:8
      Recieved variable1 valve:3 = 8
      5996 TSF:MSG:SEND,2-2-0-0,s=5,c=2,t=26,pt=0,l=0,sg=0,ft=0,st=OK:
      6055 TSF:MSG:SEND,2-2-0-0,s=5,c=2,t=26,pt=0,l=0,sg=0,ft=0,st=OK:
      6071 TSF:MSG:READ,0-0-2,s=3,c=1,t=25,pt=0,l=1,sg=0:8
      Recieved variable2 valve:3 = 8
      New Zone Times Recieved...
      Zone 1 individual time: 5 group time: 5 name: 0
      Zone 2 individual time: 8 group time: 8 name: 0
      Zone 3 individual time: 8 group time: 8 name: Zone 3
      Zone 4 individual time: 0 group time: 0 name: Zone 4
      Zone 5 individual time: 0 group time: 0 name: Zone 5
      Zone 6 individual time: 0 group time: 0 name: Zone 6
      Calling for Valve 6 Data...
      6142 TSF:MSG:SEND,2-2-0-0,s=6,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK:
      6202 TSF:MSG:SEND,2-2-0-0,s=6,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK:
      6220 TSF:MSG:READ,0-0-2,s=3,c=1,t=25,pt=0,l=1,sg=0:8
      Recieved variable2 valve:3 = 8
      6261 TSF:MSG:SEND,2-2-0-0,s=6,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK:
      6320 TSF:MSG:SEND,2-2-0-0,s=6,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK:
      6371 TSF:MSG:READ,0-0-2,s=3,c=1,t=25,pt=0,l=1,sg=0:8
      Recieved variable2 valve:3 = 8
      6379 TSF:MSG:SEND,2-2-0-0,s=6,c=2,t=26,pt=0,l=0,sg=0,ft=0,st=OK:
      6438 TSF:MSG:SEND,2-2-0-0,s=6,c=2,t=26,pt=0,l=0,sg=0,ft=0,st=OK:
      6498 TSF:MSG:SEND,2-2-0-0,s=6,c=2,t=26,pt=0,l=0,sg=0,ft=0,st=OK:
      6521 TSF:MSG:READ,0-0-2,s=3,c=1,t=26,pt=0,l=1,sg=0:0
      Recieved variable3 valve: 3 = 0
      6556 MCO:BGN:INIT OK,TSP=1
      6723 TSF:MSG:READ,0-0-2,s=3,c=1,t=26,pt=0,l=1,sg=0:0
      Recieved variable3 valve: 3 = 0
      6927 TSF:MSG:READ,0-0-2,s=4,c=1,t=24,pt=0,l=2,sg=0:12
      Recieved variable1 valve:4 = 12
      New Zone Times Recieved...
      Zone 1 individual time: 5 group time: 5 name: 0
      Zone 2 individual time: 8 group time: 8 name: 0
      Zone 3 individual time: 8 group time: 8 name: 0
      Zone 4 individual time: 0 group time: 12 name: Zone 4
      Zone 5 individual time: 0 group time: 0 name: Zone 5
      Zone 6 individual time: 0 group time: 0 name: Zone 6
      7129 TSF:MSG:READ,0-0-2,s=4,c=1,t=24,pt=0,l=2,sg=0:12
      Recieved variable1 valve:4 = 12
      7148 TSF:MSG:READ,0-0-2,s=4,c=1,t=25,pt=0,l=2,sg=0:12
      Recieved variable2 valve:4 = 12
      New Zone Times Recieved...
      Zone 1 individual time: 5 group time: 5 name: 0
      Zone 2 individual time: 8 group time: 8 name: 0
      Zone 3 individual time: 8 group time: 8 name: 0
      Zone 4 individual time: 12 group time: 12 name: Zone 4
      Zone 5 individual time: 0 group time: 0 name: Zone 5
      Zone 6 individual time: 0 group time: 0 name: Zone 6
      7331 TSF:MSG:READ,0-0-2,s=4,c=1,t=25,pt=0,l=2,sg=0:12
      Recieved variable2 valve:4 = 12
      7534 TSF:MSG:READ,0-0-2,s=4,c=1,t=25,pt=0,l=2,sg=0:12
      Recieved variable2 valve:4 = 12
      7736 TSF:MSG:READ,0-0-2,s=4,c=1,t=26,pt=0,l=1,sg=0:0
      Recieved variable3 valve: 4 = 0
      7754 TSF:MSG:READ,0-0-2,s=4,c=1,t=26,pt=0,l=1,sg=0:0
      Recieved variable3 valve: 4 = 0
      7939 TSF:MSG:READ,0-0-2,s=5,c=1,t=24,pt=0,l=2,sg=0:12
      Recieved variable1 valve:5 = 12
      New Zone Times Recieved...
      Zone 1 individual time: 5 group time: 5 name: 0
      Zone 2 individual time: 8 group time: 8 name: 0
      Zone 3 individual time: 8 group time: 8 name: 0
      Zone 4 individual time: 12 group time: 12 name: 0
      Zone 5 individual time: 0 group time: 12 name: Zone 5
      Zone 6 individual time: 0 group time: 0 name: Zone 6
      8141 TSF:MSG:READ,0-0-2,s=5,c=1,t=24,pt=0,l=2,sg=0:12
      Recieved variable1 valve:5 = 12
      8344 TSF:MSG:READ,0-0-2,s=5,c=1,t=25,pt=0,l=2,sg=0:12
      Recieved variable2 valve:5 = 12
      New Zone Times Recieved...
      Zone 1 individual time: 5 group time: 5 name: 0
      Zone 2 individual time: 8 group time: 8 name: 0
      Zone 3 individual time: 8 group time: 8 name: 0
      Zone 4 individual time: 12 group time: 12 name: 0
      Zone 5 individual time: 12 group time: 12 name: Zone 5
      Zone 6 individual time: 0 group time: 0 name: Zone 6
      8375 TSF:MSG:READ,0-0-2,s=5,c=1,t=25,pt=0,l=2,sg=0:12
      Recieved variable2 valve:5 = 12
      8546 TSF:MSG:READ,0-0-2,s=5,c=1,t=25,pt=0,l=2,sg=0:12
      Recieved variable2 valve:5 = 12
      8748 TSF:MSG:READ,0-0-2,s=5,c=1,t=26,pt=0,l=1,sg=0:0
      Recieved variable3 valve: 5 = 0
      8950 TSF:MSG:READ,0-0-2,s=5,c=1,t=26,pt=0,l=1,sg=0:0
      Recieved variable3 valve: 5 = 0
      8970 TSF:MSG:READ,0-0-2,s=6,c=1,t=24,pt=0,l=2,sg=0:10
      Recieved variable1 valve:6 = 10
      New Zone Times Recieved...
      Zone 1 individual time: 5 group time: 5 name: 0
      Zone 2 individual time: 8 group time: 8 name: 0
      Zone 3 individual time: 8 group time: 8 name: 0
      Zone 4 individual time: 12 group time: 12 name: 0
      Zone 5 individual time: 12 group time: 12 name: 0
      Zone 6 individual time: 0 group time: 10 name: Zone 6
      9153 TSF:MSG:READ,0-0-2,s=6,c=1,t=24,pt=0,l=2,sg=0:10
      Recieved variable1 valve:6 = 10
      9356 TSF:MSG:READ,0-0-2,s=6,c=1,t=25,pt=0,l=2,sg=0:10
      Recieved variable2 valve:6 = 10
      New Zone Times Recieved...
      Zone 1 individual time: 5 group time: 5 name: 0
      Zone 2 individual time: 8 group time: 8 name: 0
      Zone 3 individual time: 8 group time: 8 name: 0
      Zone 4 individual time: 12 group time: 12 name: 0
      Zone 5 individual time: 12 group time: 12 name: 0
      Zone 6 individual time: 10 group time: 10 name: Zone 6
      9559 TSF:MSG:READ,0-0-2,s=6,c=1,t=25,pt=0,l=2,sg=0:10
      Recieved variable2 valve:6 = 10
      9577 TSF:MSG:READ,0-0-2,s=6,c=1,t=26,pt=0,l=1,sg=0:0
      Recieved variable3 valve: 6 = 0
      9760 TSF:MSG:READ,0-0-2,s=6,c=1,t=26,pt=0,l=1,sg=0:0
      Recieved variable3 valve: 6 = 0
      9963 TSF:MSG:READ,0-0-2,s=6,c=1,t=26,pt=0,l=1,sg=0:0
      Recieved variable3 valve: 6 = 0
      

      EDIT - After the next openHab restart when the variables all got restored from Persistance they all show up right but now the node when reboot will not pick up the data see this node reboot log (Note Zone 1 group time 5 came through as I had forced a sendCommand on that single item - all other values restored from persistance - seems the same issue if they come from postUpdate also)

       
       __  __       ____
      |  \/  |_   _/ ___|  ___ _ __  ___  ___  _ __ ___
      | |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __|
      | |  | | |_| |___| |  __/ | | \__ \  _  | |  \__ \
      |_|  |_|\__, |____/ \___|_| |_|___/\___/|_|  |___/
              |___/                      2.2.0
      
      16 MCO:BGN:INIT NODE,CP=RNNNA---,VER=2.2.0
      25 TSM:INIT
      26 TSF:WUR:MS=0
      33 TSM:INIT:TSP OK
      35 TSM:INIT:STATID=2
      37 TSF:SID:OK,ID=2
      39 TSM:FPAR
      75 TSF:MSG:SEND,2-2-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      388 TSF:MSG:READ,0-0-2,s=255,c=3,t=8,pt=1,l=1,sg=0:0
      393 TSF:MSG:FPAR OK,ID=0,D=1
      2082 TSM:FPAR:OK
      2083 TSM:ID
      2084 TSM:ID:OK
      2086 TSM:UPL
      2089 TSF:MSG:SEND,2-2-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=OK:1
      2100 TSF:MSG:READ,0-0-2,s=255,c=3,t=25,pt=1,l=1,sg=0:1
      2105 TSF:MSG:PONG RECV,HP=1
      2107 TSM:UPL:OK
      2109 TSM:READY:ID=2,PAR=0,DIS=1
      2113 TSF:MSG:SEND,2-2-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
      2120 TSF:MSG:READ,0-0-2,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
      2128 TSF:MSG:SEND,2-2-0-0,s=255,c=0,t=17,pt=0,l=5,sg=0,ft=0,st=OK:2.2.0
      2137 TSF:MSG:SEND,2-2-0-0,s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=OK:0
      2162 TSF:MSG:READ,0-0-2,s=255,c=3,t=6,pt=0,l=1,sg=0:M
      2170 TSF:MSG:SEND,2-2-0-0,s=255,c=3,t=11,pt=0,l=19,sg=0,ft=0,st=OK:Irrigation Ctrl (2)
      2180 TSF:MSG:SEND,2-2-0-0,s=255,c=3,t=12,pt=0,l=3,sg=0,ft=0,st=OK:4.0
      2188 TSF:MSG:SEND,2-2-0-0,s=0,c=0,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
      2195 TSF:MSG:SEND,2-2-0-0,s=1,c=0,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
      2203 TSF:MSG:SEND,2-2-0-0,s=2,c=0,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
      2210 TSF:MSG:SEND,2-2-0-0,s=3,c=0,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
      2217 TSF:MSG:SEND,2-2-0-0,s=4,c=0,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
      2226 TSF:MSG:SEND,2-2-0-0,s=5,c=0,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
      2233 TSF:MSG:SEND,2-2-0-0,s=6,c=0,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
      2239 MCO:REG:REQ
      2242 TSF:MSG:SEND,2-2-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=OK:2
      2249 TSF:MSG:READ,0-0-2,s=255,c=3,t=27,pt=1,l=1,sg=0:1
      2254 MCO:PIM:NODE REG=1
      2256 MCO:BGN:STP
      Initialising...
      Turning All Valves Off...
      Checking EEPROM for stored date:
      Retreiving last run time from EEPROM...
      Sensor Presentation Complete
      Ready...
      2914 TSF:MSG:SEND,2-2-0-0,s=255,c=3,t=1,pt=0,l=0,sg=0,ft=0,st=OK:
      Requesting time from Gateway:
      2939 TSF:MSG:READ,0-0-2,s=255,c=3,t=1,pt=0,l=10,sg=0:1534915205
      Time value received and updated...
      Clock updated....
      Sensor's time currently set to: 05:20am
      8/22/2018
      Wednesday 
      Calling for Valve 1 Data...
      3952 TSF:MSG:SEND,2-2-0-0,s=1,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK:
      3976 TSF:MSG:READ,0-0-2,s=1,c=1,t=24,pt=0,l=1,sg=0:5
      Recieved variable1 valve:1 = 5
      New Zone Times Recieved...
      Zone 1 individual time: 0 group time: 5 name: Zone 1
      Zone 2 individual time: 0 group time: 0 name: Zone 2
      Zone 3 individual time: 0 group time: 0 name: Zone 3
      Zone 4 individual time: 0 group time: 0 name: Zone 4
      Zone 5 individual time: 0 group time: 0 name: Zone 5
      Zone 6 individual time: 0 group time: 0 name: Zone 6
      4012 TSF:MSG:SEND,2-2-0-0,s=1,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK:
      4072 TSF:MSG:SEND,2-2-0-0,s=1,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK:
      4126 TSF:MSG:READ,0-0-2,s=1,c=1,t=25,pt=0,l=1,sg=0:0
      Recieved variable2 valve:1 = 0
      4134 TSF:MSG:SEND,2-2-0-0,s=1,c=2,t=26,pt=0,l=0,sg=0,ft=0,st=OK:
      4194 TSF:MSG:SEND,2-2-0-0,s=1,c=2,t=26,pt=0,l=0,sg=0,ft=0,st=OK:
      4253 TSF:MSG:SEND,2-2-0-0,s=1,c=2,t=26,pt=0,l=0,sg=0,ft=0,st=OK:
      4276 TSF:MSG:READ,0-0-2,s=1,c=1,t=25,pt=0,l=1,sg=0:0
      Recieved variable2 valve:1 = 0
      Calling for Valve 2 Data...
      4340 TSF:MSG:SEND,2-2-0-0,s=2,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK:
      4399 TSF:MSG:SEND,2-2-0-0,s=2,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK:
      4426 TSF:MSG:READ,0-0-2,s=1,c=1,t=26,pt=0,l=1,sg=0:0
      Recieved variable3 valve: 1 = 0
      4458 TSF:MSG:SEND,2-2-0-0,s=2,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK:
      4517 TSF:MSG:SEND,2-2-0-0,s=2,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK:
      4611 !TSF:MSG:SEND,2-2-0-0,s=2,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=NACK:
      4670 TSF:MSG:SEND,2-2-0-0,s=2,c=2,t=25,pt=0,l=0,sg=0,ft=1,st=OK:
      4729 TSF:MSG:SEND,2-2-0-0,s=2,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK:
      4736 TSF:MSG:READ,0-0-2,s=1,c=1,t=26,pt=0,l=1,sg=0:0
      Recieved variable3 valve: 1 = 0
      4789 TSF:MSG:SEND,2-2-0-0,s=2,c=2,t=26,pt=0,l=0,sg=0,ft=0,st=OK:
      4848 TSF:MSG:SEND,2-2-0-0,s=2,c=2,t=26,pt=0,l=0,sg=0,ft=0,st=OK:
      4878 TSF:MSG:READ,0-0-2,s=2,c=1,t=24,pt=0,l=1,sg=0:0
      Recieved variable1 valve:2 = 0
      Calling for Valve 3 Data...
      4935 TSF:MSG:SEND,2-2-0-0,s=3,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK:
      4995 TSF:MSG:SEND,2-2-0-0,s=3,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK:
      5027 TSF:MSG:READ,0-0-2,s=2,c=1,t=24,pt=0,l=1,sg=0:0
      Recieved variable1 valve:2 = 0
      5054 TSF:MSG:SEND,2-2-0-0,s=3,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK:
      5113 TSF:MSG:SEND,2-2-0-0,s=3,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK:
      5173 TSF:MSG:SEND,2-2-0-0,s=3,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK:
      5179 TSF:MSG:READ,0-0-2,s=2,c=1,t=25,pt=0,l=1,sg=0:0
      Recieved variable2 valve:2 = 0
      5232 TSF:MSG:SEND,2-2-0-0,s=3,c=2,t=26,pt=0,l=0,sg=0,ft=0,st=OK:
      5292 TSF:MSG:SEND,2-2-0-0,s=3,c=2,t=26,pt=0,l=0,sg=0,ft=0,st=OK:
      5328 TSF:MSG:READ,0-0-2,s=2,c=1,t=25,pt=0,l=1,sg=0:0
      Recieved variable2 valve:2 = 0
      Calling for Valve 4 Data...
      5379 TSF:MSG:SEND,2-2-0-0,s=4,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK:
      5438 TSF:MSG:SEND,2-2-0-0,s=4,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK:
      5479 TSF:MSG:READ,0-0-2,s=2,c=1,t=25,pt=0,l=1,sg=0:0
      Recieved variable2 valve:2 = 0
      5497 TSF:MSG:SEND,2-2-0-0,s=4,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK:
      5557 TSF:MSG:SEND,2-2-0-0,s=4,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK:
      5616 TSF:MSG:SEND,2-2-0-0,s=4,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK:
      5632 TSF:MSG:READ,0-0-2,s=2,c=1,t=25,pt=0,l=1,sg=0:0
      Recieved variable2 valve:2 = 0
      5676 TSF:MSG:SEND,2-2-0-0,s=4,c=2,t=26,pt=0,l=0,sg=0,ft=0,st=OK:
      5735 TSF:MSG:SEND,2-2-0-0,s=4,c=2,t=26,pt=0,l=0,sg=0,ft=0,st=OK:
      5780 TSF:MSG:READ,0-0-2,s=2,c=1,t=26,pt=0,l=1,sg=0:0
      Recieved variable3 valve: 2 = 0
      Calling for Valve 5 Data...
      5822 TSF:MSG:SEND,2-2-0-0,s=5,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK:
      5881 TSF:MSG:SEND,2-2-0-0,s=5,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK:
      5929 TSF:MSG:READ,0-0-2,s=2,c=1,t=26,pt=0,l=1,sg=0:0
      Recieved variable3 valve: 2 = 0
      5941 TSF:MSG:SEND,2-2-0-0,s=5,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK:
      6000 TSF:MSG:SEND,2-2-0-0,s=5,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK:
      6060 TSF:MSG:SEND,2-2-0-0,s=5,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK:
      6080 TSF:MSG:READ,0-0-2,s=3,c=1,t=24,pt=0,l=1,sg=0:0
      Recieved variable1 valve:3 = 0
      6119 TSF:MSG:SEND,2-2-0-0,s=5,c=2,t=26,pt=0,l=0,sg=0,ft=0,st=OK:
      6178 TSF:MSG:SEND,2-2-0-0,s=5,c=2,t=26,pt=0,l=0,sg=0,ft=0,st=OK:
      6231 TSF:MSG:READ,0-0-2,s=3,c=1,t=24,pt=0,l=1,sg=0:0
      Recieved variable1 valve:3 = 0
      Calling for Valve 6 Data...
      6267 TSF:MSG:SEND,2-2-0-0,s=6,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK:
      6326 TSF:MSG:SEND,2-2-0-0,s=6,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK:
      6381 TSF:MSG:READ,0-0-2,s=3,c=1,t=25,pt=0,l=1,sg=0:0
      Recieved variable2 valve:3 = 0
      6389 TSF:MSG:SEND,2-2-0-0,s=6,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK:
      6448 TSF:MSG:SEND,2-2-0-0,s=6,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK:
      6507 TSF:MSG:SEND,2-2-0-0,s=6,c=2,t=25,pt=0,l=0,sg=0,ft=0,st=OK:
      6531 TSF:MSG:READ,0-0-2,s=3,c=1,t=25,pt=0,l=1,sg=0:0
      Recieved variable2 valve:3 = 0
      6566 TSF:MSG:SEND,2-2-0-0,s=6,c=2,t=26,pt=0,l=0,sg=0,ft=0,st=OK:
      6626 TSF:MSG:SEND,2-2-0-0,s=6,c=2,t=26,pt=0,l=0,sg=0,ft=0,st=OK:
      6681 TSF:MSG:READ,0-0-2,s=3,c=1,t=25,pt=0,l=1,sg=0:0
      Recieved variable2 valve:3 = 0
      6689 MCO:BGN:INIT OK,TSP=1
      6884 TSF:MSG:READ,0-0-2,s=3,c=1,t=26,pt=0,l=1,sg=0:0
      Recieved variable3 valve: 3 = 0
      7087 TSF:MSG:READ,0-0-2,s=3,c=1,t=26,pt=0,l=1,sg=0:0
      Recieved variable3 valve: 3 = 0
      7288 TSF:MSG:READ,0-0-2,s=4,c=1,t=24,pt=0,l=1,sg=0:0
      Recieved variable1 valve:4 = 0
      7308 TSF:MSG:READ,0-0-2,s=4,c=1,t=24,pt=0,l=1,sg=0:0
      Recieved variable1 valve:4 = 0
      7491 TSF:MSG:READ,0-0-2,s=4,c=1,t=25,pt=0,l=1,sg=0:0
      Recieved variable2 valve:4 = 0
      7694 TSF:MSG:READ,0-0-2,s=4,c=1,t=25,pt=0,l=1,sg=0:0
      Recieved variable2 valve:4 = 0
      7897 TSF:MSG:READ,0-0-2,s=4,c=1,t=25,pt=0,l=1,sg=0:0
      Recieved variable2 valve:4 = 0
      7915 TSF:MSG:READ,0-0-2,s=4,c=1,t=26,pt=0,l=1,sg=0:0
      Recieved variable3 valve: 4 = 0
      8099 TSF:MSG:READ,0-0-2,s=4,c=1,t=26,pt=0,l=1,sg=0:0
      Recieved variable3 valve: 4 = 0
      8301 TSF:MSG:READ,0-0-2,s=5,c=1,t=24,pt=0,l=1,sg=0:0
      Recieved variable1 valve:5 = 0
      8504 TSF:MSG:READ,0-0-2,s=5,c=1,t=24,pt=0,l=1,sg=0:0
      Recieved variable1 valve:5 = 0
      8522 TSF:MSG:READ,0-0-2,s=5,c=1,t=25,pt=0,l=1,sg=0:0
      Recieved variable2 valve:5 = 0
      8706 TSF:MSG:READ,0-0-2,s=5,c=1,t=25,pt=0,l=1,sg=0:0
      Recieved variable2 valve:5 = 0
      8908 TSF:MSG:READ,0-0-2,s=5,c=1,t=25,pt=0,l=1,sg=0:0
      Recieved variable2 valve:5 = 0
      9111 TSF:MSG:READ,0-0-2,s=5,c=1,t=26,pt=0,l=1,sg=0:0
      Recieved variable3 valve: 5 = 0
      9129 TSF:MSG:READ,0-0-2,s=5,c=1,t=26,pt=0,l=1,sg=0:0
      Recieved variable3 valve: 5 = 0
      9313 TSF:MSG:READ,0-0-2,s=6,c=1,t=24,pt=0,l=1,sg=0:0
      Recieved variable1 valve:6 = 0
      9516 TSF:MSG:READ,0-0-2,s=6,c=1,t=24,pt=0,l=1,sg=0:0
      Recieved variable1 valve:6 = 0
      9718 TSF:MSG:READ,0-0-2,s=6,c=1,t=25,pt=0,l=1,sg=0:0
      Recieved variable2 valve:6 = 0
      9737 TSF:MSG:READ,0-0-2,s=6,c=1,t=25,pt=0,l=1,sg=0:0
      Recieved variable2 valve:6 = 0
      9921 TSF:MSG:READ,0-0-2,s=6,c=1,t=25,pt=0,l=1,sg=0:0
      Recieved variable2 valve:6 = 0
      10123 TSF:MSG:READ,0-0-2,s=6,c=1,t=26,pt=0,l=1,sg=0:0
      Recieved variable3 valve: 6 = 0
      10326 TSF:MSG:READ,0-0-2,s=6,c=1,t=26,pt=0,l=1,sg=0:0
      Recieved variable3 valve: 6 = 0
      

      Sorry also just realised I am posting in an MQTT thread - I had an MQTT Gateway and now changed to Ethernet.

      posted in OpenHAB
      itbeyond
      itbeyond
    • RE: Repeater drops nodes

      Are you running 2.2 or 2.3. I have noticed that repeaters and 2.3 just do not seem to work. I have three gateways and various repeaters around my place and over 20 nodes and have reverted all Gateways and Repeater to 2.2. and all my issue went away. I even took a gateway on my desk install 2.3 on it - works find for a few hours then starts to NACK and play up - on 2.2 this just does not happen.

      posted in Troubleshooting
      itbeyond
      itbeyond
    • RE: Getting MySensors MQTT Gateway working on OpenHAB 2.2 (Stable)

      @fredswed thanks for your comments. I have gone with Ethernet gateway as it works well and at this stage I do not need MQTT - maybe if I play with node-red or something down the track but for the moment happy with Ethernet - it just works. I did have MQTT working but the MYSController connection is a possible problem.

      I have also gone to the config files directly and have worked out the bridge setup in the things file and have a few test items running.

      Yes backups - done that and have my system backing up to a local NAS box.
      Cheers David

      posted in OpenHAB
      itbeyond
      itbeyond
    • RE: Getting MySensors MQTT Gateway working on OpenHAB 2.2 (Stable)

      @TimO Thanks for the excellent work with the binding.

      I have just got this all running on OH2.3 using mosquito and mqtt mysensors using a Mega 2560. I am migration from a Vera to openHab and have around 20+ mysensors nodes from 1 to 8 devices on each. So this is a significant task. Anyway I am also newish to OH so have a few questions if I may.

      • Is it better to go via MQTT or Ethernet Bridge - on Vera I am using Ethernet my new Gateway using the Mega (as pro mini not enough ram to run security) can be either so is there a preference for either of these?
      • Is it worth using PaperUI vs Items files for configuration. I am leaning to items files as I am working with Persistance and some complex rules for device control. I have the binding learning nodes during a reboot in PaperUI these are working but I am confused how to build everything outside of the json DB files or even if I should?
      • Can MYSController be used somehow in this configuration either MQTT or Ethernet for OTA. At the moment I run this on a PC and connect to the Ethernet gateway do my updates and then let Vera have the gateway back. Is there a better way to link this using openHab?

      Sorry for the questions but if you never ask you never learn - thanks.
      David

      posted in OpenHAB
      itbeyond
      itbeyond
    • RE: Mega 2560 Pro + W5100 + NRF24 Gateway

      I would just like to conclude this post and again thanks to @hard-shovel for the connection information. I have now setup the hard wired unit and the connect/reconnects went away. The gateway connected directly to the broker I had setup on the openHab RPi running mosquitto and it started SENDING topics from my already running network. I am now working on the openHab configuration of the items but have already received a number of items from mySensors to openHab. I will play with sending data shortly once I work out my upgrade path from Vera some more and test the way you need to setup nodes on openHab.

      posted in Troubleshooting
      itbeyond
      itbeyond
    • RE: Mega 2560 Pro + W5100 + NRF24 Gateway

      @hard-shovel thanks very much clear and concise. I was having some trouble using 50, 51,52 & 10 so went for the ICSP header - I am using a module not a sheild as the 2560 Pro is not a shield type module alt text

      But it has headers at the end for the ICSP port and it is as easy to use those as the 50 and so on. I also had some trouble with the 5V supply to the module when I pulled it from the 5V lines on the module but the 5v port on the ICSP worked. I am now soldering all this up and will provide a 2amp power supply at 5v to run the high powered radio module I am installing, this will power the ethernet and mega. I have built an additional power supply for the 3.3v to the radio from this supply.

      BTW: Is it normal to see connect/re-connect sequences or is this still a power supply problem as I am testing via the usb connection to the computer at the moment?

      88620 GWT:RMQ:MQTT CONNECTED
      88623 GWT:TPS:TOPIC=mys1-out/0/255/0/0/18,MSG SENT
      118932 GWT:TPC:IP=192.168.100.63
      119936 GWT:RMQ:MQTT RECONNECT
      120244 GWT:TPC:IP=192.168.100.63
      121247 GWT:RMQ:MQTT RECONNECT
      136553 GWT:TPC:IP=192.168.100.63
      137556 GWT:RMQ:MQTT RECONNECT
      137563 GWT:RMQ:MQTT CONNECTED
      137566 GWT:TPS:TOPIC=mys1-out/0/255/0/0/18,MSG SENT
      
      posted in Troubleshooting
      itbeyond
      itbeyond
    • Mega 2560 Pro + W5100 + NRF24 Gateway

      Hi,
      Now before you point me at all the relevant threads:
      https://forum.mysensors.org/topic/1245/building-an-ethernet-gateway-on-an-arduino-mega
      https://forum.mysensors.org/topic/4680/mysensors-2-0-ethernet-gateway-atmega-w5100-restart-all-time/9
      https://forum.mysensors.org/topic/4668/ethernet-gateway-on-arduino-mega-2056-issues/14

      I have read all of these and I am totally confused and feeling a bit dumb. I have a Mega 2560 Pro board and an NRF24 module - I wired this up the same as a number of other similar setups I have with the NRF hooked up as follows:

      49 CE
      50 MISO
      51 MOSI
      52 SCK
      53 CSN

      If I simply load a repeater node sketch to this it works perfectly. So then I come along and hook up the W5100 - this must be where I am wrong or do not understand something because there seems to be conflicting information, anyway it is hooked up as follows:

      10 SS/CS
      11 MOSI/SI
      12 MIOS/SO
      13 SCK

      Now I am trying to load the GatewayW5100MQTTClient.ino - i have changed the following:

      #ifndef MY_RF24_CE_PIN
      #define MY_RF24_CE_PIN 49
      #endif
      #ifndef MY_RF24_CS_PIN
      #define MY_RF24_CS_PIN 53
      #endif
      

      I have tried with this code Enabled and disabled with the following:

      #if !defined(MY_W5100_SPI_EN) && !defined(ARDUINO_ARCH_SAMD)
      #define MY_SOFTSPI
      #define MY_SOFT_SPI_SCK_PIN 14
      #define MY_SOFT_SPI_MISO_PIN 16
      #define MY_SOFT_SPI_MOSI_PIN 15
      #endif
      

      It seems I cannot get a IP address and the system just loops

      0 MCO:BGN:INIT GW,CP=R-NGA---,VER=2.3.0
      304 GWT:TPC:IP=0.0.0.0
      1305 MCO:BGN:STP
      1307 MCO:REG:NOT NEEDED
      1309 MCO:BGN:INIT OK,TSP=NA
      1612 GWT:TPC:IP=255.255.255.255
      2615 GWT:RMQ:MQTT RECONNECT
      2918 GWT:TPC:IP=255.255.255.255
      3921 GWT:RMQ:MQTT RECONNECT
      4225 GWT:TPC:IP=255.255.255.255
      

      Is there a definitive guide on how to hook up and configure the MEGA as a gateway with the W5100 module. I can see people taking about A0-A2 pins and others talking about 14-16 and mixes of the above but I an just looking for a working solution. Please help!

      posted in Troubleshooting
      itbeyond
      itbeyond
    • RE: MySensors 2.3.0 released

      Hum I am not sure what the deal is here but I have spent the last two days updating and then removing 2.3.0 from Gateways and Repeaters. It completely trashed my 22 node network. I still have some 2.3.0 nodes running but if I installed 2.3.0 and setup #define MY_REPEATER_FEATURE my nodes would crash within about 30 mins of booting. Also on the gateway the through-put of the radio RF24 died to a crawl. I was trying to OTA my nodes and they were going line by line for about 60mins or more each (MYSController). I simply went back to 2.2.0 on Ethernet Gateway made NO other configuration changes and the nodes flashed in less than a minute each.

      Since removing 2.3.0 from gateway and repeaters the whole network appears to have stabilised again.

      posted in Announcements
      itbeyond
      itbeyond
    • RE: MYSBootloader 1.3 pre-release & MYSController 1.0.0beta

      How is the upcoming bootloader release (1.3S) going?

      I may be wrong but think I need this to push signed firmware to a node. I have a node with soft signing required. The node works but I cannot update it OTA is this 1.3S to support this?

      posted in Development
      itbeyond
      itbeyond
    • RE: 💬 Dimmable LED Actuator

      Ah I have just built a test bed with this setup however it appears the circuit diagram in the Fritizing is actually not 100% correct. The red wire from the protoboard is connected to the GND of the Pro Mini - this confused me as I was using the GND/RAW pins to identify the cable color. If you flip the red/blue connections on the Pro Mini it will be right. Small issue I know but I had to reference another image to get the circuit to work.

      posted in Announcements
      itbeyond
      itbeyond
    • RE: MYSBootloader 1.3 pre-release & MYSController 1.0.0beta

      @petewill - Thanks of course Windows Firewall - how many times does one have to forget about that little gem. One other quick question I created a new post in controllers for a MYSBootloader issue - should I add it to this post or leave it where I posted it? I cannot get one node to accept firmware (wonder if signing is a problem however it should not be).

      posted in Development
      itbeyond
      itbeyond
    • RE: MYSBootloader 1.3 pre-release & MYSController 1.0.0beta

      How does GW mode actually work - I have been trying to relay a connection to Vera but not matter what combination I am trying I cannot understand how the GW mode operates?

      posted in Development
      itbeyond
      itbeyond
    • RE: 💬 Building an Ethernet Gateway

      I give up - at least if someone is thinking of building this gateway and wanting to use security they can hopefully read this thread before they start and will look at a higher level controller before they purchase the hardware. I am only trying to help others with what to me is still a simple and easy fix alas I must have upset the apple cart.

      There is no big problem at all, just that it is really simple to know right now, with technology available today, if you need an Ethernet gateway and signing then use a Mega 2560 or better for the Ethernet Gateway controller to ensure you have the ram. @mfalkvidd - You state variations increase exponentially and most not under library control however using the MySensors Library and building the hardware shown and documented on this page using the sketch provided (completely under control of MySensors) you will need a Mega 2560 or better if you intend to enable signing (also under control of the Library). Do not get me wrong I really love the whole MySensors thing and have over 30 devices up and running and have enjoyed the whole learning thing however simple requirements (IMHO) like this should be detailed.

      Hopefully this post will help the next person, it certainly would have help me and I am sure I am not the only one.

      posted in Announcements
      itbeyond
      itbeyond
    • RE: 💬 Building an Ethernet Gateway

      @gohan yes I understand perfectly I am a developer and have over 30 years coding experience in about 20 languages. What I find difficult is that there is no detail or documentation on library resource usage so one cannot predetermine the resource requirements when a library or piece of hardware is used. In this great site we have a statement at the top (first sentance) of the Ethernet Gateway page that states "You can build an Ethernet gateway using almost any Arduino model." Well this is not exactly true because if you want to enable some of the library features (ie: signing, and lets face it you should have this enabled if you have any locks or garage doors etc) you will run out of memory in the general models. I am not complaining I just think something so simple should be documented to help other uses look at the right equipment from the outset. In fact all that needs to be written in the first sentence is something as simple as "You can build and Ethernet gateway using almost any Ardunio model however as the Ethernet library uses more resources it would be best to look at a micro controller with greater than 2kb or ram so we recommend a Mega 2560 or similar if you intend to enabled signing or whitelist support."

      posted in Announcements
      itbeyond
      itbeyond
    • Firmware does not load MYSController & MYSBootloaderV13pre

      I am not sure what I am doing wrong but I have been working on MYSController to perform OTA on my network. I have a VeraEdge and Ethernet gateway setup for the main operation. I have now added MYSContoller onto my PC and it seems to connect and read data from the Ethernet connection fine and does not seem to clash with Vera. I must admit if I need to work on a node ie: do multi function like - reboot then request presenation or assign firmware I need to disconnect and re-connect to the Etehernet gateway (not sure if this is right or even if the way I am using it is supported). Anyway I assign a new firmware build to a node and then request reboot (have to connect/disconnect/connect). But it all runs however in the logs I get this:

      [2017-11-12 16:52:58.265 Info] RX 10;255;4;0;0;FFFFFFFF080004C30102
      [2017-11-12 16:52:58.265 Info] CHILD New child discovered, node id=10, child id=internal
      [2017-11-12 16:52:58.266 Info] DEBUG Undefined firmware/type for node=10
      [2017-11-12 16:52:58.266 Info] INFO BL version=258
      [2017-11-12 16:52:58.266 Info] INFO Send FW info to node 10: type=C, version=4, blocks=0x0438, CRC=0xD69E
      [2017-11-12 16:52:58.271 Info] TX 10;0;4;0;1;0C00040038049ED6
      [2017-11-12 16:53:01.598 Info] RX 10;255;4;0;0;FFFFFFFF080004C30102
      [2017-11-12 16:53:01.599 Info] DEBUG Undefined firmware/type for node=10
      [2017-11-12 16:53:01.599 Info] INFO BL version=258
      [2017-11-12 16:53:01.602 Info] INFO Send FW info to node 10: type=C, version=4, blocks=0x0438, CRC=0xD69E
      [2017-11-12 16:53:01.614 Info] TX 10;0;4;0;1;0C00040038049ED6
      [2017-11-12 16:53:04.937 Info] RX 10;255;4;0;0;FFFFFFFF080004C30102
      [2017-11-12 16:53:04.937 Info] DEBUG Undefined firmware/type for node=10
      [2017-11-12 16:53:04.937 Info] INFO BL version=258
      [2017-11-12 16:53:04.938 Info] INFO Send FW info to node 10: type=C, version=4, blocks=0x0438, CRC=0xD69E
      [2017-11-12 16:53:04.940 Info] TX 10;0;4;0;1;0C00040038049ED6
      [2017-11-12 16:53:10.500 Info] RX 10;255;0;0;17;2.2.0-beta

      The node states to send new firmware but then simple seems to boot the old code. Any help appreciated.

      posted in Controllers
      itbeyond
      itbeyond
    • RE: 💬 Building an Ethernet Gateway

      @mfalkvidd, @Anticimex & @Ed1500,

      Thanks I have ordered a Mega 2560 to use as the gateway. I think it would be super helpful to have the specs better identified in the main topic of the Building and Ethernet Gateway (and other Gateway pages) page - maybe a table with suitable controllers for the most common configurations. It would have saved me the hassle and I am sue I will not be the first to run into this. I too was using a 328p with security via serial and did not even think I would have a problem with memory when converting the Ethernet.

      posted in Announcements
      itbeyond
      itbeyond
    • RE: 💬 Building an Ethernet Gateway

      @mfalkvidd I this just how it is going to be on W5100 if we enable signing support - we must use a different chip? The Ethernet Gateway has nothing but the basic sketch with LED's enabled and soft signing.

      posted in Announcements
      itbeyond
      itbeyond
    • RE: 💬 Building an Ethernet Gateway

      I have just built a W5100 based Ethernet gateway using a pro mini, NRF24LR and I enabled Soft Signinig - using the latest mysensors github development version 2.2.0-beta I am getting Low on memory messages when I compile and load this - if I disable Signing it does not complain. I have noticed several random crashes with signing enabled however i have secure nodes so need singing support. Is there something I am doing wrong or is the latest dev image causing this to occur. I have Debugging all disabled and burning to a stock 5V 16Mhz device.

      Sketch uses 25476 bytes (82%) of program storage space. Maximum is 30720 bytes.
      Global variables use 1648 bytes (80%) of dynamic memory, leaving 400 bytes for local variables. Maximum is 2048 bytes.
      Low memory available, stability problems may occur.

      posted in Announcements
      itbeyond
      itbeyond
    • RE: What did you build today (Pictures) ?

      Today I completed the installation of the first of my 4 channel 240V LED light dimmers. This is installed in the roof and supports 4 buttons to turn on/off/increase/decrease each channel. It uses an AC zero crossing detector circuit and can be configured for leading or trailing edge dimming.
      0_1509325181814_2017-10-06 17.48.30.jpg

      posted in General Discussion
      itbeyond
      itbeyond
    • RE: 💬 Rain Gauge

      @mfalkvidd thanks for the important info on the saveState - I have not looked at the API code in this respect and if it does not write same data this is a very good. I have also looked into the code some more there are 4 possible writes per hour which using your maths is 35k write per year so it still should be good for a few years (clones well yes who knows). I may have another problem but I am not sure what - if I reboot it is runs fine for several hours and randomly seems to stop sending data however even if the EPROM is stuffed it should not affect the temp, hum and light level sensors. I may be seeing some funny humid reading so the DHT could be faulty also - I may replace this firstly and see what the result is. Thanks for the response.

      posted in Announcements
      itbeyond
      itbeyond
    • RE: 💬 Rain Gauge

      Folks, A question of interest. I have had my gauge working great for several months but it has just started to play up. It seems to crash after a few hours. I have not plugged in a debug/console or anything as yet but decided to have a good look at the code and I have noticed that every hour the system cycles through updating EPROM values to cascade the rain rates. I have also noted with interest a comment in the API that mentions some 300K updates as max for the EPROM - I just looked at the Ardunio documentation and it states 100K read/write cycles till EPROM failure. If I am reading this right then maybe my problems are related to dead EPROM storage caused after months of hourly write cycles - Is this a possibility and if yes should we not look at another method of update management for the gauge - I do not want to have to trash an Arduino every few months, I am looking at the code and need more time to get a full handle on it however there appears to be write cycles every hour even if the values have not changed. Is this something to investigate? Is there a way to know if an Arduino EPROM has failed due to excessive write cycles?

      posted in Announcements
      itbeyond
      itbeyond
    • RE: Irrigation Controller

      @Woodside the code in this post is the latest with one exception. I am not using the internal pullup on the waterbuttonPin any more as I have installed a cap/resistor mode to facilitate a hardware debouce. The details of this have been published in the Rain Gauge project (see troubleshooting). Apart from that the above code is fully made for AU dates and is running my system now.

      The GitHub version is US date based and not AU converted but has my mods for the gateway comms and some updates - https://github.com/mysensors/MySensorsArduinoExamples/blob/master/examples/IrrigationController/IrrigationController.ino

      If you run into any problems or issues let me know.

      posted in My Project
      itbeyond
      itbeyond
    • RE: [Solved] Support for S_MULTIMETER and V_VOLTAGE in Vera

      I have loaded a Github repo to the Vera branch to fix this. The problem is the service references in the D_Multimeter1.json file. Edit this file and change all 6 references of urn:arduino-cc:serviceId: to urn:micasaverde-com:serviceId:

      Then reload the LUUP file (D_Multimeter1.json) in VERA - APPS - DEVELOP APPS - LUUP FILES. Restart the LUUP Engine and the values will now correctly appear.

      You can also see the pull request here: https://github.com/mysensors/Vera/pull/57/commits/695dfefaca0b3c7c3529242132a0902de9ec212f

      posted in Vera
      itbeyond
      itbeyond
    • RE: Change the device view of Multimeter?

      I have just found and fixed this problem. I know it is very old but in the D_Multimeter1.json file there are 6 references to :arduino-cc: in the service fields - this all need to be replaced with :micasaverde-com:

      I have just loaded a pull request to the GITHUB repo to have this reflected in the master source but you can edit this and reload the LUUP file in Vera which will fix the problem.

      posted in Vera
      itbeyond
      itbeyond
    • RE: 💬 Rain Gauge

      @user2684 That is great news - your understanding is basically correct. When no rain the 1K is providing the pull up to 3.3/5v and charging the cap at the same time (current limit is really for when you go to ground not to hold the pin up). When the bucket tips the cap is discharged via the resistor to ground (bucket switch) and thus the pin goes low. Yes - simple and effective pull up and debounce system which works every time - in fact I use this on all interrupt triggered pins for all my projects.

      @petewill it would be good to include something like this on most of the projects, would have saved me a lot of early angst in having faulty triggered interrupts. I suspect different cloned Arduino boards have different to zero internal pull ups (3 different ones I have tried seem to have none) and to be 100% sure it is much better to document an external arrangement. It will really help the beginners to get it right first time and keep some hair regardless of the quality of the board they are using. I needed this on my irrigation controller also - same problem with a 10cm cable to a push button.

      posted in Announcements
      itbeyond
      itbeyond
    • RE: 💬 Rain Gauge

      @user2684 Those values should be ok - maybe the 330 inline with the switch could be a little smaller but it should be fine with all those values. See how you go.

      I kept my noisy power supply after making these and an RF Choke mod. The RF Choke if you are interested is a 330uH choke inline with the power supply and a cap at 22uF (I used electro) on the inbound power supply just as it hits the board.

      Good luck and do let me know how it is going. I am sure it will sort it.

      posted in Announcements
      itbeyond
      itbeyond
    • RE: 💬 Rain Gauge

      @user2684 Yes make the line:
      pinMode(TIP_SENSOR_PIN, INPUT);

      I did make one other modification of installing an RF Choke and cap circuit on the input power supply but I am sure the cap & resistor mods made all the difference. Good luck and let me know how it goes!

      posted in Announcements
      itbeyond
      itbeyond
    • RE: 💬 Rain Gauge

      I had fake interupts on my device - would work great on test bench then with a 5v dc converter that was noisey plus a longer cable to the bucket I was getting a lot of trips. My fix which solved all the issues was a 0.1uF ceramic cap from ground to the signal pin of the bucket (right at the adruino) coupled with an inline resistor 330ohm to the bucket and a 1Kohm resistor from +5v to the signal pin. This is a basic pull up and debounce system and it manages to hold the 5V via the cap with 100% reliability thus far for 3 weeks including a lot of rain over the last few days. I would draw a circuit diagram if someone could tell me the best program to use?

      posted in Announcements
      itbeyond
      itbeyond
    • RE: Irrigation Controller

      OK so I have added several pull requests to Github for the irrigation controller. I thought I would now show you may take on the irrigation controller firstly a pic of my unit:

      Irrigation controller mounted on wall

      The button on the left that is glowing - turns on/off the LCD backlight as most of the time I do not want to see it and have it glowing at night - this box is mounted on a wall outside my house under the eves. The right button is the flashing led coupled with the manual operation function - I also slowed down the on time for this led again to not glow and flash as much.

      As I live in Australia I regionalised the displays for none US dates and here is my final code which is setup for 6 zones. I also made a modification to always switch on Zone 8 as a master valve when any other zone is activated. My original system has a master valve which enables the water supply to the other valves and hence needed to switch this on. If you want to copy my code and remove this it is at line 500 - 501 - just remove the ' - 128' from both these lines. The rest of this code has all the fixes added to the github repo for the Irrigation Controller - enjoy.

      /*
        MySprinkler for MySensors
      
        Arduino Multi-Zone Sprinkler Control
      
        May 31, 2015
      
      *** Version 2.0
      
      *** Upgraded to http://MySensors.org version 1.4.1
      *** Expanded for up to 16 Valves
      *** Setup for active low relay board or comment out #define ACTIVE_LOW to switch to active high
      *** Switch to bitshift method vs byte arrays
      *** Changed RUN_ALL_ZONES Vera device to 0 (was highest valve)
      *** Added optional LCD display featuring remaining time, date last ran & current time
      *** Features 'raindrop' and 'clock' icons which indicate sensor is updating valve data and clock respectively
      *** Added single pushbutton menu to manually select which program to run (All Zones or a Single Zone)
      *** Added option of naming your Zones programmatically or with Vera (V_VAR3 used to store names)
      
        Utilizing your Vera home automation controller and the MySensors.org gateway you can
        control up to a sixteen zone irrigation system with only three digital pins.  This sketch
        will create NUMBER_OF_VALVES + 1 devices on your Vera controller
      
        This sketch features the following:
      
        Allows you to cycle through All zones (RUN_ALL_ZONES) or individual zone (RUN_SINGLE_ZONE) control.
        Use the 0th controller to activate RUN_ALL_ZONES (each zone in numeric sequence 1 to n)
        using Variable1 as the "ON" time in minutes in each of the vera devices created.
        Use the individual zone controller to activate a single zone.  This feature uses
        Variable2 as the "ON" time for each individual device/zone.
        Connect according to pinout below and uses Shift Registers as to allow the MySensors
        standard radio configuration and still leave available digital pins
        Turning on any zone will stop the current process and begin that particular process.
        Turning off any zone will stop the current process and turn off all zones.
        To push your new time intervals for your zones, simply change the variable on your Vera and
        your arduino will call to Vera once a minute and update accordingly.  Variables will also be
        requested when the device is first powered on.
        Pushbutton activation to RUN_ALL_ZONES, RUN_SINGLE_ZONE or halt the current program
        LED status indicator
      
        PARTS LIST:
        Available from the MySensors store - http://www.mysensors.org/store/
        Relays (8 channel)
        Female Pin Header Connector Strip
        Prototype Universal Printed Circuit Boards (PCB)
        NRF24L01 Radio
        Arduino (I used a Pro Mini)
        FTDI USB to TTL Serial Adapter
        Capacitors (10uf and .1uf)
        3.3v voltage regulator
        Resistors (270, 1K & 10K)
        Female Dupont Cables
        1602 LCD (with I2C Interface)
        LED
        Push button
        Shift Register (SN74HC595)
        2 Pole 5mm Pitch PCB Mount Screw Terminal Block
        3 Pole 5mm Pitch PCB Mount Screw Terminal Block
        22-24 gauge wire or similar (I used Cat5/Cat6 cable)
        18 gauge wire (for relay)
        Irrigation Power Supply (24-Volt/750 mA Transformer)
      
      
        INSTRUCTIONS:
      
        A step-by-step setup video is available here: http://youtu.be/l4GPRTsuHkI
        After assembling your arduino, radio, decoupling capacitors, shift register(s), status LED, pushbutton LCD (I2C connected to
        A4 and A5) and relays, and load the sketch.
        Following the instructions at https://MySensors.org include the device to your MySensors Gateway.
        Verify that each new device has a Variable1, Variable2 and Variable3. Populate data accordingly with whole minutes for
        the RUN_ALL_ZONES routine (Variable1) and the RUN_SINGLE_ZONE routines (Variable 2).  The values entered for times may be zero and
        you may use the defaulet zone names by leaving Variable3 blank.
        Once you have entered values for each zone and each variable, save the settings by pressing the red save button on your Vera.
        Restart your arduino; verify the settings are loaded into your arduino with the serial monitor; the array will be printed
        on the serial monitor.
        Your arduino should slow-flash, indicating that it is in ready mode.
        There are multiple debug serial prints that can be monitored to assure that it is operating properly.
      * ***THIS SHOULD NO LONGER BE NEEDED*** The standard MySensors library now works. https://bitbucket.org/fmalpartida/new-liquidcrystal/downloads for the I2C library, or use yours
      
        Contributed by Jim (BulldogLowell@gmail.com) with much contribution from Pete (pete.will@mysensors.org) and is released to the public domain
      
        Modified David Martin.
        Changed date format to Australia standard dd/mm/yy
        Added valve 8 as master valve during watering sequence - so 8 will be on whenever a valve/zone is active
        Fixed initial valve read system to ensure all data read - via update of getValveTimes routine
        Changed display details for VAR_3 to be consistent with other data reads
        Updated various displays and debug outputs
      */
      //
      
      // Enable debug prints
      //#define MY_DEBUG
      
      // Enable node as Repeater
      //#define MY_REPEATER_FEATURE
      
      // Enable and select radio type attached
      #define MY_RADIO_NRF24
      #define MY_RF24_PA_LEVEL RF24_PA_LOW
      
      #define MY_NODE_ID 2  // Set this to fix your Radio ID or use Auto
      
      #include <Wire.h>
      #include <TimeLib.h>
      #include <SPI.h>
      #include <MySensors.h>
      #include <LiquidCrystal.h>
      #include <LiquidCrystal_I2C.h>
      
      
      #define NUMBER_OF_VALVES 6  // Change this to set your valve count up to 16.
      #define VALVE_RESET_TIME 2500UL   // Change this (in milliseconds) for the time you need your valves to hydraulically reset and change state
      #define VALVE_TIMES_RELOAD 720000UL  // Change this (in milliseconds) for how often to update all valves data from the controller (Loops at value/number valves)
                                           // ie: 300000 for 5 valves produces requests every minute with all valves updated every 5mins 
      #define SKETCH_NAME "MySprinkler"
      #define SKETCH_VERSION "2.2"
      //
      #define CHILD_ID_SPRINKLER 0
      //
      #define ACTIVE_LOW // comment out this line if your relays are active high
      //
      #define DEBUG_ON   // comment out to supress serial monitor output
      //
      #ifdef ACTIVE_LOW
      #define BITSHIFT_VALVE_NUMBER ~(1U << (valveNumber-1))
      #define ALL_VALVES_OFF 0xFFFF
      #else
      #define BITSHIFT_VALVE_NUMBER (1U << (valveNumber-1))
      #define ALL_VALVES_OFF 0U
      #endif
      //
      #ifdef DEBUG_ON
      #define DEBUG_PRINT(x)   Serial.print(x)
      #define DEBUG_PRINTLN(x) Serial.println(x)
      #else
      #define DEBUG_PRINT(x)
      #define DEBUG_PRINTLN(x)
      #define SERIAL_START(x)
      #endif
      //
      typedef enum {
        STAND_BY_ALL_OFF, RUN_SINGLE_ZONE, RUN_ALL_ZONES, CYCLE_COMPLETE, ZONE_SELECT_MENU
      }
      SprinklerStates;
      //
      SprinklerStates state = STAND_BY_ALL_OFF;
      SprinklerStates lastState;
      byte menuState = 0;
      unsigned long menuTimer;
      byte countDownTime = 10;
      //
      int allZoneTime [NUMBER_OF_VALVES + 1];
      int valveSoloTime [NUMBER_OF_VALVES + 1];
      int valveNumber;
      int lastValve;
      unsigned long startMillis;
      const int ledPin = 5;
      const int waterButtonPin = 3;
      bool buttonPushed = false;
      bool showTime = true;
      bool clockUpdating = false;
      bool recentUpdate = true;
      int allVars[] = {V_VAR1, V_VAR2, V_VAR3};
      const char *dayOfWeek[] = {
        "Null", "Sunday ", "Monday ", "Tuesday ", "Wednesday ", "Thursday ", "Friday ", "Saturday "
      };
      // Name your Zones here or use Vera to edit them by adding a name in Variable3...
      String valveNickName[17] = {
        "All Zones", "Zone 1", "Zone 2", "Zone 3", "Zone 4", "Zone 5", "Zone 6", "Zone 7", "Zone 8", "Zone 9", "Zone 10", "Zone 11", "Zone 12", "Zone 13", "Zone 14", "Zone 15", "Zone 16"
      };
      //
      time_t lastTimeRun = 0;
      //Setup Shift Register...
      const int latchPin = 8;
      const int clockPin = 4;
      const int dataPin  = 7;
      const int outputEnablePin = 6;
      //
      byte clock[8] = {0x0, 0xe, 0x15, 0x17, 0x11, 0xe, 0x0}; // fetching time indicator
      byte raindrop[8] = {0x4, 0x4, 0xA, 0xA, 0x11, 0xE, 0x0,}; // fetching Valve Data indicator
      // Set the pins on the I2C chip used for LCD connections:
      //                    addr, en,rw,rs,d4,d5,d6,d7,bl,blpol
      LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);  // Set the LCD I2C address to 0x27
      //
      MyMessage msg1valve(CHILD_ID_SPRINKLER, V_LIGHT);
      MyMessage var1valve(CHILD_ID_SPRINKLER, V_VAR1);
      MyMessage var2valve(CHILD_ID_SPRINKLER, V_VAR2);
      MyMessage var3valve(CHILD_ID_SPRINKLER, V_VAR3);
      
      bool receivedInitialValue = false;
      bool inSetup = true;
      //
      void setup()
      {
        DEBUG_PRINTLN(F("Initialising..."));
        pinMode(latchPin, OUTPUT);
        pinMode(clockPin, OUTPUT);
        pinMode(dataPin, OUTPUT);
        pinMode(ledPin, OUTPUT);
        pinMode(outputEnablePin, OUTPUT);
        digitalWrite (outputEnablePin, LOW);
        pinMode(waterButtonPin, INPUT_PULLUP);
        //pinMode(waterButtonPin, INPUT);
        attachInterrupt(digitalPinToInterrupt(waterButtonPin), PushButton, RISING); //May need to change for your Arduino model
        digitalWrite (ledPin, HIGH);
        DEBUG_PRINTLN(F("Turning All Valves Off..."));
        updateRelays(ALL_VALVES_OFF);
        //delay(5000);
        lcd.begin(16, 2); //(16 characters and 2 line display)
        lcd.clear();
        lcd.backlight();
        lcd.createChar(0, clock);
        lcd.createChar(1, raindrop);
        //
        //check for saved date in EEPROM
        DEBUG_PRINTLN(F("Checking EEPROM for stored date:"));
        delay(500);
        if (loadState(0) == 0xFF) // EEPROM flag
        {
          DEBUG_PRINTLN(F("Retreiving last run time from EEPROM..."));
          for (int i = 0; i < 4 ; i++)
          {
            lastTimeRun = lastTimeRun << 8;
            lastTimeRun = lastTimeRun | loadState(i + 1); // assemble 4 bytes into an ussigned long epoch timestamp
          }
        }
      
        DEBUG_PRINTLN(F("Sensor Presentation Complete"));
        //
        digitalWrite (ledPin, LOW);
        DEBUG_PRINTLN(F("Ready..."));
        //
        lcd.setCursor(0, 0);
        lcd.print(F(" Syncing Time  "));
        lcd.setCursor(15, 0);
        lcd.write(byte(0));
        lcd.setCursor(0, 1);
        int clockCounter = 0;
        while (timeStatus() == timeNotSet && clockCounter < 21)
        {
          requestTime();
          DEBUG_PRINTLN(F("Requesting time from Gateway:"));
          wait(1000);
          lcd.print(".");
          clockCounter++;
          if (clockCounter > 16)
          {
            DEBUG_PRINTLN(F("Failed initial clock synchronization!"));
            lcd.clear();
            lcd.print(F("  Failed Clock  "));
            lcd.setCursor(0, 1);
            lcd.print(F(" Syncronization "));
            wait(2000);
            break;
          }
        }
        for (byte i = 1; i <= NUMBER_OF_VALVES; i++)
        {
          lcd.clear();
          goGetValveTimes();
        }
        lcd.clear();
      }
      
      
      void presentation()
      {
        sendSketchInfo(SKETCH_NAME, SKETCH_VERSION);
        for (byte i = 0; i <= NUMBER_OF_VALVES; i++)
        {
          present(i, S_LIGHT);
        }
      }
      
      //
      void loop()
      {
        inSetup = false;
        updateClock();
        updateDisplay();
        goGetValveTimes();
        //
        if (buttonPushed)
        {
          menuTimer = millis();
          DEBUG_PRINTLN(F("Button Pressed"));
          if (state == STAND_BY_ALL_OFF)
          {
            state = ZONE_SELECT_MENU;
            menuState = 0;
          }
          else if (state == ZONE_SELECT_MENU)
          {
            menuState++;
            if (menuState > NUMBER_OF_VALVES)
            {
              menuState = 0;
            }
          }
          else
          {
            state = STAND_BY_ALL_OFF;
          }
          buttonPushed = false;
        }
        if (state == STAND_BY_ALL_OFF)
        {
          slowToggleLED ();
          if (state != lastState)
          {
            updateRelays(ALL_VALVES_OFF);
            DEBUG_PRINTLN(F("State Changed... all Zones off"));
            for (byte i = 0; i <= NUMBER_OF_VALVES; i++)
            {
              wait(50);
              send(msg1valve.setSensor(i).set(false), false);
            }
            lcd.clear();
            lcd.setCursor(0, 0);
            lcd.print(F("** Irrigation **"));
            lcd.setCursor(0, 1);
            lcd.print(F("**   Halted   **"));
            wait(2000);
            lastValve = -1;
          }
        }
        //
        else if (state == RUN_ALL_ZONES)
        {
          if (lastValve != valveNumber)
          {
            for (byte i = 0; i <= NUMBER_OF_VALVES; i++)
            {
              if (i == 0 || i == valveNumber)
              {
                send(msg1valve.setSensor(i).set(true), false);
              }
              else
              {
                send(msg1valve.setSensor(i).set(false), false);
              }
              wait(50);
            }
          }
          lastValve = valveNumber;
          fastToggleLed();
          if (state != lastState)
          {
            valveNumber = 1;
            updateRelays(ALL_VALVES_OFF);
            DEBUG_PRINTLN(F("State Changed, Running All Zones..."));
          }
          unsigned long nowMillis = millis();
          if (nowMillis - startMillis < VALVE_RESET_TIME)
          {
            updateRelays(ALL_VALVES_OFF);
          }
          else if (nowMillis - startMillis < (allZoneTime[valveNumber] * 60000UL))
          {
            updateRelays(BITSHIFT_VALVE_NUMBER);
          }
          else
          {
            DEBUG_PRINTLN(F("Changing Valves..."));
            updateRelays(ALL_VALVES_OFF);
            startMillis = millis();
            valveNumber++;
            if (valveNumber > NUMBER_OF_VALVES)
            {
              state = CYCLE_COMPLETE;
              startMillis = millis();
              lastValve = -1;
              lastTimeRun = now();
              saveDateToEEPROM(lastTimeRun);
              for (byte i = 0; i <= NUMBER_OF_VALVES; i++)
              {
                send(msg1valve.setSensor(i).set(false), false);
              }
              DEBUG_PRINT(F("State = "));
              DEBUG_PRINTLN(state);
            }
          }
        }
        //
        else if (state == RUN_SINGLE_ZONE)
        {
          fastToggleLed();
          if (state != lastState)
          {
            for (byte i = 0; i <= NUMBER_OF_VALVES; i++)
            {
              if (i == 0 || i == valveNumber)
              {
                send(msg1valve.setSensor(i).set(true), false);
              }
              else
              {
                send(msg1valve.setSensor(i).set(false), false);
              }
              wait(50);
            }
            DEBUG_PRINTLN(F("State Changed, Single Zone Running..."));
            DEBUG_PRINT(F("Zone: "));
            DEBUG_PRINTLN(valveNumber);
          }
          unsigned long nowMillis = millis();
          if (nowMillis - startMillis < VALVE_RESET_TIME)
          {
            updateRelays(ALL_VALVES_OFF);
          }
          else if (nowMillis - startMillis < (valveSoloTime [valveNumber] * 60000UL))
          {
            updateRelays(BITSHIFT_VALVE_NUMBER);
          }
          else
          {
            updateRelays(ALL_VALVES_OFF);
            for (byte i = 0; i <= NUMBER_OF_VALVES; i++)
            {
              send(msg1valve.setSensor(i).set(false), false);
            }
            state = CYCLE_COMPLETE;
            startMillis = millis();
            DEBUG_PRINT(F("State = "));
            DEBUG_PRINTLN(state);
          }
          lastTimeRun = now();
        }
        else if (state == CYCLE_COMPLETE)
        {
          if (millis() - startMillis < 30000UL)
          {
            fastToggleLed();
          }
          else
          {
            state = STAND_BY_ALL_OFF;
          }
        }
        if (state == ZONE_SELECT_MENU)
        {
          displayMenu();
        } 
        else 
        {
          lastState = state;
        }
      }
      //
      void displayMenu(void)
      {
        static byte lastMenuState = -1;
        static int lastSecond;
        if (menuState != lastMenuState)
        {
          lcd.clear();
          lcd.setCursor(0, 0);
          lcd.print(valveNickName[menuState]);
          lcd.setCursor(0, 1);
          lcd.print(F("Starting"));
          DEBUG_PRINT(valveNickName[menuState]);
          Serial.print(F(" Starting Shortly"));
        }
        int thisSecond = (millis() - menuTimer) / 1000UL;
        if (thisSecond != lastSecond && thisSecond < 8)
        {
          lcd.print(F("."));
          Serial.print(".");
        }
        lastSecond = thisSecond;
        if (millis() - menuTimer > 10000UL)
        {
          startMillis = millis();
          if (menuState == 0)
          {
            valveNumber = 1;
            state = RUN_ALL_ZONES;
          }
          else
          {
            valveNumber = menuState;
            state = RUN_SINGLE_ZONE;
          }
        }
        else
        {
      
        }
        lastMenuState = menuState;
      }
      //
      void updateRelays(int value)
      {
        digitalWrite(latchPin, LOW);
        if (value == -1) {
          shiftOut(dataPin, clockPin, MSBFIRST, highByte(value));
          shiftOut(dataPin, clockPin, MSBFIRST, lowByte(value));
        } else {
          // Valve 8 is master and must be on to turn on water supply -128 for 8
          shiftOut(dataPin, clockPin, MSBFIRST, highByte(value - 128));
          shiftOut(dataPin, clockPin, MSBFIRST, lowByte(value - 128));
        }
        digitalWrite(latchPin, HIGH);
      }
      //
      void PushButton() //interrupt with debounce
      {
        static unsigned long last_interrupt_time = 0;
        unsigned long interrupt_time = millis();
        if (interrupt_time - last_interrupt_time > 200)
        {
          buttonPushed = true;
        }
        last_interrupt_time = interrupt_time;
      }
      //
      void fastToggleLed()
      {
        static unsigned long fastLedTimer;
        if (millis() - fastLedTimer >= 100UL)
        {
          digitalWrite(ledPin, !digitalRead(ledPin));
          fastLedTimer = millis ();
        }
      }
      //
      void slowToggleLED ()
      {
        static unsigned long slowLedTimer;
        if (millis() - slowLedTimer >= 20000UL)
        {
          digitalWrite(ledPin, !digitalRead(ledPin));
          if (!digitalRead(ledPin)) {
            slowLedTimer = millis();
          } else {
            slowLedTimer = millis() - 19000UL;
          }
        }
      }
      //
      void receive(const MyMessage &message)
      {
        bool zoneTimeUpdate = false;
        if (message.isAck())
        {
          DEBUG_PRINTLN(F("This is an ack from gateway"));
        }
        for (byte i = 0; i <= NUMBER_OF_VALVES; i++)
        {
          if (message.sensor == i)
          {
            if (message.type == V_LIGHT)
            {
              int switchState = atoi(message.data);
              if (switchState == 0)
              {
                state = STAND_BY_ALL_OFF;
                DEBUG_PRINTLN(F("Recieved Instruction to Cancel..."));
              }
              else
              {
                if (i == 0)
                {
                  state = RUN_ALL_ZONES;
                  valveNumber = 1;
                  DEBUG_PRINTLN(F("Recieved Instruction to Run All Zones..."));
                }
                else
                {
                  state = RUN_SINGLE_ZONE;
                  valveNumber = i;
                  DEBUG_PRINT(F("Recieved Instruction to Activate Zone: "));
                  DEBUG_PRINTLN(i);
                }
              }
              startMillis = millis();
            }
            else if (message.type == V_VAR1)
            {
              int variable1 = atoi(message.data);// RUN_ALL_ZONES time
              DEBUG_PRINT(F("Recieved variable1 valve:"));
              DEBUG_PRINT(i);
              DEBUG_PRINT(F(" = "));
              DEBUG_PRINTLN(variable1);
              if (variable1 != allZoneTime[i])
              {
                allZoneTime[i] = variable1;
      
                zoneTimeUpdate = true;
              }
              receivedInitialValue = true;
            }
            else if (message.type == V_VAR2)
            {
              int variable2 = atoi(message.data);// RUN_SINGLE_ZONE time
              DEBUG_PRINT(F("Recieved variable2 valve:"));
              DEBUG_PRINT(i);
              DEBUG_PRINT(F(" = "));
              DEBUG_PRINTLN(variable2);
              if (variable2 != valveSoloTime[i])
              {
                valveSoloTime[i] = variable2;
                zoneTimeUpdate = true;
              }
              receivedInitialValue = true;
            }
            else if (message.type == V_VAR3)
            {
              String newMessage = String(message.data);
              if (newMessage.length() == 0)
              {
                DEBUG_PRINT(F("No Name Recieved for zone "));
                DEBUG_PRINTLN(i);
                break;
              }
              if (newMessage.length() > 16)
              {
                newMessage.substring(0, 16);
              }
              valveNickName[i] = "";
              valveNickName[i] += newMessage;
              DEBUG_PRINT(F("Recieved variable3 valve: "));
              DEBUG_PRINT(i);
              DEBUG_PRINT(F(" = "));
              DEBUG_PRINTLN(valveNickName[i]);
             }
            receivedInitialValue = true;
          }
        }
        if (zoneTimeUpdate)
        {
          //
          DEBUG_PRINTLN(F("New Zone Times Recieved..."));
          for (byte i = 0; i <= NUMBER_OF_VALVES; i++)
          {
            if (i != 0)
            {
              DEBUG_PRINT(F("Zone "));
              DEBUG_PRINT(i);
              DEBUG_PRINT(F(" individual time: "));
              DEBUG_PRINT(valveSoloTime[i]);
              DEBUG_PRINT(F(" group time: "));
              DEBUG_PRINT(allZoneTime[i]);
              DEBUG_PRINT(F(" name: "));
              DEBUG_PRINTLN(valveNickName[i]);
              recentUpdate = true;
            }
          }
        }
        else
        {
          recentUpdate = false;
        }
      }
      //
      void updateDisplay()
      {
        static unsigned long lastUpdateTime;
        static bool displayToggle = false;
        //static byte toggleCounter = 0;
        static SprinklerStates lastDisplayState;
        if (state != lastDisplayState || millis() - lastUpdateTime >= 3000UL)
        {
          displayToggle = !displayToggle;
          switch (state) {
            case STAND_BY_ALL_OFF:
              //
              fastClear();
              lcd.setCursor(0, 0);
              if (displayToggle)
              {
                lcd.print(F("  System Ready "));
                if (clockUpdating)
                {
                  lcd.setCursor(15, 0);
                  lcd.write(byte(0));
                }
                lcd.setCursor(0, 1);
                lcd.print(hourFormat12() < 10 ? F(" ") : F(""));
                lcd.print(hourFormat12());
                lcd.print(minute() < 10 ? F(":0") : F(":"));
                lcd.print(minute());
                lcd.print(isAM() ? F("am") : F("pm"));
                lcd.print(day() < 10 ? F(" 0") : F("  "));
                lcd.print(day());
                lcd.print(month() < 10 ? F("/0") : F("/"));
                lcd.print(month());
                lcd.print(F("/"));
                lcd.print(year() % 100);
              }
              else
              {
                lcd.print(F("  Last Watered "));
                if (clockUpdating)
                {
                  lcd.setCursor(15, 0);
                  lcd.write(byte(0));
                }
                lcd.setCursor(0, 1);
                lcd.print(dayOfWeek[weekday(lastTimeRun)]);
                lcd.setCursor(11, 1);
                lcd.print(day(lastTimeRun) < 10 ? F("0") : F(""));
                lcd.print(day(lastTimeRun));
                lcd.print(month(lastTimeRun) < 10 ? F("/0") : F("/"));
                lcd.print(month(lastTimeRun));
              }
              break;
            case RUN_SINGLE_ZONE:
              //
              fastClear();
              lcd.setCursor(0, 0);
              if (displayToggle)
              {
                lcd.print(F("Single Zone Mode"));
                lcd.setCursor(0, 1);
                lcd.print(F(" Zone:"));
                if (valveNumber < 10) lcd.print(F("0"));
                lcd.print(valveNumber);
                lcd.print(F(" Active"));
              }
              else
              {
                lcd.print(F(" Time Remaining "));
                lcd.setCursor(0, 1);
                if (valveSoloTime[valveNumber] == 0)
                {
                  lcd.print(F(" No Valve Time "));
                }
                else
                {
                  unsigned long timeRemaining = (valveSoloTime[valveNumber] * 60) - ((millis() - startMillis) / 1000);
                  lcd.print(timeRemaining / 60 < 10 ? "   0" : "   ");
                  lcd.print(timeRemaining / 60);
                  lcd.print("min");
                  lcd.print(timeRemaining % 60 < 10 ? " 0" : " ");
                  lcd.print(timeRemaining % 60);
                  lcd.print("sec  ");
                }
              }
              break;
            case RUN_ALL_ZONES:
              //
              fastClear();
              lcd.setCursor(0, 0);
              if (displayToggle)
              {
                lcd.print(F(" All-Zone  Mode "));
                lcd.setCursor(0, 1);
                lcd.print(F(" Zone:"));
                if (valveNumber < 10) lcd.print(F("0"));
                lcd.print(valveNumber);
                lcd.print(F(" Active "));
              }
              else
              {
                lcd.print(F(" Time Remaining "));
                lcd.setCursor(0, 1);
                int timeRemaining = (allZoneTime[valveNumber] * 60) - ((millis() - startMillis) / 1000);
                lcd.print((timeRemaining / 60) < 10 ? "   0" : "   ");
                lcd.print(timeRemaining / 60);
                lcd.print("min");
                lcd.print(timeRemaining % 60 < 10 ? " 0" : " ");
                lcd.print(timeRemaining % 60);
                lcd.print("sec  ");
              }
              break;
            case CYCLE_COMPLETE:
              //
              if (displayToggle)
              {
                lcd.setCursor(0, 0);
                lcd.print(F(" Watering Cycle "));
                lcd.setCursor(0, 1);
                lcd.print(F("    Complete    "));
              }
              else
              {
                int totalTimeRan = 0;
                for (int i = 1; i < NUMBER_OF_VALVES + 1; i++)
                {
                  totalTimeRan += allZoneTime[i];
                }
                lcd.setCursor(0, 0);
                lcd.print(F(" Total Time Run "));
                lcd.setCursor(0, 1);
                lcd.print(totalTimeRan < 10 ? "   0" : "   ");
                lcd.print(totalTimeRan);
                lcd.print(" Minutes   ");
              }
            default:
              // what of ZONE_SELECT_MENU?
              break;
          }
          lastUpdateTime = millis();
        }
        lastDisplayState = state;
      }
      void receiveTime(time_t newTime)
      {
        DEBUG_PRINTLN(F("Time value received and updated..."));
        int lastSecond = second();
        int lastMinute = minute();
        int lastHour = hour();
        setTime(newTime);
        if (((second() != lastSecond) || (minute() != lastMinute) || (hour() != lastHour)) || showTime)
        {
          DEBUG_PRINTLN(F("Clock updated...."));
          DEBUG_PRINT(F("Sensor's time currently set to:"));
          DEBUG_PRINT(hourFormat12() < 10 ? F(" 0") : F(" "));
          DEBUG_PRINT(hourFormat12());
          DEBUG_PRINT(minute() < 10 ? F(":0") : F(":"));
          DEBUG_PRINT(minute());
          DEBUG_PRINTLN(isAM() ? F("am") : F("pm"));
          DEBUG_PRINT(month());
          DEBUG_PRINT(F("/"));
          DEBUG_PRINT(day());
          DEBUG_PRINT(F("/"));
          DEBUG_PRINTLN(year());
          DEBUG_PRINTLN(dayOfWeek[weekday()]);
          showTime = false;
        }
        else
        {
          DEBUG_PRINTLN(F("Sensor's time did NOT need adjustment greater than 1 second."));
        }
        clockUpdating = false;
      }
      void fastClear()
      {
        lcd.setCursor(0, 0);
        lcd.print(F("                "));
        lcd.setCursor(0, 1);
        lcd.print(F("                "));
      }
      //
      void updateClock()
      {
        static unsigned long lastVeraGetTime;
        if (millis() - lastVeraGetTime >= 3600000UL) // updates clock time and gets zone times from vera once every hour
        {
          DEBUG_PRINTLN(F("Requesting time and valve data from Gateway..."));
          lcd.setCursor(15, 0);
          lcd.write(byte(0));
          clockUpdating = true;
          requestTime();
          lastVeraGetTime = millis();
        }
      }
      //
      void saveDateToEEPROM(unsigned long theDate)
      {
        DEBUG_PRINTLN(F("Saving Last Run date"));
        if (loadState(0) != 0xFF)
        {
          saveState(0, 0xFF); // EEPROM flag for last date saved stored in EEPROM (location zero)
        }
        //
        for (int i = 1; i < 5; i++)
        {
          saveState(5 - i, byte(theDate >> 8 * (i - 1))); // store epoch datestamp in 4 bytes of EEPROM starting in location one
        }
      }
      //
      void goGetValveTimes()
      {
        static unsigned long valveUpdateTime;
        static byte valveIndex = 1;
        if (inSetup || millis() - valveUpdateTime >= VALVE_TIMES_RELOAD / NUMBER_OF_VALVES) // update each valve once every 5 mins (distributes the traffic)
        {
          if (inSetup) {
            lcd.print(F(" Updating  "));
            lcd.setCursor(0, 1);
            lcd.print(F(" Valve Data: "));
            lcd.print(valveIndex);
          }
          bool flashIcon = false;
          DEBUG_PRINT(F("Calling for Valve "));
          DEBUG_PRINT(valveIndex);
          DEBUG_PRINTLN(F(" Data..."));
      
          for (int a = 0; a < (sizeof(allVars)/sizeof(int)); a++) {
            receivedInitialValue = false;
            byte timeout = 10;
            while (!receivedInitialValue && timeout > 0)
            {
              lcd.setCursor(15, 0);
              flashIcon = !flashIcon;
              flashIcon ? lcd.write(byte(1)) : lcd.print(F(" "));
              request(valveIndex, allVars[a]);
              wait(50);
              timeout--;
            }
          }
          valveUpdateTime = millis();
          valveIndex++;
          if (valveIndex > NUMBER_OF_VALVES)
          {
            valveIndex = 1;
          }
        }
      }
      
      
      posted in My Project
      itbeyond
      itbeyond
    • RE: Irrigation Controller

      @hek Great thanks - I am setting a pull request right now which fixes another issue with the goGetValveTimes function which causes NACKs due to 3 successive sends to the radio without any pause or delay. This is a simple bug in the code and should not really need a discussion to implement as careful analysis of the DEBUG results will always yield this error. I basically copied the setup code that reads the data - put it in the function and changed the setup to call this updated function.

      There is another bug I am trying to stamp out right now which is causing the manual button start to NOT send the status updates to the controller via the radio - again this is a standard bug and may or may not get seen by many if you are not testing the manual button operation. Once this is resolved I will make a pull for it also.

      posted in My Project
      itbeyond
      itbeyond
    • Irrigation Controller

      Hi and thanks to all contributors of this great project. I am fairly new to all this but a long term programmer and electronics nerd. I have recently built the Irrigation Contoller project and debugged it (I thought well until I mounted it on the wall and connected everything).

      I have found a number of code issues with the example code and I am wondering the best way to update or request updates to the master. I have made a pull request for a simple update which was causing the initial setup to miss getting the VAR_1 data during the setup process - is this the right way to submit updates as I have done a lot of additional work on the code to fix a number of issues I have found. An example of this being the goGetValveTimes() routine has no delays and creates NACK requests due to bombarding the radio module with 3 requests in quick succession without then waiting for the reply. Should I post these as Github pulls or should I pop it in this forum system for update?

      I have some more issues with the code and project but wanting to see the best way to provide my updates back to the community firstly.

      Thanks David

      posted in My Project
      itbeyond
      itbeyond
    • RE: Vera Lite U17 - Serial Can't Detect Device

      @hek This fix worked for me today using Plugin 1.5 Version 2.1.1 on UI7 1.7.2607
      Thanks.

      posted in Vera
      itbeyond
      itbeyond