-
Notifications
You must be signed in to change notification settings - Fork 180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added script to post your location automatically on the allsky map #1073
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@thomasjacquin Welcome back to Allsky. I'm glad you remember how to do a PR :-)
Several people agreed to help test this - see the Discussions link for their names. I will coordinate with them.
I will look at this in more detail, but some initial thoughts:
- thanks for creating the PR. I haven't had a chance.
- we plan to merge all the allsky config files into one .json file that will support multiple cameras, so it might be best to not introduce another config file at this point. Some of the info in postToMap.sh is already in the settings*.json files, and some can be automatically determined (as is done with config.js in the allsky-website package), so I suggest putting all the data in the settings* file, including the POST_TO_MAP boolean. We can create a new group in the file so all the settings appear together in the WebUI. When we get to one json config file it will be managed via the WebUI, so adding the postToMap data there now seems like a natural fit.
- How will IP address work for people like me whose Pi is behind a firewall and has a 192.168.* address? We may get a lot of duplicate IPs. Should we use the IP and, for example, owner's name as the unique key?
- After we last talked I thought of some other information that would be useful to have sent to the server, like Allsky version, whether or not they have the WebUI and website installed, and some other info I can't remember. The info doesn't need to appear on the map, but assuming us developers have a way to access the info, it might help us decide what features to work on, etc. We of couse need to make sure users know what is being sent to the server to eliminate privacy concerns.
- Uploading every day isn’t needed, is it? We had talked about the data expiring in a month. If we can think of a way to have the info uploaded once a week that would be easier on your server, especially if we can spread out which day of the week, possibly by using the last octet of the IP address and taking the remainder of dividing by 7.
- We are trying to keep all scripts in allsky/scripts so I suggest moving this script there. Invoking it from endOfNight.sh would then be
"${ALLSKY_SCRIPTS}/postToMap.sh"
- what is the .gitignore file for? It has some obsolete files in it (e.g., saveImageDay.sh) and existing files.
Thanks @EricClaeys, things have been crazy busy with work this year but I'm trying to balance it out better. I probably won't have a huge amount of time to spend on the Allsky project but I'll try to stay up to date with the latest changes. There are a few small enhancements I've had in mind for a while so I'll make sure to take the time to submit more PRs.
|
@thomasjacquin
|
|
I have added a PR for the Side note: How does one call a script manually with a dynamic source path? Side note 2: I am unsure why git included the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
The "Added mac address as unique ID" commit changed the src/allsky_common.cpp and src/include/allsky_common.h files - it looks like every line was changed, but I can't tell what the changes are. Do you know?
I assume you've tested this?
@thomasjacquin
Side note: All scripts need to source "variables.sh" before sourcing "config.sh" since variables.sh defines all the $ALLSKY_* variables except ALLSKY_HOME:
Sorry I missed those when reviewing the PR. |
@thomasjacquin |
The changes to |
@thomasjacquin. Andreas has been working primarily on the RPiHQ code and shellcheck and other tests. I have been making all the other checks. Chris was absent for a few months and Michael has been helping as time permits. There are a bunch of PRs waiting for review/approval so if you have time I would appeciate you looking at them. The shellcheck is new so we don't have any standards yet, but I have been trying to resolve them as I make other changes, plus there is a branch just for shellcheck changes. |
@EricClaeys Thanks for the info. I'll take a look at those PRs and give my input if it's in my field of expertise. |
I do get a lot of requests to add users to the allsky map (http://www.thomasjacquin.com/allsky-map/).
It currently is a manual process. I need to add a pin on a Google Map with the user details (location, lat, long, website url, image url).
The data is hardcoded in the index file. It loads all cameras at once (along with the image) and it slows down the load of the page.
Here's the current format:
This PR adds a script to post the camera details once a day (endOfNight script but open to other suggestions). If a user changes details about their setup, it gets propagated to the website automatically.
Users can choose to display their website url or not. If no website is provided, only a pin gets displayed.
The server side code filters requests (insert vs update) based on IP address as a unique ID.
Let me know what you think. I'm open to changes. The goal here is to have more cameras (and camera setup info) on the map without any action from the user or myself.
New map for testing: http://www.thomasjacquin.com/allsky-map/index-new.php
cc @EricClaeys I've mentioned this to you last month. I just got back home so I can work on this now.