add reading of 125 values from emulator #1
@@ -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,
|
||||
}))
|
||||
}
|
||||
|
||||
@@ -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}
|
||||
|
NBizyaev
commented
переименуй в переименуй в
CLOUD_INGEST_URL, пожалуйста.
Это будет много в каких handlers использоваться
|
||||
|
||||
Reference in New Issue
Block a user
давай на всякий случай в идентификатор введём сразу edge
${edge}.modbus.${index + 1},