aqhome-mqttlog: increased verbosity.

This commit is contained in:
Martin Preuss
2024-02-11 22:22:42 +01:00
parent 13d161d119
commit de1a975586

View File

@@ -154,7 +154,12 @@ int _handlePublish(AQHOME_MQTT *aqh, GWEN_MSG_ENDPOINT *ep, const char *rcvdTopi
device=AQHMQTT_Device_List_First(aqh->registeredDeviceList);
while(device) {
AQHMQTT_TOPIC_LIST *topicList;
AQHMQTT_TOPIC_LIST *topicList;
const char *sDeviceName;
const char *sDeviceId;
sDeviceName=AQHMQTT_Device_GetName(device);
sDeviceId=AQHMQTT_Device_GetId(device);
topicList=AQHMQTT_Device_GetTopicList(device);
if (topicList) {
@@ -168,7 +173,11 @@ int _handlePublish(AQHOME_MQTT *aqh, GWEN_MSG_ENDPOINT *ep, const char *rcvdTopi
AQHMQTT_Topic_SetTopic(topic, rcvdTopic);
}
#endif
if (topic) {
if (topic) {
DBG_INFO(AQH_LOGDOMAIN,
"Handling topic \"%s\" for device type %s (id: %s)",
rcvdTopic,
sDeviceName, sDeviceId?sDeviceId:"<no id>");
if (AQHMQTT_Topic_GetTopicType(topic)==AQHMQTT_TopicType_Json)
_handleJsonTopic(aqh, ep, device, topic, rcvdValue);
else
@@ -305,7 +314,8 @@ int _registerNewDeviceForTopic(AQHOME_MQTT *aqh, GWEN_MSG_ENDPOINT *ep, const ch
if (aqh->registeredDeviceList==NULL)
aqh->registeredDeviceList=AQHMQTT_Device_List_new();
DBG_ERROR(NULL, "Registered device \"%s\" (%s)", AQHMQTT_Device_GetId(newDevice), AQHMQTT_Device_GetName(newDevice));
AQHMQTT_Device_List_Add(newDevice, aqh->registeredDeviceList);
AQHMQTT_Device_List_Add(newDevice, aqh->registeredDeviceList);
/* TODO: add devices and values to data server */
GWEN_Buffer_free(buf);
return 1;
}