Faino is a platform for IoT devices, based on python and Django frameworks, Faino it’s an alternative for Thingsboard and Toya web servers and it provides some exciting features. with the Faino you can provide a platform for others to create accounts and register unlimited IoT devices and manage them. you can connect your IoT devices over WebSocket and control devices via HTTP API, by sending custom commands, letting them to checking the status of the devices in real-time, and update the devices online
- Description
- Features
- Requirements
- Installation
- Config
- Usage [ Unvaliable ]
- ToDo
- Connect devices over WebSocket
- Registering unlimited devices to the server
- Accessing devices with a powerful Restful-API
- Create Customize permissions for your users to access your devices
- Offers some permission like OWNER, ADMIN, MEMBER
- Provide permissions to other users to accessing to your devices
- Two-step authentication
- Possession transition of devices to other users
- Connect devices to the server with token authentication
- Save Custome commands as a button
- Grouping a some of related commands as a Control
- Send customize commands to devices over Websocket with HTTP API
- Create a queue of commands to send to devices
- Check the status of devices in real-time
- Update source code IoT devices over the server in real-time
- Providing a profile per user for each device
- Record activities of users and devices
the only thing you needs is to install the below softwares:
the first thing is editing some of the config files to complete the setup. edit the EMAIL CONFIG and SECRET_KEY from /config/django.dev.env
Tip: The place all development config is /config/ folder with pattern [config-name].dev.env
SECRET_KEY : We recommend generating a new secret key and filling it with that. how generate a secret key? the easiest way to generate is this website djecrety.ir. or following the official document of python to generate the new secret key.
EMAIL CONFIG: in this section, you should config your email settings this config is used for sending some emails like activation codes and verifying codes to users. for more information how to fill this section you can read this page
after complate the configs your should run this script in your terminal :
./install-service.dev.sh
this command build the images and run the containter.
Now you can access the platform with your localhost IP on the port 8000
The next step is creating a new superuser, but the default superuser is inactivated so you should active this with the API endpoint, basically, after creating a new user you must request to send a confirmation code to your email, then send the code you received to an endpoint to confirm and activate your account/user, but you can create a new active superuser so easily by this command without any confirmation email:
./django-manager.sh createactivesuperuser
there are some scripts available for convenience like :
django-manager.sh :
-
alternative for manage.py of Django but in the container, you can use it like normal manage.py
start-service.dev.sh :
-
Starting Faino development environment again, after changing some of the configs or when is stopping
stop-service.sh :
-
Stoping Faino Development Environment
For installing production mode, you must fill all the below config files:
SECRET_KEY : the easiest way to generate is this website djecrety.ir. or following the official document of python to generate the new secret key.
Tip: The place all production config is /config/ folder with pattern [service-name].prod.env
if you don't know how to fill config files you can go to the Configs section or you can use development configs as a reference.
after complate the configs your should run this script in your terminal :
$ ./install-service.prod.sh
this command build the images and run the containter.
Now you can access the platform with your localhost IP on the port 80
The next step is creating a new superuser, but the default superuser is inactivated so you should active this with the API endpoint, basically, after creating a new user you must request to send a confirmation code to your email, then send the code you received to an endpoint to confirm and activate your account/user, but you can create a new active superuser so easily by this command without any confirmation email:
./django-manager.sh createactivesuperuser
there are some scripts available for convenience like :
django-manager.sh :
-
alternative for manage.py of Django but in the container, you can use it like normal manage.py
start-service.prod.sh :
-
Starting Faino production environment again
stop-service.sh :
-
Stoping Faino Development Environment
the config files are used by the Faino and Docker services, there are some environment files and some python files to config how to work and customize the project with your needs
Config Name | Description | Required |
---|---|---|
REQUIREMENTS_FILE | The path of requirements.txt file | Yes |
DJANGO_SETTINGS_MODULE | The path of django settings see more | Yes |
SECRET_KEY | Secret key of django settings see more | Yes |
ALLOWED_HOSTS | List of allowed host in django see more | Yes |
DEBUG | Status of debuging see more | Yes |
APPEND_SLASH | Status of appending slash in the end url see more | No |
EMAIL_USE_TLS | Status of using tls for email service see more | No |
EMAIL_HOST | Email provider host see more | Yes |
EMAIL_PORT | Email port see more | Yes |
EMAIL_HOST_USER | Email address see more | Yes |
EMAIL_HOST_PASSWORD | Email password see more | Yes |
Config Name | Description | Required |
---|---|---|
DJANGO_IP | Django bind IP in the django service | Yes |
DJANGO_PORT | Django port bhind in the django service | Yes |
WORKERS_COUNT | Workers count of Gunicorn see more | Yes |
EXTRA_ARGS | Pass extra config to Gunicorn see more | No |
Config Name | Description | Required |
---|---|---|
POSTGRES_DB | Name of Postgres DB | Yes |
POSTGRES_USER | User of Postgres DB | Yes |
POSTGRES_PASSWORD | Password of Postgres DB | Yes |
Tip : Some of the Configs by default are available and you edit some of those.
Config Place : you can find here available configs: Config/[name config].[mod].env
- Create Dashboard
- Fixing tests of API
- Provide bash script to direct accessing to manage.py of Django in container
- Provide logs file of each service in the logs folder
- Create Development environment
- Create contribute guideline
- Document API app
- Document WebServer App
- Document AuthSystem App
- Document Quickstart
- Section Development
- Production Mode
- Development Mode