How to upgrade 0.96 to 0.98

May I know how to perform upgrade? Do i need to flash again and setup all the WIFI and MQTT from scratch?

If you use a pre built binary you can flash without erasing the data from the web flasher or from esp flasher
If you have a platformio config just update the code and flash from it.
If you use arduino ide you have to update the libraries, update the code, update your framework and merge your user_config.h.

1 Like

0.98 is working great for me 433 MHZ RF + Somfy blinds control on the same ESP32.
One glitch: if Home assistant (maybe Mosquitto) crashes then OpenMqttGateway resends the last command to my blinds.
I may one day try bring back bluetooth LE to OpenMqttGateway - I had a problem in the past and offloaded it to an ESPHOME node.

This is strange, I don’t think OpenMQTTGateway resend command when there is a broker or controller crash. Are you sure this is not on home assistant side. Would it be possible to check what are you seeing on the broker to isolate the issue?

I would be happy if you try it again and give me feedback.

Dear Florian, sorry to say I haven’t retried bluetooth LE with OMG 0.9.8 yet; moreover I compounded my attachment to using ESPHome for BLE by implementing a family weight filter like this with my MiScale: Xiaomi Miscale Sensors — ESPHome . Can you see a way to OMG be used like that? Or would the logic to separate the different family members weights need to be done in Home Assistant ? Moreover I am able to use the new long term statistics of Home Assistant by using ESPhome sensors.

For the unwanted re-sending of commands to my Somfy blinds I have noticed it happens when OpenMqttGateway disconnects (from Mosquitto?). It corresponds to these events in Home Assistant


This is particularly problematic when it raises the blind in the middle of the night. So I have to address it one way or another. I am going to try OMG on a different ESP32 board and failing that I might move to Mosquitto on a different Raspberry Pi to that running Home Assistant. Failing that I’ll have to try tracing the execution of OMG.
Cheers
Barry

I think you could do some automation into HASS to do this, keeping the same principle of weight ranges

Seems that we need to add the last_reset to the device definition:

Could you check what is happening at the broker level, when a restart occurs, it seems strange that the message is sent again.
Maybe your HAAS MQTT message is published with the retain flag and one OMG restart it catches the retained message and control your blind.

Aha, I think it is probably a retained message that OMG reads when it reconnects to the broker. Retained Messages - MQTT Essentials: Part 8 explains it in general terms. On the broker at the moment is this

HA sent it to OMG at sunset this evening due to the scripts below. MQTT Explorer is showing a “retained” flag.

lower_somfy_blind:
alias: Lower Somfy Blind
sequence:
service: script.send_mqtt_message
data:
topic: home/OpenMQTTGateway_ESP32_Somfy-CC1101/commands/MQTTtoSomfy
payload: {“remote”:0,“command”:“Down”}

send_mqtt_message:
alias: Send MQTT message
sequence:
service: mqtt.publish
data_template:
topic: ‘{{ topic }}’
payload: ‘{{ payload }}’
qos: 1
retain: 0

I had culled that script somewhere from the WWW. Having read the doc (at last!) MQTT Publish service - Home Assistant I have just now changed that last line to:

  retain: false 

and re-ran my “Lower” script and bingo - no retained flag!

So I will re-connect my CC1101 emit Dupont cable to pin 12 of my ESP32 and look out for reconnections to the broker to make sure nothing happens!

Merci Florian

1 Like