|  | @ -114,7 +114,7 @@ class PubMqtt { | 
			
		
	
		
		
			
				
					|  |  |                     continue; // skip to next inverter
 |  |  |                     continue; // skip to next inverter
 | 
			
		
	
		
		
			
				
					|  |  |                 rec = iv->getRecordStruct(RealTimeRunData_Debug); |  |  |                 rec = iv->getRecordStruct(RealTimeRunData_Debug); | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |                 if (!iv->isAvailable(*mUtcTimestamp, rec)) { |  |  |                 if ((!iv->isAvailable(*mUtcTimestamp, rec)) || (!iv->config->enabled)) { | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  |                     snprintf(topic, MQTT_TOPIC_LEN + 15, "%s/available_text", iv->config->name); |  |  |                     snprintf(topic, MQTT_TOPIC_LEN + 15, "%s/available_text", iv->config->name); | 
			
		
	
		
		
			
				
					|  |  |                     snprintf(val, 32, "not available and not producing"); |  |  |                     snprintf(val, 32, "not available and not producing"); | 
			
		
	
		
		
			
				
					|  |  |                     publish(topic, val, true); |  |  |                     publish(topic, val, true); | 
			
		
	
	
		
		
			
				
					|  | @ -263,7 +263,7 @@ class PubMqtt { | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |             subscribe("ctrl/#"); |  |  |             subscribe("ctrl/#"); | 
			
		
	
		
		
			
				
					|  |  |             subscribe("setup/#"); |  |  |             subscribe("setup/#"); | 
			
		
	
		
		
			
				
					
					|  |  |             subscribe("status/#"); |  |  |             //subscribe("status/#");
 | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  |         } |  |  |         } | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |         void onDisconnect(espMqttClientTypes::DisconnectReason reason) { |  |  |         void onDisconnect(espMqttClientTypes::DisconnectReason reason) { | 
			
		
	
	
		
		
			
				
					|  | @ -293,7 +293,7 @@ class PubMqtt { | 
			
		
	
		
		
			
				
					|  |  |         } |  |  |         } | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |         void onMessage(const espMqttClientTypes::MessageProperties& properties, const char* topic, const uint8_t* payload, size_t len, size_t index, size_t total) { |  |  |         void onMessage(const espMqttClientTypes::MessageProperties& properties, const char* topic, const uint8_t* payload, size_t len, size_t index, size_t total) { | 
			
		
	
		
		
			
				
					
					|  |  |             DPRINTLN(DBG_VERBOSE, F("MQTT got topic: ") + String(topic)); |  |  |             DPRINTLN(DBG_INFO, F("MQTT got topic: ") + String(topic)); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  |             if(NULL == mSubscriptionCb) |  |  |             if(NULL == mSubscriptionCb) | 
			
		
	
		
		
			
				
					|  |  |                 return; |  |  |                 return; | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
	
		
		
			
				
					|  | @ -394,11 +394,13 @@ class PubMqtt { | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |                         // inverter status
 |  |  |                         // inverter status
 | 
			
		
	
		
		
			
				
					|  |  |                         uint8_t status = MQTT_STATUS_AVAIL_PROD; |  |  |                         uint8_t status = MQTT_STATUS_AVAIL_PROD; | 
			
		
	
		
		
			
				
					
					|  |  |                         if (!iv->isAvailable(*mUtcTimestamp, rec)) { |  |  |                         if ((!iv->isAvailable(*mUtcTimestamp, rec)) || (!iv->config->enabled)) { | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  |                             status = MQTT_STATUS_NOT_AVAIL_NOT_PROD; |  |  |                             status = MQTT_STATUS_NOT_AVAIL_NOT_PROD; | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                             if(iv->config->enabled) { // only change all-avail if inverter is enabled!
 | 
			
		
	
		
		
			
				
					|  |  |                                 totalIncomplete = true; |  |  |                                 totalIncomplete = true; | 
			
		
	
		
		
			
				
					|  |  |                                 allAvail = false; |  |  |                                 allAvail = false; | 
			
		
	
		
		
			
				
					|  |  |                             } |  |  |                             } | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                         } | 
			
		
	
		
		
			
				
					|  |  |                         else if (!iv->isProducing(*mUtcTimestamp, rec)) { |  |  |                         else if (!iv->isProducing(*mUtcTimestamp, rec)) { | 
			
		
	
		
		
			
				
					|  |  |                             mIvAvail = true; |  |  |                             mIvAvail = true; | 
			
		
	
		
		
			
				
					|  |  |                             if (MQTT_STATUS_AVAIL_PROD == status) |  |  |                             if (MQTT_STATUS_AVAIL_PROD == status) | 
			
		
	
	
		
		
			
				
					|  | 
 |