Comments (10)
IIRC, discovery uses UDP broadcast. That might be blocked from a Docker container.
from pylogix.
Yeah if docker is out of the question for discovery of devices. The next best solution is as I mentioned before, with nssm, creating either a script or even an exe for a simple api /api/get_devices and you call that endpoint from your docker container. Would you probably be better to write this exe in another language for a smallest binary.
from pylogix.
Hey there, does this also happen with a host adapter?
https://docs.docker.com/network/network-tutorial-host/
from pylogix.
I don't know much about docker but if it doesn't have direct access to a network adapter, like bridged mode in a VM, then it is likely the broadcast isn't making it out of the container.
from pylogix.
host mode is the equivalent to a vm bridge mode, that should solve the issue.
from pylogix.
Hi @TheFern2 @dmroeder @kyle-github , thank you so much for your replies!
I was trying to create custom network for my container, but it seems that the host option is only for Linux host and transparent network is only for windows containers. I am looking into two directions now. One is to change from Linux container to Windows container and the other is to figure out how to send UDP broadcast from a docker container. I'll reply here if I could find anything.
from pylogix.
A bit off topic, but why do you need to run pylogix inside a container? pylogix requires zero deps aside python, so running in a container is imo an unnecessary overhead. Use venv or poetry if you don't want to install python on the system wide libraries, and use nssm to call your python script.
from pylogix.
This is mainly for deployment purposes. We are developing a web-based software framework that includes the frontend, backend and database. All the components are in a docker compose network for easy deployment and they are managed by nginx. I was trying to add pylogix to the Django backend app so that we can communicate with RA PLCs. Another way around is to use the common gateway platform which claims to work in docker but has other issues that we need to resolve.
from pylogix.
I did not find a working solution to broadcast from the container to the local network for my setup (windows host and linux container). Thank for all your help anyway!
from pylogix.
Thanks for the suggestion! I'll give it a try. I really like the discover function as it could simplify the workflow and make it easier for the user.
from pylogix.
Related Issues (20)
- Unknown Error 255 on Multi-Write when including a string HOT 6
- read tag from 80 sets of plc HOT 22
- Double read packets? HOT 6
- cannot import name 'Adapter' from 'pylogix' HOT 23
- Tag Write falsely reports Success HOT 7
- "Forward open failed" when trying to read tags from Berghof PLC HOT 8
- .GetDeviceProperties always returns DeviceType of "None" HOT 5
- Issues connecting to emulate HOT 7
- micro850 connection HOT 5
- Return data gets jumbled up on a multi write when the tags don't exist. HOT 13
- The return value is different when using a multi write compared to a single write for a string. HOT 4
- cannot get a tag list HOT 3
- Is it possible to inhibit a periodic task? HOT 2
- pylogix - returning a tag list as a row of values HOT 7
- PLC REAL values HOT 5
- Pylogix - compare a previously acquired tag list with the current one HOT 5
- Invalid Continuation Byte HOT 5
- Abnormal code termination. HOT 8
- Do I need to use routing? HOT 20
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pylogix.