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 Flole Systems about 2 years ago
Poul Kalff wrote:
Fantastic work, ry ser. Keep it up, tvheadend certainly could use a new webinterface.... I was actually working on one myself, years ago, but never quite completed it. It was also called 'crap' and worse things by Saen Acro, by the way, so don't be discouraged by that... ;-)
I'm a little curious: Is there a specific reason why it was never completed? Just too much work to implement all the features of the current interface?
RE: tvheadend stats app - Added by ry ser about 2 years ago
Flole Systems wrote:
I think it looks a lot better than the interface Tvheadend currently has to offer to be honest. Maybe it's a good starting point for a complete rewrite of the Webinterface, depending on what options the framework used is offering.
Well I'm not trying to replace the current interface, it's a completely separated web app that polls the http api, and I just plan to show stats. Just like Tautulli does for plex.
RE: tvheadend stats app - Added by Flole Systems about 2 years ago
I understand that, but maybe someone picks it up and adds more and more features so it eventually ends up as a full featured replacement for the Webinterface.
RE: tvheadend stats app - Added by Anonymous about 2 years ago
Dave H wrote:
but I do think his contributions are generally helpful.
no.
RE: tvheadend stats app - Added by Dave H about 2 years ago
Der Depp vom Dienst wrote:
Dave H wrote:
but I do think his contributions are generally helpful.
no.
And Der Depp vom Dienst is another person I could make similar comments about
RE: tvheadend stats app - Added by Flole Systems about 2 years ago
Can we please go back to the topic of this thread? This thread is about a project someone has started and not about whose contributions are helpful or not. If that still needs discussing open a new thread for it.
RE: tvheadend stats app - Added by Poul Kalff about 2 years ago
Flole Systems wrote:
I'm a little curious: Is there a specific reason why it was never completed? Just too much work to implement all the features of the current interface?
Well, I think that all the features of the current interface are in fact implemented.... at least to the point that they are usable. I never decided to stop the project, I just came to a point when I found myself doing other things instead. There are probably two reasons for that; mainly, no-one seemed interested, no-one gave feedback, no-one tested new ideas.... I got the impression that no-one cared, and whether that was true or not, it kinda took the fun out of it, especially when the few comments ere extremely negative (although from one person only). The other thing that stopped me, I guess, is that I have little to no knowledge about how to use the more advanced features of the program; i mainly use tvheadend for DVR on KODI, and that part is completely done, since I am familiar with its use, but it is very, very difficult to create an interface to features that you do not understand, and I simply didn't know what to do. I implemented it all (I think), but not to be very usable. The DVR-section, however, is quite finished, I use it every day.
The whole thing is on my github page, so ideally, someone can continue it, or just get inspired by it to do something else....
RE: tvheadend stats app - Added by ry ser about 2 years ago
Is anyone interested in testing it or helping with development?
RE: tvheadend stats app - Added by saen acro about 2 years ago
ry ser wrote:
Is anyone interested in testing it or helping with development?
Put it in Github.
RE: tvheadend stats app - Added by Jonas Lang about 2 years ago
I’ll gladly help to test. Hopefully we will see a greater contribution from other forum members here too. The more contributors we see to projects like this the more relevant the forum becomes. What we don’t need is someone criticising projects like this.
RE: tvheadend stats app - Added by ry ser about 2 years ago
Later this week I expect to have the project at a stage that Im comfortable sharing the repo.
For this to happen I want to finish pagination on history page and having configurable settings. (Server address, port and authentication)
RE: tvheadend stats app - Added by ry ser about 2 years ago
I have made the repo public, now you can try or even contribute if you feel like it.
But mostly I'd like feedback if you run it!
RE: tvheadend stats app - Added by ry ser about 2 years ago
Jonas Lang wrote:
I’ll gladly help to test. Hopefully we will see a greater contribution from other forum members here too. The more contributors we see to projects like this the more relevant the forum becomes. What we don’t need is someone criticising projects like this.
It's published on github if you'd like to test it.
aen acro wrote:
ry ser wrote:
Is anyone interested in testing it or helping with development?
Put it in Github.
Its now on github, if you feel like trying it. But be aware it depends on postgres for now.
RE: tvheadend stats app - Added by Dave Pickles about 2 years ago
RE: tvheadend stats app - Added by ry ser about 2 years ago
Dave Pickles wrote:
what do you mean? I already added it to the post.
RE: tvheadend stats app - Added by saen acro about 2 years ago
ry ser is it possible "manual" configuration user task config/config.exs editing
to be switched to "in web UI" one, in first login.
Also in feature option to add multiple selectable servers?
database simplifying
https://github.com/elixir-sqlite/ecto_sqlite3
https://github.com/elixir-sqlite/exqlite
RE: tvheadend stats app - Added by ry ser about 2 years ago
saen acro wrote:
ry ser is it possible "manual" configuration user task config/config.exs editing
to be switched to "in web UI" one, in first login.
Also in feature option to add multiple selectable servers?
database simplifying
https://github.com/elixir-sqlite/ecto_sqlite3
https://github.com/elixir-sqlite/exqlite
I might add it, but for now, as I'm the only one using it, I focus on improving the core rather than QoL.
How do you imagine multiple servers? Aggregated results as if it was a single server, or completely separated stats pages
RE: tvheadend stats app - Added by saen acro about 2 years ago
Individual stats per server, idea is to monitor them from one place.
Where are logs of this "nice" software called Docker
few seconds after start with
docker compose up -d
i see :4000 exist and then disappear
root@alpin-docker:/opt/tvhstats$ docker compose up -d
[+] Running 2/2
⠿ Container tvhstats-db-1 Running 0.0s
⠿ Container tvhstats-tvhstats-1 Started 0.7s
root@alpin-docker:/opt/tvhstats$ 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 5580/docker-proxy
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 2592/sshd [listener
tcp 0 0 :::4000 :::* LISTEN 5585/docker-proxy
tcp 0 0 :::22 :::* LISTEN 2592/sshd [listener
root@alpin-docker:/opt/tvhstats$ 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:22 0.0.0.0:* LISTEN 2592/sshd [listener
tcp 0 0 :::22 :::* LISTEN 2592/sshd [listener
RE: tvheadend stats app - Added by ry ser about 2 years ago
saen acro wrote:
Individual stats per server, idea is to monitor them from one place.
Where are logs of this "nice" software called Docker
few seconds after start with
[...]
i see :4000 exist and then disappear[...]
You can start it without the -d param and you will see the logs.
I think I know what the problem is.
Try to run this first: docker-compose run --rm tvhstats mix ecto.migrate
Then run the up command.
RE: tvheadend stats app - Added by saen acro about 2 years ago
there is some other
docker-compose run --rm tvhstats mix ecto.migrate Creating tvhstats_tvhstats_run ... done Failed to fetch record for 'hexpm/esbuild' from registry (using cache instead) {:failed_connect, [{:to_address, {'repo.hex.pm', 443}}, {:inet, [:inet], :nxdomain}]} Failed to fetch record for 'hexpm/tzdata' from registry (using cache instead) {:failed_connect, [{:to_address, {'repo.hex.pm', 443}}, {:inet, [:inet], :nxdomain}]} Failed to fetch record for 'hexpm/cowlib' from registry (using cache instead) {:failed_connect, [{:to_address, {'repo.hex.pm', 443}}, {:inet, [:inet], :nxdomain}]} Failed to fetch record for 'hexpm/swoosh' from registry (using cache instead) {:failed_connect, [{:to_address, {'repo.hex.pm', 443}}, {:inet, [:inet], :nxdomain}]} Failed to fetch record for 'hexpm/hpax' from registry (using cache instead) {:failed_connect, [{:to_address, {'repo.hex.pm', 443}}, {:inet, [:inet], :nxdomain}]} Failed to fetch record for 'hexpm/ecto' from registry (using cache instead) {:failed_connect, [{:to_address, {'repo.hex.pm', 443}}, {:inet, [:inet], :nxdomain}]} Failed to fetch record for 'hexpm/unicode_util_compat' from registry (using cache instead) {:failed_connect, [{:to_address, {'repo.hex.pm', 443}}, {:inet, [:inet], :nxdomain}]} Failed to fetch record for 'hexpm/cowboy' from registry (using cache instead) {:failed_connect, [{:to_address, {'repo.hex.pm', 443}}, {:inet, [:inet], :nxdomain}]} ** (Mix) Unknown package cowlib in lockfile Unchecked dependencies for environment dev: * telemetry_metrics (Hex package) the dependency is not available, run "mix deps.get" * phoenix_live_view (Hex package) the dependency is not available, run "mix deps.get" * telemetry_poller (Hex package) the dependency is not available, run "mix deps.get" * gen_stage (Hex package) the dependency is not available, run "mix deps.get" * uri_query (Hex package) the dependency is not available, run "mix deps.get" * dart_sass (Hex package) the dependency is not available, run "mix deps.get" * tarams (Hex package) the dependency is not available, run "mix deps.get" * esbuild (Hex package) the dependency is not available, run "mix deps.get" * jason (Hex package) the dependency is not available, run "mix deps.get" * phoenix_html (Hex package) the dependency is not available, run "mix deps.get" * phoenix (Hex package) the dependency is not available, run "mix deps.get" * phoenix_live_dashboard (Hex package) the dependency is not available, run "mix deps.get" * sizeable (Hex package) the dependency is not available, run "mix deps.get" * gettext (Hex package) the dependency is not available, run "mix deps.get" * phoenix_live_reload (Hex package) the dependency is not available, run "mix deps.get" * finch (Hex package) the dependency is not available, run "mix deps.get" * swoosh (Hex package) the dependency is not available, run "mix deps.get" * tzdata (Hex package) the dependency is not available, run "mix deps.get" * postgrex (Hex package) the dependency is not available, run "mix deps.get" * plug_cowboy (Hex package) the dependency is not available, run "mix deps.get" * ecto_sql (Hex package) the dependency is not available, run "mix deps.get" * tailwind (Hex package) the dependency is not available, run "mix deps.get" * phoenix_ecto (Hex package) the dependency is not available, run "mix deps.get" ** (Mix) Can't continue due to errors on dependencies Unchecked dependencies for environment dev: * telemetry_metrics (Hex package) the dependency is not available, run "mix deps.get" * phoenix_live_view (Hex package) the dependency is not available, run "mix deps.get" * telemetry_poller (Hex package) the dependency is not available, run "mix deps.get" * gen_stage (Hex package) the dependency is not available, run "mix deps.get" * uri_query (Hex package) the dependency is not available, run "mix deps.get" * dart_sass (Hex package) the dependency is not available, run "mix deps.get" * tarams (Hex package) the dependency is not available, run "mix deps.get" * esbuild (Hex package) the dependency is not available, run "mix deps.get" * jason (Hex package) the dependency is not available, run "mix deps.get" * phoenix_html (Hex package) the dependency is not available, run "mix deps.get" * phoenix (Hex package) the dependency is not available, run "mix deps.get" * phoenix_live_dashboard (Hex package) the dependency is not available, run "mix deps.get" * sizeable (Hex package) the dependency is not available, run "mix deps.get" * gettext (Hex package) the dependency is not available, run "mix deps.get" * phoenix_live_reload (Hex package) the dependency is not available, run "mix deps.get" * finch (Hex package) the dependency is not available, run "mix deps.get" * swoosh (Hex package) the dependency is not available, run "mix deps.get" * tzdata (Hex package) the dependency is not available, run "mix deps.get" * postgrex (Hex package) the dependency is not available, run "mix deps.get" * plug_cowboy (Hex package) the dependency is not available, run "mix deps.get" * ecto_sql (Hex package) the dependency is not available, run "mix deps.get" * tailwind (Hex package) the dependency is not available, run "mix deps.get" * phoenix_ecto (Hex package) the dependency is not available, run "mix deps.get" ** (Mix) Can't continue due to errors on dependencies ERROR: 1
RE: tvheadend stats app - Added by ry ser about 2 years ago
saen acro wrote:
there is some other
[...]
It looks like the container can't connect to the network, I'm not sure about this error, sorry.
RE: tvheadend stats app - Added by saen acro about 2 years ago
ry ser wrote:
saen acro wrote:
there is some other
[...]It looks like the container can't connect to the network, I'm not sure about this error, sorry.
https://github.com/elixir-lang/elixir/issues/6057
Try on clear virtual PC,
simple and effective way to find what is wrong in dependency's.
RE: tvheadend stats app - Added by Flole Systems about 2 years ago
Nothing is wrong with the dependencies, there's either no network connection or the DNS is not working properly. Fix that and it will work.
RE: tvheadend stats app - Added by saen acro about 2 years ago
Solution found
Edit/add if not exist /etc/docker/daemon.json
{
"dns": ["1.1.1.1", "8.8.8.8"]
}
Restart the docker daemon for those changes to take effect:
---
but new problem digest authentication request not work
server have both activated.
RE: tvheadend stats app - Added by ry ser about 2 years ago
saen acro wrote:
Solution found
Edit/add if not exist /etc/docker/daemon.json[...]
Restart the docker daemon for those changes to take effect:
---
but new problem digest authentication request not work
server have both activated.
Oh yes, it just works with basic auth for now.