- config.yaml: 恢复现场 IP(10.50.253.165/.181/.182)、s331_2 端口 502 - config.yaml: S331 全部 32 位量 word_order 改 CDAB,瞬时流量 scale=60 (m3/min -> m3/h) - config.yaml: 11# 电表功率/电能类型改 int32;第二路 RTU 从站 slave_id 改 10 - poller.py: 过滤 S331 无数据哨兵 -9999 与非有限值,避免污染周期基准 - rtu.py: 新增 SafeRTUFramer 支持多点半总线,忽略其它从站请求 - 新增 config.debug.yaml、README.md、wheelhouse 离线依赖 - tests: 适配新配置(ttyS7/address_offset);新增 pytest.ini 限定 testpaths
21 lines
587 B
Desktop File
21 lines
587 B
Desktop File
[Unit]
|
|
Description=Air Compressor Gas-Electric Ratio Edge Gateway (EG828-CEW)
|
|
After=network-online.target
|
|
Wants=network-online.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
WorkingDirectory=/opt/hx-gateway
|
|
Environment=PYTHONUNBUFFERED=1
|
|
ExecStart=/opt/hx-gateway/.venv/bin/python -m gateway.app --config /opt/hx-gateway/config/config.yaml
|
|
# 串口异常/程序异常自动重启;正常退出码 0 不重启
|
|
Restart=always
|
|
RestartSec=3
|
|
KillSignal=SIGTERM
|
|
TimeoutStopSec=20
|
|
# 串口权限(若改用非 root 用户,请将该用户加入 dialout 组)
|
|
User=root
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|