Solar Temperature Sensor Tweaks

Please see code and fritzing

Setup
ESP8266 (node mcu)
DHT22 Temp Sensor
AA 3.2v Lifepo4 Rechargeable 600mah Battery
500ma 5v Solar panel
lifepo4 charge module set at 120ma
INA219 i2c current voltage power sensor

System is awake for 10 seconds and reports over MQTT via wifi Temperature, Battery Voltage, Solar Voltage, Solar Current and Solar Power and then deep sleeps for 5 minutes (once all okay will trim wake time down and deep sleep time maybe 10 mins)

I have had this working okay for a few months gradually upgraded it to solar and it’s currently at this stage

Issues - dosen’t always send data every 5 mins when it wakes from deep sleep
This is probably because its outside with poor wifi - how can I confirm this? cannot find it in logs anywhere - (signal strength)
I think this is causing battery drain to go sky high when it can’t connect - not sure it is sleeping at all - sometimes it connects every 5 mins as it should, sometimes I get no readings for an hour

How can I implement qos 1 or 2 in MQTT to make sure the message gets sent? or have I misunderstood how MQTT works

Also I would like to setup something so I can do OTA updates without it going to sleep!! at the moment I have to bring the board indoors hook it up and flash it connected to my server (tinker board) but unsure on this - also would I still need to disconnect the reset cable for flash to complete (just realised I have missed the reset cable off the fritzing whoops will update it)

Additionally I have made some modifications to the esp8266 (node mcu) to make it more efficient
I have removed the ground pin from the serial uart chip and soldered a dupont cable to it so that when its in use that chip draws no power - when i flash it I connect the dupont to a ground pin
I have also unsoldered the regulator from the board as that was drawing power when I supply the board from the 3v terminal
The consumption in deep sleep with just the espboard and DHT22 sensor was around 80uA and 80mA when awake.

The INA219 board draws a few ma when the board is in deep sleep so I would like to turn that on via a transistor or relay I tried to feed it direct from a gpio pin but it wouldn’t work (maybe too much voltage drop) any advice on this? just an NPN or a mosfet I guess

Any advice or suggestions welcome looking to fine tune it / improve it

#ESP DETAILS
esphome:
  name: shed
  platform: ESP8266
  board: esp01_1m

#I2C SETUP FOR INA219 SENSOR
i2c:
  sda: GPIO4
  scl: GPIO5
  scan: FALSE #SAVE SOME TIME DURINH WAKEUP
  id: bus_a

# Enable logging
logger:
  level: DEBUG

#OTA PASSWORD
ota:
  password: "xxx"

#WIFI SETUP
wifi:
  fast_connect: true #SPEEDS UP WIFI CONNECTION
  ssid: "xxx"
  password: "xxx"
  
#WIFI POWERSAVE (DISABLED POOR SIGNAL)
#  power_save_mode: light
#  output_power: 15dB


# MANUAL IP SETTINGS (SPEEDS UP CONNECTION)
  manual_ip:
    static_ip: 192.168.0.160
    gateway: 192.168.0.1
    subnet: 255.255.255.0

#MQTT SETTING
mqtt:
  broker: '192.168.0.150'
  username: xxx
  password: xxx
  birth_message:
  will_message:

#SENSORS
sensor:
#TEMP SENSOR GARDEN
  - platform: dht
    pin: GPIO14
    temperature:
      name: "SHEDTEMP"
    humidity:
      name: "SHEDHUMIDITY"
    update_interval: 2s
    model: DHT22

#ON BOARD ADC TO MESURE BATTERY
  - platform: adc
    pin: A0
    name: Shed Battery
    accuracy_decimals: 3
    update_interval: 2s
    filters:
     - multiply: 12.8

#INA219 SENSOR TO MEASURE SOLAR 
  - platform: ina219
    address: 0x40
    shunt_resistance: 0.1 ohm
    current:
      name: "INA219 Current"
    power:
      name: "INA219 Power"
    bus_voltage:
      name: "INA219 Bus Voltage"
    shunt_voltage:
      name: "INA219 Shunt Voltage"
    max_voltage: 10.0V
    max_current: 0.5A
    update_interval: 2s
      
#DEEP SLEEP TO SAVE POWER      
deep_sleep:
   run_duration: 10s
   sleep_duration: 5min