Giter Site home page Giter Site logo

cybear-jinni / cbj_app Goto Github PK

View Code? Open in Web Editor NEW
115.0 115.0 143.0 264.49 MB

๐Ÿ“ฑ CyBear Jinni App is the app to control CyBear Jinni Hub ๐Ÿ’ก remotely from your Android, IOS and Web Browser. If you have ever wondered "Is there an open-source project to make my own smart home?", This is part of one.

Home Page: https://cybearjinni.com

License: GNU Affero General Public License v3.0

Kotlin 0.03% Swift 0.29% Objective-C 0.01% Dart 89.55% HTML 0.66% Ruby 1.00% CMake 3.36% C++ 4.81% C 0.30%
dart flutter hacktoberfest hacktoberfest-2020 hacktoberfest-2021 hacktoberfest-2023 hacktoberfest2020 hacktoberfest2021 hacktoberfest2023 phone smart-home smarthome

cbj_app's Introduction

Hello and welcome to CyBear Jinni ๐Ÿฆพ๐Ÿป๐Ÿงžโ€โ™‚๏ธ

Our goal here is to raise the quality of life for everyone and make the world a better place to live in.

We are starting this by making Smart-Home ๐Ÿก more affordable and accessible for the common person.

Our code is open source so that even you can have control of your Smart-Home, and by that we give the people the power to control their technological future๐Ÿ”ฎ๐ŸŒŒ.

cbj_app's People

Contributors

3t8 avatar adeeteya avatar akhil-blanc avatar algyjr avatar andoriyaprashant avatar arunkarthicknm avatar avielco avatar bikramjit21 avatar brandon-t84 avatar chena-1 avatar duythien0912 avatar eilaydev avatar guyluz11 avatar idanre avatar khuirul-huda avatar mahich123 avatar mohfirdaus avatar nabeel001 avatar ojninja16 avatar sagarchoudhary96 avatar sahilbal avatar sankethbk avatar skohan avatar spoctone avatar superiorsd10 avatar talib1996 avatar tamir198 avatar thehappybaloney avatar thilinatch avatar utkarshdeoli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

cbj_app's Issues

Adding Firebase support for IOS (Xcode is needed)

We are going to start supporting IOS for our Flutter app ๐Ÿฅณ.

I never ran the app on IOS so I would love to see screenshots how does it look.

You will need to use Xcode in order to import the GoogleService-Info.plist file for Firebase configuration.

Please add Firebase support for IOS and make sure that it is working.

Adding translations

Hi

Do you want to help open source project?, or perhaps you're looking for easy pull request!.

If you know how to write this is your chance, lets get down to it.

First locate your language in this page.
Now remember the Language (two letter) - Region (two capital letter) of your region.

In this folder you will see files with the names of the Language-Region, if yours does not exist please create a new file for it.

Even if the language already exist but your region is not it is ok to open pull request, for example:
en-GB
it will be accepted because it is not en-US which already exists.

So how do you do it:

Language file does not exist

  1. In this folder copy the en-US.json (as it is our base to translate) change the name of the copy to your Language-Region.

  2. Change the right side of the text to your language, you should keep the {} in the same place inside the word as it is place holder.

  3. Open the pull request to the dev branch.

Language file exists

  1. Copy all missing translations from en-US.json into your existing Language file that we located earlier.

  2. Change the right side of the text to your language, you should keep the {} in the same place inside the word as it is a placeholder.

  3. Open the pull request to the dev branch.

If you have any questions you can ask me in the Discord server

Adding local storage

Currently we have static dart file called cloud_interface_data.dart that stores all the devices in the home.

When adding new device from the application menu it disappear after restart of the application.
We need to add local storage that will save all the devices after the application is closed.

The local storage will be used for (you only need to implement the first one):

  • Keeping a list of all the SmartRoomObject (that contain inside rooms and smart devices in each room).
  • This data will be updated from and to the Cloud fire store.
  • This data will be updated through WiFi and from WiFi (devices will share configuration with each other).
  • Support multiple platforms is a plus (phones browser desktop).
  • In the future a lot more like pictures and application settings preference.

Choosing local storage/database package is a big part in this project so lets discuss this before starting the work, this way we will do the best choice for this project.

You can contact me on the discord channel

I can add blank password made of tabs

Both in the login page and in the create a new user there is a requirement that the password and the email should not contain any spaces:

image

This works fine if I try to enter spaces, but I can enter a password and email that only contains tabs.
In this case, the app will act just as everything is normal and there was not a single space entered from the user.

Fix Flutter action in the project

Currently the Flutter action is not working.

This is the file of the implementation of it in the project.

Line on crash:

 tar (child): xz: Cannot exec: No such file or directory
tar (child): Error is not recoverable: exiting now
/usr/bin/tar: Child returned status 2
/usr/bin/tar: Error is not recoverable: exiting now
Error: The process '/usr/bin/tar' failed with exit code 2

As this is my first time working with GitHub Flutter Action I may have basic thing that I missing in the process.

Change readme logo url

Current logo in readme have space in the top of the image.

I have created new one without that, pleas update the readme to the new one and update the height to 400


CyBear Jinni image

[<div align="center">
<img alt="CyBear Jinni image" height="400" src="https://user-images.githubusercontent.com/9304740/95004821-f8417600-05f8-11eb-95bb-60a7863364e0.png">](https://github.com/CyBear-Jinni/CBJ_Smart-Home)
</div>

version solving failed

I was trying to run the project and got this error:

Running "flutter pub get" in CBJ_App...
Because no versions of firebase_auth match >0.18.4+1 <0.19.0 and firebase_auth 0.18.4+1 depends on firebase_auth_web ^0.3.2+3, firebase_auth ^0.18.4+1 requires firebase_auth_web ^0.3.2+3.
And because firebase_auth_web >=0.3.0-dev.1 depends on intl ^0.16.1, firebase_auth ^0.18.4+1 requires intl ^0.16.1.
And because easy_localization >=2.1.0+1 depends on flutter_localizations any from sdk which depends on intl 0.17.0-nullsafety.2, firebase_auth ^0.18.4+1 is incompatible with easy_localization >=2.1.0+1.
So, because cybear_jinni depends on both easy_localization ^2.3.3 and firebase_auth ^0.18.4+1, version solving failed.
pub get failed (1; So, because cybear_jinni depends on both easy_localization ^2.3.3 and firebase_auth ^0.18.4+1, version solving failed.)

I wanted to ask if it's ok for me to change pubspec.yaml file according to the error log?

If yes - Do you want to me change the libraries version to a specific one?
If no- what should I do to handle the error?

broken links on Instructions for developers

On the wiki page of this repo inside instructions for developers there is this text :

image

But the "flutter project" link is broken and leads to a 404 page:

image

You may want to show a link to your flutter project:

flutter project


Another broken link can be found here:

image

I think that you wanted to show this link:

constant_credentials.dart


There is also this link:

image

I think that this was not intended to be a link, maybe you can consider it to be wrapped in a code block like this:

.../android/app/

Or even simply bold the text .../android/app/

If this was meant to be a link please use this link instead:

.../android/app/

Getting Firebase data from the file google-services.json file into the app

While setting up the app developers need to insert fireBaseProjectId and fireBaseApiKey manually from
google-services.json file to constant_credentials.dart file.

This is needed in order to too transfer it to the CyBear Jinni Smart Device so that the device will be able to connect to the cloud Firebase as well.

Please make the app add programmatically project_id and current_key from the google-services.json file into the file constant_credentials.dart.

Logo in readme need some editing

We have logo of CyBear Jinni in the readme.
CyBear Jinni have the following repository's Smart Device, App, Smart Home so we need some change to the logo to distinguish between them.

For the App I suggest to put the logo inside a phone

This is a mock that I created, you can use it or be creative and do better one and take it to whole new place.

Lights toggle switch should update live from Firebase

Currently the toggle switches are getting updated from the cloud, only when the page is being loaded.

Since there are more than one people in the same home we need to let know the person who is watching the toggles that someone else change one of the toggles state while he is looking at the page.

Toggle switch is in this page.

Do not get confused, the toggle can get updated both from the cloud and straight from the Smart Device and we are talking here only about the cloud.
This is depending if the App is currently connected to the Smart Device LAN network.
If the phone is connected to the home WiFi it will be straight to the device, for everything else it will be through the cloud.
This logic can be found here at line 40.

Please add listener to the app so that when the cloud being updated it can trigger updated to the toggle switches state.

Create a hotspot page

We need a page that will open hotspot with the name and password that we give it.

This is needed in order make the Security-Bear connect to the app for further configurations.

If opening hotspot from the app is not an option it should open the hotspot setting page in the device so that the user will manually insert the hotspot name and password that we will give him.

Android example

If you anything is not clear you can reach me in the CyBear Jinni Discord server

Markdown License badges change in readme

Found out that we put the wrong badge for the license in the readme.
Please update the license badge to the new one.

License: AGPL v3
[![License: AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)

creating new user with already existing email

If I will go to create a new user and enter an already existing email (like below) pressing the create a new account will do nothing :

image

I think that if that email is already in use, maybe it is a good thing to notify the user with a "Email Already in use" message or something similar.

Otherwise, it may seem to the user like the create a new account button is just not working.

The getter 'length' was called on null - lamp setting page

On the lamp setting page I am getting an error after clicking the plus button :

Visualization

image

The error

======== Exception caught by widgets library =======================================================
The following NoSuchMethodError was thrown building FutureBuilder<String>(dirty, state: _FutureBuilderState<String>#99b95):
The getter 'length' was called on null.
Receiver: null
Tried calling: length

The relevant error-causing widget was: 
  FutureBuilder<String> file:///G:/TAMIR/Desktop/cybear_jhini/CBJ_App/lib/features/shared_widgets/add_new_devie_widget.dart:27:7
When the exception was thrown, this was the stack: 
#0      Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5)
#1      new _AddNewDeviceWidgetPopup.<anonymous closure> (package:CyBearJinni/features/shared_widgets/add_new_devie_widget.dart:34:60)
#2      _FutureBuilderState.build (package:flutter/src/widgets/async.dart:753:55)
#3      StatefulElement.build (package:flutter/src/widgets/framework.dart:4792:27)
#4      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4675:15)
...
====================================================================================================

App registration suggestion

When a new user is creating his account for the app, the very next thing that he will see is the empty login page.

Suggestion:

When you redirect the user to the login page (after creating a new account) you can show him his email on the login page.
This will prevent your user from writing the same email again, it may not take a long time but it is affecting the user experience.

Easy way for the app to connect new smart devices to the WiFi

Easy way for the app to connect new smart devices to the WiFi.

We need the app a way to open a hotpot with name and password that we will control.
After hotspot will be opened we will make the device app be a server that will wait for Security Bear to send the device IP.
After that we will call the Smart Device to get all the virtual devices names and types that inside it with the IP that Security Bear Gave us to.

From that list we can update the Smart Device with new name, room for the virtual devices, and update the Security bear with the new WiFi credentials.

CyBear-Jinni/cbj_smart-home#117

"Create your home" button does not add new collection for the home in cloude Firestore

When the user creates new home and login into account a new collection of the smart home should be created in cloud Firestore.

The collections of the home should be as following (Gen is auto generated name).

Actions (data that control or set functionality):

SmartHomes/HomeNameGen/Actions/Devices

SmartHomes/HomeNameGen/Actions/Links

SmartHomes/HomeNameGen/Actions/Routines

SmartHomes/HomeNameGen/Actions/Scenes

Information (data that most of the time we set once and will not be synchronized often):

SmartHomes/HomeNameGen/Information/DevicesInRooms


SmartHomes/HomeNameGen/Information/DevicesNames


SmartHomes/HomeNameGen/Information/DevicesWiFiName


SmartHomes/HomeNameGen/Information/LinksNames


SmartHomes/HomeNameGen/Information/RoomsNames


SmartHomes/HomeNameGen/Information/ScenesInTheRooms


SmartHomes/HomeNameGen/Information/ScenesNames

Users (all the users of the app and information about them:

SmartHomes/HomeNameGen/Users/UserNameGen


UsersAllowedToJoin (if admin tries to add user that does not have account yet like by email, the user will be placed here until he creates account and join the existing home) :

SmartHomes/HomeNameGen/UsersAllowedToJoin



The following fields will be fill in the creation of the home:
SmartHomes/HomeNameGen/Users/UserNameGen -> will have the admin user stored and his information.

Add the Actions History page

Currently Actions History is empty.

The actions history are the same (for now) history that we called and received from Firebase.

In the future it will include all the history from the Smart Devices but not for today.

Lets fill the Actions History with the actions that we did and received from the app while it running.

This is the history_tab.dart that you see in the picture.

For example:

We toggled a light in the application so it will show in theActions History.
We get update of the state of the blinded from cloud Firebase, it will show in the Actions History.

All of it is passes through the Firebase sending and receiving actions.

If you can make it remember the last history after closing the app that could be great but it is not a must at this time.

We will start with it slow and slowly will add functionality for it.

Adding badges to readme

Please make the readme top part same as this readme.

Don't forget to change the title to CyBear Jinni App and the link to the dart cli badge to this project action.

Readme file small fixes

Please add alt="CyBear Jinni image" to the CyBear Jinni image in the readme

Like this

CyBear Jinni image

[<div align="center"><img alt="CyBear Jinni image" height="300" src="https://user-images.githubusercontent.com/9304740/94843279-24a49900-0425-11eb-83f3-87e8ba40b1dc.png">](https://github.com/CyBear-Jinni/CBJ_Smart-Home)
</div>

And move the badges to be above it.

No feedback while signing in

Could you please add some indication when the user is pressing the "log-in in" button?

Right now, when the user presses it, it seems like the app is not responding, it could be nice as a user if I could know that something is happening in the background (user validation, etc...)

Add functionality to scene buttons

Scene is like preset, one button that does a lot of actions together.

Currently the button does not have any logic.

Please add the logic to execute number of task and give one example where you implement this like turning on a Lights, and another one that turn off the Lights.

This is the scenes_widgets.dart

They should be very flexible as they will trigger a lot of different types of devices.

Scenes page should be using bloc and DDD

Currently the Scenes tab (in the home page) isn't built using the bloc and DDD architecture.

As we decided to move to both of them and use dependency injection with getIt the Scenes tab should move too.

Moving scenes to folders of rooms in the home will be welcome too but not required.

Add login with Firebase to the flutter app

We are currently have a non working login page located here.

Pressing the "Log In" button just passing the user to the next page without any validation that the credentials exist in the Firebase users database.

We need to

  • Add request to Firebase to check if user exist.
  • Login automatically if the user have logged in before.

Make sure that the screens will look the same on every device

I want to help with this project and make sure that all the screens will look the same on all devices.

Basically, I want to replace all the fixed size values in the project (for example radius: 48.0) with something more dynamic.
The current fixed size for the widgets and spaces between them may look good on one device but it may not look so good on another device because different phones got different screen sizes.

How do I want to do it

In order to determine the screen dimensions, I want to use the MediaQuery class https://stackoverflow.com/questions/49553402/flutter-screen-size.

final Size screenSize = MediaQuery.of(context).size;

A problem

I need to get access to context, this is fine in Stateful Widgets when I have the state object, but when I am having a Stateless Widget I can not access cotext.

For more info check flutter/flutter#23400

Solution

I can either pass context as an argument via the class constructor or I can convert the class to Stateful Widget.
I think that the better approach will be to pass it via constructor argument, because if some screen data will not change there is no point in using a Stateful Widget.


What approach would you like me to take?
If there is a better one I am willing to take it.

Create 'Create new account' page

Currently the login page is missing a way to create new account.

Please add new text button "Create new account" above the 'Forgot password?' button.

The new text should send you to new page that will show the user registration screen.

In the registration screen the following fields are required: Email, Password.

For now the actual registration logic is not required to be created.

Add a page to show all devices in the room

In the Lamps tab if the user press the name of the room (the read arrow point to it)

the user moved to the room page.

In that screen we need to show all the devices that belong to that room, and have the functionality to turn them on and off.

It is not shown in the Lamps tab because the Lamps tab designed to show only 1-4 most used devices from each room for easy access.

App icon need to be changed

As we just got nice new icon from our create fan art issue we are going to update it everywhere in the app.

All the images of the owl (logo.png) in the app should be updated to the new logo.

That's include the icon of the app, the image in the splash screen, the image in the login page.

If more places exist please change it as well

Please change the name of the file from logo to cbj_logo .

Here is an image of the logo that I removed the background.
You will probably need to change the dimensions of the image to the right ones.

New "Forgot password" page is required

In the login page we have "Forgot password?" text that does not do anything.

When the user pressing the text he need to move to different page and insert his details to reset his password using the FireBase api .

For now pleas do it without functionality as we don't want it to collide with #5 and have duplicated code to control FireBase.

  • Add forgot password page to the app.
  • Add functionality to it using FireBase api.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.