Closed jjl109 closed 1 year ago
I've tried making the same request manually using Postman https://publicapi.lightwaverf.com/v1/features/read
with the same body as that shown in the logs above, and it works fine. But HA consistently gets the 500 error.
It's working for me.
This makes no sense! I assume all the previous calls to the API work, and it's just failing on the features\read
call? I don't know why that would happen, or why it would work when you do it separately. There is a problem with requests that are too long, but (a) I'm pretty sure that a request that is too long returns a 404 error, and (b) it works when you do it manually. I'm not sure where to go with this.
Have you tried removing the dimmer?
Indeed, very strange.
I will try removing the dimmer next (annoying as I have some automations within Lightwave itself that I will need to remove the dimmer from manually first) and report back.
This makes no sense! I assume all the previous calls to the API work, and it's just failing on the
features\read
call? I don't know why that would happen, or why it would work when you do it separately. There is a problem with requests that are too long, but (a) I'm pretty sure that a request that is too long returns a 404 error, and (b) it works when you do it manually. I'm not sure where to go with this.
Yes the previous calls work. However as mentioned, on one of my attempts to restart, it was the /v1/events
endpoint that had the 500 error instead.
Using Postman I haven't been able to reproduce the raw html 500 error from Nginx. I've tried messing up the headers, the Json body, give invalid Json etc etc and I only ever get a nice JSON response from Lightwave with a 400 error.
I have removed the new dimmer and the error still occurs. Glad to have eliminated that as the cause.
Will have to try and intercept the HTTP request that it is making and see if there is anything odd there.
I have found a solution but am still puzzled.
Things I tried:
So it's still a mystery why:
Have submitted https://github.com/bigbadblunt/lightwave2/pull/6 which fixes it for me, and presumably eventually someone else would have stumbled across this too!
I'm also confused. But I've merged the PR and updated the component to use the updated library. Thanks!
I'm getting this in v3.5.19beta3. Is it expected?
I've also been getting this today, although seems intermittent.
I have been using the Public API for a number of weeks with no issues.
Today I restarted HA (after installing a new dimmer) and the lightwave2 integration failed to start:
On a second attempt, the URL shown in the error was a different one:
On a third attempt, it was back to the first error.
After enabling the debug logs, I see this entry:
So it's receiving a 500 error from Lightwave.
Today I added a new dimmer to Lightwave, and I don't know whether that is the cause, or whether there is a general issue with the Public API at the moment (and I just haven't restarted HA in a while).
Using v3.5.16 of the integration.
If anyone else can confirm whether the Public API is working for them at the moment, I will know whether it's likely to be the addition of the new dimmer that is at fault.
The integration is starting fine using the websocket method.