rmcl icon indicating copy to clipboard operation
rmcl copied to clipboard

enabled capability to interact with rmfakecloud cloud servers

Open flomlo opened this issue 3 years ago • 2 comments

This PR adds the capability to check for other (well-configured) cloud servers.

One the first run the user is prompted for the server URL. Default is the official remarkable cloud. Once that has been set everything continues as usual, the user must provide a one-time-code, etc.

From a technical perspective a few things have changed: all the constants in const.py like DEVICE_TOKEN_URL were split up into DEFAULT_TOKEN_SERVER_URL and DEVICE_TOKEN_PATH.

The api.py now uses self.config['device_token_url'] instead of DEVICE_TOKEN_URL. The value of these values is calculated after the initial prompt for the server url and saved in the config file (e.g. $HOME/.config/rmcl/config.json).

Analogously USER_TOKEN_URL and SERVICE_MGR_URL where split up, calculated and put into the config dict.

It might not be the most elegant solution, but it works for me (tested with rmfakecloud and the official cloud)

flomlo avatar Mar 30 '22 16:03 flomlo

Note that well-configured rmfakecloud server means that it must configure STORAGE_HOST properly to the server host name. See https://github.com/ddvk/rmfakecloud/pr/161 or https://github.com/ddvk/rmfakecloud/issues/162.

Otherwise one must modify the /etc/hosts of the computer running rmcl and place the appropriate ca.crt on there as well.

flomlo avatar Mar 30 '22 16:03 flomlo

Ah yes, it fixes https://github.com/rschroll/rmcl/pull/8 as well until reMarkable™ decides to change it yet again.

flomlo avatar Mar 30 '22 16:03 flomlo