Hello everyone,
i have a problem on who to configure a JSON Switch in Home Assistant.
My situation:
I’m having Hyperion-NG installed on a RP3b+ (with the HyperBian OS, works like a charm!) and the W2801 Leds behind my TV are controlled by an ESP8266 with WLED installed on it.
This also works without a problem, Hyperion gets the HDMI signal from my TV and sends the informations to the ESP8266.
Before i added an ESP, the Raspberry controlled the W2801 Leds directly, but i wantet to use the led strip also for other things, so reconfigured my setup, just for info^^
At the moment i have an rest switch in my HA config, which controls the UDP receiving from the WLED:
0 = allow
1 = override once
(2 would be override until reboot)
- platform: rest
name: Hyperion
resource: http://192.168.188.55/json/state
body_on: '{"lor": 0}'
body_off: '{"lor": 1}'
is_on_template: '{{value_json.lor == 0}}'
headers:
Content-Type: application/json
Also this is working without a problem, when the switch is on, the ESP controls the led strip with the data received from Hyperion, when the switch is off, i can control the ESP/WLED with the webui/HA integration like a normal led strip (with effects etc.)
Now i managed to install LedFX on my computer and i like it very much, BUT here i have a problem with it:
When the “Hyperion Switch” in HA is off, also LedFX doesn’t work, because the switch controls the UDP receiving from the WLED not Hyperion-NG directly.
So after a bit of research, i found two articles in the Hyperion-NG wiki:
https://docs.hyperion-project.org/en/json/#what-is-json
https://docs.hyperion-project.org/en/json/Control.html#control-instances
Although i have no idea on how to configure a JSON-RPC switch from Home Assistant to control an Hyperion instance.
It should start with http://Hyperion-IP:19444/json-rpc ; method: post ; and that’s all i know.
Could someone help me to configure the switch to turn on/off the instance in Hyperion with a JSON switch from Home Assistant?
I know i could go to the webserver of hyperion and do in manually, but having everything in HA is more comfortable and i don’t want to use other app/websites everytime.
Hoping someone has an idea
Greetings