Closed Ruediger3 closed 2 years ago
Rüdiger - thanks for kind words and glad it's useful! It's a fun plugin - I've had a good time writing it.
To be honest, the plugin isn't really setup to support multiple running instances of NINA. My original thought was that just setting a different HTTP server port for each instance would work. However, thinking about it some more and looking at the code, I see why you're having problems. Let me give this a bit of thought and get back to you.
But I'm very concerned that you're seeing actual crashes of NINA since I try to shield NINA from any problems that might occur in the plugin. Can you send me a log, preferably at Debug level? DM me (tcpalmer) in Discord if that's quicker.
Hi Tom,
many thanks and: yes! your Plugin is used by all my local AP friends here. I gave them a short intro to it and all were happy with it.
MY use case: I use the second instance only to run the AF on the guiding scope. Actually I close the second instance after focusing and hand over to PHD2. But the problem is, just by opening the second NINA instance it tears down the web server from main instance, which starts much earlier to fire up all the devices and start the preparations like cooling. Unfortunately I cannot switch the web server on and off via instruction in the sequence. So I always end up with an stalled web-server on the main instance and the session I see is that from the guide scope: Start, AF, End. That's all.
I think the easiest ways would be to store a dedicated port for each instance. I think this could solve the problems.
Once again: A great plugin and please keep on enhancing it. You have some fans :)
E.g. I use it in the gym during workout to check weather all is running fine. Only what I have noticed: Safari on iPhone falls back to the start screen when trying to display Bin1x1 of the full frame ASI, Smaller images e.g. Bin2 cause no problem. On the tablet also Bin1 is displayed. Looks like an over flow on client side. But no big deal. But maybe good to know.
Again - many thanks again for your effort!
Cheers Rüdiger
A couple of things:
For your immediate problem, it sounds like your second instance to do AF on guide scope is short-lived. So either:
A couple of thoughts on the Safari problem:
Thanks!
Hi Tom,
thanks for the detailed answer. Very much appreciated.
For my use case it would be sufficient, that I can switch off one instance and keep one on. But the problem is, what ever I set, will automatically also valid for any Instance I start. Hence the workaround is not working: The main sequence starts 45 to 60 minutes minutes before the AF sequence of the guider during dusk. If I start the main with web server on, since I want to supervise it, the second instance comes also up with active web server, and crashes the main instance. The other way round: If I start the main wo web, then AF comes up also wo web and there would be no conflict - but I have also no web for the main, since I cannot automatically start the web after AF has finished. Moreover I would loose all info before finishing AF. The web log would be truncated.
I will test as soon as possible and give feedback. I hope the Bin1 session is not already behind the event horizon.... In worst case I will create a quick test session, but I'll need a bit of time. Tonight the system is active.
Again, many thanks for your perfect support. Thumbs up! Rüdiger
This is the mutual dead lock situation for which I found no solution for weeks now.
Just checked. The session with Bin1 was already deleted, due to the many starts of NINA and the web server always active. But I found one log from the night of Bin1. Unfortunately I cannot attach it :( So I paste directly. Is it helpful if I provide one of the full frame fits?
08:31:27.927 INF >> [WebServer] [582jXjWOc0a2eY5JmJ7lCg] GET /apple-touch-icon-120x120.png: "404 Not Found" sent in 1ms (0 bytes)
08:31:27.937 INF >> [WebServer] [LeNuQawLjECNTACrWdRN5g] GET /apple-touch-icon.png: "404 Not Found" sent in 1ms (0 bytes)
08:31:27.943 INF >> [WebServer] [Qvqnt81HIkCLgW/Sa0d0Sg] GET /apple-touch-icon.png: "404 Not Found" sent in 2ms (0 bytes)
08:31:27.936 ERR >> [WebServer] [LeNuQawLjECNTACrWdRN5g] HTTP exception 404
$type : EmbedIO.HttpException
StatusCode : 404
Message : Exception of type 'EmbedIO.HttpException' was thrown.
TargetSite :
System.Threading.Tasks.Task ThrowNotFound(EmbedIO.IHttpContext, EmbedIO.Files.MappedResourceInfo)
StackTrace :
at EmbedIO.Files.FileRequestHandler.ThrowNotFound(IHttpContext context, MappedResourceInfo info)
at EmbedIO.Files.FileModule.
That looks like a web server log. What I need is a zip of the entire %localappdata%\NINA\WebPlugin folder plus one full sized FITs file.
No problem: Here we are: https://ufile.io/acrg3pp6
Great thanks- will check in the morning, done thinking for the day ;)
On Thu, Apr 28, 2022 at 5:45 PM Rüdiger @.***> wrote:
No problem: Here we are: https://ufile.io/acrg3pp6
— Reply to this email directly, view it on GitHub https://github.com/tcpalmer/nina.plugin.web/issues/9#issuecomment-1112682077, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACBBCI4T46R55LKFD6OQX7TVHMBHJANCNFSM5UTIE67A . You are receiving this because you commented.Message ID: <tcpalmer/nina. @.***>
me too! Sleep well :)
Regarding your web client problem when viewing the large image - yes, it's because it's large ;) I can duplicate the problem in Chrome on my iPhone at 75% image scale and at 100% scale on my iPad. The 75% web-ready image is 26MB so not too surprising - likely just a memory problem. On the iPhone, it still fails at 50% but works at 33% so that should be a good work around for you. The image creation on the server side will be quicker too.
Hi Tom,
thanks for checking and confirming. I will scale it down, when shooting in Bin1.
CS Rüdiger
Ruediger - I've got a pre-release version for you to try out. This version supports a new SHARE option for plugin state, described in the plugin page description. Basically, you would run your primary NINA instance in ON mode and the second one in SHARE mode. Both sessions will be visible and live in the web client. Also, plugin options are now saved per NINA profile. Give a try and let me know if that works for you. If you have problems, please run both instances in Debug log level and provide the logs.
Download from https://github.com/tcpalmer/nina.plugin.web/releases/tag/v1.1.2.0-pre
Hi Tom,
sorry for my late answer, but I had to set up a test environment since the observatory cannot be used due to bad weather.
I have installed and tested as advised and it works! So far no flaw detected. I ran two instances with ASCOM simulator and both sessions were shown. You only have to be very careful which session is which instance. Is there a chance to display the profile name on top of the page?
One thing needs to be checked: What happens if accidentally to instances with "on" get started and you correct the settings. Is the already longer running instance "corrupted" as in the older version?
Anyway, many thanks for the quick help and great solution. Very much appreciated!
Best wishes Rüdiger
Rüdiger - There shouldn't be any problems or corruption from switching the state back and forth since 'HTTP server running' (ON) and 'actively capturing events' (ON or SHARE) are separate things. And each NINA instance is saving to a completely different session history directory.
Adding profile name is easy and generally useful - grab https://github.com/tcpalmer/nina.plugin.web/releases/tag/v1.1.2.0a-pre to try it.
Here's a sample:
Hi Tom, I need your help, I don't get the plugin loaded. I have unzipped all files to Plugin folder but NINA refuses to load it. Ruediger
Oops! Bad zip. Create a new folder there called 'Web Session History Viewer' then move dist and those 3 DLLs into it. Restart NINA.
Hi Tom,
now it was working. Profile gets properly displayed.
One minor suggestion: Showing the date in international ISO format YYYY-MM-DD would be better. Thank you!
Cheers Rüdiger
Yeah I've been waiting for that request ;) I need to check the browser locale and invoke the appropriate converters. I'll take a look but this might be something that waits for the next release since I've got a vacation starting next week. We'll see.
I think I'll hold on this release for a couple of days in case you get a chance to do any more real testing. Let me know if you find any issues. Enjoy!
Tom
Rüdiger - Turned out to be pretty easy to display dates based on user's locale. Assuming you're in Germany (jumping to a conclusion based only on your name), your dates should display as 22. April 2022 in the Sessions menu and session header, and 22.4.2022 (dd.mm.yyyy) in short form in the various chart tooltips. In the US, mine display as 'April 22, 2022' and '4/22/2022'. Give it a try and let me know what you think.
https://github.com/tcpalmer/nina.plugin.web/releases/tag/v1.1.2.0b-pre
The zip should be correctly structured this time.
Hi Tom,
you are right - I am from Germany. :)
I prefer to have it always in international ISO format YYYY-MM-DD since only by that a proper sort order is ensured. Also I use different machines with different locals, since some SW has a hick up when using "," instead of "." as decimal separator. There fore I have used almost switched to international ISO date and time formats and avoid using any local settings. This simply avoids trouble. Also when posting screenshots, logs, etc... Same with time AM/PM also UTC and many more.
Of course this is not a big thing, but I'd always prefer international exchangeable formats.
Once again, many thanks for all your patience and efforts.
Cheers Rüdiger
The sort order in the sessions drop-down won't change since it's based on the session key which is yyyymmdd-hhmmss. Also, I didn't localize times since that would use the local time zone conversion and might get weird - so times will always reflect what was originally set by NINA. I think even ISO dates can be a bit confusing with mm/dd vs dd/mm on different sides of the Atlantic. And built-in localization makes it easy to support pretty much anything - see Tokyo and Mumbai examples below.
I think I prefer to stick with this for now and we'll see what the broader NINA user community thinks. If there's more interest to just go ISO, it's easy to switch back. Thanks for all your feedback!
Hi Tom,
ISO format is always YYYY-MM-DD e.g. "2022-05-03 14:31:12 " worldwide. therefore we use it for all international projects. Also the ISO format is defined for all databases from all vendors and SW libraries. This is not localized in any way in any region.
Hey - I posted to https://discord.com/channels/436650817295089664/854531935660146718 and asked users what they thought about this. I've got your vote but please feel free to weigh in :)
Thanks a lot! One idea: What about make the format select able in the options?
PS: Thanks for the invite to discord, but I share a deep depreciation of Discord like many users. I have tried it a couple of times, but I never got a friend of it or felt comfortable. Let's see what comes out of the poll.
Thanks! Rüdiger
Update: Voted :) But still hate Discord :D Rüdiger
You may win the vote by 1-0 ;) I thought about making it an option but I think the number of users who actually check the settings - despite pointers in the documentation - is vanishingly small.
I hear you about Discord. The first time I posted, I heard nothing back (of course it was for a Nikon issue). The second time I was told that my plugin use case just wasn't his use case so therefore not valuable. This was for what became Session Metadata which I think is reasonably popular and useful. Not going to name names but you might well know who I'm talking about. I feel 100% certain that Stefan hears frequently about this individual and I think he periodically gets banned, at least temporarily. Very unfortunate, especially for new users and those who could contribute a great deal.
That being said, you can still use Discord to direct-message me or anyone else without getting into the channels. Certainly the quickest way to communicate with me.
Many thanks for this kind offer. I will make use of it.
80% of my global Astro community I know refuse Discord. They prefer to live with a bug, or suppress their needs, before entering Discord. I think Discord is the completely wrong tool for requirement engineering. Information is hard to find. Also I prefer asynchronous communication due to work etc. But it is Stefan's baby and I respect that. Nevertheless I hate Discord from the bottom of my heart and try not to use it. I use Bitbucket or Github instead. This is much more structured and issues/requests are much more traceable. For an IT pro Discord is a capital punishment and makes me feel crying.
I am the only one here who has even a Discord account. All my other friends refused to use Discord. I had to :( I would love to delete this ... account.
I know how you must have felt. But I also had bad experience on Bitbucket. Sometimes the tone is very rude and repels many.
Well, that said: 1-0 is also a win LOL
Hmmm ... now 3-0. Still holding out hope that when the sun next sets in Asia, those users will get on and vote for locale ;)
I agree that Discord isn't a requirements evaluation or tracking tool - not at all. It's really just to facilitate communications like Slack or Teams. When it works, I think it can be great at helping with community building. I think the lean for younger generations (and gamers) is to go with tools like Discord instead of forum approaches like CN. To your point, things like CN are much more traceable, searchable, etc and of course CN is extremely successful and a pretty awesome resource. I don't know if Stefan has thought about doing that in addition to Discord. But it would be tough to keep two such communities both active and vibrant.
One thing that I've seen Discord do really well is to facilitate very fast iterations with developers to move the product forward quickly - agile development with an open, distributed set of users. The past 2-3 months of Hocus Focus development has been nuts and truly shows the power of an open source approach. Like many NINA users, I came from SGP and just got sick of the circa-2002 Windows UI and couldn't take it anymore. I'd guess that the SGP, Voyager, etc developers are more than a little concerned now about the future when they see how fast NINA is improving.
So is your primary issue with Discord that it isn't the right tool for the job? Or is it the (sometimes) toxic nature of some of the people and interactions?
Hi Tom,
I think it still scores 3-0 ... I clear win :)
Yes, I think NINA is on the best way to get dominant. I have evaluated Voyager, APT, SGP and INDIGO. I ended up with NINA for some good reasons. What I do like is the sequencer and the ability to modify running sequences. It contains 95% what I need. I have also donated a small amount of money, But I dislike the the communication of some team members. If they do not share your opinion they get very unpleasant. They are not willing to listen to your arguments, regardless how god they are. They only accept their point of view. Some NINA guys (not Stefan) tend to refuse good arguments but try to push over their thinking to the user's need. Right the opposite you were reacting to my feedback, which I deeply appreciate. I was real positive experience. This was also the reason I have chosen GitHub to address my issue.
Why not Discord: It is a chat tool. This may be good for giving user help interactively. For that it will work fine. But for requirements it is simply unusable. It is like putting in screws with a hammer: Wrong tool!
And even for support it is limited since a solution for an already speared problem is hard to find, since information is sorted by timeline and not topic wise. The search function is no help at all. It contains only fragmented information and the channels only cluster the mess. It is simply a pool of un-clustered, not sorted and un-tagged information.
For Bugs/Problems/Requirements you need a system, where you can classify, tag, and trace the items. Also to assign it to a role. Including notification. But exactly what is the strength for Discord - real time communication - is not needed for that purpose at all. Therefore it is an epic fail to use that for this purpose.
Also if I describe an requirement it needs good text (PH). This is not done in a few lines Discord. You need description, text, use cases and many more. And after posting that I have to stay online and wait for someone to reply. Actually I do not have time sit there and wait for a potential reply and after some time it is beyond the "event horizon" because other posted something in between. This is highly inefficient. For both sides.
Conclusion: Discord is a communication tool, but neither an information hub, nor a requirement tools nor a aid beyond quickly chatting with someone. This is a painful abuse of a tool. Hammering on screws.
BTW: I am an IT Pro and work as a software architect and SW product manager. I have my own team. Hence I am a bit familiar with this topics. This is actually my daily bread and butter business.
I hope you understand why I dislike this so much...
Cheers Rüdiger
Yep - the people have spoken, ISO it is ;)
I was doing some final testing and discovered a couple of problems that I want to fix and I'm seriously puzzled about one of them. I'm also leaving on vacation soon and don't want to release a version that might have stability issues when I'd have no way to address them quickly.
But I'm more than happy to get you a clean build with ISO dates if you like. The main problem is that an AF performed in one NINA instance will show up in both session histories. The other problem is some weird cross talk where a dome close event in one showed up in the other (no clue about that yet). But neither of those issues is breaking basic operation. Let me know.
Re: Discord:
But of course none of that excuses the toxic behavior from some of the devs (one in particular). I've thought about DMing Stefan and discussing this but need to think about that some more. There's no way I'd be the first to bring this up - he has to be completely aware of it.
In any case, feel free to keep using github to communicate with me.
Hi Tom,
sure I can test such a pre-version and let you know my findings too. I can do some testing, if the weather will allow me. The dry runs are only of limited use. But sure! I will support you as good as I can.
Thanks also coming back on the topic of Discord. You are definitely right with many points. Well, I had some good arguments and valid feature requests but some of them were wiped away by one person - probably the same you mean. I felt really upset by his ... behavior. Simply terrible. But I also agree: Some conceptual leadership and guiding is needed. NINA is neither a tool for DSLR, nor a Lucky Imaging.
Please be so kind pack a new zip and I will do my tests. I benefit from that also, since as said, your Plugin fills an important gap. I had suggested some time ago almost identical functionality within NINA too - but ... So it is in my own interest to support you.
Thanks a lot in advance! Rüdiger
Give it a try: https://github.com/tcpalmer/nina.plugin.web/releases/tag/v1.1.2.0c-pre
Another thing that the plugin does is try to cleanup when NINA is stopping:
If you're running another instance of NINA, we don't want to do either of these operations - so now only the last instance running will perform the cleanup. If you see any strange behavior with empty sessions or sessions that shouldn't be live, let me know.
Enjoy!
Many thanks! I will give it a try and report any issue - and also further ideas :) So far, do good: I wish you a happy vacation. Enjoy the time :)
Thanks a lot! Rüdiger
Hey Rüdiger - I usually don't do much AP as daylight lengthens but will start to ease back into it - and plugin work - now that the solstice has passed. I wanted to check in with you and see if that version of the web plugin has been working well and to see if you have any other suggestions. I need to officially release that and update all of mine to the official NINA 2 libs. Let me know - thanks.
Assuming this is good now
Hi Tom, yes it is fine now. Many thanks! Rüdiger
Hello Tom,
I heavily use your great plugin, which is extremely helpful. Thanks a lot for this great little helper :)
But there is a severe issue when running multiple instances of NINA on one device. Each instance try tries to start the web server on the same port. Disabling in one instance in its profile automatically disables also the other instance. It is also not possible to assign different ports to the instances. Moreover you crash the first instance when opening he second. Also it causes some weird errors. e.g. see below. This error was thrown by the same NINA instance.
Possible solution: Store server information along with the profile and use per profile individual settings.
Many thanks in advance! Rüdiger