tony-fav / tasmota-blerry

GNU General Public License v3.0
93 stars 29 forks source link

Totally break after upgrade tasmota to 14.1 #86

Closed wbrione closed 6 days ago

wbrione commented 2 weeks ago

tasmota information

* version: Tasmota 14.1.0 (release-bluetooth)
* ota url: http://ota.tasmota.com/tasmota32/release/tasmota32-bluetooth.bin

Error on boot

09:33:52.598 BRY: failed to run compiled code (type_error - value 'nil' does not support subscriptable)

files:

blerry.be                2024-07-06T19:28:55    28310
blerry_config.json       2024-07-06T19:49:51      323
blerry_driver_ATCpvvx.be 2024-07-06T19:30:06     1814

blerry.be

#######################################################################
# Blerry = BLE with Berry for Tasmota ESP32
#
# use : `ON System#Boot DO br load('blerry.be') ENDON`
#
# Provides MQTT Discovery and Reporting for BLE Devices
#######################################################################

var blerry_version = 'v0.2.0-dev'
(...)

blerry_config.json

{
   "devices": {
     "A4C138166BA3": {
       "alias": "Sensor-Sala",
       "model": "ATCpvvx"
     }
   },
   "override": {
     "base_topic": "tele/tasmota_blerry",
     "discovery": true,
     "precision": {
       "Temperature": 1,
       "Humidity": 1
     }
   },
   "advanced": {
     "old_details": false
   }
 } 

Note: To me, it seems that the code is not being compiled due to some syntax error.

wbrione commented 2 weeks ago

Workaround:

After downgrade tasmota do 13.4, Blerry/Berry script back working fine.

tony-fav commented 2 weeks ago

From my testing, this was a timing issue. Seems things for berry/blerry aren't initialized as early in 14.1

This as the startup rule seems like a workaround

Rule1 ON System#Boot DO backlog delay 20; br load('blerry.be') ENDON

Can you verify?

wbrione commented 2 weeks ago

Rule1 ON System#Boot DO backlog delay 20; br load('blerry.be') ENDON

Sorry for the delay...

Your tip was accurate! Thank you!

This fine-tuning was enough.

tony-fav commented 6 days ago

Thanks for the report back, then this is fixed by https://github.com/tony-fav/tasmota-blerry/commit/a6a24a6a14ee105d823de0ee29a4a563c71b7163