translation_to_dart
Translated from Python to Dart. Source can be seen [here] (https://github.com/btwq97/ee4002d-fyp).
Installing dependencies
- Install AWS DynamoDB SDK (ver 1.0.0)
flutter pub add aws_dynamodb_api
- Install Dart Decimal package (ver 2.1.0)
flutter pub add decimal
- Install flutter_blue package (ver 0.8.0). May need adminstration rights.
flutter pub add flutter_blue
- Install mqtt_client package (ver 9.6.3)
flutter pub add mqtt_client
- Install flutter_dotenv (ver 5.0.2)
flutter pub add flutter_dotenv
Other required dependencies
-
DynamoDB
Requirements
- Have JRE installed.
- Download DynamoDB locally here.
- Unzip the files.
To run Database
- Run db instance locally.
java -D"java.library.path=./DynamoDBLocal_lib" -jar DynamoDBLocal.jar -sharedDb
To test for connection
- Run command
aws dynamodb list-tables --endpoint-url http://localhost:8000
Learning
- Read more here.
-
Mosquitto
Installation guide
- Tested on Ubuntu 20.04.
- Read more here.
To boot up Mosquitto
- Run
mosquitto
- To see published messages
mosquitto_sub -h localhost -t "<insert topic>" -u "<insert username>" -P "<insert password>"
Testing
- Run Flutter App.
flutter run