简体   繁体   中英

How can I see the gateway connected individual device data in the IBM-watson-IoT dashboard?

How can I see the gateway connected individual device data in the IBM-watson-IoT dashboard ? Is there any specific way see that? Right now I am sending data as:

//publishing device events with deviceType 'Raspi' and deviceId 'pi01' using the default quality of service
gatewayClient.publishDeviceEvent("Raspi","pi01", "status","json",'{"d" : { "cpu" : 60, "mem" : 50 }}');
console.log('event published');

But I am not able to see this data stream anywhere in the IBM-watson-IoT dashboard. It's showing the event as received but no data stream of device "pi01".

When data is sent as:

gatewayClient.publishGatewayEvent("status","json",'{"d" : { "cpu" : 40, "mem" : 50 }}');

this means as gateway. It shows "received data" when I am creating the card. But I dont want this, I have a different device connected with the gateway, so I want the new device data in a different data stream.

Please let me know if I am doing it right, and if yes then where can I see all that data.

The only way to do this in the Dashboard is in a Card. No other way in the Dashboard (though there are other ways outside of the dashboard). Your code looks fine. If you select your device in a Device centric card you can see the stream of values for just that gw-device in the properties or make graphs etc if they would help. It is its own stream of data; should not be mixed up with any other device even if they share the same gateway. Here is one gateway sending data for 2 devices using:

gatewayClient.publishDeviceEvent('SenseHat','sen-pi-xxx-gw' ,'event', 'json', '{"sugar":5, "salt":2}', 1);
gatewayClient.publishDeviceEvent('SenseHat','xx-gw-device' ,'event', 'json', '{"sugar":9, "salt":12}', 1);

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM