The binding is indeed sampling the power values every 30s (default). As a result 29 out of 30 samples are ignored. The sampled value is only an indication of the power usage, and only more or less correct if the power flow is quite stable. Averaging all values might be difficult (I don’t know if openhab is able to handle bindings at a 1 sec pace). Alternative could be to calculate the average as the (delta energy) divided by (delta time).
My update jar file is available at:
https://github.com/cambronf/openhab
I you want to build the jar yourself. Install Java17 and Maven on your computer. Goto to folder:
…\openhab-addons-IOConnector\bundles\org.openhab.binding.smaenergymeter
and run: mvn clean install -pl :org.openhab.binding.smaenergymeter
sometimes also mvn spotless:apply is required. If succesfull, you will find the jar file in the target folder.
More info on: https://github.com/openhab/openhab-addons
About SMA API. It looks like this is only B2B, and not available for private usage https://developer.sma.de/api-plans