NiHoel/Anno1800Calculator

Feature Request: Display data from running Anno on different computer

Closed this issue · 7 comments

Hi,

first of all, great programm, I love it ! :)

I have Calculator 4.1 + Server 5.2 running on the same machine. Having only one monitor, you always have to tab out of the game to check the current status. I'd like to ask for a feature to seperate calculator and server machinewise. Server of course running the same computer as Anno does, calculator display on a laptop for example. I was not sure if this is a feature request of the calculator or the server..

That would be a killer feature :)
Thanks !

That is actually pretty easy. In line 1969 of AnnoCalculator.js replace localhost by the ip address of your desktop PC.

this.url = 'http://localhost:8000/AnnoServer/Population';

But there are some things to keep in mind:

  1. You desktop computer must be reachable from the device where you run the calculator (e.g. be in the same network and inter device communication must be enabled by the router)
  2. The port 8000 must be open for incoming traffic (and responses). Check windows defender and / or your antivirus software

Then, you can receive updates on any mobile device. Even on Android or iPhone. The trick there is to open a local website: https://android.stackexchange.com/a/4777

Due to the caveats I do not offer a UI to enter the IP address. I fear that I'd then receive a lot of complaints "doesn't work for me".

Thanks for the fast reply!
Yes I also played around with the AnnoCalculator.js. Even though inter communication in home network is enabled and firewalls are turned off, accessing http://myip:8000/AnnoServer/Population from a different machine than server gives HTTP 400 invalid hostname. Is the server expecting localhost? Unfortunately I haven't found any clue to this in the https://github.com/NiHoel/Anno1800UXEnhancer/ files.

But nevertheless, as this is Server related and not Client Calculator related anymore I would just close this issue :) Thanks again !

I uploaded a new server version here:
https://drive.google.com/drive/folders/1Vsy3kXGe11d28pISqR82VpaCGdZaNtyi?usp=sharing

The Readme contains instructions how to access the server from remote devices.

Works like a charm with -h flag to start up the server! Thank you very much :)

I'm not sure if I should comment here, but seeing that the version that is on Google Drive differs from the one available at https://github.com/NiHoel/Anno1800UXEnhancer/ isn't the same, I'll try my chances here.

Whenever I try to start the server with the -h flag I get the following message:
image

I'm running the cmd prompt as admin, as I was getting errors before when trying it with a non-admin shell. The verbose logging didn't give me any additional info. I did follow the instructions as they were put in the readme included in the download from drive.

EDIT: I got it working by recompiling the source with different hostname. This works for me for now, though a non-hardcoded solution would be preferred.

I uploaded a new version with a command line flag. See the README.

I'm impressed that you manage to compile all the dependencies and the server!