Project

General

Profile

TVHStats: An activity monitor / history tracker for Tvheadend

Added by ry ser about 2 years ago

Hello,

I'm currently developing a web app to show realtime streams, keep a record of everything that is played and then generate stats using those records.

I love how Tautulli does this for Plex, and I really thought this fits perfectly with tvheadend, to track user behavior, favorite channels, etc.

It is now available to try or contribute on: https://github.com/jbonet/tvhstats

I have released prebuilt docker images so the setup process should now run smoothly. Available at: https://hub.docker.com/r/jbonet4/tvhstats

This is an preview of how it looks. It has now evolved a little bit (not too much):

  • Currently implemented:
  • Active subscriptions with live update .
  • Some stats .
  • History with pagination so its not too heavy.
  • Graphs

Replies (81)

RE: tvheadend stats app - Added by saen acro about 2 years ago

ry ser wrote:

saen acro wrote:

but new problem digest authentication request not work
server have both activated.

Oh yes, it just works with basic auth for now.

Server have active both plain and digest

RE: tvheadend stats app - Added by saen acro about 2 years ago

Just plain auth, but web :4000 is still not active

#netstat -lpnt

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:4000            0.0.0.0:*               LISTEN      21988/docker-proxy
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      2592/sshd [listener
tcp        0      0 :::4000                 :::*                    LISTEN      21994/docker-proxy
tcp        0      0 :::22                   :::*                    LISTEN      2592/sshd [listener

# curl http://localhost:4000
curl: (56) Recv failure: Connection reset by peer

RE: tvheadend stats app - Added by ry ser about 2 years ago

saen acro wrote:

Just plain auth, but web :4000 is still not active

[...]

What is the log from the container?

RE: tvheadend stats app - Added by saen acro about 2 years ago

ry ser wrote:

saen acro wrote:

Just plain auth, but web :4000 is still not active

[...]

What is the log from the container?

docker compose up
[+] Running 2/0
 ⠿ Container tvhstats-db-1        Created                                                                                                                          0.0s
 ⠿ Container tvhstats-tvhstats-1  Created                                                                                                                          0.0s
Attaching to tvhstats-db-1, tvhstats-tvhstats-1
tvhstats-db-1        |
tvhstats-db-1        | PostgreSQL Database directory appears to contain a database; Skipping initialization
tvhstats-db-1        |
tvhstats-db-1        | 2022-10-16 16:02:26.825 UTC [1] LOG:  starting PostgreSQL 15.0 (Debian 15.0-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
tvhstats-db-1        | 2022-10-16 16:02:26.826 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
tvhstats-db-1        | 2022-10-16 16:02:26.826 UTC [1] LOG:  listening on IPv6 address "::", port 5432
tvhstats-db-1        | 2022-10-16 16:02:26.829 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" 
tvhstats-db-1        | 2022-10-16 16:02:26.834 UTC [27] LOG:  database system was shut down at 2022-10-16 16:02:07 UTC
tvhstats-db-1        | 2022-10-16 16:02:26.841 UTC [1] LOG:  database system is ready to accept connections
tvhstats-tvhstats-1  | Resolving Hex dependencies...
tvhstats-tvhstats-1  | Dependency resolution completed:
tvhstats-tvhstats-1  | Unchanged:
tvhstats-tvhstats-1  |   castore 0.1.18
tvhstats-tvhstats-1  |   certifi 2.9.0
tvhstats-tvhstats-1  |   connection 1.1.0
tvhstats-tvhstats-1  |   cowboy 2.9.0
tvhstats-tvhstats-1  |   cowboy_telemetry 0.4.0
tvhstats-tvhstats-1  |   cowlib 2.11.0
tvhstats-tvhstats-1  |   dart_sass 0.5.1
tvhstats-tvhstats-1  |   db_connection 2.4.2
tvhstats-tvhstats-1  |   decimal 2.0.0
tvhstats-tvhstats-1  |   ecto 3.9.0
tvhstats-tvhstats-1  |   ecto_sql 3.9.0
tvhstats-tvhstats-1  |   esbuild 0.5.0
tvhstats-tvhstats-1  |   file_system 0.2.10
tvhstats-tvhstats-1  |   finch 0.13.0
tvhstats-tvhstats-1  |   floki 0.33.1
tvhstats-tvhstats-1  |   gen_stage 1.1.2
tvhstats-tvhstats-1  |   gettext 0.20.0
tvhstats-tvhstats-1  |   hackney 1.18.1
tvhstats-tvhstats-1  |   hpax 0.1.2
tvhstats-tvhstats-1  |   html_entities 0.5.2
tvhstats-tvhstats-1  |   idna 6.1.1
tvhstats-tvhstats-1  |   jason 1.4.0
tvhstats-tvhstats-1  |   metrics 1.0.1
tvhstats-tvhstats-1  |   mime 2.0.3
tvhstats-tvhstats-1  |   mimerl 1.2.0
tvhstats-tvhstats-1  |   mint 1.4.2
tvhstats-tvhstats-1  |   nimble_options 0.4.0
tvhstats-tvhstats-1  |   nimble_pool 0.2.6
tvhstats-tvhstats-1  |   parse_trans 3.3.1
tvhstats-tvhstats-1  |   phoenix 1.6.13
tvhstats-tvhstats-1  |   phoenix_ecto 4.4.0
tvhstats-tvhstats-1  |   phoenix_html 3.2.0
tvhstats-tvhstats-1  |   phoenix_live_dashboard 0.6.5
tvhstats-tvhstats-1  |   phoenix_live_reload 1.3.3
tvhstats-tvhstats-1  |   phoenix_live_view 0.17.12
tvhstats-tvhstats-1  |   phoenix_pubsub 2.1.1
tvhstats-tvhstats-1  |   phoenix_view 1.1.2
tvhstats-tvhstats-1  |   plug 1.13.6
tvhstats-tvhstats-1  |   plug_cowboy 2.5.2
tvhstats-tvhstats-1  |   plug_crypto 1.2.3
tvhstats-tvhstats-1  |   postgrex 0.16.5
tvhstats-tvhstats-1  |   ranch 1.8.0
tvhstats-tvhstats-1  |   sizeable 1.0.2
tvhstats-tvhstats-1  |   ssl_verify_fun 1.1.6
tvhstats-tvhstats-1  |   swoosh 1.8.0
tvhstats-tvhstats-1  |   tailwind 0.1.9
tvhstats-tvhstats-1  |   tarams 1.7.0
tvhstats-tvhstats-1  |   telemetry 1.1.0
tvhstats-tvhstats-1  |   telemetry_metrics 0.6.1
tvhstats-tvhstats-1  |   telemetry_poller 1.0.0
tvhstats-tvhstats-1  |   tzdata 1.1.1
tvhstats-tvhstats-1  |   unicode_util_compat 0.7.0
tvhstats-tvhstats-1  |   uri_query 0.1.2
tvhstats-tvhstats-1  |   valdi 0.3.0
tvhstats-tvhstats-1  | All dependencies are up to date
tvhstats-tvhstats-1  |
tvhstats-tvhstats-1  | 16:02:32.900 [info] Migrations already up
tvhstats-tvhstats-1  | [info] [Janitor] Cleaning up records task started.
tvhstats-tvhstats-1  | [info] [CacheWarmer] Task Retrieve icons started.
tvhstats-tvhstats-1  | [info] [CacheWarmer] Icons folder does not exist, creating it.
tvhstats-tvhstats-1  | [info] [CacheWarmer] Saving icons to: /app/priv/static/assets/icons
tvhstats-tvhstats-1  | [debug] QUERY OK source="subscriptions" db=1.0ms decode=11.3ms queue=54.0ms idle=0.0ms
tvhstats-tvhstats-1  | SELECT s0."hash", s0."user", s0."channel", s0."ip", s0."client", s0."stream_type", s0."started_at", s0."stopped_at", s0."inserted_at", s0."updated_at" FROM "subscriptions" AS s0 WHERE (s0."stopped_at" IS NULL) []
tvhstats-tvhstats-1  | ↳ TVHStats.Worker.Janitor.cleanup_records/0, at: lib/tvhstats/worker/janitor.ex:18
tvhstats-tvhstats-1  | [info] Running TVHStatsWeb.Endpoint with cowboy 2.9.0 at 0.0.0.0:4000 (http)
tvhstats-tvhstats-1  | [debug] Downloading tailwind from https://github.com/tailwindlabs/tailwindcss/releases/download/v3.1.8/tailwindcss-linux-x64
tvhstats-tvhstats-1  | [debug] Downloading esbuild from https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.29.tgz
tvhstats-tvhstats-1  | [debug] Downloading dart-sass from https://github.com/sass/dart-sass/releases/download/1.55.0/dart-sass-1.55.0-linux-x64.tar.gz
tvhstats-tvhstats-1  | [info] Access TVHStatsWeb.Endpoint at http://192.168.1.15:4000
tvhstats-tvhstats-1  | [info] API polling worker started. Poll interval: 1000
tvhstats-tvhstats-1  | [error] Task #PID<0.516.0> started from TVHStats.Supervisor terminating
tvhstats-tvhstats-1  | ** (MatchError) no match of right hand side value: {:ok, %Finch.Response{status: 401, body: "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\r\n<HTML><HEAD>\r\n<TITLE>401 Unauthorized</TITLE>\r\n</HEAD><BODY>\r\n<H1>401 Unauthorized</H1>\r\n<P STYLE=\"text-align: center; margin: 2em\"><A HREF=\"/\" STYLE=\"border: 1px solid; border-radius: 4px; padding: .6em\">Default login</A></P><P STYLE=\"text-align: center; margin: 2em\"><A HREF=\"/login\" STYLE=\"border: 1px solid; border-radius: 4px; padding: .6em\">New login</A></P></BODY></HTML>\r\n", headers: [{"server", "HTS/tvheadend"}, {"cache-control", "no-cache"}, {"www-authenticate", "Basic realm=\"tvheadend\""}, {"connection", "Keep-Alive"}, {"content-type", "text/html"}, {"content-length", "432"}]}}
tvhstats-tvhstats-1  |     (tvhstats 0.0.1) lib/tvhstats/api/client.ex:31: TVHStats.API.Client.get_channels/3
tvhstats-tvhstats-1  |     (tvhstats 0.0.1) lib/tvhstats/worker/cache_warmer.ex:21: TVHStats.Worker.CacheWarmer.retrieve_icons/0
tvhstats-tvhstats-1  |     (elixir 1.14.1) lib/task/supervised.ex:89: Task.Supervised.invoke_mfa/2
tvhstats-tvhstats-1  |     (stdlib 4.1.1) proc_lib.erl:240: :proc_lib.init_p_do_apply/3
tvhstats-tvhstats-1  | Function: &TVHStats.Worker.CacheWarmer.retrieve_icons/0
tvhstats-tvhstats-1  |     Args: []
tvhstats-tvhstats-1  | [error] Task #PID<0.515.0> started from TVHStats.Supervisor terminating
tvhstats-tvhstats-1  | ** (MatchError) no match of right hand side value: {:ok, %Finch.Response{status: 401, body: "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\r\n<HTML><HEAD>\r\n<TITLE>401 Unauthorized</TITLE>\r\n</HEAD><BODY>\r\n<H1>401 Unauthorized</H1>\r\n<P STYLE=\"text-align: center; margin: 2em\"><A HREF=\"/\" STYLE=\"border: 1px solid; border-radius: 4px; padding: .6em\">Default login</A></P><P STYLE=\"text-align: center; margin: 2em\"><A HREF=\"/login\" STYLE=\"border: 1px solid; border-radius: 4px; padding: .6em\">New login</A></P></BODY></HTML>\r\n", headers: [{"server", "HTS/tvheadend"}, {"cache-control", "no-cache"}, {"www-authenticate", "Basic realm=\"tvheadend\""}, {"connection", "Keep-Alive"}, {"content-type", "text/html"}, {"content-length", "432"}]}}
tvhstats-tvhstats-1  |     (tvhstats 0.0.1) lib/tvhstats/api/client.ex:15: TVHStats.API.Client.get_streams/0
tvhstats-tvhstats-1  |     (tvhstats 0.0.1) lib/tvhstats/worker/janitor.ex:22: TVHStats.Worker.Janitor.cleanup_records/0
tvhstats-tvhstats-1  |     (elixir 1.14.1) lib/task/supervised.ex:89: Task.Supervised.invoke_mfa/2
tvhstats-tvhstats-1  |     (stdlib 4.1.1) proc_lib.erl:240: :proc_lib.init_p_do_apply/3
tvhstats-tvhstats-1  | Function: &TVHStats.Worker.Janitor.cleanup_records/0
tvhstats-tvhstats-1  |     Args: []
tvhstats-tvhstats-1  | [error] GenServer TVHStats.Worker.Producer terminating
tvhstats-tvhstats-1  | ** (MatchError) no match of right hand side value: {:ok, %Finch.Response{status: 401, body: "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\r\n<HTML><HEAD>\r\n<TITLE>401 Unauthorized</TITLE>\r\n</HEAD><BODY>\r\n<H1>401 Unauthorized</H1>\r\n<P STYLE=\"text-align: center; margin: 2em\"><A HREF=\"/\" STYLE=\"border: 1px solid; border-radius: 4px; padding: .6em\">Default login</A></P><P STYLE=\"text-align: center; margin: 2em\"><A HREF=\"/login\" STYLE=\"border: 1px solid; border-radius: 4px; padding: .6em\">New login</A></P></BODY></HTML>\r\n", headers: [{"server", "HTS/tvheadend"}, {"cache-control", "no-cache"}, {"www-authenticate", "Basic realm=\"tvheadend\""}, {"connection", "Keep-Alive"}, {"content-type", "text/html"}, {"content-length", "432"}]}}
tvhstats-tvhstats-1  |     (tvhstats 0.0.1) lib/tvhstats/api/client.ex:15: TVHStats.API.Client.get_streams/0
tvhstats-tvhstats-1  |     (tvhstats 0.0.1) lib/tvhstats/worker/producer.ex:34: TVHStats.Worker.Producer.handle_cast/2
tvhstats-tvhstats-1  |     (gen_stage 1.1.2) lib/gen_stage.ex:2134: GenStage.noreply_callback/3
tvhstats-tvhstats-1  |     (stdlib 4.1.1) gen_server.erl:1123: :gen_server.try_dispatch/4
tvhstats-tvhstats-1  |     (stdlib 4.1.1) gen_server.erl:1200: :gen_server.handle_msg/6
tvhstats-tvhstats-1  |     (stdlib 4.1.1) proc_lib.erl:240: :proc_lib.init_p_do_apply/3
tvhstats-tvhstats-1  | Last message: {:"$gen_cast", :fetch}
tvhstats-tvhstats-1  | State: %{poll_interval: 1000}
tvhstats-tvhstats-1  | [info] API polling worker started. Poll interval: 1000
tvhstats-tvhstats-1  | [notice] GenStage consumer TVHStats.Worker.Consumer is stopping after receiving cancel from producer #PID<0.645.0> with reason: {{:badmatch,
tvhstats-tvhstats-1  |   {:ok,
tvhstats-tvhstats-1  |    %Finch.Response{
tvhstats-tvhstats-1  |      status: 401,
tvhstats-tvhstats-1  |      body: "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\r\n<HTML><HEAD>\r\n<TITLE>401 Unauthorized</TITLE>\r\n</HEAD><BODY>\r\n<H1>401 Unauthorized</H1>\r\n<P STYLE=\"text-align: center; margin: 2em\"><A HREF=\"/\" STYLE=\"border: 1px solid; border-radius: 4px; padding: .6em\">Default login</A></P><P STYLE=\"text-align: center; margin: 2em\"><A HREF=\"/login\" STYLE=\"border: 1px solid; border-radius: 4px; padding: .6em\">New login</A></P></BODY></HTML>\r\n",
tvhstats-tvhstats-1  |      headers: [
tvhstats-tvhstats-1  |        {"server", "HTS/tvheadend"},
tvhstats-tvhstats-1  |        {"cache-control", "no-cache"},
tvhstats-tvhstats-1  |        {"www-authenticate", "Basic realm=\"tvheadend\""},
tvhstats-tvhstats-1  |        {"connection", "Keep-Alive"},
tvhstats-tvhstats-1  |        {"content-type", "text/html"},
tvhstats-tvhstats-1  |        {"content-length", "432"}
tvhstats-tvhstats-1  |      ]
tvhstats-tvhstats-1  |    }}},
tvhstats-tvhstats-1  |  [
tvhstats-tvhstats-1  |    {TVHStats.API.Client, :get_streams, 0,
tvhstats-tvhstats-1  |     [file: 'lib/tvhstats/api/client.ex', line: 15]},
tvhstats-tvhstats-1  |    {TVHStats.Worker.Producer, :handle_cast, 2,
tvhstats-tvhstats-1  |     [file: 'lib/tvhstats/worker/producer.ex', line: 34]},
tvhstats-tvhstats-1  |    {GenStage, :noreply_callback, 3, [file: 'lib/gen_stage.ex', line: 2134]},
tvhstats-tvhstats-1  |    {:gen_server, :try_dispatch, 4, [file: 'gen_server.erl', line: 1123]},
tvhstats-tvhstats-1  |    {:gen_server, :handle_msg, 6, [file: 'gen_server.erl', line: 1200]},
tvhstats-tvhstats-1  |    {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 240]}
tvhstats-tvhstats-1  |  ]}
tvhstats-tvhstats-1  |
tvhstats-tvhstats-1  | [error] GenServer TVHStats.Worker.Consumer terminating
tvhstats-tvhstats-1  | ** (MatchError) no match of right hand side value: {:ok, %Finch.Response{status: 401, body: "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\r\n<HTML><HEAD>\r\n<TITLE>401 Unauthorized</TITLE>\r\n</HEAD><BODY>\r\n<H1>401 Unauthorized</H1>\r\n<P STYLE=\"text-align: center; margin: 2em\"><A HREF=\"/\" STYLE=\"border: 1px solid; border-radius: 4px; padding: .6em\">Default login</A></P><P STYLE=\"text-align: center; margin: 2em\"><A HREF=\"/login\" STYLE=\"border: 1px solid; border-radius: 4px; padding: .6em\">New login</A></P></BODY></HTML>\r\n", headers: [{"server", "HTS/tvheadend"}, {"cache-control", "no-cache"}, {"www-authenticate", "Basic realm=\"tvheadend\""}, {"connection", "Keep-Alive"}, {"content-type", "text/html"}, {"content-length", "432"}]}}
tvhstats-tvhstats-1  |     (tvhstats 0.0.1) lib/tvhstats/api/client.ex:15: TVHStats.API.Client.get_streams/0
tvhstats-tvhstats-1  |     (tvhstats 0.0.1) lib/tvhstats/worker/producer.ex:34: TVHStats.Worker.Producer.handle_cast/2
tvhstats-tvhstats-1  |     (gen_stage 1.1.2) lib/gen_stage.ex:2134: GenStage.noreply_callback/3
tvhstats-tvhstats-1  |     (stdlib 4.1.1) gen_server.erl:1123: :gen_server.try_dispatch/4
tvhstats-tvhstats-1  |     (stdlib 4.1.1) gen_server.erl:1200: :gen_server.handle_msg/6
tvhstats-tvhstats-1  |     (stdlib 4.1.1) proc_lib.erl:240: :proc_lib.init_p_do_apply/3
tvhstats-tvhstats-1  | Last message: {:DOWN, #Reference<0.1752657894.1704198145.91240>, :process, #PID<0.645.0>, {{:badmatch, {:ok, %Finch.Response{status: 401, body: "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\r\n<HTML><HEAD>\r\n<TITLE>401 Unauthorized</TITLE>\r\n</HEAD><BODY>\r\n<H1>401 Unauthorized</H1>\r\n<P STYLE=\"text-align: center; margin: 2em\"><A HREF=\"/\" STYLE=\"border: 1px solid; border-radius: 4px; padding: .6em\">Default login</A></P><P STYLE=\"text-align: center; margin: 2em\"><A HREF=\"/login\" STYLE=\"border: 1px solid; border-radius: 4px; padding: .6em\">New login</A></P></BODY></HTML>\r\n", headers: [{"server", "HTS/tvheadend"}, {"cache-control", "no-cache"}, {"www-authenticate", "Basic realm=\"tvheadend\""}, {"connection", "Keep-Alive"}, {"content-type", "text/html"}, {"content-length", "432"}]}}}, [{TVHStats.API.Client, :get_streams, 0, [file: 'lib/tvhstats/api/client.ex', line: 15]}, {TVHStats.Worker.Producer, :handle_cast, 2, [file: 'lib/tvhstats/worker/producer.ex', line: 34]}, {GenStage, :noreply_callback, 3, [file: 'lib/gen_stage.ex', line: 2134]}, {:gen_server, :try_dispatch, 4, [file: 'gen_server.erl', line: 1123]}, {:gen_server, :handle_msg, 6, [file: 'gen_server.erl', line: 1200]}, {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 240]}]}}
tvhstats-tvhstats-1  | State: []
tvhstats-tvhstats-1  | [watch] build finished, watching for changes...
tvhstats-tvhstats-1  | [error] GenServer TVHStats.Worker.Producer terminating
tvhstats-tvhstats-1  | ** (MatchError) no match of right hand side value: {:ok, %Finch.Response{status: 401, body: "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\r\n<HTML><HEAD>\r\n<TITLE>401 Unauthorized</TITLE>\r\n</HEAD><BODY>\r\n<H1>401 Unauthorized</H1>\r\n<P STYLE=\"text-align: center; margin: 2em\"><A HREF=\"/\" STYLE=\"border: 1px solid; border-radius: 4px; padding: .6em\">Default login</A></P><P STYLE=\"text-align: center; margin: 2em\"><A HREF=\"/login\" STYLE=\"border: 1px solid; border-radius: 4px; padding: .6em\">New login</A></P></BODY></HTML>\r\n", headers: [{"server", "HTS/tvheadend"}, {"cache-control", "no-cache"}, {"www-authenticate", "Basic realm=\"tvheadend\""}, {"connection", "Keep-Alive"}, {"content-type", "text/html"}, {"content-length", "432"}]}}
tvhstats-tvhstats-1  |     (tvhstats 0.0.1) lib/tvhstats/api/client.ex:15: TVHStats.API.Client.get_streams/0
tvhstats-tvhstats-1  |     (tvhstats 0.0.1) lib/tvhstats/worker/producer.ex:34: TVHStats.Worker.Producer.handle_cast/2
tvhstats-tvhstats-1  |     (gen_stage 1.1.2) lib/gen_stage.ex:2134: GenStage.noreply_callback/3
tvhstats-tvhstats-1  |     (stdlib 4.1.1) gen_server.erl:1123: :gen_server.try_dispatch/4
tvhstats-tvhstats-1  |     (stdlib 4.1.1) gen_server.erl:1200: :gen_server.handle_msg/6
tvhstats-tvhstats-1  |     (stdlib 4.1.1) proc_lib.erl:240: :proc_lib.init_p_do_apply/3
tvhstats-tvhstats-1  | Last message: {:"$gen_cast", :fetch}
tvhstats-tvhstats-1  | State: %{poll_interval: 1000}
tvhstats-tvhstats-1  | [info] API polling worker started. Poll interval: 1000
tvhstats-tvhstats-1  | [notice] GenStage consumer TVHStats.Worker.Consumer is stopping after receiving cancel from producer #PID<0.665.0> with reason: {{:badmatch,
tvhstats-tvhstats-1  |   {:ok,
tvhstats-tvhstats-1  |    %Finch.Response{
tvhstats-tvhstats-1  |      status: 401,
tvhstats-tvhstats-1  |      body: "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\r\n<HTML><HEAD>\r\n<TITLE>401 Unauthorized</TITLE>\r\n</HEAD><BODY>\r\n<H1>401 Unauthorized</H1>\r\n<P STYLE=\"text-align: center; margin: 2em\"><A HREF=\"/\" STYLE=\"border: 1px solid; border-radius: 4px; padding: .6em\">Default login</A></P><P STYLE=\"text-align: center; margin: 2em\"><A HREF=\"/login\" STYLE=\"border: 1px solid; border-radius: 4px; padding: .6em\">New login</A></P></BODY></HTML>\r\n",
tvhstats-tvhstats-1  |      headers: [
tvhstats-tvhstats-1  |        {"server", "HTS/tvheadend"},
tvhstats-tvhstats-1  |        {"cache-control", "no-cache"},
tvhstats-tvhstats-1  |        {"www-authenticate", "Basic realm=\"tvheadend\""},
tvhstats-tvhstats-1  |        {"connection", "Keep-Alive"},
tvhstats-tvhstats-1  |        {"content-type", "text/html"},
tvhstats-tvhstats-1  |        {"content-length", "432"}
tvhstats-tvhstats-1  |      ]
tvhstats-tvhstats-1  |    }}},
tvhstats-tvhstats-1  |  [
tvhstats-tvhstats-1  |    {TVHStats.API.Client, :get_streams, 0,
tvhstats-tvhstats-1  |     [file: 'lib/tvhstats/api/client.ex', line: 15]},
tvhstats-tvhstats-1  |    {TVHStats.Worker.Producer, :handle_cast, 2,
tvhstats-tvhstats-1  |     [file: 'lib/tvhstats/worker/producer.ex', line: 34]},
tvhstats-tvhstats-1  |    {GenStage, :noreply_callback, 3, [file: 'lib/gen_stage.ex', line: 2134]},
tvhstats-tvhstats-1  |    {:gen_server, :try_dispatch, 4, [file: 'gen_server.erl', line: 1123]},
tvhstats-tvhstats-1  |    {:gen_server, :handle_msg, 6, [file: 'gen_server.erl', line: 1200]},
tvhstats-tvhstats-1  |    {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 240]}
tvhstats-tvhstats-1  |  ]}
tvhstats-tvhstats-1  |
tvhstats-tvhstats-1  | [error] GenServer TVHStats.Worker.Consumer terminating
tvhstats-tvhstats-1  | ** (MatchError) no match of right hand side value: {:ok, %Finch.Response{status: 401, body: "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\r\n<HTML><HEAD>\r\n<TITLE>401 Unauthorized</TITLE>\r\n</HEAD><BODY>\r\n<H1>401 Unauthorized</H1>\r\n<P STYLE=\"text-align: center; margin: 2em\"><A HREF=\"/\" STYLE=\"border: 1px solid; border-radius: 4px; padding: .6em\">Default login</A></P><P STYLE=\"text-align: center; margin: 2em\"><A HREF=\"/login\" STYLE=\"border: 1px solid; border-radius: 4px; padding: .6em\">New login</A></P></BODY></HTML>\r\n", headers: [{"server", "HTS/tvheadend"}, {"cache-control", "no-cache"}, {"www-authenticate", "Basic realm=\"tvheadend\""}, {"connection", "Keep-Alive"}, {"content-type", "text/html"}, {"content-length", "432"}]}}
tvhstats-tvhstats-1  |     (tvhstats 0.0.1) lib/tvhstats/api/client.ex:15: TVHStats.API.Client.get_streams/0
tvhstats-tvhstats-1  |     (tvhstats 0.0.1) lib/tvhstats/worker/producer.ex:34: TVHStats.Worker.Producer.handle_cast/2
tvhstats-tvhstats-1  |     (gen_stage 1.1.2) lib/gen_stage.ex:2134: GenStage.noreply_callback/3
tvhstats-tvhstats-1  |     (stdlib 4.1.1) gen_server.erl:1123: :gen_server.try_dispatch/4
tvhstats-tvhstats-1  |     (stdlib 4.1.1) gen_server.erl:1200: :gen_server.handle_msg/6
tvhstats-tvhstats-1  |     (stdlib 4.1.1) proc_lib.erl:240: :proc_lib.init_p_do_apply/3
tvhstats-tvhstats-1  | Last message: {:DOWN, #Reference<0.1752657894.1704198146.87065>, :process, #PID<0.665.0>, {{:badmatch, {:ok, %Finch.Response{status: 401, body: "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\r\n<HTML><HEAD>\r\n<TITLE>401 Unauthorized</TITLE>\r\n</HEAD><BODY>\r\n<H1>401 Unauthorized</H1>\r\n<P STYLE=\"text-align: center; margin: 2em\"><A HREF=\"/\" STYLE=\"border: 1px solid; border-radius: 4px; padding: .6em\">Default login</A></P><P STYLE=\"text-align: center; margin: 2em\"><A HREF=\"/login\" STYLE=\"border: 1px solid; border-radius: 4px; padding: .6em\">New login</A></P></BODY></HTML>\r\n", headers: [{"server", "HTS/tvheadend"}, {"cache-control", "no-cache"}, {"www-authenticate", "Basic realm=\"tvheadend\""}, {"connection", "Keep-Alive"}, {"content-type", "text/html"}, {"content-length", "432"}]}}}, [{TVHStats.API.Client, :get_streams, 0, [file: 'lib/tvhstats/api/client.ex', line: 15]}, {TVHStats.Worker.Producer, :handle_cast, 2, [file: 'lib/tvhstats/worker/producer.ex', line: 34]}, {GenStage, :noreply_callback, 3, [file: 'lib/gen_stage.ex', line: 2134]}, {:gen_server, :try_dispatch, 4, [file: 'gen_server.erl', line: 1123]}, {:gen_server, :handle_msg, 6, [file: 'gen_server.erl', line: 1200]}, {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 240]}]}}
tvhstats-tvhstats-1  | State: []
tvhstats-tvhstats-1  | [notice] Application tvhstats exited: shutdown

RE: tvheadend stats app - Added by ry ser about 2 years ago

saen acro wrote:

ry ser wrote:

saen acro wrote:

Just plain auth, but web :4000 is still not active

[...]

What is the log from the container?

[...]

That error means your user has no authorization to use the api, is the user an admin?

RE: tvheadend stats app - Added by saen acro about 2 years ago

ry ser wrote:

That error means your user has no authorization to use the api, is the user an admin?

user have enabled all options including is administrator.

#curl http://11:[email protected]:9981/status.xml
<?xml version="1.0"?>
<currentload>
<systemload>0.940000,2.340000,2.150000</systemload>
<recordings>
</recordings>
<subscriptions>0</subscriptions>

# curl http://11:[email protected]:9981/api/status/subscriptions
{"entries":[],"totalCount":0}

/this is a test server no clients/

RE: tvheadend stats app - Added by ry ser about 2 years ago

saen acro wrote:

ry ser wrote:

That error means your user has no authorization to use the api, is the user an admin?

user have enabled all options including is administrator.

[...]

/this is a test server no clients/

Have you configured the user and password correctly in the config file? Try to check if the env variables are set in the container.

Also please, write this in the repo issues, so we dont flood this thread.

RE: tvheadend stats app - Added by saen acro about 2 years ago

ry ser wrote:

saen acro wrote:

ry ser wrote:

That error means your user has no authorization to use the api, is the user an admin?

user have enabled all options including is administrator.

[...]

/this is a test server no clients/

Have you configured the user and password correctly in the config file? Try to check if the env variables are set in the container.

Also please, write this in the repo issues, so we dont flood this thread.

checked twice no errors with credentials.

RE: tvheadend stats app - Added by ry ser about 2 years ago

saen acro wrote:

ry ser wrote:

saen acro wrote:

ry ser wrote:

That error means your user has no authorization to use the api, is the user an admin?

user have enabled all options including is administrator.

[...]

/this is a test server no clients/

Have you configured the user and password correctly in the config file? Try to check if the env variables are set in the container.

Also please, write this in the repo issues, so we dont flood this thread.

checked twice no errors with credentials.

I have updated the repo, please pull the latest changes and do a rebuild:

docker-compose down
docker-compose up -d

I have moved where the config is loaded from, it should work now, let me now. But if it keeps failing, please, write in the repo issues, I won't provide support here.

RE: tvheadend stats app - Added by saen acro about 2 years ago

ry ser wrote:

I have updated the repo, please pull the latest changes and do a rebuild:

docker-compose down
docker-compose up -d

I have moved where the config is loaded from, it should work now, let me now. But if it keeps failing, please, write in the repo issues, I won't provide support here.

Success now work.
lets see what happens after few hours...

RE: tvheadend stats app - Added by saen acro about 2 years ago

After few hours test ...
What can be the problem?

tvhstats_1  | [error] Task #PID<0.870.0> started from #PID<0.516.0> terminating
tvhstats_1  | ** (ArgumentError) invalid scheme "picon" for url: picon://1_0_1_34D_8_C8_FFFF0000_0_0_0.png
tvhstats_1  |     (finch 0.13.0) lib/finch/request.ex:138: Finch.Request.parse_url/1
tvhstats_1  |     (finch 0.13.0) lib/finch/request.ex:103: Finch.Request.build/5
tvhstats_1  |     (tvhstats 0.0.1) lib/tvhstats/worker/cache_warmer.ex:30: TVHStats.Worker.CacheWarmer.store_in_cache/2
tvhstats_1  |     (elixir 1.14.1) lib/task/supervised.ex:89: Task.Supervised.invoke_mfa/2
tvhstats_1  |     (elixir 1.14.1) lib/task/supervised.ex:34: Task.Supervised.reply/4
tvhstats_1  |     (stdlib 4.1.1) proc_lib.erl:240: :proc_lib.init_p_do_apply/3
tvhstats_1  | Function: #Function<2.63190957/0 in TVHStats.Worker.CacheWarmer.retrieve_icons/0>
tvhstats_1  |     Args: []
tvhstats_1  | [error] GenServer TVHStats.Worker.Producer terminating
tvhstats_1  | ** (FunctionClauseError) no function clause matching in TVHStats.Subscriptions.Utils.generate_hash/1
tvhstats_1  |     (tvhstats 0.0.1) lib/tvhstats/subscriptions/utils.ex:5: TVHStats.Subscriptions.Utils.generate_hash(%{"channel" => "Nat Geo HD", "client" => "NR", "descramble" => "0B00:000000(436ms)-127.0.0.1:12345", "errors" => 0, "hostname" => "172.31.90.253", "id" => 1594, "in" => 1236476, "out" => 1236476, "pids" => [256, 512, 520, 1010], "profile" => "pass", "service" => "DVB-C #1__/A1/818MHz/Nat Geo HD", "start" => 1666117706, "state" => "", "title" => "HTTP", "total_in" => 1950990116, "total_out" => 1950990116})
tvhstats_1  |     (tvhstats 0.0.1) lib/tvhstats/api/client.ex:43: TVHStats.API.Client.parse_subscription/1
tvhstats_1  |     (elixir 1.14.1) lib/enum.ex:1658: Enum."-map/2-lists^map/1-0-"/2
tvhstats_1  |     (tvhstats 0.0.1) lib/tvhstats/api/client.ex:22: TVHStats.API.Client.get_streams/0
tvhstats_1  |     (tvhstats 0.0.1) lib/tvhstats/worker/producer.ex:34: TVHStats.Worker.Producer.handle_cast/2
tvhstats_1  |     (gen_stage 1.1.2) lib/gen_stage.ex:2134: GenStage.noreply_callback/3
tvhstats_1  |     (stdlib 4.1.1) gen_server.erl:1123: :gen_server.try_dispatch/4
tvhstats_1  |     (stdlib 4.1.1) gen_server.erl:1200: :gen_server.handle_msg/6
tvhstats_1  |     (stdlib 4.1.1) proc_lib.erl:240: :proc_lib.init_p_do_apply/3
tvhstats_1  | Last message: {:"$gen_cast", :fetch}
tvhstats_1  | State: %{poll_interval: 1000}
tvhstats_1  | [notice] GenStage consumer TVHStats.Worker.Consumer is stopping after receiving cancel from producer #PID<0.645.0> with reason: {:function_clause,
tvhstats_1  |  [
tvhstats_1  |    {TVHStats.Subscriptions.Utils, :generate_hash,
tvhstats_1  |     [
tvhstats_1  |       %{
tvhstats_1  |         "channel" => "Nat Geo HD",
tvhstats_1  |         "client" => "NR",
tvhstats_1  |         "descramble" => "0B00:000000(436ms)-127.0.0.1:12345",
tvhstats_1  |         "errors" => 0,
tvhstats_1  |         "hostname" => "172.31.90.253",
tvhstats_1  |         "id" => 1594,
tvhstats_1  |         "in" => 1236476,
tvhstats_1  |         "out" => 1236476,
tvhstats_1  |         "pids" => [256, 512, 520, 1010],
tvhstats_1  |         "profile" => "pass",
tvhstats_1  |         "service" => "DVB-C #1__/A1/818MHz/Nat Geo HD",
tvhstats_1  |         "start" => 1666117706,
tvhstats_1  |         "state" => "",
tvhstats_1  |         "title" => "HTTP",
tvhstats_1  |         "total_in" => 1950990116,
tvhstats_1  |         "total_out" => 1950990116
tvhstats_1  |       }
tvhstats_1  |     ], [file: 'lib/tvhstats/subscriptions/utils.ex', line: 5]},
tvhstats_1  |    {TVHStats.API.Client, :parse_subscription, 1,
tvhstats_1  |     [file: 'lib/tvhstats/api/client.ex', line: 43]},
tvhstats_1  |    {Enum, :"-map/2-lists^map/1-0-", 2, [file: 'lib/enum.ex', line: 1658]},
tvhstats_1  |    {TVHStats.API.Client, :get_streams, 0,
tvhstats_1  |     [file: 'lib/tvhstats/api/client.ex', line: 22]},
tvhstats_1  |    {TVHStats.Worker.Producer, :handle_cast, 2,
tvhstats_1  |     [file: 'lib/tvhstats/worker/producer.ex', line: 34]},
tvhstats_1  |    {GenStage, :noreply_callback, 3, [file: 'lib/gen_stage.ex', line: 2134]},
tvhstats_1  |    {:gen_server, :try_dispatch, 4, [file: 'gen_server.erl', line: 1123]},
tvhstats_1  |    {:gen_server, :handle_msg, 6, [file: 'gen_server.erl', line: 1200]},
tvhstats_1  |    {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 240]}
tvhstats_1  |  ]}
tvhstats_1  | 
tvhstats_1  | [info] API polling worker started. Poll interval: 1000
tvhstats_1  | [error] GenServer TVHStats.Worker.Consumer terminating
tvhstats_1  | ** (FunctionClauseError) no function clause matching in TVHStats.Subscriptions.Utils.generate_hash/1
tvhstats_1  |     (tvhstats 0.0.1) lib/tvhstats/subscriptions/utils.ex:5: TVHStats.Subscriptions.Utils.generate_hash(%{"channel" => "Nat Geo HD", "client" => "NR", "descramble" => "0B00:000000(436ms)-127.0.0.1:12345", "errors" => 0, "hostname" => "172.31.90.253", "id" => 1594, "in" => 1236476, "out" => 1236476, "pids" => [256, 512, 520, 1010], "profile" => "pass", "service" => "DVB-C #1__/A1/818MHz/Nat Geo HD", "start" => 1666117706, "state" => "", "title" => "HTTP", "total_in" => 1950990116, "total_out" => 1950990116})
tvhstats_1  |     (tvhstats 0.0.1) lib/tvhstats/api/client.ex:43: TVHStats.API.Client.parse_subscription/1
tvhstats_1  |     (elixir 1.14.1) lib/enum.ex:1658: Enum."-map/2-lists^map/1-0-"/2
tvhstats_1  |     (tvhstats 0.0.1) lib/tvhstats/api/client.ex:22: TVHStats.API.Client.get_streams/0
tvhstats_1  |     (tvhstats 0.0.1) lib/tvhstats/worker/producer.ex:34: TVHStats.Worker.Producer.handle_cast/2
tvhstats_1  |     (gen_stage 1.1.2) lib/gen_stage.ex:2134: GenStage.noreply_callback/3
tvhstats_1  |     (stdlib 4.1.1) gen_server.erl:1123: :gen_server.try_dispatch/4
tvhstats_1  |     (stdlib 4.1.1) gen_server.erl:1200: :gen_server.handle_msg/6
tvhstats_1  |     (stdlib 4.1.1) proc_lib.erl:240: :proc_lib.init_p_do_apply/3
tvhstats_1  | Last message: {:DOWN, #Reference<0.686759624.4055105538.64727>, :process, #PID<0.645.0>, {:function_clause, [{TVHStats.Subscriptions.Utils, :generate_hash, [%{"channel" => "Nat Geo HD", "client" => "NR", "descramble" => "0B00:000000(436ms)-127.0.0.1:12345", "errors" => 0, "hostname" => "172.31.90.253", "id" => 1594, "in" => 1236476, "out" => 1236476, "pids" => [256, 512, 520, 1010], "profile" => "pass", "service" => "DVB-C #1__/A1/818MHz/Nat Geo HD", "start" => 1666117706, "state" => "", "title" => "HTTP", "total_in" => 1950990116, "total_out" => 1950990116}], [file: 'lib/tvhstats/subscriptions/utils.ex', line: 5]}, {TVHStats.API.Client, :parse_subscription, 1, [file: 'lib/tvhstats/api/client.ex', line: 43]}, {Enum, :"-map/2-lists^map/1-0-", 2, [file: 'lib/enum.ex', line: 1658]}, {TVHStats.API.Client, :get_streams, 0, [file: 'lib/tvhstats/api/client.ex', line: 22]}, {TVHStats.Worker.Producer, :handle_cast, 2, [file: 'lib/tvhstats/worker/producer.ex', line: 34]}, {GenStage, :noreply_callback, 3, [file: 'lib/gen_stage.ex', line: 2134]}, {:gen_server, :try_dispatch, 4, [file: 'gen_server.erl', line: 1123]}, {:gen_server, :handle_msg, 6, [file: 'gen_server.erl', line: 1200]}, {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 240]}]}}
tvhstats_1  | State: []
tvhstats_1  | [error] GenServer TVHStats.Worker.Producer terminating
tvhstats_1  | ** (FunctionClauseError) no function clause matching in TVHStats.Subscriptions.Utils.generate_hash/1
tvhstats_1  |     (tvhstats 0.0.1) lib/tvhstats/subscriptions/utils.ex:5: TVHStats.Subscriptions.Utils.generate_hash(%{"channel" => "Nat Geo HD", "client" => "NR", "descramble" => "0B00:000000(432ms)-127.0.0.1:12345", "errors" => 0, "hostname" => "172.31.90.253", "id" => 1594, "in" => 1353036, "out" => 1353036, "pids" => [256, 512, 520, 1010], "profile" => "pass", "service" => "DVB-C #1__/A1/818MHz/Nat Geo HD", "start" => 1666117706, "state" => "", "title" => "HTTP", "total_in" => 1952366276, "total_out" => 1952366276})
tvhstats_1  |     (tvhstats 0.0.1) lib/tvhstats/api/client.ex:43: TVHStats.API.Client.parse_subscription/1
tvhstats_1  |     (elixir 1.14.1) lib/enum.ex:1658: Enum."-map/2-lists^map/1-0-"/2
tvhstats_1  |     (tvhstats 0.0.1) lib/tvhstats/api/client.ex:22: TVHStats.API.Client.get_streams/0
tvhstats_1  |     (tvhstats 0.0.1) lib/tvhstats/worker/producer.ex:34: TVHStats.Worker.Producer.handle_cast/2
tvhstats_1  |     (gen_stage 1.1.2) lib/gen_stage.ex:2134: GenStage.noreply_callback/3
tvhstats_1  |     (stdlib 4.1.1) gen_server.erl:1123: :gen_server.try_dispatch/4
tvhstats_1  |     (stdlib 4.1.1) gen_server.erl:1200: :gen_server.handle_msg/6
tvhstats_1  |     (stdlib 4.1.1) proc_lib.erl:240: :proc_lib.init_p_do_apply/3
tvhstats_1  | Last message: {:"$gen_cast", :fetch}
tvhstats_1  | State: %{poll_interval: 1000}
tvhstats_1  | [info] API polling worker started. Poll interval: 1000
tvhstats_1  | [notice] GenStage consumer TVHStats.Worker.Consumer is stopping after receiving cancel from producer #PID<0.875.0> with reason: {:function_clause,
tvhstats_1  |  [
tvhstats_1  |    {TVHStats.Subscriptions.Utils, :generate_hash,
tvhstats_1  |     [
tvhstats_1  |       %{
tvhstats_1  |         "channel" => "Nat Geo HD",
tvhstats_1  |         "client" => "NR",
tvhstats_1  |         "descramble" => "0B00:000000(432ms)-127.0.0.1:12345",
tvhstats_1  |         "errors" => 0,
tvhstats_1  |         "hostname" => "172.31.90.253",
tvhstats_1  |         "id" => 1594,
tvhstats_1  |         "in" => 1353036,
tvhstats_1  |         "out" => 1353036,
tvhstats_1  |         "pids" => [256, 512, 520, 1010],
tvhstats_1  |         "profile" => "pass",
tvhstats_1  |         "service" => "DVB-C #1__/A1/818MHz/Nat Geo HD",
tvhstats_1  |         "start" => 1666117706,
tvhstats_1  |         "state" => "",
tvhstats_1  |         "title" => "HTTP",
tvhstats_1  |         "total_in" => 1952366276,
tvhstats_1  |         "total_out" => 1952366276
tvhstats_1  |       }
tvhstats_1  |     ], [file: 'lib/tvhstats/subscriptions/utils.ex', line: 5]},
tvhstats_1  |    {TVHStats.API.Client, :parse_subscription, 1,
tvhstats_1  |     [file: 'lib/tvhstats/api/client.ex', line: 43]},
tvhstats_1  |    {Enum, :"-map/2-lists^map/1-0-", 2, [file: 'lib/enum.ex', line: 1658]},
tvhstats_1  |    {TVHStats.API.Client, :get_streams, 0,
tvhstats_1  |     [file: 'lib/tvhstats/api/client.ex', line: 22]},
tvhstats_1  |    {TVHStats.Worker.Producer, :handle_cast, 2,
tvhstats_1  |     [file: 'lib/tvhstats/worker/producer.ex', line: 34]},
tvhstats_1  |    {GenStage, :noreply_callback, 3, [file: 'lib/gen_stage.ex', line: 2134]},
tvhstats_1  |    {:gen_server, :try_dispatch, 4, [file: 'gen_server.erl', line: 1123]},
tvhstats_1  |    {:gen_server, :handle_msg, 6, [file: 'gen_server.erl', line: 1200]},
tvhstats_1  |    {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 240]}
tvhstats_1  |  ]}
tvhstats_1  | 
tvhstats_1  | [error] GenServer TVHStats.Worker.Consumer terminating
tvhstats_1  | ** (FunctionClauseError) no function clause matching in TVHStats.Subscriptions.Utils.generate_hash/1
tvhstats_1  |     (tvhstats 0.0.1) lib/tvhstats/subscriptions/utils.ex:5: TVHStats.Subscriptions.Utils.generate_hash(%{"channel" => "Nat Geo HD", "client" => "NR", "descramble" => "0B00:000000(432ms)-127.0.0.1:12345", "errors" => 0, "hostname" => "172.31.90.253", "id" => 1594, "in" => 1353036, "out" => 1353036, "pids" => [256, 512, 520, 1010], "profile" => "pass", "service" => "DVB-C #1__/A1/818MHz/Nat Geo HD", "start" => 1666117706, "state" => "", "title" => "HTTP", "total_in" => 1952366276, "total_out" => 1952366276})
tvhstats_1  |     (tvhstats 0.0.1) lib/tvhstats/api/client.ex:43: TVHStats.API.Client.parse_subscription/1
tvhstats_1  |     (elixir 1.14.1) lib/enum.ex:1658: Enum."-map/2-lists^map/1-0-"/2
tvhstats_1  |     (tvhstats 0.0.1) lib/tvhstats/api/client.ex:22: TVHStats.API.Client.get_streams/0
tvhstats_1  |     (tvhstats 0.0.1) lib/tvhstats/worker/producer.ex:34: TVHStats.Worker.Producer.handle_cast/2
tvhstats_1  |     (gen_stage 1.1.2) lib/gen_stage.ex:2134: GenStage.noreply_callback/3
tvhstats_1  |     (stdlib 4.1.1) gen_server.erl:1123: :gen_server.try_dispatch/4
tvhstats_1  |     (stdlib 4.1.1) gen_server.erl:1200: :gen_server.handle_msg/6
tvhstats_1  |     (stdlib 4.1.1) proc_lib.erl:240: :proc_lib.init_p_do_apply/3
tvhstats_1  | Last message: {:DOWN, #Reference<0.686759624.4055105538.68451>, :process, #PID<0.875.0>, {:function_clause, [{TVHStats.Subscriptions.Utils, :generate_hash, [%{"channel" => "Nat Geo HD", "client" => "NR", "descramble" => "0B00:000000(432ms)-127.0.0.1:12345", "errors" => 0, "hostname" => "172.31.90.253", "id" => 1594, "in" => 1353036, "out" => 1353036, "pids" => [256, 512, 520, 1010], "profile" => "pass", "service" => "DVB-C #1__/A1/818MHz/Nat Geo HD", "start" => 1666117706, "state" => "", "title" => "HTTP", "total_in" => 1952366276, "total_out" => 1952366276}], [file: 'lib/tvhstats/subscriptions/utils.ex', line: 5]}, {TVHStats.API.Client, :parse_subscription, 1, [file: 'lib/tvhstats/api/client.ex', line: 43]}, {Enum, :"-map/2-lists^map/1-0-", 2, [file: 'lib/enum.ex', line: 1658]}, {TVHStats.API.Client, :get_streams, 0, [file: 'lib/tvhstats/api/client.ex', line: 22]}, {TVHStats.Worker.Producer, :handle_cast, 2, [file: 'lib/tvhstats/worker/producer.ex', line: 34]}, {GenStage, :noreply_callback, 3, [file: 'lib/gen_stage.ex', line: 2134]}, {:gen_server, :try_dispatch, 4, [file: 'gen_server.erl', line: 1123]}, {:gen_server, :handle_msg, 6, [file: 'gen_server.erl', line: 1200]}, {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 240]}]}}
tvhstats_1  | State: []
tvhstats_1  | [notice] Application tvhstats exited: shutdown

and this one

tvhstats_1  | 19:04:01.093 [info] Migrations already up
tvhstats_1  | [info] [Janitor] Cleaning up records task started.
tvhstats_1  | [info] [CacheWarmer] Task Retrieve icons started.
tvhstats_1  | [info] [CacheWarmer] Saving icons to: /app/priv/static/assets/icons
tvhstats_1  | [debug] QUERY OK source="subscriptions" db=1.0ms decode=11.6ms queue=64.1ms idle=0.0ms
tvhstats_1  | SELECT s0."hash", s0."user", s0."channel", s0."ip", s0."client", s0."stream_type", s0."started_at", s0."stopped_at", s0."inserted_at", s0."updated_at" FROM "subscriptions" AS s0 WHERE (s0."stopped_at" IS NULL) []
tvhstats_1  |  TVHStats.Worker.Janitor.cleanup_records/0, at: lib/tvhstats/worker/janitor.ex:18
tvhstats_1  | [info] Running TVHStatsWeb.Endpoint with cowboy 2.9.0 at 0.0.0.0:4000 (http)
tvhstats_1  | [info] Access TVHStatsWeb.Endpoint at http://localhost:4000
tvhstats_1  | [info] API polling worker started. Poll interval: 1000
tvhstats_1  | Sass is watching for changes. Press Ctrl-C to stop.
tvhstats_1  | 
tvhstats_1  | [error] Task #PID<0.516.0> started from TVHStats.Supervisor terminating
tvhstats_1  | ** (MatchError) no match of right hand side value: {:error, %Mint.TransportError{reason: :econnrefused}}
tvhstats_1  |     (tvhstats 0.0.1) lib/tvhstats/api/client.ex:31: TVHStats.API.Client.get_channels/3
tvhstats_1  |     (tvhstats 0.0.1) lib/tvhstats/worker/cache_warmer.ex:21: TVHStats.Worker.CacheWarmer.retrieve_icons/0
tvhstats_1  |     (elixir 1.14.1) lib/task/supervised.ex:89: Task.Supervised.invoke_mfa/2
tvhstats_1  |     (stdlib 4.1.1) proc_lib.erl:240: :proc_lib.init_p_do_apply/3
tvhstats_1  | Function: &TVHStats.Worker.CacheWarmer.retrieve_icons/0
tvhstats_1  |     Args: []
tvhstats_1  | [error] Task #PID<0.515.0> started from TVHStats.Supervisor terminating
tvhstats_1  | ** (MatchError) no match of right hand side value: {:error, %Mint.TransportError{reason: :econnrefused}}
tvhstats_1  |     (tvhstats 0.0.1) lib/tvhstats/api/client.ex:15: TVHStats.API.Client.get_streams/0
tvhstats_1  |     (tvhstats 0.0.1) lib/tvhstats/worker/janitor.ex:22: TVHStats.Worker.Janitor.cleanup_records/0
tvhstats_1  |     (elixir 1.14.1) lib/task/supervised.ex:89: Task.Supervised.invoke_mfa/2
tvhstats_1  |     (stdlib 4.1.1) proc_lib.erl:240: :proc_lib.init_p_do_apply/3
tvhstats_1  | Function: &TVHStats.Worker.Janitor.cleanup_records/0
tvhstats_1  |     Args: []
tvhstats_1  | [watch] build finished, watching for changes...
tvhstats_1  | [error] GenServer TVHStats.Worker.Producer terminating
tvhstats_1  | ** (MatchError) no match of right hand side value: {:error, %Mint.TransportError{reason: :econnrefused}}
tvhstats_1  |     (tvhstats 0.0.1) lib/tvhstats/api/client.ex:15: TVHStats.API.Client.get_streams/0
tvhstats_1  |     (tvhstats 0.0.1) lib/tvhstats/worker/producer.ex:34: TVHStats.Worker.Producer.handle_cast/2
tvhstats_1  |     (gen_stage 1.1.2) lib/gen_stage.ex:2134: GenStage.noreply_callback/3
tvhstats_1  |     (stdlib 4.1.1) gen_server.erl:1123: :gen_server.try_dispatch/4
tvhstats_1  |     (stdlib 4.1.1) gen_server.erl:1200: :gen_server.handle_msg/6
tvhstats_1  |     (stdlib 4.1.1) proc_lib.erl:240: :proc_lib.init_p_do_apply/3
tvhstats_1  | Last message: {:"$gen_cast", :fetch}
tvhstats_1  | State: %{poll_interval: 1000}
tvhstats_1  | [info] API polling worker started. Poll interval: 1000
tvhstats_1  | [notice] GenStage consumer TVHStats.Worker.Consumer is stopping after receiving cancel from producer #PID<0.645.0> with reason: {{:badmatch, {:error, %Mint.TransportError{reason: :econnrefused}}},
tvhstats_1  |  [
tvhstats_1  |    {TVHStats.API.Client, :get_streams, 0,
tvhstats_1  |     [file: 'lib/tvhstats/api/client.ex', line: 15]},
tvhstats_1  |    {TVHStats.Worker.Producer, :handle_cast, 2,
tvhstats_1  |     [file: 'lib/tvhstats/worker/producer.ex', line: 34]},
tvhstats_1  |    {GenStage, :noreply_callback, 3, [file: 'lib/gen_stage.ex', line: 2134]},
tvhstats_1  |    {:gen_server, :try_dispatch, 4, [file: 'gen_server.erl', line: 1123]},
tvhstats_1  |    {:gen_server, :handle_msg, 6, [file: 'gen_server.erl', line: 1200]},
tvhstats_1  |    {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 240]}
tvhstats_1  |  ]}
tvhstats_1  | 
tvhstats_1  | [error] GenServer TVHStats.Worker.Consumer terminating
tvhstats_1  | ** (MatchError) no match of right hand side value: {:error, %Mint.TransportError{reason: :econnrefused}}
tvhstats_1  |     (tvhstats 0.0.1) lib/tvhstats/api/client.ex:15: TVHStats.API.Client.get_streams/0
tvhstats_1  |     (tvhstats 0.0.1) lib/tvhstats/worker/producer.ex:34: TVHStats.Worker.Producer.handle_cast/2
tvhstats_1  |     (gen_stage 1.1.2) lib/gen_stage.ex:2134: GenStage.noreply_callback/3
tvhstats_1  |     (stdlib 4.1.1) gen_server.erl:1123: :gen_server.try_dispatch/4
tvhstats_1  |     (stdlib 4.1.1) gen_server.erl:1200: :gen_server.handle_msg/6
tvhstats_1  |     (stdlib 4.1.1) proc_lib.erl:240: :proc_lib.init_p_do_apply/3
tvhstats_1  | Last message: {:DOWN, #Reference<0.3696639384.298844162.55070>, :process, #PID<0.645.0>, {{:badmatch, {:error, %Mint.TransportError{reason: :econnrefused}}}, [{TVHStats.API.Client, :get_streams, 0, [file: 'lib/tvhstats/api/client.ex', line: 15]}, {TVHStats.Worker.Producer, :handle_cast, 2, [file: 'lib/tvhstats/worker/producer.ex', line: 34]}, {GenStage, :noreply_callback, 3, [file: 'lib/gen_stage.ex', line: 2134]}, {:gen_server, :try_dispatch, 4, [file: 'gen_server.erl', line: 1123]}, {:gen_server, :handle_msg, 6, [file: 'gen_server.erl', line: 1200]}, {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 240]}]}}
tvhstats_1  | State: []
tvhstats_1  | [error] GenServer TVHStats.Worker.Producer terminating
tvhstats_1  | ** (MatchError) no match of right hand side value: {:error, %Mint.TransportError{reason: :econnrefused}}
tvhstats_1  |     (tvhstats 0.0.1) lib/tvhstats/api/client.ex:15: TVHStats.API.Client.get_streams/0
tvhstats_1  |     (tvhstats 0.0.1) lib/tvhstats/worker/producer.ex:34: TVHStats.Worker.Producer.handle_cast/2
tvhstats_1  |     (gen_stage 1.1.2) lib/gen_stage.ex:2134: GenStage.noreply_callback/3
tvhstats_1  |     (stdlib 4.1.1) gen_server.erl:1123: :gen_server.try_dispatch/4
tvhstats_1  |     (stdlib 4.1.1) gen_server.erl:1200: :gen_server.handle_msg/6
tvhstats_1  |     (stdlib 4.1.1) proc_lib.erl:240: :proc_lib.init_p_do_apply/3
tvhstats_1  | Last message: {:"$gen_cast", :fetch}
tvhstats_1  | State: %{poll_interval: 1000}
tvhstats_1  | [info] API polling worker started. Poll interval: 1000
tvhstats_1  | [notice] GenStage consumer TVHStats.Worker.Consumer is stopping after receiving cancel from producer #PID<0.647.0> with reason: {{:badmatch, {:error, %Mint.TransportError{reason: :econnrefused}}},
tvhstats_1  |  [
tvhstats_1  |    {TVHStats.API.Client, :get_streams, 0,
tvhstats_1  |     [file: 'lib/tvhstats/api/client.ex', line: 15]},
tvhstats_1  |    {TVHStats.Worker.Producer, :handle_cast, 2,
tvhstats_1  |     [file: 'lib/tvhstats/worker/producer.ex', line: 34]},
tvhstats_1  |    {GenStage, :noreply_callback, 3, [file: 'lib/gen_stage.ex', line: 2134]},
tvhstats_1  |    {:gen_server, :try_dispatch, 4, [file: 'gen_server.erl', line: 1123]},
tvhstats_1  |    {:gen_server, :handle_msg, 6, [file: 'gen_server.erl', line: 1200]},
tvhstats_1  |    {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 240]}
tvhstats_1  |  ]}
tvhstats_1  | 
tvhstats_1  | [error] GenServer TVHStats.Worker.Consumer terminating
tvhstats_1  | ** (MatchError) no match of right hand side value: {:error, %Mint.TransportError{reason: :econnrefused}}
tvhstats_1  |     (tvhstats 0.0.1) lib/tvhstats/api/client.ex:15: TVHStats.API.Client.get_streams/0
tvhstats_1  |     (tvhstats 0.0.1) lib/tvhstats/worker/producer.ex:34: TVHStats.Worker.Producer.handle_cast/2
tvhstats_1  |     (gen_stage 1.1.2) lib/gen_stage.ex:2134: GenStage.noreply_callback/3
tvhstats_1  |     (stdlib 4.1.1) gen_server.erl:1123: :gen_server.try_dispatch/4
tvhstats_1  |     (stdlib 4.1.1) gen_server.erl:1200: :gen_server.handle_msg/6
tvhstats_1  |     (stdlib 4.1.1) proc_lib.erl:240: :proc_lib.init_p_do_apply/3
tvhstats_1  | Last message: {:DOWN, #Reference<0.3696639384.298844162.55110>, :process, #PID<0.647.0>, {{:badmatch, {:error, %Mint.TransportError{reason: :econnrefused}}}, [{TVHStats.API.Client, :get_streams, 0, [file: 'lib/tvhstats/api/client.ex', line: 15]}, {TVHStats.Worker.Producer, :handle_cast, 2, [file: 'lib/tvhstats/worker/producer.ex', line: 34]}, {GenStage, :noreply_callback, 3, [file: 'lib/gen_stage.ex', line: 2134]}, {:gen_server, :try_dispatch, 4, [file: 'gen_server.erl', line: 1123]}, {:gen_server, :handle_msg, 6, [file: 'gen_server.erl', line: 1200]}, {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 240]}]}}
tvhstats_1  | State: []
tvhstats_1  | [notice] Application tvhstats exited: shutdown
db_1        | 2022-10-18 19:08:55.453 UTC [25] LOG:  checkpoint starting: time
db_1        | 2022-10-18 19:08:55.463 UTC [25] LOG:  checkpoint complete: wrote 3 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.003 s, sync=0.001 s, total=0.010 s; sync files=2, longest=0.001 s, average=0.001 s; distance=0 kB, estimate=0 kB

RE: tvheadend stats app - Added by ry ser about 2 years ago

saen acro wrote:

After few hours test ...
What can be the problem?

[...]

and this one

[...]

I repeat, write in the repo issues please, I won't provide support here, its easier.

RE: tvheadend stats app - Added by ry ser about 2 years ago

well I guess its not that interesting to gather stats about usage, only one person has tried it, its sad

RE: tvheadend stats app - Added by Jonas Lang about 2 years ago

I understand your sentiments but you need to realize that GitHub is filled with thousands of projects, each one having its own merits but unless the project has a particular interest and is going to be of particular use to its target audience it’s very difficult to convince users to test it.

May I suggest that you continue your discussion here for the moment with the one user that is actually testing it instead of pushing him towards GitHub. Also you need to make the install process of your project as easy as possible as not all users here would be very familiar with GitHub.

RE: tvheadend stats app - Added by ry ser about 2 years ago

Jonas Lang wrote:

I understand your sentiments but you need to realize that GitHub is filled with thousands of projects, each one having its own merits but unless the project has a particular interest and is going to be of particular use to its target audience it’s very difficult to convince users to test it.

May I suggest that you continue your discussion here for the moment with the one user that is actually testing it instead of pushing him towards GitHub. Also you need to make the install process of your project as easy as possible as not all users here would be very familiar with GitHub.

For support I prefer github as I can better track the issues and have it organized, here I'd discuss other things.

Yes I know its difficult, its just frustrating. But if no one shows interest in trying it, making the install process simpler its not a priority (its just running a command tho).

RE: tvheadend stats app - Added by Jonas Lang about 2 years ago

Yes I do understand the process behind GitHub. I tend to find that from time to time developers in some cases neglect documentation and installation instructions and as a result the curious user passes the project by. Be patient and give it time. I’m sure others will be along in due course to test it.

RE: tvheadend stats app - Added by Anonymous about 2 years ago

ry ser wrote:

well I guess its not that interesting to gather stats about usage, only one person has tried it, its sad

You have written a nice tool in an exotic language which has several exotic problems. Good.

Most of this thread is about the problems the guy with the two fat pigs has while
installing a testversion of your tool. Reading page and page through errors like DNS misconfig: BAD

The choosen language is great, if you are working in an ancient Telecom environment, e.g. AXE programming.
But for most current dist there is no Std.package for the lang you have choosen.

So I need to invest a lot of hours, to try to install an environment where your tool may work - or not.

The entry hurdles even for trying are way to high.....the time invested is gone.

Will be back next year.

RE: tvheadend stats app - Added by ry ser about 2 years ago

Der Depp vom Dienst wrote:

ry ser wrote:

well I guess its not that interesting to gather stats about usage, only one person has tried it, its sad

You have written a nice tool in an exotic language which has several exotic problems. Good.

Most of this thread is about the problems the guy with the two fat pigs has while
installing a testversion of your tool. Reading page and page through errors like DNS misconfig: BAD

The choosen language is great, if you are working in an ancient Telecom environment, e.g. AXE programming.
But for most current dist there is no Std.package for the lang you have choosen.

So I need to invest a lot of hours, to try to install an environment where your tool may work - or not.

The entry hurdles even for trying are way to high.....the time invested is gone.

Will be back next year.

Yes there have been errors, as I was testing it, and needed some config changes, but other errors are not due to my app.

But the entry to the app is easy as long as you have docker, else no, i don't recommend testing it at the moment. I will provide binaries in the future.

About the language, you couldn't be more mistaken, as it's a perfect fit for an app like this. But I understand, its not so common.

This said, you're free to test it or not, but the question in the original post was: Are you interested in a tool like this? And that hasn't been answered. I'll keep developing it for myself, and it's ok, that's why I wrote it in the first place, but I thought maybe someone else was interested too.

RE: tvheadend stats app - Added by ry ser about 2 years ago

I have updated the app and now provide prebuilt docker images so its very easy to run.

RE: tvheadend stats app - Added by ry ser about 2 years ago

Improved stability and handling cases for non-user clients such as epggrab, idle scanner.

Will start working on graphs now that the base is stable.

RE: tvheadend stats app - Added by ry ser almost 2 years ago

up need more feedback :)

RE: tvheadend stats app - Added by saen acro almost 2 years ago

ry ser wrote:

up need more feedback :)

More minimalistical interface.
More contrasting colors for text.
Stats MOST with more then 5 channels, when click on frame,
with day, week, month.

RE: tvheadend stats app - Added by ry ser almost 2 years ago

saen acro wrote:

ry ser wrote:

up need more feedback :)

More minimalistical interface.
More contrasting colors for text.
Stats MOST with more then 5 channels, when click on frame,
with day, week, month.

I have been busy, I have added a Graph view, for now it only has daily aggregated play count.

I will add more in the coming weeks :)

RE: TVHStats: An activity monitor / history tracker for Tvheadend - Added by saen acro about 1 year ago

ry ser wrote:

Someone using/tried it?

Work OK

(51-75/81)