No matter how I try to configure the interval parameters, I can’t get the refresh interval to match Tasmota for the same device ( Xiaomi LYWSD03MMC temp-hum sensor)
see graph below - Yellow dots are Tasmota, Green : openmqttgateway
Are you using the stock firmware with the LYWSD03MMC ?
If yes OMG retrieve the data by a connection and even if you have intervalcnct at 5s, retrieving data with a connection is less easy than broadcasting.
I would advise to change the LYWSD03MMC firmware with PVVX one. You will get a better battery life.
If you already use an alternative firmware, could you detail the version and configuration options?
Was about to upgrade to the other version but wanted to technically understand why I couldn’t get the data via OMG since it can obviously be done with Tasmota without upgrading.
Especially that I’m still not totally sure I understand the full differences and use cases for :
would you have any recommendations regarding my omg configuration/parameters above? All scan modes are set below 5 second so what would explain it only captures a fraction of the updates every 5minutes?
Will try the pvvx upgrade but would like to identify the root cause of this.
In fact the OMG ESP32 is actually closer to the device than the Tasmota ESP32.
I had already set “scanduration” to 5000 earlier today after upgrading to pvvx4.6 but still no success:
I also tried to disable the Tasmota ESP32 in case there was some kind of conflict but it has no effect on the OMG response frequency. something else is going on on the OMG side.
Although I’m not sure if an erase and then init of the saved settings in flash would function in a similar way with a pre-build binary install, but really best to to a complete erase flash via cable
ESP32 erased + fresh install/flash. A little better but still not great.
Tried not to use round numbers to avoid some type of command overlapping.
Is there some type of data “filter” as it seems the data resolution is low.
Last option would be to change the ESP32 unit itself. Maybe some physical issue with the BLE receiver? but even then, for the same device, OMG reports RSSI -70 and Tasmota -85…
Ok, looking better already, but not quite what you’re expecting.
Could you do a few more adjustments to your setting?
Initially, can you set
"bleconnect": false,
"adaptivescan": false,
As the LYWSD03MMC do not require active scanning you can set
"intervalacts": 300000,
just for testing to only scan actively every 5 minutres - I don’t know what other sensors you might have which require active scanning.
Then for a more frequent passive scanning you can keep
"interval": 1000,
but set
"scanduration": 5000,
This should give you a reading every 6 seconds.
Could you also monitor the LYWSD03MMC in MQTT Explorer History for the device. Just to see if there are possibly some undecoded messages in between the decoded ones, in a format which we do not currently decode. What are the reading intervals in parenthesis in the History?
Other than that I am also not sure of some of the PVVX settings you showed above when installing it. Were those the default suggested settings?
Intervalcnt set to 3600000
Doesn’t look too bad.
I think the extra resolution on the tasmota side comes from the fact that I have a secondary esp32 outdoors which probably feeds additional data from the same sensor.
Can I do the same with OMG, IE: have multiple ESP32 publish to the same topic?