Supereg / homebridge-http-switch

Powerful http switch for Homebridge: https://github.com/homebridge/homebridge
ISC License
219 stars 36 forks source link

Example with errors #67

Closed Betterkeks closed 3 years ago

Betterkeks commented 4 years ago

The example configuration contains the snippet below, which doesn't work because the statusPattern isn't escaped (at least in HOOBS).

      "statusUrl": "http://192.168.1.10:8080/js?pw=xxx",
      "statusPattern": "{\"sn\":[1,[0-9]+,[0-9]+,[0-9]+,[0-9]+,[0-9]+,[0-9]+,[0-9]+],\"nstations\":8}",
      "pullInterval": "1000"

May I please suggest that the example is changed to the following:

      "statusUrl": "http://192.168.1.10:8080/js?pw=xxx",
      "statusPattern": "\\{\"sn\":\\[1,[0-9]+,[0-9]+,[0-9]+,[0-9]+,[0-9]+,[0-9]+,[0-9]+\\],\"nstations\":8\\}",
      "pullInterval": "1000"

Please ignore if the problem is elsewhere, but this is how I fixed it in HOOBS.

Supereg commented 3 years ago

I can't reproduce the reported bug. Checking the example it works as expected 🤔

Supereg commented 3 years ago

This issue is stale and will be closed for now. Feel free to reopen or just comment if you can provide any more information on this.