Hi, I’ve successfully set up the gateway however when trying to connect a virtual thing to the gateway, it is not found. I followed this tutorial to add a virtual thing: GitHub - WebThingsIO/webthing-python: Python implementation of a Web Thing server. The web thing server is definitely working as I can connect to the URL and it displays the thing’s information.
I have tried adding via URL but I get an error 400. I was also getting an ECONNREFUSED error in the docker terminal however this is not showing anymore. After doing much troubleshooting, it appears it may have something to do with host networking - which I am aware is not supported in Docker for Windows. Does this mean it is not possible to setup a gateway and connect things to it using the docker image in Windows?
This is all very new to me so apologies if I have missed something obvious!
I use WT on an RPI and docker, with virtual things that I control remotely. As you hinted, it’s stared using host networking…
Did you try to use the IP address of the windows host rather than localhost?
Did you map port 8888 when starting the docker container?
Are there any errors in the logfile when trying to add the virtual thing?
Did you map a persistent volume to store dynamic data, addon code, logfiles so when the container restarts it won’t loose previous configurations?
I don’t think I have mapped port 8888 when starting the docker container so that may be the issue. I simply ran the command below to create the container which is the command listed on the webthings io docker webpage (https://hub.docker.com/r/webthingsio/gateway). How can I achieve this?
Hi @Martin_Verret, sorry I should have been more specific of my goal. I am aware of the virtual adapter addon and if I cannot solve this then that will have to be my backup. However, I already have python code for a custom thing which has lots of properties and events which would take substantial time to enter in manually via the addon GUI. Therefore obviously my preferable option is to have it working via python code so I thought I would check to see if there is a solution that way.
Sorry I’m not sure what you mean. Typing in ipconfig in terminal displays lots of information and I understand each main heading is a NIC which displays info like