MQTT would be easiest since pretty much everything is already set up for you. The HestiaPi even comes with it’s own MQTT broker so all you would need to do is figure out an MQTT client library, which is pretty easy (I’ve used Paho in Python before and it’s super simple. You can see that at https://github.com/rkoshak/sensorReporter (look in the mqttCommunicator.py file).
But it’s not your only option. OH has a pretty extensive REST API that you can use. It has a swagger page that provides an interactive set of docs showing all the REST API calls and lets you make the calls right there in the browser.
Bring up http://hestiapi:8080 (or IP address) and select PaperUI.
Click on “Add-ons” and then the “User Interfaces” tab.
At the bottom of the list you will find “REST Documentation”. Click on “Install”.
Occasionally PaperUI may get stuck and not see that the add-on has been installed. If the spinning circle continues for a long time refresh the page and it will show “Uninstall” instead of “Install”. It can be helpful to tail /var/log/openhab2/openhab.log or log into the karaf console to watch the logs to see what’s going on. You can also just watch the dashboard and when it’s done a new entry will appear.
Once it’s installed, return to the dashboard at http://hestiapi:8080. There will be a new entry called REST API.
You will mainly care about updating and commanding Items so click on “items” in the list. Click on the row corresponding with what you want to do and it will open up into a form you can fill out and submit. Once submitted you will get the result and it will tell you the curl command to make the same request. The following screen shots will show commanding the TempSetpoint Item to 70 which is what you would want to do to change the target heating/cooling temp.
An third approach is using ssh and issuing commands in the Karaf console itself. I won’t go into details on that one, more information can be found at https://www.openhab.org/docs/administration/console.html#the-console. The default username is openhab and the default password is habopen. You might need to change the settings to allow connections outside of localhost if you go down this path. Instructions for all of that stuff is at the link above.