ofxPiMapper icon indicating copy to clipboard operation
ofxPiMapper copied to clipboard

Remote Client in Browser

Open magdesign opened this issue 7 years ago • 7 comments

Thank you so much for releasing the remote-client and remote-server, its just freakin' amazing!

In the next few months I will try together with my coder to create a client which will run in the webbrowser (same approach as you know from PocketVJ). So the client will run also on the Rpi (as a webserver) and its commands will be sent trough a website. I hope there is enough power on the RPi...

My question is: Can you give me some hints how I can talk to Remote Server (like pointing me to some files which do the talking) ?

Update: After spending several hours googling, I think best would be to implement this with Openframeworks: https://github.com/bakercp/ofxJSONRPC https://github.com/bakercp/ofxHTTP Instead of json, sockets, snap etc.

If anyone has some hints of which would be the least resource hungry solution, please post here.

magdesign avatar Mar 29 '18 09:03 magdesign

I would build a simple Python-based server as a proxy. The Python script would establish a TCP socket connection to the oF app. The Python script would publish an API that would be accessible through something like http://127.0.01:8080/opm. There you could forward JSON packets from the Web Interface by using whatever you are using for AJAX. The Python script then would forward that to the TCP connection of the oF app.

Currently the connection is very basic and without encryption. I like the simplicity, but that could cause trouble in more serious scenarios.

kr15h avatar Mar 30 '18 17:03 kr15h

Until I have the Webclient solution, I compiled the Remote clients for Linux and OSX: https://pocketvj.com/downloads/MapperRemote.zip

Failing to build the Windows version in VisualStudio due this stupid backslash filepaths, it will not find the data folder and outputs an error. Using Windows is like learning an arabic language for me......just impossible. If a windows geek reads this, please help so we can compile also the windows client.

magdesign avatar Apr 27 '18 14:04 magdesign

It's cooking https://youtu.be/xv-UAn7Segs

kr15h avatar Apr 27 '18 15:04 kr15h

I have AppVeyor set up to compile ofxPiMapper, it compiles fine with msys2 as well as Visual Studio 32 and 64 bit.

kr15h avatar Apr 29 '18 12:04 kr15h

It compiles here too, but when you execute the .exe it crashes cause it does not find the data folder...

magdesign avatar Apr 30 '18 08:04 magdesign

I see. I could start up my virtual machine at some point. Will take a look.

kr15h avatar Apr 30 '18 10:04 kr15h

good news...

pietrondo avatar May 22 '18 16:05 pietrondo