AllskyTeam / allsky

A Raspberry Pi operated Wireless Allsky Camera
MIT License
1.19k stars 180 forks source link

Unable to see online the AllSky camera #1302

Closed CarlosTapiaAyuga closed 2 years ago

CarlosTapiaAyuga commented 2 years ago

Hi.

I installed the webUI and the allsky-website, configured following the steps, filled the data for the FTP of my website. But I can't see it online, only in local mode.

It can be used the RPi as a server standalone? Where anybody can see the camera without using VPN?

Thanks so much for the work.

EricClaeys commented 2 years ago

@CarlosTapiaAyuga is your Allsky Website on your Pi or a remote server? If it's on your Pi and the Pi is not on the Internet (e.g., it has a 192.168.. IP address), then you won't be able to see it from the Internet. What did you enter for the FTP settings? It's possible to have the website on your Pi and allow other people to access it via the Internet, but you have to open a port on your firewall to allow it, then get an IP address and ideally a DNS name from an Internet Service Provider. If you have the money it's easier to buy some disk space on a web server and install the Allsky Website there. The Wiki describes this.

CarlosTapiaAyuga commented 2 years ago

Hi Eric, In 192.168... I can see without problems the cam and everything goes fine. I can see on the world map too (without images).

I tried too to configure my FTP, I have a website on SiteGround (no problem about space, DNS, etc.) But I don't know how to upload there the all-sky :/ So, installing Allsky Website on my server will work? I have to ask if I can do it.

CarlosTapiaAyuga commented 2 years ago

Attached you can find the FTP settings (I deleted the password for my server :) )

allsky.txt

EricClaeys commented 2 years ago

@CarlosTapiaAyuga See this Wiki page for how to install the Allsky Website on a remote server. A lot of people have done this (including me for both cameras).

In your ftp-settings.sh file, why are the WEB_*_DIR variables set to /allsky? Do you have a directory called /allsky ? People rarely create files and directories in the root directory.

Per the Wiki: If you have the Allsky Website on your Pi, set these variables:

The WEB_*_DIR variables are for when you want to copy an image to BOTH a remote server AND your Pi, which I don't think you have set up yet, right?

CarlosTapiaAyuga commented 2 years ago

Thanks a lot for the help. So sorry for be a totally noob.

I can install the website on my server: https://carlostapia.es/allsky/index.php

But I can't see any image. I tried the troubleshooting tutorial to upload test.txt but it returns the folder doesn't exist. Can be the problem that the server where allsky folder is carlosatpia.es/public_html/allsky but the website in the browser is carlostapia.es/allsky?

The @ at the ftp "allsky@carlostapia.es" could be a problem too?

Attached updated ftp settings: allsky.txt

Stephen2615 commented 2 years ago

When you ftp to your web site, and do an ls, do you see the allsky directory in the output? If so, instead of using WEB_IMAGE_DIR="carlostapia.es/public_html/allsky/"

use

IMAGE_DIR="allsky"

and the same for the other upload directories. I had no issues with that. Ofcourse, sftp is different if you want to go that path.

Also, if you ftp to your website, do you use allsky@carlostapia.es for your login? Generally, the user name doesn't include @.

EricClaeys commented 2 years ago

@CarlosTapiaAyuga We were all noob's at one time... When you FTP into your server (from the Pi or anywhere else), where are the website files? That location is what you want to put into the ftp-settings.sh file. You currently have /var/www/html/allsky/ for the remote directory names, which is what you'd use on the Pi. If you run upload.sh --debug ... it will do a pwd and ls so you can see the directory structure at the root.

I'm not sure why you'd need a @ in anything. That's usually for separating a user name from the server name, but ftp-settings.sh has separate variables for those.

In your config.js file you should probably change imageName: "carlostapia.es/public_html/allsky/image.jpg", to imageName: "image.jpg", since the file is in the root of the allsky website.

EricClaeys commented 2 years ago

@CarlosTapiaAyuga Any update?

CarlosTapiaAyuga commented 2 years ago

Hi, Thanks so much for the help. I will try it now.

I will be married in a few days and I don't have so much time :)

But the next week you will have updates about my progress.

EricClaeys commented 2 years ago

@CarlosTapiaAyuga. Congratulations in advance. If you go on a honeymoon I hope you have a great time.

Eric

CarlosTapiaAyuga commented 2 years ago

Hi,

Thanks for the good wishes.

I restarted whole installation and updated my server, now I can access without problems with FTP like Filezilla (before I had some problems) The REMOTE_HOST="siteground203.com" And REMOTE_USER="allsky@carlostapia.es"

And where the files goes is /carlostapia.es/public_html/

The website is installed on /carlostapia.es/public_html/allsky

I can upload with FTP server, but the Raspberry didn't do it. I can't find where is the bug on address.

The data.json is generated correctly on the raspberry, but it doesn't upload to the server.

I checked this too: curl -T /home/pi/allsky/tmp/image.jpg ftp://siteground203.com//carlostapia.es/public_html/allsky/image.jpg --user allsky@carlostapia.es:mypassword % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0 curl: (9) Server denied you to change to the given directory

ftp_settings.txt config.txt

CarlosTapiaAyuga commented 2 years ago

Today I contacted with the support of my server and now I can upload images using cron.

curl -T /home/pi/filename.jpg ftp://siteground203.com/allsky/image.jpg --user allsky@carlostapia.es:password % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 4642k 0 0 100 4642k 0 1488k 0:00:03 0:00:03 --:--:-- 1488k

So, the problem must be in the syntaxis of ftp-setting image_dir, etc.

EricClaeys commented 2 years ago

@CarlosTapiaAyuga The Wiki should have the information you need, in the "settings" or "troubleshooting uploads" pages.

Stephen2615 commented 2 years ago

Have a look in the allsky.log. As you are using ftp, you might have problems with lftp. That is documented in the ftp-settings file. You might need to have: LFTP_COMMANDS="set ssl:verify-certificate false"

You also have POST_END_OF_NIGHT_DATA="false" in the config.txt file. which means the json file won't upload.

Your upload directories look good.

EricClaeys commented 2 years ago

@Stephen2615, Thanks for answering.

CarlosTapiaAyuga commented 2 years ago

Thanks so much for the help.

Finally, the camera es online!! https://carlostapia.es/allsky/image.jpg

But here reamains loading all the time: https://carlostapia.es/allsky/index.php

Now is time to mount the camera on the roof :)

CarlosTapiaAyuga commented 2 years ago

After 30 minutes the camera stops to upload images :(

It stops when I corrected the name of the image on IMAGE_DIR config from "image.jog" to "image.jpg" . And when I try to change the white balance to auto. But if I return to no, it remains freeze. I did the 2 things at the same time.

settings_RPiHQ.txt config.txt

EricClaeys commented 2 years ago

@CarlosTapiaAyuga. Carlos, the fix for the Loading... message is easy - take a close look at the imageName setting in the "allsky-website" settings in the Wiki. Also take a look at the "auroraMap" setting.

EricClaeys commented 2 years ago

@CarlosTapiaAyuga Take a look at the line above the IMG_DIR= line in config/config.sh. Then put that variable back to what it was. That should fix the remaining problem.

screetch82 commented 2 years ago

I think i have the same issue after upgrading to newest release. The issue is the website hostet on a server which stopped showing the image. The thumbnails etc all work fine.

Image upload works: https://skyobservatory.space/allsky/image.jpg

when I just go there is seems to load index.php and shows a gray box "Loading..."

when I go to https://skyobservatory.space/allsky/index.html and copy the image link it shows me: https://skyobservatory.space/allsky/image-resize.jpg

here the new file name is not being used. also the side box with all the meta data is empty..seems it doesnt read the Config.js data?

This is the config.js:

var config = { comment: "See https://github.com/thomasjacquin/allsky/wiki/allsky-website-Settings for a description of these settings", title: "SkyObservatory Norderstedt", imageName: "/allsky/image.jpg", location: "North", latitude_longitude_comment: "latitude and longitude must be decimal numbers with OUT the trailing N, S, E, and W.", latitude: 53.69N, longitude: 10.00E, az: 0, camera: "ZWO ASI 078", lens: "ZWO 2.5mm 170 degree lens", computer: "Pi4", owner: "Norman Hamann", overlaySize: 875, overlayOffsetLeft: 0, overlayOffsetTop: 0, showOverlayAtStartup: false, auroraForecast: false, auroraMap: "XX_need_to_update_XX", intervalSeconds: 5, }

Stephen2615 commented 2 years ago

The first thing I noticed which might not have anything to do with your problem is:

latitude_longitude_comment: "latitude and longitude must be decimal numbers with OUT the trailing N, S, E, and W.", latitude: 53.69N, longitude: 10.00E,

It should be (no N,S,E or W)

latitude: 53.69 longitude: -10.00

You have:

imageName: "/allsky/image.jpg",

My config has:

imageName: "image.jpg"

but as I am sftping into the server, it might be different to normal ftp.

The loading screen means that the image.jpg is not available for index.php. There is a file on the server called loading.jpg. The image.jpg is probably somewhere else or not even getting there which you should be able to determine by looking at the allsky.log on your RPi.

Stephen

screetch82 commented 2 years ago

this is index.php and i saw it doesnt seem to take the variable information from config.js as for the image it directly references src=loading.jpg

<!DOCTYPE html>

Allsky - {{title}}
{{title}}
Aurora activity: {{key}}: {{getScale(val)}}
  •   Location: {{location}}
  • Latitude: {{latitude < 0 ? latitude * -1 + 'S' : latitude + 'N'}}
  • Longitude: {{longitude < 0 ? longitude * -1 + 'W' : longitude + 'E'}}
  •   Camera: {{camera}}
  •   Lens: {{lens}}
  •   Computer: {{computer}}
  •   Owner: {{owner}}
allsky image
50) { // The initial analyticsTracking.js file has a comment line "//Include your Google Analytics code here" which is < 50 characters. ?>
screetch82 commented 2 years ago

so i modded index.php now:

<div id="imageContainer">
    <div id="starmap_container" ng-show="showOverlay==true">
        <div id="starmap"></div>
    </div>
    <div id="live_container">
        <img title="allsky image" alt="allsky image" id="current" class="current" src="image.jpg">
    </div>
</div>

it shows the image but surely this isnt the way

EricClaeys commented 2 years ago

@screetch82 You should never need to modify a .php file. If something isn't working, it's usually a configuration issue (as in your case), or less likely a bug. I suggest you restore index.php to what it was originally.

Your web server appears to be Linux-based which is case-sensitive, so "AllSky" is different than "allsky". On https://skyobservatory.space/AllSky/ you have a link to AllSky which I assume is supposed to be your Allsky Website, but because the link points to https://skyobservatory.space/AllSky/ it takes the user back to the same page. If you want the AllSky link to go to your Allsky Website, change the link to https://skyobservatory.space/allsky/, since you put the Allsky Website in a directory on your server called "allsky".

The imageName setting in your /allsky/config.js file is /image.jpg which means the web server is looking in the root of your website. The file actually exists in the /allsky subdirectory, so imageName should be /allsky/image.jpg.

EricClaeys commented 2 years ago

@CarlosTapiaAyuga. Any update?

EricClaeys commented 2 years ago

Closing issue - no response from user in a month, and I believe the problem was mis-configuration.