Discovery HA and HomeD

This commit is contained in:
Mit4el
2024-09-20 12:19:15 +03:00
parent d6a24b1837
commit b32abb5a28
12 changed files with 782 additions and 39 deletions

View File

@@ -0,0 +1,32 @@
#include "Global.h"
#include "classes/IoTDiscovery.h"
#include "IoTDiscovery.h"
IoTDiscovery::IoTDiscovery(const String &parameters) : IoTItem(parameters)
{
/* int _tx, _rx, _speed, _line;
jsonRead(parameters, "rx", _rx);
jsonRead(parameters, "tx", _tx);
jsonRead(parameters, "speed", _speed);
jsonRead(parameters, "line", _line);
*/
//ChipId = getChipId();
}
void IoTDiscovery::publishStatusHOMEd(const String &topic, const String &data) {}
void IoTDiscovery::getlayoutHA() {}
void IoTDiscovery::getlayoutHOMEd() {}
void IoTDiscovery::deleteFromHOMEd() {}
void IoTDiscovery::mqttSubscribeDiscovery(){}
boolean IoTDiscovery::publishRetain(const String &topic, const String &data)
{
if (mqtt.beginPublish(topic.c_str(), data.length(), true))
{
mqtt.print(data);
return mqtt.endPublish();
}
return false;
}
IoTDiscovery::~IoTDiscovery() {}

View File

@@ -258,6 +258,14 @@ IoTBench *IoTItem::getBenchmarkLoad()
{
return nullptr;
}
IoTBench *IoTItem::getHOMEdDiscovery()
{
return nullptr;
}
IoTBench *IoTItem::getHADiscovery()
{
return nullptr;
}
unsigned long IoTItem::getRtcUnixTime()
{
return 0;