From 4afc16e2cb2a17dd9fb1d234451ce6b2d28d0f85 Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Wed, 4 Dec 2024 18:25:31 +0100 Subject: [PATCH] modbus command path to api #2276 --- src/modbus.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modbus.cpp b/src/modbus.cpp index 48577ba61..0c0432a15 100644 --- a/src/modbus.cpp +++ b/src/modbus.cpp @@ -414,9 +414,9 @@ ModbusMessage Modbus::handleWrite(const ModbusMessage & request) { std::string path; if (tag < DeviceValueTAG::TAG_HC1) { - path = std::string("ems-esp/") + std::string(EMSdevice::device_type_2_device_name(device_type)) + "/" + modbusInfo->short_name; + path = std::string("api/") + std::string(EMSdevice::device_type_2_device_name(device_type)) + "/" + modbusInfo->short_name; } else { - path = std::string("ems-esp/") + std::string(EMSdevice::device_type_2_device_name(device_type)) + "/" + EMSdevice::tag_to_mqtt(tag) + "/" + path = std::string("api/") + std::string(EMSdevice::device_type_2_device_name(device_type)) + "/" + EMSdevice::tag_to_mqtt(tag) + "/" + modbusInfo->short_name; }