What's new

Skynet Practice displaying a world map on a webpage using an addon-api.

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

I get a nice looking map but the python scripts keeps getting this error:

Status code Unknown from https://nominatim.openstreetmap.org/search: ERROR - HTTPSConnectionPool(host='nominatim.openstreetmap.org', port=443): Max retries exceeded with url: /search?q=Sofia%2C+BG&format=jsonv2&addressdetails=1&limit=1 (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7fa4c29e50>, 'Connection to nominatim.openstreetmap.org timed out. (connect timeout=62)'))
Status code Unknown from https://nominatim.openstreetmap.org/search: ERROR - HTTPSConnectionPool(host='nominatim.openstreetmap.org', port=443): Max retries exceeded with url: /search?q=Amsterdam+%28Amsterdam-Centrum%29%2C+NL&format=jsonv2&addressdetails=1&limit=1 (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7fa4ee7110>, 'Connection to nominatim.openstreetmap.org timed out. (connect timeout=62)'))
Saving the map as an ASP file...
Processing complete.
 
I get a nice looking map but the python scripts keeps getting this error:

My test result is normal, but you may have sent too many requests, which could trigger the server's anti-overuse mechanism, causing your requests to be denied or timed out. This error may be expected behavior. If you're WAN using a dynamic real IP, try restarting the WAN service to obtain a new IP and see if that resolves the issue!

Status code Unknown from https://nominatim.openstreetmap.org/search: ERROR - HTTPSConnectionPool(host='nominatim.openstreetmap.org', port=443): Max retries exceeded

Moreover, your error message helped me realize that the ip2geotools API calls https://nominatim.openstreetmap.org/search. I'll update the installation instructions accordingly. Thank you!
 
The honor is all mine, @aru ... Happy to help with whatever @SomeWhereOverTheRainBow and I can do to bring more understanding to all this. I live by my motto...."Work hard, play harder, code even more harder!". :p Some people (like @Tech9) take this too literally, and before you know it, he's downing aircraft with SOHO router-integrated avionics. :D
Can't experience the SOHO router better than at 42,000 feet. This is the optimal ceiling.
 
Some people (like @Tech9) take this too literally, and before you know it, he's downing aircraft

A mishap happened when testing WXMON, but few thousand more rivets and the aircraft will be good to go. This work has to wait a bit because I can't take my eyes off your recently created (renamed, still unannounced) 3XMON. If you noticed @SomeWhereOverTheRainBow is also inactive lately, he's reviewing the code every night for hours. We both still don't understand how some of the things work. Crashing an aircraft when testing WXMON was... expected, but crushing an office chair with 3XMON... wasn't.

Can't experience the SOHO router better than at 42,000 feet.

We never got that high. The engine fell off at 10.000ft. Unfortunately, the two bolts from Home Depot holding it were never found and I couldn't get a refund. 😒
 
Last edited:
If you noticed @SomeWhereOverTheRainBow is also inactive lately, he's reviewing the code every night for hours.
Inactive is not the word, just not inundated. The code does keep me busy though. Especially trying to get higher than 10,000 feet. That and @Viktor Jaep keeps me busy on this tireless regex translation program.

Crashing an aircraft when testing WXMON was... expected, but crushing an office chair with 3XMON... wasn't.

You always said you'd ride that office chair 'till the wheels fell off; I didn't think you actually meant it.
 
Last edited:
The edit of "menuTree.js" was gone after reboot?

Based on my experience using the router, the Merlin firmware is stable, with very few reboots occurring apart from during power outages or firmware upgrades. Additionally, considering that the router hosts other remote services and is utilized by family members, any reboots could lead to complaints and frustration from them. This has led to my lack of testing in this regard. If you have such a requirement, I can offer some initial ideas. If feasible, I will update the installation instructions accordingly.

Edit services-start file, that called after all other system services have been started at boot.
#nano -w /jffs/scripts/services-start

Please paste the following cmdline into services-start.
# myaddon
sed -i '/menu_Addons/,/tab: \[/s/tab: \[/&\n{url: "user20.asp", tabName: "Skynet-Maps"},/' /tmp/menuTree.js
umount /www/require/modules/menuTree.js && mount -o bind /tmp/menuTree.js /www/require/modules/menuTree.js

Additionally, if you want to automatically update the Maps content every hour or every half day, you need to use 'cru a' to add executable file tasks. Please paste the following cmdline into services-start.

cru a skynet-maps "0 * * * * /jffs/scripts/addon-maps.py"
 
This is a great idea for a project, but will you be collating and sharing a full step-by-step instruction set, by updating Post #1 (or automate it via a script and add to AMTM)?
 
This is a great idea for a project, but will you be collating and sharing a full step-by-step instruction set, by updating Post #1 (or automate it via a script and add to AMTM)?
Thank you so much for your high regard for this script. I would like to extend special thanks to darkj2k, jacklul, and JGrana for reporting some issues during the installation process, which have contributed to improving the installation instructions. As for the automation script, I still have a ways to go as it involves many intricate details, and I haven't taken that step yet. Additionally, integrating it into the AMTM platform presents an even greater challenge, requiring a masterful level of skill. It's likely that only masterpieces would qualify for inclusion there. If you're interested in this project script, I hope that through this article, it can also inspire others to create their own works.
 
Thank you so much @aru and other contributors for this wonderful script and instruction. I finally get this threat map from Skynet in my router, with the ability to update data daily or weekly, accordingly. Maybe @aru should update the instruction of how to have an auto-update function on the first page, too :D Although I know it may be just for fun, but the map gives me a more visual concept of where the last 100 threats come from.


1711587425791.png
 
Thank you so much @aru and other contributors for this wonderful script and instruction. I finally get this threat map from Skynet in my router, with the ability to update data daily or weekly, accordingly. Maybe @aru should update the instruction of how to have an auto-update function on the first page, too :D Although I know it may be just for fun, but the map gives me a more visual concept of where the last 100 threats come from.

A good script requires testing and feedback from users. Since I haven't personally obtained testing results due to not restarting the router after updating the firmware to avoid complaints from family members, I've been hesitant to put automatic updates on the front page. Your feedback increases my confidence. Thank you!
 
A good script requires testing and feedback from users. Since I haven't personally obtained testing results due to not restarting the router after updating the firmware to avoid complaints from family members, I've been hesitant to put automatic updates on the front page. Your feedback increases my confidence. Thank you!
You're welcome @aru. Oh, please accept my apology for forgetting to test it after restarting the router. Unfortunately, the cru jobs and Menu tree cannot be kept after a restart...
 
You're welcome @aru. Oh, please accept my apology for forgetting to test it after restarting the router. Unfortunately, the cru jobs and Menu tree cannot be kept after a restart...

Don't worry, it's all in good intention. I just need to retract the update on the first page for now, until I understand the incorrect syntax or receive some guidance. Then I can update the installation instructions again...
 
Don't worry, it's all in good intention. I just need to retract the update on the first page for now, until I understand the incorrect syntax or receive some guidance. Then I can update the installation instructions again...
Thanks @aru, please take your time 😊
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top