Can you please tell me at which version it worked and at which version it doesn't anymore? As HTTP post requests do not work since 2017 anymore:
https://forum.kodi.tv/showthread.php?tid=324598
Not sure what your home-automation script is capable of or not, but "curl" commands from the bash-commandline are working properly for post-requests:
curl -s -u kodi:1234 -X POST http://127.0.0.1:8080/jsonrpc -H 'Content-Type: application/json' --data '{"jsonrpc": "2.0", "method": "Input.Down", "id":1}'
^^ for example works fine from command-line. Please note that the
-u kodi:1234
is only needed if you have set a username and a password at the web server settings. In case you are running Kodi 19, setting a username and a password for the web server is a requirement and the web server you might have enabled before might be disabled until you set a username and a password for it after an update.
So for Kodi 18 use:
curl -s -X POST http://127.0.0.1:8080/jsonrpc -H 'Content-Type: application/json' --data '{"jsonrpc": "2.0", "method": "Input.Down", "id":1}'
and for Kodi 19 use the line I mentioned first and change username and password accordingly.
If you can't use "curl" on your home-automation system (and I expect that this system is running on a linux-basis-os) but if it can trigger bash-scripts you can write a little script which is triggered then, which does the login via SSH and then runs a shotdown command. For example:
sshpass -p "libreelec" ssh root@<ip> shutdown -h now
this requires that the machine you send the command from knows the LE machine as a known-host. So you have to ssh into the libreelec machine from that home-automation machine first to add that LE machine to the known-hosts file (that's automatically done by logging in via command line).