Use REST Notify to push a Value to Loxone API

In case you need to send quickly changing value to Loxone (i.e. from power meter) websocket might not be the best solution. It had some undesirable side-effects for me (see the issue here) so I switched to sending the data other way. You have either the option to send data to Virtual Input as you originally wanted or maybe even better going through UDP.

You need to first define shell commands for each of the ways:

shell_command:
  loxone_udp: /bin/sh loxone_udp.sh "{{ value }}"
  loxone_vi: curl -X GET -H "Authorization:Basic xxxREDACTEDxxx" http://MINISERVER_IP/dev/sps/io/"{{ vi_name }}"/"{{ value}}"

For UDP you also need to create a simple shell script (i.e. by using the “Terminal & SSH” addon) in the config directory and make it executable.
I have called it loxone_udp.sh :

#/bin/sh
echo "$1" | nc -u -w1 MINISERVER_IP MINISERVER_PORT

Then you can use it from an automation like this:

service: shell_command.loxone_udp
data_template:
  value: "pcpower{{states.sensor.pc_power.state | float(0) * 0.001 | float }}"

or

service: shell_command.loxone_vi
data_template:
  vi_name: VI##
  value: "{{states.sensor.pc_power.state | float(0) * 0.001 | float }}"

For UDP you need to create the UDP input in Loxone with correct UDP command (like pcpower\v for my example above).

The reason why it didn’t work for you using the REST Notify are most probably the templates. I have fought with them for some time till I gave up and found a way using this shell command.
I also think it is a bit safer to use the basic auth hash than plain text password if you decide to choose http. I prefer UDP as it is lighter.