Skip to content

Commit

Permalink
Bluetooth config (#5)
Browse files Browse the repository at this point in the history
* Display BLE device, service & char info

* Bluetooth LE Connection control

- Removed hard coding of specific devices
- Added device lookup from local db to connect to devices
- removed python script that is no longer used

* Make BLE Support more dynamic
- Char lookups
- Auto connect
- read / write / toggle based on more general endpoint

* Fixed the async/await for read to enable toggle
- removed unused python scripts
- updated eslint for windows development linebreak
- added airbnb linter
- Fixed some but not all linting issues

* Sidetracked to outlet control & rename

* Finish rename

* Commit WIP for laptop access

* Finish outlet add / delete and update of table

* rename

* update dependencies

* Refactor modules and Added temperature detail page

* not sure but save point

* updating dependencies

* Dependency Update and stop pop

* Package
  • Loading branch information
mstelz authored Mar 22, 2019
1 parent 55f9418 commit b5da348
Show file tree
Hide file tree
Showing 68 changed files with 165,389 additions and 7,425 deletions.
2 changes: 2 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{
}
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Contributing to opex
We are excited that you are enthusiastic and want to contribute to Opex. Please familiarize yourself with the information below to help you get started with your first contribution.
# Contributing to ocra
We are excited that you are enthusiastic and want to contribute to Orca. Please familiarize yourself with the information below to help you get started with your first contribution.

## Contribution Process
1. Fork Opex
1. Fork Orca
2. Complete and commit changes to a git branch on your fork
3. Create a Pull Request outlining your changes
4. Discuss if necessary on the 'Conversation' Tab of your PR while your code is being reviewed
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Opex
# Orca

Opex is an opensource aquarium controller that uses affordable and easily accessible components such as the raspberry-pi, arduino, and other components frequently found on adafruit. The objective of this project is to create a modular, affordable, DIY aquarium controller to monitor, automate, and simplify maintanence of your aquarium similar to the level of other consumer level controllers. The project consists of a two part system: a cloud/web based monitoring, controller, and backup, as well as an all-in-one physical controller to run and manage your tank(s) when offline.
Orca is an opensource aquarium controller that uses affordable and easily accessible components such as the raspberry-pi, arduino, and other components frequently found on adafruit. The objective of this project is to create a modular, affordable, DIY aquarium controller to monitor, automate, and simplify maintanence of your aquarium similar to the level of other consumer level controllers. The project consists of a two part system: a cloud/web based monitoring, controller, and backup, as well as an all-in-one physical controller to run and manage your tank(s) when offline.

## Features (Current and Upcoming)
- Multiple Tank Support
Expand All @@ -17,4 +17,4 @@ Opex is an opensource aquarium controller that uses affordable and easily access

## [Controller Information](/controller/README.md)

## [Website Information](/website/README.md)
## [Website Information](/website/README.md) (On hold until controller is further along)
21 changes: 21 additions & 0 deletions controller/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,27 @@ This README is to explain how to put together the physical components of the con

----

### Install and Enable BlueZ (BLE Support)
1. `cd ~`
2. `wget http://www.kernel.org/pub/linux/bluetooth/bluez-5.50.tar.xz`
3. `tar xvf bluez-5.50.tar.xz`
4. `cd bluez-5.50`
5. `sudo apt-get update`
6. `sudo apt-get install -y libusb-dev libdbus-1-dev libglib2.0-dev libudev-dev libical-dev libreadline-dev`
7. `./configure`
8. `make`
9. `sudo make install`
10. `sudo systemctl start bluetooth`
11. `systemctl status bluetooth` Should see Active status
12. `sudo systemctl enable bluetooth`
13. Reboot the pi
14. `sudo nano /lib/systemd/system/bluetooth.service`
- Add ` --experimental` to the end of `ExecStart` line
15. `sudo systemctl daemon-reload`
16. `sudo systemctl restart bluetooth`

----

### Global Part List (Needed for all)
* [Raspberry-Pi Model 3B](https://www.amazon.com/gp/product/B01LPLPBS8/)
* [Arduino Uno R3](https://www.amazon.com/gp/product/B01EWOE0UU/)
Expand Down
122 changes: 0 additions & 122 deletions controller/raspberry-pi/piMonitor.py

This file was deleted.

11 changes: 9 additions & 2 deletions controller/server/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
{
"parser": "babel-eslint",
"extends": ["airbnb"],
"extends": ["airbnb", "prettier", "prettier/react"],
"plugins": ["prettier"],
"env": {
"browser": true,
"node": true
},
"rules": {
"no-console": "off",
"comma-dangle": "off",
"react/jsx-filename-extension": "off"
"react/jsx-filename-extension": [
1,
{
"extensions": [".js", ".jsx"]
}
],
"linebreak-style": 0
}
}
6 changes: 6 additions & 0 deletions controller/server/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"singleQuote": true,
"trailingComma": "es5",
"tabWidth": 2,
"useTabs": false
}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
SELECT
devices.device_uuid,
devices.name,
service_uuid,
services.name as service_name,
group_concat(chars.char_uuid) AS characteristics
FROM bt_devices AS devices
INNER JOIN bt_services AS services
ON devices.device_uuid = services.device_uuid
INNER JOIN bt_service_chars AS chars
ON services.service_uuid = chars.service_uuid
GROUP BY devices.device_uuid, services.service_uuid
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
SELECT
devices.device_uuid,
devices.name,
service_uuid,
services.name as service_name,
group_concat(chars.char_uuid) AS characteristics,
group_concat(chars.name) AS char_name
FROM bt_devices AS devices
INNER JOIN bt_services AS services
ON devices.device_uuid = services.device_uuid
INNER JOIN bt_service_chars AS chars
ON services.service_uuid = chars.service_uuid
WHERE devices.device_uuid = 'EF:04:6F:54:36:A9'
GROUP BY devices.device_uuid, services.service_uuid
Loading

0 comments on commit b5da348

Please sign in to comment.