Browse Source

mqtt->rssi nicht in /ch0/, mqtt->json kein YieldDay/YieldTotal einzeln

pull/1541/head
geronet1 10 months ago
parent
commit
59b1fe866f
  1. BIN
      scripts/__pycache__/htmlPreprocessorDefines.cpython-311.pyc
  2. 3
      src/publisher/pubMqtt.h
  3. 2
      src/publisher/pubMqttIvData.h

BIN
scripts/__pycache__/htmlPreprocessorDefines.cpython-311.pyc

Binary file not shown.

3
src/publisher/pubMqtt.h

@ -559,6 +559,9 @@ class PubMqtt {
} }
void sendData(Inverter<> *iv, uint8_t curInfoCmd) { void sendData(Inverter<> *iv, uint8_t curInfoCmd) {
if (cfg_mqtt->json)
return;
record_t<> *rec = iv->getRecordStruct(curInfoCmd); record_t<> *rec = iv->getRecordStruct(curInfoCmd);
uint32_t lastTs = iv->getLastTs(rec); uint32_t lastTs = iv->getLastTs(rec);

2
src/publisher/pubMqttIvData.h

@ -115,7 +115,7 @@ class PubMqttIvData {
mPublish(mSubTopic.data(), mVal.data(), true, QOS_0); mPublish(mSubTopic.data(), mVal.data(), true, QOS_0);
if((mIv->ivGen == IV_HMS) || (mIv->ivGen == IV_HMT)) { if((mIv->ivGen == IV_HMS) || (mIv->ivGen == IV_HMT)) {
snprintf(mSubTopic.data(), mSubTopic.size(), "%s/ch0/rssi", mIv->config->name); snprintf(mSubTopic.data(), mSubTopic.size(), "%s/rssi", mIv->config->name);
snprintf(mVal.data(), mVal.size(), "%d", mIv->rssi); snprintf(mVal.data(), mVal.size(), "%d", mIv->rssi);
mPublish(mSubTopic.data(), mVal.data(), false, QOS_0); mPublish(mSubTopic.data(), mVal.data(), false, QOS_0);
} }

Loading…
Cancel
Save