hoylabs / OpenDTU-OnBattery

Software for ESP32 to talk to Hoymiles/TSUN/Solenso Inverters, VE.Direct devices, battery management systems, and related peripherals
GNU General Public License v2.0
301 stars 63 forks source link

Fix: restore JSON array access for HTTP power meter #967

Closed schlimmchen closed 5 months ago

schlimmchen commented 5 months ago

this implements accessing array members in an ArduinoJSON object following the FirebaseJson syntax. the FirebaseJson lib was previously removed to save flash memory, and logic was implemented to find a JSON node using the FirebaseJson path syntax, restoring the functionality. however, array access was not implemented.

this change also addresses leading and trailing and double forward slashes in the path expression.

moreover, much more expressive error messages are now generated in case the path could not be resolved.

Closes #966.

schlimmchen commented 5 months ago

Oh boy, this was of course meant to go into the development branch first...

schlimmchen commented 5 months ago

Related: ca3d1da74071ad42931de29cc840b73e1c4d2306 (re-adds example to access JSON array)

github-actions[bot] commented 4 months ago

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion or issue for related concerns.