rudders / homebridge-http

HTTP Plugin for Homebridge
Apache License 2.0
178 stars 110 forks source link

Possibility to ignore parts of long JSON output "status_" matching #74

Open brotkasten87 opened 6 years ago

brotkasten87 commented 6 years ago

Hi, the plugin I'm using to get status updates outputs a rather long JSON string (It's called Raumserver). To get the current "status_on" or "status_off", I need the possiblity to let homebridge-http ignore parts of the JSON string for it's matching. Is there the possibility to ad the possibility to includa a *-selector (or anything else) before and after the important JSON string to ignore everything before and after? Example:

"status_on": 
{ *
 "power": "ON","color": "Blue"
 * }

would only check this part of the JSON output and set the status to "on" if it matches. Because of the *-selector, the plugin would ignore any strings before or afterwards.

That would be super helpful. Thanks in advance!