Initial commit

This commit is contained in:
Sasa Karanovic
2024-07-13 22:52:18 -04:00
commit f0de487448
11 changed files with 34138 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
github: [SasaKaranovic]
+27
View File
@@ -0,0 +1,27 @@
name: 'Close stale issues and PRs'
on:
schedule:
- cron: '30 1 * * *'
permissions:
contents: write
issues: write
pull-requests: write
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9
with:
exempt-assignees: SasaKaranovic
exempt-issue-labels: bug,question,never-stale
exempt-pr-labels: WIP,need-help,never-stale
stale-issue-message: 'This issue is stale because it has been open 15 days with no activity. Remove stale label or comment or this will be closed in 3 days.'
stale-pr-message: 'This PR is stale because it has been open 20 days with no activity. Remove stale label or comment or this will be closed in 10 days.'
close-issue-message: 'This issue was closed because it has been stalled for 5 days with no activity.'
close-pr-message: 'This PR was closed because it has been stalled for 10 days with no activity.'
days-before-issue-stale: 15
days-before-pr-stale: 20
days-before-issue-close: 5
days-before-pr-close: 10
+234
View File
@@ -0,0 +1,234 @@
### Altium ###
# Previews Folders
**/__Previews/
# History Folders
**/History/*
# Project Logs
Project\ Logs*/
# Project Outputs
Project\ Outputs*/
# Auto-conversion notices
*.PcbDoc.htm
# Access lock file for dbLib sources
**/*.ldb
# Jlink
*.jdebug.user
### C ###
# Build folder
**/build/*
# Prerequisites
*.d
# Object files
*.o
*.ko
*.obj
*.elf
# Linker output
*.ilk
*.map
*.exp
# Precompiled Headers
*.gch
*.pch
# Libraries
*.lib
*.a
*.la
*.lo
# Shared objects (inc. Windows DLLs)
*.dll
*.so
*.so.*
*.dylib
# Executables
*.exe
*.out
*.app
*.i*86
*.x86_64
*.hex
# Debug files
*.dSYM/
*.su
*.idb
*.pdb
# Kernel Module Compile Results
*.mod*
*.cmd
.tmp_versions/
modules.order
Module.symvers
Mkfile.old
dkms.conf
### Python ###
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
.pybuilder/
target/
# Jupyter Notebook
.ipynb_checkpoints
# IPython
profile_default/
ipython_config.py
# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock
# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/
# Celery stuff
celerybeat-schedule
celerybeat.pid
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
# pytype static type analyzer
.pytype/
# Cython debug symbols
cython_debug/
# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
*.pid.lock
upload/*
+5
View File
@@ -0,0 +1,5 @@
# Gitignore settings for ESPHome
# This is an example and may include too much for your use-case.
# You can modify this file to suit your needs.
/.esphome/
/secrets.yaml
+75
View File
@@ -0,0 +1,75 @@
# Change below substitutions if you want to edit
# device host-name and sensor names
substitutions:
hostname: livingroom
sensorname: Living room
wifiname: replace-with-your-wifi-name
wifipass: replace-with-wifi-password
otapass: replace-with-ota-password
encryptionkey: "l4DWPnRDq6JBgvlYzFpUAmFZovolbnicD3hi/+X8ohc=" # <-- Please change this (https://esphome.io/components/api.html)
# -- You normally should not have to change any of the parameters below.
# -- But it can be fun to play around with them if you understand what they mean! :)
# -- The documentation can be fount at https://esphome.io/
esphome:
name: opensense-$hostname
platform: esp32
board: esp32-c3-devkitm-1
platformio_options:
board_build.f_cpu: 80000000L
wifi:
use_address: opensense-$hostname.local
ssid: "$wifiname" # <
password: "$wifipass"
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "OpenSENSE ${hostname} WiFi"
captive_portal:
ota:
password: "$otapass"
# Enable Home Assistant API
api:
encryption:
key: "$encryptionkey"
on_client_connected:
- delay: 100ms
- component.update: bme280_sensor
- component.update: ltr390_sensor
- delay: 1s # Immediately after sending new values, wait 1s and go to sleep
- deep_sleep.enter:
sleep_duration: 1min # Leave the board in sleep mode for longer periods of time to prevent heat build up.
# If ESP32 is constantly on, it will generate heat that over time can affect temperature reading
i2c:
sda: 7 # Do not change this or sensors will fail to work
scl: 4 # Do not change this or sensors will fail to work
# scan: true
scan: false
id: bus_a
sensor:
- platform: bme280
id: bme280_sensor
temperature:
name: "$sensorname Temperature"
oversampling: 16x
pressure:
name: "$sensorname Pressure"
humidity:
name: "$sensorname Humidity"
address: 0x77
- platform: ltr390
id: ltr390_sensor
uv:
name: "$sensorname UV Index"
light:
name: "$sensorname Light"
deep_sleep:
id: deep_sleep_1
+4930
View File
File diff suppressed because it is too large Load Diff
+28786
View File
File diff suppressed because it is too large Load Diff
Binary file not shown.
+80
View File
@@ -0,0 +1,80 @@
# OpenSENSE - Smart Home Ambient Sensor
![OpenSENSE - Smart Home Ambient Sensor](assets/sensor.png "OpenSENSE - Smart Home Ambient Sensor")
![OpenSENSE - Smart Home Ambient Sensor](assets/ha_dashboard.png "OpenSENSE - Smart Home Ambient Sensor")
## What is this project about?
OpenSENSE is a DIY wireless ambient sensor for smart home and home automation applications.
Easily measure room temperature, humidity, pressure, ambient light and UV index.
The sensor is USB-C powered, \`really tiny\` and light-weight so you can easily mount it almost anywhere.
### Sensor Measurements
- Ambient Temperature
- Relative Humidity
- Barometric pressure
- Ambient Light
- UV Index
### Features
- Small form-factor (measures 40x20mm / 1.58"x0.79")
- USB-C connector for power
- Wireless sensor (WiFi)
- Low-power consumption
- Re-configurable over USB
- Works with HomeAssistant
- Works with ESPHome
- Open-Source and Open-Hardware
- DIY friendly
### Hardware
ESP32-C3 microcontroller - Wi-Fi and Bluetooth 5 (LE) SoC
- BME280 temperature, humidity and pressure sensor
-- Temperature: -40 to +80C temperature range
-- Humidity: ±3% accuracy (20-100% RH)
-- Pressure: RMS noise 0.2Pa, Sensitivity error ±0.25%
- LTR-390UV ambient light and UV sensor
-- Wide dynamic range 1:18.000.000
-- Close to human eye spectral response
Out of the box the sensor is pre-configured to work with HomeAssistant using ESPHome integration. This should allow anyone to get up-an-running in just a couple of simple steps.
## Can I buy OpenSENSE?
Yes you can. It's available on the [web shop](https://shop.sasakaranovic.com/products/opensense).
<br/><br/>
## What platforms are supported?
OpenSENSE is designed to work with ESPHome to allow for quick and easy integration into your Smart Home system.
But it is also a very hacker friendly solution, so you could treat it as a custom board for which you can write your own Arduino/ESP code.
Or you can use any other ESP32 smart home integrations.
You could also use it as a ESP32 development board with BME280 and LTR-390UV sensors.
<br/><br/>
#### Sasa Karanovic
<a href="https://sasakaranovic.com/" target="_blank" title="Sasa Karanovic Home Page"><img src="https://raw.githubusercontent.com/SasaKaranovic/common/master/assets/img_home.png" width="16"> Home Page</a> &nbsp;&middot;&nbsp;
<a href="https://youtube.com/c/sasakaranovic" target="_blank" title="Sasa Karanovic on YouTube"><img src="https://raw.githubusercontent.com/SasaKaranovic/common/master/assets/img_youtube.png" width="16"> YouTube</a> &nbsp;&middot;&nbsp;
<a href="https://github.com/sasakaranovic" target="_blank" title="Sasa Karanovic on GitHub"><img src="https://raw.githubusercontent.com/SasaKaranovic/common/master/assets/img_github.png" width="16"> GitHub</a> &nbsp;&middot;&nbsp;
<a href="https://twitter.com/_sasakaranovic_" target="_blank" title="Sasa Karanovic on Twitter"><img src="https://raw.githubusercontent.com/SasaKaranovic/common/master/assets/img_twitter.png" width="16"> Twitter</a> &nbsp;&middot;&nbsp;
<a href="https://instagram.com/_sasakaranovic_" target="_blank" title="Sasa Karanovic on Instagram"><img src="https://raw.githubusercontent.com/SasaKaranovic/common/master/assets/img_instagram.png" width="16"> Instagram</a> &nbsp;&middot;&nbsp;
<a href="https://github.com/sponsors/SasaKaranovic" target="_blank" title="Sponsor on GitHub"><img src="https://raw.githubusercontent.com/SasaKaranovic/common/master/assets/img_github.png" width="16"> Sponsor on GitHub</a>
Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB