victronenergy / venus-docker

MIT License
28 stars 9 forks source link

Remote Console Bugs - Port Number and iFrame #13

Closed tpomerhn closed 2 years ago

tpomerhn commented 2 years ago

Just built the image and launched the Docker container, but when it comes up, if I click on the Remote Console piece (which I assume I need to do, in order to enable MQTT so I can play with venus-docker-grafana, because otherwise it doesn't find it), the iframe that contains the console errors with a connection refused to localhost.

If I packet sniff the loopback adapter, I can see that the iframe is attempting to load the iframe's content using an HTTP call to port 80; the only problem is, since this is a container, it is mapped to port 8080, so of course my computer rejects the connection. image

I believe this setting is in ./venus-html5-app/src/app/KVNRV/components/Views/RemoteConsole, on line 16, where it has a definition for a remote console container that launches with a full "http://" absolute path instead of a relative path, but I've attempted a fix by adding ' + ":8080"' at the end and doing a fresh docker build, but it still attempts to connect to port 80 so I'm missing something. My TypeScript skills are not up to the challenge of debugging this further, unfortunately.

The other issue is that even if this is "fixed" - i.e. force edit the "run.sh" file to run the web interface on port 80 instead of 8080 - the iframe simply loads the contents of the main page, not the remote console (but, at least it doesn't error, which also proves my debugs above). So whatever applet/app/etc that is supposed to run in the iframe, the iframe itself is calling incorrectly and just "nesting" the main homepage in it. image

AlexImb commented 2 years ago

Hi. The purpose of this project is to run data simulations to build UIs like the venus-html5-app and more. The Remote console is not part of this image.

If you want to get the Remote console working, you'll have to connect to real Venus device or a Raspberry Pi running Venus OS.

Then you can specify the IP of that device using URL parameters. For example: localhost:8080?host=192.168.1.13