 }
 /* -- */
 
-void sendmqttMsg(char* topictosend, String topicpayload)
+void sendmqttMsg(char* topictosend, String topicpayload, bool retain = 1)
 {
   unsigned int msg_length = topicpayload.length();
 
   byte* p = (byte*)malloc(msg_length);
   memcpy(p, (char*) topicpayload.c_str(), msg_length);
 
-  if (mqttclient.publish(topictosend, p, msg_length, 1))
+  if (mqttclient.publish(topictosend, p, msg_length, retain))
   {
     free(p);
   }


  pinMode(goproPowerPin, OUTPUT);

  Wire.begin(0, 2);
  //twi_setClock(200000);
  //delay(100);


            }
          }
        }

        //-----------------------------------------------
        if ((millis() - startMills) > REPORT_INTERVAL )
        {

          payload = "{\"DS18B20\":";
          payload += tempCinside;
          payload += ",\"FreeHeap\":";
          payload += ESP.getFreeHeap();
          payload += ",\"RSSI\":";
          payload += WiFi.RSSI();
          payload += ",\"millis\":";
          payload += millis();
          payload += "}";

          sendmqttMsg(topic, payload, 0);

          sensors.requestTemperatures();
          bDalasstarted = true;

          startMills = millis();
        }
        mqttclient.loop();
      }
      ArduinoOTA.handle();
