aqhome-mqttlog: increased verbosity.
This commit is contained in:
@@ -154,7 +154,12 @@ int _handlePublish(AQHOME_MQTT *aqh, GWEN_MSG_ENDPOINT *ep, const char *rcvdTopi
|
|||||||
|
|
||||||
device=AQHMQTT_Device_List_First(aqh->registeredDeviceList);
|
device=AQHMQTT_Device_List_First(aqh->registeredDeviceList);
|
||||||
while(device) {
|
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);
|
topicList=AQHMQTT_Device_GetTopicList(device);
|
||||||
if (topicList) {
|
if (topicList) {
|
||||||
@@ -168,7 +173,11 @@ int _handlePublish(AQHOME_MQTT *aqh, GWEN_MSG_ENDPOINT *ep, const char *rcvdTopi
|
|||||||
AQHMQTT_Topic_SetTopic(topic, rcvdTopic);
|
AQHMQTT_Topic_SetTopic(topic, rcvdTopic);
|
||||||
}
|
}
|
||||||
#endif
|
#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)
|
if (AQHMQTT_Topic_GetTopicType(topic)==AQHMQTT_TopicType_Json)
|
||||||
_handleJsonTopic(aqh, ep, device, topic, rcvdValue);
|
_handleJsonTopic(aqh, ep, device, topic, rcvdValue);
|
||||||
else
|
else
|
||||||
@@ -305,7 +314,8 @@ int _registerNewDeviceForTopic(AQHOME_MQTT *aqh, GWEN_MSG_ENDPOINT *ep, const ch
|
|||||||
if (aqh->registeredDeviceList==NULL)
|
if (aqh->registeredDeviceList==NULL)
|
||||||
aqh->registeredDeviceList=AQHMQTT_Device_List_new();
|
aqh->registeredDeviceList=AQHMQTT_Device_List_new();
|
||||||
DBG_ERROR(NULL, "Registered device \"%s\" (%s)", AQHMQTT_Device_GetId(newDevice), AQHMQTT_Device_GetName(newDevice));
|
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);
|
GWEN_Buffer_free(buf);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user