I am writing to ask for your help. I would like to send data to HA from Loxone using REST API. I know there is Loxone integration but for some reason it breaks my Sonos integration.
I have prepared two helpers and created long-time token
Input_button.ring
Input_text.tts
I would like to press the ring button and I am using the following data to do it Instruction: /api/services/input_button/press Header: Authorization: ‘Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiIyZjdmMTg0MzdlOTc0M2VlYmVkNzU5OGFhZDQ5ZjA0OCIsImlhdCI6MTY3MDkzNTUwMiwiZXhwIjoxOTg2Mjk1NTAyfQ.3rYiZynVsYf2ozo-AiQsGiIsVJnOhxKkK_YzPpWMbec’\nContent-Type: ‘application/json’ Body: { “entity_id”: “input_button.ring” } Method: POST
For text use:
I would like to press the ring button and I am using the following data to do it Instruction: /api/services/input_text/set_value Header: Authorization: ‘Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiIyZjdmMTg0MzdlOTc0M2VlYmVkNzU5OGFhZDQ5ZjA0OCIsImlhdCI6MTY3MDkzNTUwMiwiZXhwIjoxOTg2Mjk1NTAyfQ.3rYiZynVsYf2ozo-AiQsGiIsVJnOhxKkK_YzPpWMbec’
Content-Type: ‘application/json’ Body: {“entity_id”: “input_text.tts”,“value”: “{{ }}”} Method: POST
I have checked the rest API and I am sure that the domain for the button is input_button as it is shown like this in my automations. The same applies to input_text. They were created using option to add helpers.
The rest of the values I found in other posts though.
Ok, I have tried different commands and the main issue seems to be the authentification.
Every time the command is carried on I receive:
2022-12-14 10:46:43.635 WARNING (MainThread) [homeassistant.components.http.ban] Login attempt or request with invalid authentication from 192.168.1.41 (192.168.1.41). Requested URL: ‘/api/services/input_text/set_value’. ([en])
2022-12-14 10:46:46.972 WARNING (MainThread) [homeassistant.components.http.ban] Login attempt or request with invalid authentication from 192.168.1.41 (192.168.1.41). Requested URL: ‘/api/services/input_button/press’. ([en])