IBM BlueMix Node-RED not displaying the sensor values - ibm-cloud

My mobile android device was connected successfully to my dashboard and i can visualize all my sensors values on real time.
The problem is that these values cannot be displayed in Node-RED even though that i have followed all the instructions provided on this guide.
Why these values cannot be displayed?
P.S: Debugging button is enabled.

Select 'All' for Device Id and type 'accel' into the Event text field. You input node is showing connected.

Related

Continuous update UI from Service

I'd be very grateful if somebody can help me. (I'm absolute beginer with Android).
There's a lot of code in the web, but I couldn't find anything suitable for my application.
I've an installation with some sensors connected to Arduino. All input data are collected in a String, and this String is sent via Bluetooth to an Android device every 1~2 seconds (depending on data availability from sensors). Is to be used for hours.
I made an App that receives the data (via Bluetooth) and shows all data in real time update in one layout, with the Bluetooth code in the MainActivity. Works well.
What I need is an App with three different Activities, all using the same String data from Bluetooth, and real time updated.
My question is how to build the App:
-Bluetooth running in a Service, and Activities connected to it?
-Which is a good way for real time update in any of the three Activities?
A similar example could be a weather station, an Android device receiving data via Bluetooth, showing the same weather data in three different layouts, with continous update.
Thanks in advance

IFTTT ASUS Trigger, Device Connected dropdown list shows only 1 device and duplicated in the entire list

I have linked my IFTTT service ASUS successfully to my ASUS RT-AC88U which is on AIMESH mode with a RT-AC66U as a node.
However when I want to create a trigger using the ASUS IFTTT when a specific devices connects to my router, it only shows a single devices instead of all the available devices that are currently connected to the router. (before I reset the router it was way worst as it didn't even show a single connected device)
I turned off the AIMESH node too but still same result.
I have tried restoring the router to factory settings, but to no avail.
Anyone has any idea how to resolve this?
by the way, If I choose that only devices displayed in the drop down list, the IFTTT works and sends me a notification.
Screenshot of the drop down list

How to configure libnfc to use a specific device?

I have a Raspberry PI with two NFC readers attached. Problem is that the readers get different device numbers each time the system reboots or a reader is detached and attached again.
I therefore created udev rules that create a fixed device name depending on the physical port a device is attached to. E.g. plug in NFC reader in the upper left port leads always to /dev/nfc_a and plugged into the upper right port leads always to /dev/nfc_b.
How can I now configure libnfc to use these devices and report the device names such as /dev/nfc_a as a part of the reading? I am using Node-RED with node-red-contrib-nfc (https://github.com/hardillb/node-red-contrib-nfc) on top of libnfc. My ultimate goal is to safely distinguish the two readers within my Node-RED flow to act differently upon the readings.
I already found the "connstring" configuration but I don't know how to correctly set it for using /dev/nfc_a.
It's been a LONG time since I wrote this node, but looking back at the nodejs library it's based on (nfc) the output message should contain a field called deviceID which should indicate which NFC reader triggered the input.
When I run on my machine I get:
deviceID: 'pn53x_usb:001:005'
Where 001 is the USB bus id and 005 is the device ID, which matches up with the output from lsusb. These should stay static as long as the readers are always plugged into the same USB sockets.

IBM Watson IoT platform : historical data is empty

I try to do the POC on IBM Watson IoT platform. I have followed the document in this link for creating the device simulator.
https://console.ng.bluemix.net/docs/services/IoT/nodereddevice_sample.html#devices
It can connect and send the MQTT message event to IoT platform but when I try to get the historical data from REST API, it always returns empty.
https://os9c6l.internetofthings.ibmcloud.com/api/v0002/historian
Not sure what when wrong.
Go to the IoT Watson IoT Platform dashboard connected to your BlueMix app, go to settings and there is a setting for Time Series DB which defaults to Off. When you turn it on you also get to choose the storage duration.
if the Time Series DB was off and the device was added, you might not be able to see it even if you set the historian on on. Try and re-add the device.

Registering Raspberry Pi with IBM Bluemix

I registered my Raspberry Pi with IBM Bluemix successfully . It has dht22 temp and humidity sensor connected to it and running.
Question: While building Internet of things starter app , do i need to code anything on Rpi to push that sensor data into Bluemix or simply providing the MAC address and the API will do the trick?
Note: I followed a recipe to configure my Raspberry Pi , registered with the MAC address. It is connected and sending messages when i check in the device.
Kindly let me know if i need to do any other configuration or coding to send specifically my dht22 sensor data to visualize in Bluemix and use it in Node-red.
By default Raspberry Pi recipe sends only the CPU temperature and CPU load. As there are no sensors present in Raspberry Pi by default, the recipe uses parameters like CPUTemp and CPULoad.
In your case, you will need to update the code to include dht22 temp and humidity parameters to be sent to IoTF(Bluemix). Please check the code in Github for the raspberry Pi recipe - https://github.com/ibm-messaging/iot-raspberrypi
Navigate to samples/c for the recipe code. You will have to gather the dht22 sensor data and convert them to JSON and send it to IoTF.
In the iot.h, update the json struct to include your sensor values. You can remove the cputtemp and cpuload parameters if you dont need them.
In iotmain.c, line 152 update the code with the code to gather the dht22 sensor values.
In jsonator.c, update the new sensor values based on your new struct.
Then follow the steps provided here to compile the code and install the new deb file. Now the iot service will send data with dht22 sensor values.
If the Bluemix IOT console is showing the that the device is connected and sending data then you should not need to do anything more on the Raspberry Pi.
You will need to bind the IOT service to your Node-RED instance (assuming you are running Node-RED on Bluemix) to access the data.
I believe the recipe you used was this one: https://developer.ibm.com/iot/recipes/raspberry-pi/
Per the readme in the source code, the events that are emitted in this sample are:
CPU temperature
CPU Load
Simulated Sine wave to demonstrate the different events can be pushed to IoT Portal and visualized.
If you are trying to capture other items such as humidity you may need to create additional code/logic.
I have an ansible role to register raspberrypi, fyr
https://github.com/reachlin/fangge/tree/master/ansible/roles/iot
You have to replace your credentials in file defaults/main.yml
ORG:xxx
TYPE:xxx
ID:xxx
AUTH:token
TOKEN:xxx