grzegorz914 / homebridge-enphase-envoy

Homebridge plugin for Photovoltaic Energy System manufactured by Enphase. Supported Envoy-IQ, Envoy-S and all peripheral devices.
MIT License
47 stars 9 forks source link

Issue homebridge-enphase-envoy v4.6.6 - HPE_UNEXPECTED_CONTENT_LENGTH #25

Closed eronnes closed 3 years ago

eronnes commented 3 years ago

homebridge-enphase-envoy v4.6.6

Any solution available?

[2/26/2021, 9:05:54 PM] [enphaseEnvoy] Device: 192.168.178.216 Envoy-S, update Device state error: Error: Parse Error: Content-Length can't be present with Transfer-Encoding at Socket.socketOnData (_http_client.js:509:22) at Socket.emit (events.js:315:20) at addChunk (internal/streams/readable.js:309:12) at readableAddChunk (internal/streams/readable.js:284:9) at Socket.Readable.push (internal/streams/readable.js:223:10) at TCP.onStreamRead (internal/stream_base_commons.js:188:23) { bytesParsed: 242, code: 'HPE_UNEXPECTED_CONTENT_LENGTH', reason: "Content-Length can't be present with Transfer-Encoding", rawPacket: <Buffer 48 54 54 50 2f 31 2e 31 20 33 30 31 20 4d 6f 76 65 64 20 50 65 72 6d 61 6e 65 6e 74 6c 79 0d 0a 44 61 74 65 3a 20 46 72 69 2c 20 32 36 20 46 65 62 20 ... 192 more bytes>, config: [Object], request: [Writable], response: undefined, isAxiosError: true, toJSON: [Function: toJSON]

grzegorz914 commented 3 years ago

Please enable debug mode, restart homebridge and get the log.

eronnes commented 3 years ago

Done, result of the logging:

[enphaseEnvoy] Device: 192.168.178.216 Envoy-S, requesting devices info. [2/27/2021, 1:55:45 PM] [enphaseEnvoy] Device: 192.168.178.216 Envoy-S, update Device state error: Error: Parse Error: Content-Length can't be present with Transfer-Encoding at Socket.socketOnData (_http_client.js:509:22) at Socket.emit (events.js:315:20) at addChunk (internal/streams/readable.js:309:12) at readableAddChunk (internal/streams/readable.js:284:9) at Socket.Readable.push (internal/streams/readable.js:223:10) at TCP.onStreamRead (internal/stream_base_commons.js:188:23) { bytesParsed: 242, code: 'HPE_UNEXPECTED_CONTENT_LENGTH', reason: "Content-Length can't be present with Transfer-Encoding", rawPacket: <Buffer 48 54 54 50 2f 31 2e 31 20 33 30 31 20 4d 6f 76 65 64 20 50 65 72 6d 61 6e 65 6e 74 6c 79 0d 0a 44 61 74 65 3a 20 53 61 74 2c 20 32 37 20 46 65 62 20 ... 192 more bytes>, config: [Object], request: [Writable], response: undefined, isAxiosError: true, toJSON: [Function: toJSON] } [2/27/2021, 1:55:45 PM] [Hue] Philips hue: request 18: GET /lights [2/27/2021, 1:55:45 PM] [Hue] Philips hue: request 18: 200 OK [2/27/2021, 1:55:49 PM] [enphaseEnvoy] Device: 192.168.178.216 Envoy-S, requesting devices info. [2/27/2021, 1:55:50 PM] [Hue] Philips hue: request 19: GET /lights [2/27/2021, 1:55:50 PM] [Hue] Philips hue: request 19: 200 OK

eronnes commented 3 years ago

Is it necessary to enter an installer username and password in the setting?

grzegorz914 commented 3 years ago

If U do not have Installer password do not type it in settings. Installer user leave empty.

Please get the output from:

http://envoy.local/info.xml http://envoy.local/inventory.json

eronnes commented 3 years ago

The two links do not open after copy them into the "safari" bar....

grzegorz914 commented 3 years ago

then Your Envoy is not reached on the network, check Your Envoy IP address in router

grzegorz914 commented 3 years ago

get also http://envoy.local/home.json

eronnes commented 3 years ago

Looks like it was an issue on the envoy. After a restart it works again...only issue is the following error message:

[2/27/2021, 3:56:26 PM] [homebridge-enphase-envoy] This plugin generated a warning from the characteristic 'Energy last 7 days': characteristic was supplied illegal value: number -368.577436 exceeded minimum of 0. See https://git.io/JtMGR for more info.

grzegorz914 commented 3 years ago

It’s nothing wrong, how is possible Your energy last 7 days is negative?

can You get output from http://envoy.local/production.json

grzegorz914 commented 3 years ago

Are U updated plugin to latest version?

eronnes commented 3 years ago

Yes, I’m on the latest version. It’s running now (still giving the warning for the energy last 7 days). But that could has to do with an installation thing which needs to fase out. I wil check in a view days.

There is one other thing. After I started the package in homebridge I am unable to access the envoy via the homepage. I this supposed to be happening?

eronnes commented 3 years ago

Leaves me the question how I can see the data in Apple HomeKit?

grzegorz914 commented 3 years ago
  1. Try to reduce refresh time.
    1. https://github.com/grzegorz914/homebridge-enphase-envoy#info-v45x-and-above