WLED: JSON API returns error for "/json/live"

What happened?

When attempting to use the http://host/liveview page nothing was loading, upon closer inspection the api located at http://host/json/live was returning the following:

{"error": 4}

The “Peek” feature in the regular UI works as expected however it is communicating using websocket messages and not with the same JSON api resource

To Reproduce Bug

Navigate to http://host/liveview when using version 0.15.0-b6 “Kosen”

image

Expected Behavior

The assumption is that the http://host/json/live api resource would return a non-error

Install Method

Binary from WLED.me

What version of WLED?

WLED 0.15.0-b6 (build 2410140)

Which microcontroller/board are you seeing the problem on?

ESP8266

Relevant log/trace output

No response

Anything else?

No response

Code of Conduct

  • I agree to follow this project’s Code of Conduct

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 16 (2 by maintainers)

Most upvoted comments

Wenn der Build nur Websocket-Unterstützung hat, dann sollten wir den Benutzer nicht wirklich brauchen, um die ? Ws-Modifikator

Ich habe meine Unwissenheit vergessen, aber was gibt die Live-Ansicht, die ein Blick nicht gibt? D.h. warum verwenden Sie Liveview und nicht Peek?

Unfortunately, I cannot integrate the Peek view into ioBroker / Home Assistant. This would only be possible with Liveview.

liveview is a frame embedded in UI. it can be called/invoked independently, though. just a disclaimer: it was not developed to be invoked independent of UI.

Live view is still broken in the release build of 0.15. Web UI Peek feature works fine. Opening a new tab/window and visiting /liveview does not work. Not sure how I get /liveview to use websocket instead of /json/live

Nevermind, I figured it out. Adding ‘?ws’ to the end works, as long as websockets are working in your browser/network.

Example: http://1.2.3.4/liveview?ws