Help Center>
IoT Device Management>
FAQs>
Secondary Development>
FAQs About Application Development>
Subscription and Push>
Difference Between deviceDatachanged and deviceDataschanged
Updated on 2022-02-24 GMT+08:00
Difference Between deviceDatachanged and deviceDataschanged
Device change data is subscribed to over the Device Data Change and Batch Device Data Change APIs, and the format for encapsulating data is different.
For example: A water meter has two service types: Battery and Connectivity. The data of the two services is reported each time.
- If deviceDatachanged is subscribed to, the IoT platform pushes the data to the application server twice, Battery service data for the first time, and Connectivity service data for the second time. Examples are as follows:
{ "notifyType": "deviceDataChanged", "deviceId": "70a8d7cd-5ecd-4bda-a87c-afc16bd31bda", "gatewayId": "70a8d7cd-5ecd-4bda-a87c-afc16bd31bda", "requestId": null, "service": { "serviceId": "battery", "serviceType": "battery", "data": {"batteryLevel": 66}, "eventTime": "20170211T034003Z" }}
{"notifyType": "deviceDataChanged","deviceId": "70a8d7cd-5ecd-4bda-a87c-afc16bd31bda", "gatewayId": "70a8d7cd-5ecd-4bda-a87c-afc16bd31bda","requestId": null, "service": { "serviceId": "Connectivity", "serviceType": "Connectivity", "data": { "signalStrength": 72, "cellId": 4022250974, "tac": 61374, "mnc": 91, "mcc": 235 }, "eventTime": "20170211T092317Z" }}
- If deviceDataschanged is subscribed to, the IoT platform encapsulates the data of the two services together and sends the data to the application server.
{ "notifyType": "deviceDatasChanged", "requestId": null, "deviceId": "70a8d7cd-5ecd-4bda-a87c-afc16bd31bda",<br> "gatewayId": "70a8d7cd-5ecd-4bda-a87c-afc16bd31bda",<br> "services": [{ "serviceId": "battery", "serviceType": "battery", "data": { "batteryLevel": 66 }, "eventTime": "20170211T034003Z" }, { "serviceId": "Connectivity", "serviceType": "Connectivity","data": {"signalStrength": 72, "cellId": 4022250974, "tac": 61374, "mnc": 91, "mcc": 235 }, "eventTime": "20170211T034003Z" } ]}
Parent topic: Subscription and Push
Subscription and Push FAQs
- Invalid Callback Address Occurs When Calling the Subscription API
- How to Obtain the subscriptionId When Calling the Querying Subscription in Batches API
- Application Server Fails to Receive Data Pushed by the IoT Platform
- How Do I Export the HTTPS Push Certificate
- Difference Between deviceDatachanged and deviceDataschanged
- How Does an Application Server Obtain the IMEI of Devices
- Application Server Receives Data But an Error Is Displayed on the IoT Platform
- Push Messages May Fail to Be Sent to Application Servers
- How Does an Application Servers Obtain The Address Used by the IoT Platform to Push Messages
- Does the IoT Platform Supports Re-push
- How Does an Application Server Receive a Command Status Change Notification
- Application Servers That Have Subscribed to Confirmation Notifications and Command Response Notifications Fail to Receive Push Messages
- Does the IoT Platform Support Only HTTPS Callback Addresses
- Can the IoT Platform Push Data Reported by Different Devices Under the Same Application to Two Servers
- Can a Subscription Address Be a Domain Name
- Can a Callback Address Be Changed
- How Do I Obtain the Callback URL When Calling the Subscription API
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbotmore