added all devices - API: HTTP read/write #506

This commit is contained in:
proddy
2020-09-20 15:52:44 +02:00
parent 22fcff6682
commit 9fc15650a2
35 changed files with 742 additions and 425 deletions

View File

@@ -111,6 +111,10 @@ uint8_t EMSdevice::device_name_2_device_type(const char * topic) {
return DeviceType::MIXING;
}
if (strcmp(topic, "sensor") == 0) {
return DeviceType::SENSOR;
}
return DeviceType::UNKNOWN;
}
@@ -286,7 +290,7 @@ void EMSdevice::register_mqtt_topic(const std::string & topic, mqtt_subfunction_
// add command to library
void EMSdevice::register_mqtt_cmd(const __FlashStringHelper * cmd, cmdfunction_p f) {
Command::add_command(this->device_type_, this->device_id_, cmd, f);
Command::add(this->device_type_, this->device_id_, cmd, f);
}
// register a call back function for a specific telegram type