updated IP to PLC
This commit is contained in:
@@ -33,7 +33,7 @@ pip install -e .
|
||||
Set environment variables:
|
||||
|
||||
```bash
|
||||
export PLC_IP=192.168.1.15
|
||||
export PLC_IP=198.18.100.141
|
||||
export PLC_PORT=502
|
||||
export DATA_UPDATE_INTERVAL=5
|
||||
export LOG_LEVEL=INFO
|
||||
@@ -150,7 +150,7 @@ export PLC_IP=127.0.0.1 # For simulator
|
||||
# Production environment
|
||||
export FLASK_ENV=production
|
||||
export SECRET_KEY=your-secret-key
|
||||
export PLC_IP=192.168.1.15
|
||||
export PLC_IP=198.18.100.141
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
@@ -26,8 +26,8 @@ def parse_args():
|
||||
help='Host to bind to (default: 0.0.0.0)')
|
||||
parser.add_argument('--port', type=int, default=5000,
|
||||
help='Port to bind to (default: 5000)')
|
||||
parser.add_argument('--plc-ip', default='192.168.1.15',
|
||||
help='PLC IP address (default: 192.168.1.15)')
|
||||
parser.add_argument('--plc-ip', default='198.18.100.141',
|
||||
help='PLC IP address (default: 198.18.100.141)')
|
||||
parser.add_argument('--plc-port', type=int, default=502,
|
||||
help='PLC Modbus port (default: 502)')
|
||||
parser.add_argument('--debug', action='store_true',
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
}
|
||||
],
|
||||
"settings": {
|
||||
"python.defaultInterpreterPath": "/home/paulg/FCI/api/venv/bin/python",
|
||||
"python.defaultInterpreterPath": "/home/paulg/FCI/api/.venv/bin/python",
|
||||
"python.terminal.activateEnvironment": true,
|
||||
"terminal.integrated.cwd": "/home/paulg/FCI/api"
|
||||
}
|
||||
|
||||
@@ -20,8 +20,8 @@ def parse_args():
|
||||
help='Host to bind to (default: 0.0.0.0)')
|
||||
parser.add_argument('--port', type=int, default=5000,
|
||||
help='Port to bind to (default: 5000)')
|
||||
parser.add_argument('--plc-ip', default='192.168.1.15',
|
||||
help='PLC IP address (default: 192.168.1.15)')
|
||||
parser.add_argument('--plc-ip', default='198.18.100.141',
|
||||
help='PLC IP address (default: 198.18.100.141)')
|
||||
parser.add_argument('--plc-port', type=int, default=502,
|
||||
help='PLC Modbus port (default: 502)')
|
||||
parser.add_argument('--debug', action='store_true',
|
||||
|
||||
@@ -14,7 +14,7 @@ class Config:
|
||||
SECRET_KEY = os.getenv('SECRET_KEY', 'watermaker-plc-api-dev-key')
|
||||
|
||||
# PLC Connection Settings
|
||||
PLC_IP = os.getenv('PLC_IP', '192.168.1.15')
|
||||
PLC_IP = os.getenv('PLC_IP', '198.18.100.141')
|
||||
PLC_PORT = int(os.getenv('PLC_PORT', '502'))
|
||||
PLC_UNIT_ID = int(os.getenv('PLC_UNIT_ID', '1'))
|
||||
PLC_TIMEOUT = int(os.getenv('PLC_TIMEOUT', '3'))
|
||||
|
||||
Reference in New Issue
Block a user