add reading of 125 values from emulator #1

Merged
APervov merged 2 commits from edge5modbus into main 2026-06-05 15:38:44 +00:00
2 changed files with 3 additions and 3 deletions
Showing only changes of commit 2a8bf3c2fb - Show all commits

View File

@@ -5,7 +5,7 @@ export const TOPIC = 'data/edge5/modbus/v1'
const EDGE = 'edge5'
const REGISTER_COUNT = 125
const postUrl =
process.env.EDGE5_MODBUS_POST_URL ?? 'https://greact.drll.cloud/api/ingest'
process.env.CLOUD_INGEST_URL ?? 'https://greact.drll.cloud/api/ingest'
type Edge5ModbusMetric = {
edge: string
@@ -38,7 +38,7 @@ function toMetrics(values: number[], timestamp: number): Edge5ModbusMetric[] {
return values.map((value, index) => ({
edge: EDGE,
timestamp,
tag: `modbus.${index + 1}`,
tag: `${EDGE}.modbus.${index + 1}`,
value,
}))
}

View File

@@ -21,4 +21,4 @@ services:
MQTT_URL: mqtt://mosquitto:1883
HTTP_PORT: "80"
WS_PORT: "9090"
EDGE5_MODBUS_POST_URL: ${EDGE5_MODBUS_POST_URL:-https://greact.drll.cloud/api/ingest}
CLOUD_INGEST_URL: ${CLOUD_INGEST_URL:-https://greact.drll.cloud/api/ingest}