sitewhere icon indicating copy to clipboard operation
sitewhere copied to clipboard

Send multiple measurements

Open hhj1995 opened this issue 5 years ago • 5 comments

How can sitewhere send multiple measured values at the same time through the mqtt client. The example given on the official website can only send one test value, not multiple

hhj1995 avatar Jun 12 '20 13:06 hhj1995

Sending multiple measurements in one request is only supported in the REST APIs and not via MQTT at this time. See this API call for information about sending multiple events.

derekadams avatar Jun 12 '20 13:06 derekadams

Is the interface for sending multiple measurement values of version 2.0.0 encapsulated in the officially provided rest-api library

------------------ 原始邮件 ------------------ 发件人: "Derek Adams"<[email protected]>; 发送时间: 2020年6月12日(星期五) 晚上9:58 收件人: "sitewhere/sitewhere"<[email protected]>; 抄送: "霓裳挽歌倾城醉"<[email protected]>;"Author"<[email protected]>; 主题: Re: [sitewhere/sitewhere] Send multiple measurements (#825)

Sending multiple measurements in one request is only supported in the REST APIs and not via MQTT at this time. See this API call for information about sending multiple events.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

hhj1995 avatar Jun 12 '20 14:06 hhj1995

Yes, it's the addMultipleEventsForDevice method here. Note you can send any number of locations, alerts, and measurements in the payload.

derekadams avatar Jun 12 '20 14:06 derekadams

In version 2.0.0, the device allocation information has been found in influcDB, but the inbound microservice still prompts that the device is not allocated, so the mqtt client cannot transmit messages into it.

------------------ 原始邮件 ------------------ 发件人: "Derek Adams"<[email protected]>; 发送时间: 2020年6月12日(星期五) 晚上10:20 收件人: "sitewhere/sitewhere"<[email protected]>; 抄送: "霓裳挽歌倾城醉"<[email protected]>;"Author"<[email protected]>; 主题: Re: [sitewhere/sitewhere] Send multiple measurements (#825)

Yes, it's the addMultipleEventsForDevice method here. Note you can send any number of locations, alerts, and measurements in the payload.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

hhj1995 avatar Jun 15 '20 08:06 hhj1995

Sorry to disturb you, I found that the official interface for transmitting multiple measured values is wrong. How to debug this situation when compiling the source code in idea?

------------------ 原始邮件 ------------------ 发件人: "Derek Adams"<[email protected]>; 发送时间: 2020年6月12日(星期五) 晚上10:20 收件人: "sitewhere/sitewhere"<[email protected]>; 抄送: "霓裳挽歌倾城醉"<[email protected]>;"Author"<[email protected]>; 主题: Re: [sitewhere/sitewhere] Send multiple measurements (#825)

Yes, it's the addMultipleEventsForDevice method here. Note you can send any number of locations, alerts, and measurements in the payload.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

hhj1995 avatar Jun 19 '20 12:06 hhj1995