Jump to content

Developing a standalone embystat server


reggi

Recommended Posts

Diedrich

Think the emby api authentication, is for emby-stats when it needs to sync, with emby.

And not as a login security measure for emby-stats.

Oh, right! Duh. Sorry.
  • Like 1
Link to comment
Share on other sites

This is pretty cool, been running it on my Windows Server 2019 setup.

Any chance this can be made into a service like Emby does with icon in the taskbar cluster(beside the time), otherwise it's a CMD prompt window always open.

 

Also, when clicking on a specific user, the image is broken(worked on the previous screen) I only watched one episode since I've done a clean install of Emby but it isn't showing that I watched any episodes.

5e3c3ab7133fb_UserStats.jpg

 

 

I'd also like to see a login page to access it remotely.

If I open the port now, anyone can enter it and make changes.

Having people be able to login to it to see their stats would be cool too.

I'll keep playing with it.

 

Thanks,

 

Thanks for testing EmbyStat!

 

It's still in early beta phase and as a result the user statistics are still broken. I'm first trying to get the performance and memory usage steady before moving on in the feature list.

As for the login page, that is indeed a very good request and is already on the road map somewhere!

 

Currently I create a Windows installer package (will be deployed in the next release) so you can install EmbyStat standalone or as a service (wtih NSSM).

A nice tray icon will be the next step but I do need to investigate some more about how that is possible.

Link to comment
Share on other sites

centuryx476

Hello,

Simple question.

I have a windows server with emby on it.

How can I configure the embystat server to use IIS ?

 

I checked the wiki but the section for IIS install is blank.

 

Thank You

Link to comment
Share on other sites

zer0ish

Hello,

Simple question.

I have a windows server with emby on it.

How can I configure the embystat server to use IIS ?

 

I checked the wiki but the section for IIS install is blank.

 

Thank You

I just unzipped the package and ran the embystats.exe.

It tells you the url to type in your browser and then follow the steps.

You will need to keep the command prompt window open for the stats server to continue to run.

Closing it results is shutting down the embystats server.

I put the extracted folder on my C: drive and made a shortcut to my start menu.

 

Good luck.

Link to comment
Share on other sites

 

 

Thanks for testing EmbyStat!

 

It's still in early beta phase and as a result the user statistics are still broken. I'm first trying to get the performance and memory usage steady before moving on in the feature list.

As for the login page, that is indeed a very good request and is already on the road map somewhere!

 

Currently I create a Windows installer package (will be deployed in the next release) so you can install EmbyStat standalone or as a service (wtih NSSM).

A nice tray icon will be the next step but I do need to investigate some more about how that is possible.

I came here to inquire about this. Got my answer. Do you have a guesstimate on how long? This is a key function as you are probably well aware.

 

Sent from my SM-G960U1 using Tapatalk

Link to comment
Share on other sites

WilhelmStroker

I just unzipped the package and ran the embystats.exe.

It tells you the url to type in your browser and then follow the steps.

You will need to keep the command prompt window open for the stats server to continue to run.

Closing it results is shutting down the embystats server.

I put the extracted folder on my C: drive and made a shortcut to my start menu.

 

Good luck.

Or you can use NSSM to run embystat as a service so you don't see the command prompt and it will start with windows.

Link to comment
Share on other sites

zer0ish

Or you can use NSSM to run embystat as a service so you don't see the command prompt and it will start with windows.

I've tried it and not a fan. I have my server setup so a certain user needs to be logged in for specific software to run. I don't always want something running right away after a reboot. I'm patient and will wait for an installer that installs it kinda the same way emby gets installed hopefully with a tray icon. Or a plug in into emby that starts and stops the service when emby starts and stops. I might give it another at a later time but not a huge priority for me.

 

Edit: Just tested NSSM again with this and it does the job. The last piece of software I used NSSM on didn't work properly. 

Edited by zer0ish
Link to comment
Share on other sites

Diedrich

 

 

I don't always want something running right away after a reboot.

 

Edit: Just tested NSSM again with this and it does the job. The last piece of software I used NSSM on didn't work properly.

You can go to Services and set your custom service to run as an Automatic Delayed Start if that helps.
Link to comment
Share on other sites

centuryx476

Thank you all. Ill give this a try,

 

I believe I can make this a scheduled task which will auto-run on startup and also hides the CMD console...

I'll test it out

Link to comment
Share on other sites

@@vaise, I don't have a LiteDB v5 implementation. I'm currently waiting for the version to be released as stable before moving to v5. Using beta packages can be very time consuming really. I'm currently still moving so I will start working on EmbyStat in a week or 2.

 

@@djhifi, currently not because I have no idea in how to create such a package. If you have knowledge in creating such a package feel free to PM me about it! But at the moment the tool itself is very unstable so releasing it on a lot of platforms will slow down the development even more. 

 

 

Will make an inquiry on the synnocommunity git.

  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...
Happy2Play

Hi Why this is not a .exe i download i just get many dll on a folder

 

Do you not see "EmbyStat.exe"?

Link to comment
Share on other sites

Happy2Play

yes i just install it?

Don't know exactly what you have done, but i download the zip from github and extract and run the exe for that folder.

Link to comment
Share on other sites

thegrunge

Ok that's run cmd so where do i put the folder to be sure that's work and were can i see the stats after that?

 

Thanks

Link to comment
Share on other sites

Happy2Play

Ok that's run cmd so where do i put the folder to be sure that's work and were can i see the stats after that?

 

Thanks

Doesn't matter, I put mine in my portable Emby-Server location "Y:\Emby-Server\EmbyStat-win10".

Link to comment
Share on other sites

thegrunge

ok you see that on the cmd? Where cant i see the stats after that?

 

Hosting environment: Production
Content root path: C:\Users\osx30\AppData\Roaming\Emby-Server\Emby Stats
Now listening on: http://[::]:6555
Application started. Press Ctrl+C to shut down.
Link to comment
Share on other sites

Happy2Play

 

ok you see that on the cmd? Where cant i see the stats after that?

 

Hosting environment: Production
Content root path: C:\Users\osx30\AppData\Roaming\Emby-Server\Emby Stats
Now listening on: http://[::]:6555
Application started. Press Ctrl+C to shut down.

 

I don't really do IPv6 but did you open a browser and go to "http://[::]:6555"?

Link to comment
Share on other sites

thegrunge

Ok thank you i find how start configuration with your help :)

Edited by thegrunge
Link to comment
Share on other sites

Happy2Play

In fact I would like to understand how it works. All I know right now is click on emby.exe and it opens cmd

Yes that is all it does, it starts a web server that you configure in the a browser.  The command box remains open unless you run as a services.

 

https://github.com/mregni/EmbyStat/wiki/Windows-Kestrel

Link to comment
Share on other sites

vaise

Tried the latest docker update on unraid - still same database issue :

2020-03-17 11:38:28.1629 [ERROR] Error in event handler System.InvalidCastException: Unable to cast object of type 'LiteDB.EmptyPage' to type 'LiteDB.DataPage'.
   at LiteDB.PageService.GetPage[T](UInt32 pageID)
   at LiteDB.PageService.GetFreePage[T](UInt32 startPageID, Int32 size)
   at LiteDB.DataService.Insert(CollectionPage col, Byte[] data)
   at LiteDB.LiteEngine.InsertDocument(CollectionPage col, BsonDocument doc, BsonType autoId)
   at LiteDB.LiteEngine.<>c__DisplayClass22_0.<Insert>b__0(CollectionPage col)
   at LiteDB.LiteEngine.Transaction[T](String collection, Boolean addIfNotExists, Func`2 action)
   at LiteDB.LiteEngine.Insert(String collection, BsonDocument doc, BsonType autoId)
   at LiteDB.LiteCollection`1.Insert(T document)
   at EmbyStat.Repositories.SessionRepository.<>c__DisplayClass4_0.<CreateSession>b__0() in d:\a\1\s\EmbyStat.Repositories\SessionRepository.cs:line 60
   at EmbyStat.Repositories.BaseRepository.ExecuteQuery(Action query) in d:\a\1\s\EmbyStat.Repositories\BaseRepository.cs:line 29
   at EmbyStat.Services.SessionService.ProcessSessions(List`1 sessions) in d:\a\1\s\EmbyStat.Services\SessionService.cs:line 36
   at EmbyStat.Services.WebSocketService.WebSocketApiSessionsUpdated(Object sender, GenericEventArgs`1 e) in d:\a\1\s\EmbyStat.Services\WebSocketService.cs:line 107
   at EmbyStat.Clients.Emby.WebSocket.WebSocketApi.FireEvent[T](EventHandler`1 handler, Object sender, T args) in d:\a\1\s\EmbyStat.Clients.Emby.WebSocket\WebSocketApi.cs:line 212
Link to comment
Share on other sites

  • 2 weeks later...
saltedhash

Hi,

 

I'm loving the work done thus far, great job! I've been following for quite some time as I previously used the emby statistics plugin. Have you made headway on the user stats? This was the main reason I used the previous plugin as it gave me great stats overall. I saw last mention of it was early February.

 

Thanks!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...