Hello
I created a led matrix board that I want to use from HA, I want to use a rest command however I seem to be unsuccesful in calling it from HA
When I try to approach the Wled through its IP and by using Fiddler it is succesful, so I might be missing something obvious in HA
I have added to configuration.yaml
rest_command: !include rests.yaml
And then in the rests.yaml the following code:
wled_text:
url: http://192.168.2.18/json/state
method: POST
payload: '{ "on": true, "bri": "{{brightness}}", "seg":{"id":0, "col":{{color}} , "fx":122, "n":"{{text}}" }}'
When I try to execute a Yaml in developer tools
action: rest_command.wled_text
data:
text: "test me"
It returns
content:
error: 9
status: 400
In Fiddler the payload looks like the following
{ “on”: true, “bri”: “{128}”, “seg”:{“id”:0, “col”:[[0,255,200]], “fx”:122, “n”:“I Love Home Assistant” }}
Now I cannot see what HA is sending out or how it forms the actual POST before it sends it to the target host, this might be able to tell me where the issue is. Anyone know if this is possible from HA or do I need to start a sniffer on my HA Raspberry Pi to capture it?
Any ideas which formatting I might be overlooking or what I can investigate further?
2 posts - 2 participants