IOT PROJECT FOR NODEMCU - flutter

how can i create simulation for the following devices Arduino IDE + NodeMCU ESP8266 + Firebase and android application, soil PH sensor | NodeMCU ESP8266 send & get Data from Firebase Database. the aim is to measure the soil PH as well as displaying favourables crops and type of fertilizer that can used via android app.

you can do that so so you can use cloudeFireStore as a database or RealtimeDB is there , you can use any one of them and you need to find it's end point of a collection refer this ; if you have get that you can call from your iot device and post your data in to firebase; also connect your flutter app with firbase refer this and and use some CRUD operation as you wish

Related

How do I send data using low bluetooth energy in flutter

I have a Project to send data from flutter to Arduino to do some tasks, I was working with HC -05 and 'serial Bluetooth communication library' but I found that isn't support Low energy Bluetooth, so I have to work with 'flutter_blue' and I can't find exactly how just send data like "1"
if someone has already work with something like that, help me and thanks
method to how can I send data with this library "Flutter blue"
'how can I send data with this library "Flutter blue"?'
There is an example there in flutter blue page (https://pub.dev/packages/flutter_blue) on how to get and send data to a BLE device.
await c.write([0x12, 0x34])
There are initial steps before the app can read and write data to the BLE device. Basically, the steps consists of scanning, connecting, and discovering services. After that, the app can start reading and writing data. Data are written(or read) to (or from) a 'characteristics'. The app can also subscribe to a characteristics so it can receive data from the notification. These are just a general guide for communicating with BLE devices. You must know the details from the documentation of the specific device.

How to data get Smartwatch

I have made some apps in flutter (pedometer, heart rate, audio recorder) for the moto360 with flutter wear. everything works fine, but I don't know how to save the data on the watch and how to access the data on the smartphone. I have managed to send messages to the watch, but I can't send data from the watch to the phone. I can save my data on the smartphone, but I don't know how to manage it on the smartwatch. can someone show me a tutorial or an example? thank you so much!
how to get smartwatch data, how to retrieve steps count and heart rate etc. from a smartwatch with communicating Bluetooth in flutter so I have received Bluetooth device id and Bluetooth UUID. how to data read and get permission to data show the flutter app

how to receive data from ESP32 to flutter app using bluetooth_serial

I am currently working on a project which is basically showing the Realtime readings from firebase database that are being uploaded by ESP32. I am plotting an ECG graph in the app and the delays are terrible( uploading values to firebase). I want to shift the app to Bluetooth and did some research and found Bluetooth Serial for flutter.. I can connect to a Bluetooth device but I don't know how to receive data from this device. any help would be appreciated. I have 0 knowledge of implementing Bluetooth as I am new to Flutter.
I am using this : https://pub.dev/packages/flutter_bluetooth_serial
currently I am using firebase Realtime Database for fetching values but the delays are huge due to internet delays. here are some screenshots:
whenever this ECG values changes in the firebase, the graph plots. I want to shift this graph to Bluetooth.

Flutter MiBand services

I'm trying to read data from Xiaomi MiBand 5 with Flutter app.
So far I've managed to connect to band and read heart rate.
I found which service and UUID is responsible for heart rate and now I'm trying to find which services are responsible for other values.
After discovering all services, it seems that there are 12 of them :
1800, 1801, 180a, 1530, 1811, 1802, 180d, fee0, fee1, 180f, 1812, 3802
180d is responsible for heart rate and I managed to read data from it.
But how can I read steps count?
The list of Bluetooth SIG adopted services are available at:
https://www.bluetooth.com/specifications/gatt/services/
I suspect some of those are custom services. The Bluetooth Base UUID is
0000xxxx-0000-1000-8000-00805F9B34FB
Examples include:
0x180F -> Battery Service UUID (128-bit UUID: 0000180F-0000-1000-8000-00805F9B34FB)
If the value doesn't follow the base UUID then it will be a custom service.
There are some generic scanning and exploration tools to explore the services being provided by devices.
On mobile phones, the nRF Connect app is a good choice:
https://www.nordicsemi.com/Software-and-tools/Development-Tools/nRF-Connect-for-mobile
On desktops machines, if you have a recent version of the Chrome browser then use the url chrome://bluetooth-internals/#devices to scan and inspect devices.

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