ahodges9 / LedFx

LedFx is a network based LED effect controller with support for advanced real-time audio effects! LedFx can control multiple devices and works great with cheap ESP8266 nodes allowing for cost effectvice syncronized effects across your entire house!
MIT License
386 stars 90 forks source link

Activating a preset via API #71

Closed camcs1 closed 4 years ago

camcs1 commented 4 years ago

Is it possible to activate a preset via the API so I can control LedFx via HomeAssitant

I found a integration for Home Assistant but it seems like its a full version of LedFx (which is awesome just not what I was hoping for) as opposed to a integration more geared up towards control

Also as a bonus is it possible to stop control via the api?

btw sorry if I'm being thick and the solutions fairly obvious

camcs1 commented 4 years ago

Slight Duplicate of #44

camcs1 commented 4 years ago

So after some digging I think I've cracked it:

Activate A Preset

Request URL:http://[LedFxIP]:8888/api/presets Request Method:PUT Body: {"id":"presetname","action":"activate"}

Stop Listening

Request URL: http://[LedFxIP]:8888/api/devices/[devicename]/effects Request Method: DELETE Body: Null

Home Assistant Integration