add mapper. add v2 handler. add tag description short and full versions. delete topic[1-5].

This commit is contained in:
Первов Артем
2026-06-10 01:44:31 +03:00
parent 926a01640b
commit 07eae3dfb4
14 changed files with 1165 additions and 99 deletions

View File

@@ -5,7 +5,7 @@ export const TOPIC = 'data/edge5/modbus/v1'
const EDGE = 'edge5'
const REGISTER_COUNT = 125
const postUrl =
process.env.CLOUD_INGEST_URL ?? 'https://demo.backend.drill.greact.ru/api/ingest'
process.env.CLOUD_INGEST_URL ?? 'https://demo.backend.drill.greact.ru/ingest'
type Edge5ModbusMetric = {
edge: string
@@ -44,7 +44,6 @@ function toMetrics(values: number[], timestamp: number): Edge5ModbusMetric[] {
}
async function postMetrics(metrics: Edge5ModbusMetric[]): Promise<void> {
const response = await fetch(postUrl, {
method: 'POST',
headers: {