Supereg / homebridge-http-switch

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

Stateless devices generate always log error #126

Open marioaprea opened 10 months ago

marioaprea commented 10 months ago

Describe the bug I had some switches configured like this: { "accessory": "HTTP-SWITCH", "name": "camera1on", "switchType": "stateless", "timeout": 1000, "onUrl": "http://192.168.x.x/MyBridge/Camera1On" }

When I call direct the address http://192.168.x.x/MyBridge/Camera1On, I receive a "200 OK" from web service on this device.

When I call it from homebridge button, the device switch on but there is an error on log:

[18/1/2024, 12:12:17] [camera1on] Error occurred setting state of switch: socket hang up [18/1/2024, 12:12:17] [camera1on] Error: socket hang up at connResetException (node:internal/errors:720:14) at Socket.socketOnEnd (node:_http_client:525:23) at Socket.emit (node:events:529:35) at endReadableNT (node:internal/streams/readable:1400:12) at processTicksAndRejections (node:internal/process/task_queues:82:21) { code: 'ECONNRESET' } [18/1/2024, 12:12:17] [camera1on] Resetting switch to OFF

Why I receive this errors on log?

Versions: