I am trying to set up a simple app that listens for Plex’s webhook using Flask/python. When certain players are started, it will dim the lights on my Haiku fans (using another custom driver). My code for flask is
When Plex posts to my URL, it throws out the JSON because the header isn’t correct. If I manually curl a fake JSON to my url, my little app detects it just fine and prints it back.
Is this something Plex needs to fix or do I have to somehow get around it?
@elan said: @dcplaya ~ remember the POST is a multipart body; the part which has JSON should be the correct type.
I skipped over this in the documentation! This is definitely helpful and I can finally get the data to print to my screen. Now I just have to figure out how to separate all the values (which isn’t a Plex issue, just me learning). Thanks elan!
@elan said:
You’re a lucky guy to have Haiku fans, I’ve always drooled over those!
I just pick up another. Little secret… call them and ask for refurbs. Got it for about half price! Still pricey but better than full price. And their premium lights are awesome too! (I don’t work for them but they are a great company I think) My attempt to make my own API (I forked part of this from another guy) is github.com/dcplaya/SenseMe/tree/v0.2