Skip to content

Commit

Permalink
add readme, app example
Browse files Browse the repository at this point in the history
  • Loading branch information
ph4r05 committed Jul 14, 2024
1 parent 608a7de commit c42b7ee
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 1 deletion.
12 changes: 12 additions & 0 deletions isense_esp32_plant/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Local instance

Install
```shell
mpremote cp -r ph4_sense_base/ :
mpremote cp -r ph4_sense/ :
```

```shell
# UDP monitor
while true; do nc -ul 9998; done
```
1 change: 1 addition & 0 deletions isense_esp32_plant/boot.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# boot.py -- run on boot-up
10 changes: 10 additions & 0 deletions isense_esp32_plant/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# import esp
# esp.osdebug(None)
# import webrepl
# webrepl.start()

print("Booted")

from sense import main # noqa: E402

main()
6 changes: 5 additions & 1 deletion ph4ha/apps/vent.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,18 @@


class Venting(hass.Hass):
"""
TODO: threshold + diff of two hum sensors.
"""

def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.hum_sensor = None
self.vent_switch = None

# Timing control
self.flip_history = []
self.humidity_threshold_value = 65
self.humidity_threshold_value = 68
self.segment_max_flips = 15
self.segment_flip_count = 0
self.last_reset_time = datetime.now()
Expand Down
6 changes: 6 additions & 0 deletions ph4ha/config/apps.example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,9 @@ blinds:
ha_name: "shellyplus2pm-zzz"
password: !secret shelly_blinds_study
weekdays_open_time: "input_text.weekday_blind_open_time"
guest_mode_input: "input_text.weekday_blind_open_time"
stop_automation_input: "input_text.weekday_blind_open_time"
morning_routine_time_input: "input_text.weekday_blind_open_time"
full_open_time_input: "input_text.weekday_blind_open_time"
full_close_time_input: "input_text.weekday_blind_open_time"
privacy_time_input: "input_text.weekday_blind_open_time"
7 changes: 7 additions & 0 deletions ph_bark/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## Bark

```shell
sudo apt install portaudio19-dev alsa-utils
arecord -l
pip3.12 install pyaudio librosa scipy sounddevice 'numpy<2'
```

0 comments on commit c42b7ee

Please sign in to comment.