ea1ii / lightgraph

MIT License
0 stars 0 forks source link

non-issue, more of a question & a suggestion #1

Open jcauthen78 opened 1 year ago

jcauthen78 commented 1 year ago

I'm digging this module idea and look, and fully understand it's under development & experimental. Is there a specific timezone coded in somewhere? My dark/light isn't aligning correctly (attached image for reference).

Screen Shot 2023-02-12 at 2 20 32 PM

Suggestion: I had to jump into the code itself to get the font size bigger to fit my image scale - is it feasible to add a field to set a user specified font size? Unfortunately I wasn't able to figure out how to put the variable in and set the args successfully (my coding background is google & youtube).

Keep up the good work =)

ea1ii commented 1 year ago

Hi Jim,

Thanks a lot for the feedback. As I said this is still WIP.

About the text. I'm actually planning to add a text size parameter, but before that I want to figure out a way of automatically skip out hours if the text becomes too big and overlaps. I do take note from that suggestion.

The hour sync might be wrong. It should calculate for the local time, but since I'm working in a few projects smiultaneously (that I don't recommend at all :) ) I might have left something behind. I'll have a look into that.

By the way. There's an extra feature not uploaded yet, that is an additional chart showing Sun & Moon elevation.

Kind regards, Carlos

ea1ii commented 1 year ago

Hi Jim,

Think you might want have a look now. Before mergin into the main branch, please try elevGrid branch.

Thanks

jcauthen78 commented 1 year ago

Appreciate the speed of the response, thank you!

Installed the elevGrid branch - had to throw the colors in manually for the elevation tab because it was blank, with them empty it wouldn't save. But when i go back in to the settings after saving it, the elevation tab is empty again - feels like a permissions problem. Checking the allsky.log shows the following: Feb 13 09:47:57 allsky allsky.sh[904809]: INFO:----- Running Module allsky_lightgraph.py ----- Feb 13 09:47:57 allsky allsky.sh[904809]: INFO: Attempting to load allsky_lightgraph Feb 13 09:47:57 allsky allsky.sh[904809]: INFO: Creating folder for debug /home/pi/allsky/tmp/debug/allsky_lightgraph Feb 13 09:47:57 allsky allsky.sh[904809]: Traceback (most recent call last): Feb 13 09:47:57 allsky allsky.sh[904809]: File "/home/pi/allsky/scripts/flow-runner.py", line 174, in <module> Feb 13 09:47:57 allsky allsky.sh[904809]: result = globals()[method](arguments, shared.args.event) Feb 13 09:47:57 allsky allsky.sh[904809]: File "/etc/allsky/modules/allsky_lightgraph.py", line 847, in lightgraph Feb 13 09:47:57 allsky allsky.sh[904809]: drawer = lGraph(debug, params) Feb 13 09:47:57 allsky allsky.sh[904809]: File "/etc/allsky/modules/allsky_lightgraph.py", line 836, in __init__ Feb 13 09:47:57 allsky allsky.sh[904809]: self.get_params(debug, params) Feb 13 09:47:57 allsky allsky.sh[904809]: File "/etc/allsky/modules/allsky_lightgraph.py", line 382, in get_params Feb 13 09:47:57 allsky allsky.sh[904809]: if params["draw_elev"] == True: `Feb 13 09:47:57 allsky allsky.sh[904809]: KeyError: 'draw_elev'``

Gonna research the string I need to do to get the permissions to mirror the existing modules. 99% sure that it's a problem on my end, and not anything on yours. Existing modules: -rwxrwxr-- This module: -rw-r--r--

Will keep troubleshooting and keep you in the loop. Trying to find out why it uploaded with the wrong permissions.

Thanks again.

ea1ii commented 1 year ago

Weird.

These are the permissions in my Pi: image

ea1ii commented 1 year ago

I'm not completely sure yet, but think I found the reason for the blank fields issue (need to confirm with other developers).

When you update a module file, you need to remove it from the list, save the settings and add it to the list again, and save again, of course. I insist, not sure yet about this.

jcauthen78 commented 1 year ago

Yours is living in the /home/pi/allsky/scripts/modules/ folder. When uploading through the GUI, it goes into /etc/allsky/modules. I'm asking the devs why they have them separated out in a non intuitive (to me) location. Gonna try your remove-save-add method.

ea1ii commented 1 year ago

Hmmm.... Good question. I reckon i haven't updated my dev branch since I installed it, as I'm still getting into the ins of GitHub.

I need to find some spare time to find out how this thing works. I mean: updating my soft to the currrent branch status, without loosing my settings and all that. My guess is that when downloading almost everything goes to the right place and it is the install script that copies settings files from the repo folder and a few other actions.

But as I said: got too many things in my dish right now.

I'm also guessing that this error kept you from checking the right timing...

jcauthen78 commented 1 year ago

You're correct, the error is preventing the module from running. Keep rockin on your other projects, I'm good at derailing people with questions at times ;) So keep the focus where it needs to be, I'll be able to test when you get around to it.

As for the updating - It sounds like they're trying to get a good update process setup where it can copy the core program without overwriting the user settings. They did a pretty big change late last month, or maybe early this month that, in theory, opened up the door for an update script to be developed. For now, I backup the scripts folder, and the config folder prior to doing a new pull - it allows me to have the previous settings backed up just in case i need to go back and reference them, or copy/paste the contents. They haven't released the update script yet, so not fully sure how it's going to work.

In the mean time/spare time, I'll keep playing with your elevGrid branch and seeing if i can find anything for you.

jcauthen78 commented 1 year ago

OK - it's happy. The devs made a change to one of the PHP's yesterday - i pulled it down, rebooted, and it's happy now. Gonna test it on my primary rig to see if it fixes that one too.

The dark/light graph is still askew for some reason (see below). But - the new graph is working well, i like it.

image

Edited to add: The fields are all filled in by default now - so it was something on my end, not your code :)

ea1ii commented 1 year ago

Ok, I see. May I ask your lat/lon for debugging purposes? (my rocket launcher is broken, anyway 😄 )

jcauthen78 commented 1 year ago

LAT: 43.32N LON: 116.18W

jcauthen78 commented 1 year ago

Wanted to shoot a quick update - Did a fresh dev pull on my primary rig and migrated all my setting, your graph module looks like it's working well (minus the time conflict). I'll probably play with the elevation graph colors so they suit my over all image a little better - the graph grid stands out more than the sun/moon lines.

Mine is pretty data-overload, but it's fun to push the entire Pi & Allsky system and see what all it's capable of doing. current_overlay

ea1ii commented 1 year ago

Really apreciate your collab, Jim. It's being priceless.

Colors? That's whyt they are customizable: day, night, brightness, FOV, personal taste,....

Got a new rev to try. This UTC thin is a PITA.

Ah. And mine is not empty either: image

jcauthen78 commented 1 year ago

I like it :) and more than welcome about the testing! I've loved playing with this software for years, and it's awesome to see it growing and evolving with the help and support of a group of its users. We're getting pretty close to releasing v1.0, they're doing a few more small fixes and tweaks.

Pulled down the recent edit, but the dark/light is still off for some reason. Looks like it's off by the timezone (7 hours) for me, same as before.

ea1ii commented 1 year ago

ok, I'll keep going but need a sleep and 4 nights on shift starting tomorrow. Catch you soon

ea1ii commented 1 year ago

Back in business, Jim, Would you give it a go?

jcauthen78 commented 1 year ago

got it coppied over - the one from 4 days ago, right? It's still showing wrong - here's what it's looking like. For some reason its also adding something off to the right (under the website link) - not sure how/why though. image

ea1ii commented 1 year ago

This bit is interesting: image Working on it tomorrow. Cheers, Jim.

jcauthen78 commented 1 year ago

Yeah... that caught me too. Can't remember seeing that previous tests - ill see if I can find some previous testing images - not sure if I'll be able to find any though, I didn't have it active a long time when we were testing it.

ea1ii commented 1 year ago

Don't worry about that. If I'm right that means that my corrections were in the right way and I just left something behind. Let's try once more.

jcauthen78 commented 1 year ago

Got it copied over this morning - Looks like that cleaned it up and got it lined up correctly 😎 Nicely done sir!

image

ea1ii commented 1 year ago

😃 That's great news. Looking right now to your cam: sun/moon grid looks also great.

I think I'll monitor for a few more hours and then merging the branch to main.

Also adding to Alex' repo @Alex-developer

jcauthen78 commented 1 year ago

Not sure when, but they're trying to figure out how/where to make a repo for the modules for easier access to all users

I'm still tweaking the colors a little bit to have it suit my black background mixed with the circle of the sky. Not wanting to cause more work, but is there a way to add in a font color option? It seems to be linked to the border color, but it's darker than that.

Since it looks happy, I'm gonna leave it active and see how it goes. Thinking it visually works in the locations on my system, just the font color is the only thing I can see potentially throwing it off, but that's just cosmetic and not a functional break :)

ea1ii commented 1 year ago

I think that after all your help you well deserve a font color option 😄 Yeah. They are building a module repository or something like that

jcauthen78 commented 1 year ago

You've done the leg work, I'm just giving ya a second system to test it on 🤓 I've loved Thomas' AllSky for years, and enjoy nerding out trying to help make it better (and break it sometimes in the process). I'm the guy who knows just enough to be dangerous and not afraid of a reformat 😂

jcauthen78 commented 1 year ago

I gave yesterday's push a shot - the day and night color aren't saving for some reason, and causing it to error out and negating the module.

INFO: ----------------------- Running Module allsky_lightgraph.py ----------------------- INFO: Attempting to load allsky_lightgraph INFO: Creating folder for debug /home/pi/allsky/tmp/debug/allsky_lightgraph ERROR: 'day_text_color'

Can't see why its' not saving the day and night fields. The file permissions are correct. Thoughts to test?

ea1ii commented 1 year ago

The day and night settings for day/night modules is something I intend to investigate.

I was empty in my Pi the first time I updated the code, but is is ok now withouth further change. I think (but got no proof yet) that the parameter list updates when you insert the module in the selected list (rihgt side), and enabling/disabling is not enough. But, as I said, don't know if this is a fact.

Mi suggestion. Remove the module from the workig list; save module configuration; insert module again; and save config again. Of course, do change settings as needed. Also remember day and night settings.

Thinking about it. I might be able to remove the duplicity in some parameters (colors mainly).

Let me know, Jim. Regards.

jcauthen78 commented 1 year ago

Ok - you did bring up an idea that maybe it was the file itself (can't prove, but...):

Of note - i can't remember if I downloaded the main lightgraph, or the forked version (pretty sure it was this one). But this time, I downloaded the forked (allsky-modules/[allsky_lightgraph]), and it's happy. edit: file version 0.6

ea1ii commented 1 year ago

That's nice. Now to find out the reason for it.

Also found in ~/allsky/config folder several files like postprocessing_day.json and postprocessing_night.json (and others), so it looks liek next version is having fewer settings, ad day and night 'instance' values are stored separatedly.

jcauthen78 commented 1 year ago

oddity that I didn't notice until this morning - the graphs failed when the day to night transition happened, then came back this morning when daytime returned. I'll have to look at the logs this evening when the transition happens again - no clue what happened there. Will keep ya in the loop this evening.

If there are any other things ya want me to test, just holler :)

jcauthen78 commented 1 year ago

I also see that Alex is also working on it in his Repo as well. Let me know which one you want me to test/work with - I don't wanna double your work if the one on Alex's repo is gonna be the primary.

ea1ii commented 1 year ago

Them both should be identical. From now on, I'm working primarily on alex' repo.

Still digging into GH mysteries. Looks like once Alex aproved my pull req I am able to edit branch and merge without further authorization (probably his set up). So, unless he rather go other way, master brach in his repo is the source.

I also had an oddity, but embarrasing as it sounds, I still don't know what was it as it happened while I made a mistake somewhere else and that got me quite confused.

I'm going back to shift tonight, but I'll keep an eye on my mail. Feel free to keep me posted. Greatly appreciated.

PS: I do work night shifts on a 4 days on - 4 days off pattern. Same job, but way more peacefu. (And a 26% allowance 😃) Only issue is Murphy: quite a few clear sky nights do actually fall on my 4-on segment 😠

ea1ii commented 1 year ago

Damn.... With all that chat I forgot to mention that I merged day and night color settings as the day/nights module mechanism already does that. See a few posts above for explanation.

jcauthen78 commented 1 year ago

Sounds good :) I'll keep an eye on Alex's repo and use it as my primary and we'll run that way moving on.

I did see the day/night colors merged, and I think that's a great idea - simplifies it (i was using the same colors for both day/night, and was gonna suggest it after ya got it all tuned up).

Again, shoot me anything you think needs tested and I'll take a look at it. And also, there's no rush, I know this is a hobby for all of us, so there's never really an EMERGENCY with it :)