Skip to content

Commit

Permalink
Get existing site working on chulapa
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenpapierski committed Jul 17, 2024
1 parent cac5ecc commit c959c0f
Show file tree
Hide file tree
Showing 18 changed files with 225 additions and 40 deletions.
2 changes: 2 additions & 0 deletions static/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ group :jekyll_plugins do
gem 'jekyll-sitemap'
gem 'jekyll-include-cache'
end

gem "webrick", "~> 1.8"
2 changes: 1 addition & 1 deletion static/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ googlefonts:
chulapa-skin:
highlight : # default["default"]
skin : gitdev-dark # Optional predefined skins
autothemer : false # Bool: Use autotheming
# autothemer : false # Bool: Use autotheming
vars :
primary : "#FFB700" #default ["#007bff"] - Bootstrap blue

Expand Down
Binary file added static/assets/images/bed-presence.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/assets/images/bp-install-1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/assets/images/bp-install-2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/assets/images/bp-install-3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/assets/images/bp-install-4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/assets/images/bp-install-5.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/assets/images/bp-install-6.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/assets/images/bp-install-7.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/assets/images/bp-install-8.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/assets/images/logo-inline.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/assets/images/sensors.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
76 changes: 76 additions & 0 deletions static/bed-presence-mk1/getting-started.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
---
layout: default
title: Bed Presence for ESPHome
header_type: post
subtitle: Getting Started
---

Welcome to Bed Presence for ESPHome! This page contains everything you need to get started.

## WiFi Provisioning

1. Connect USB-C power supply.
2. Use phone to connect to "bed-presence-xxxxxx" WiFi.
3. If asked to stay connected, press "Yes".
4. Open a web browser and navigate to http://192.168.4.1
5. Select WiFi network you would like to add the device to, and provide the password.

## Adding to ESPHome

1. Navigate to your ESPHome Dashboard.
2. The device should appear as "Discovered".
3. Press "Adopt".
4. Provide a name for the device and click "Adopt" (By default, it will be named "Bed Presence" followed by the last 6 digits of its MAC address).
5. Click "Install".
6. Wait for firmware to compile and upload.
7. You are done! You can now hit "Stop".

## Adding to Home Assistant

1. Now that the device has been adopted in ESPHome, you should get a notification that a new device was discovered.
2. Open the notification and press "Check it out".
3. If you don't get a notification, go to Settings -> Devices & services.
4. The discovered device should appear at the top.
5. Press "Configure" then "Submit".
6. Select an area for the device if desired and press "Finish".
7. Congrats! Your sensor is ready to use.

## Installing Sensor on Bed

1. Remove mattress from bed frame.

<img src="/assets/images/bp-install-1.jpg" class="rounded" alt="test" width="400"/>

2. Select a bed slat in the torso region, where most of your weight will be applied to the bed (think about where you sit or lay in bed). If possible, select a bed slat that does not rock side to side.

3. Orient the sensor with the circuit board/text facing up, and the thicker part of the device hanging over the edge of the bed slat.

<img src="/assets/images/bp-install-2.jpg" class="rounded" alt="test" width="400"/>

4. Firmly attach the device using the provided screw. Pre-drill if necessary.

<img src="/assets/images/bp-install-3.jpg" class="rounded" alt="test" width="400"/>
<img src="/assets/images/bp-install-4.jpg" class="rounded" alt="test" width="400"/>

5. Insert the sensor strips, then peal the adhesive backing and affix the sensors to the bed slat.

<img src="/assets/images/bp-install-5.jpg" class="rounded" alt="test" width="400"/>
<img src="/assets/images/bp-install-6.jpg" class="rounded" alt="test" width="400"/>
<img src="/assets/images/bp-install-7.jpg" class="rounded" alt="test" width="400"/>

6. Connect USB-C power.

<img src="/assets/images/bp-install-8.jpg" class="rounded" alt="test" width="400"/>

## Automatic Sensor Calibration

1. The calibration process requires you to get into and out of your bed. It uses the maximum and minimum observed pressures to automatically figure out the best trigger pressure.
2. Have the person you are calibrating for lay on their side of the bed.
3. Navigate to the device and find the "Configuration" section.
4. Turn on "Calibration \[Right or Left\] (Auto)".
5. Have the person get out of bed.
6. Turn off "Calibration \[Right or Left\] (Auto)".

## Manual Sensor Calibration
1. Alternatively, you can manually set the "Trigger Pressure". The Max/Min Pressure values in the "Diagnostic" section can help guide your desired pressure.
2. If using only once sensor, you can set the value slightly higher than the "non occupied" pressure. If using both sensors, make sure to set it high enough that someone on the opposite side of the bed doesn't trigger it.
38 changes: 38 additions & 0 deletions static/bed-presence-mk1/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
layout: default
title: Bed Presence for ESPHome
header_type: hero
subtitle: A dual bed occupancy sensor
---

<div class="row">
<div class="col-lg-4">
<div class="card text-left border-primary h-100">
<!-- <div class="card-header">Setup/Installation</div> -->
<div class="card-body">
<h5 class="card-title">Setup/Installation</h5>
<p class="card-text">Everything you need to know to get your sensor setup and installed.</p>
<a href="{% link bed-presence-mk1/getting-started.md%}" class="btn btn-outline-warning stretched-link">Go!</a>
</div>
</div>
</div>
<!-- <div class="col-lg-4"> -->
<!-- <div class="card text-left border-primary h-100"> -->
<!-- <div class="card-body"> -->
<!-- <h5 class="card-title">Sensor Details</h5> -->
<!-- <p class="card-text">Get details about what each sensor value means.</p> -->
<!-- <a href="{% link bed-presence-mk1/sensors.md%}" class="btn btn-outline-warning stretched-link">Go!</a> -->
<!-- </div> -->
<!-- </div> -->
<!-- </div> -->
<div class="col-lg-4">
<div class="card text-left border-primary h-100">
<div class="card-body">
<h5 class="card-title">ESP Web Tools</h5>
<p class="card-text">Reflash your device with the factory image.</p>
<a href="{% link bed-presence-mk1/webtools.md%}" class="btn btn-outline-warning stretched-link">Go!</a>
</div>
</div>
</div>
</div>

76 changes: 76 additions & 0 deletions static/bed-presence-mk1/sensors.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
---
layout: default
title: Bed Presence for ESPHome
header_type: post
subtitle: Sensor Details
---

Welcome to Bed Presence for ESPHome! This page contains everything you need to get started.

## WiFi Provisioning

1. Connect USB-C power supply.
2. Use phone to connect to "bed-presence-xxxxxx" WiFi.
3. If asked to stay connected, press "Yes".
4. Open a web browser and navigate to http://192.168.4.1
5. Select WiFi network you would like to add the device to, and provide the password.

## Adding to ESPHome

1. Navigate to your ESPHome Dashboard.
2. The device should appear as "Discovered".
3. Press "Adopt".
4. Provide a name for the device and click "Adopt" (By default, it will be named "Bed Presence" followed by the last 6 digits of its MAC address).
5. Click "Install".
6. Wait for firmware to compile and upload.
7. You are done! You can now hit "Stop".

## Adding to Home Assistant

1. Now that the device has been adopted in ESPHome, you should get a notification that a new device was discovered.
2. Open the notification and press "Check it out".
3. If you don't get a notification, go to Settings -> Devices & services.
4. The discovered device should appear at the top.
5. Press "Configure" then "Submit".
6. Select an area for the device if desired and press "Finish".
7. Congrats! Your sensor is ready to use.

## Installing Sensor on Bed

1. Remove mattress from bed frame.

<img src="/assets/images/bp-install-1.jpg" class="rounded" alt="test" width="400"/>

2. Select a bed slat in the torso region, where most of your weight will be applied to the bed (think about where you sit or lay in bed). If possible, select a bed slat that does not rock side to side.

3. Orient the sensor with the circuit board/text facing up, and the thicker part of the device hanging over the edge of the bed slat.

<img src="/assets/images/bp-install-2.jpg" class="rounded" alt="test" width="400"/>

4. Firmly attach the device using the provided screw. Pre-drill if necessary.

<img src="/assets/images/bp-install-3.jpg" class="rounded" alt="test" width="400"/>
<img src="/assets/images/bp-install-4.jpg" class="rounded" alt="test" width="400"/>

5. Insert the sensor strips, then peal the adhesive backing and affix the sensors to the bed slat.

<img src="/assets/images/bp-install-5.jpg" class="rounded" alt="test" width="400"/>
<img src="/assets/images/bp-install-6.jpg" class="rounded" alt="test" width="400"/>
<img src="/assets/images/bp-install-7.jpg" class="rounded" alt="test" width="400"/>

6. Connect USB-C power.

<img src="/assets/images/bp-install-8.jpg" class="rounded" alt="test" width="400"/>

## Automatic Sensor Calibration

1. The calibration process requires you to get into and out of your bed. It uses the maximum and minimum observed pressures to automatically figure out the best trigger pressure.
2. Have the person you are calibrating for lay on their side of the bed.
3. Navigate to the device and find the "Configuration" section.
4. Turn on "Calibration \[Right or Left\] (Auto)".
5. Have the person get out of bed.
6. Turn off "Calibration \[Right or Left\] (Auto)".

## Manual Sensor Calibration
1. Alternatively, you can manually set the "Trigger Pressure". The Max/Min Pressure values in the "Diagnostic" section can help guide your desired pressure.
2. If using only once sensor, you can set the value slightly higher than the "non occupied" pressure. If using both sensors, make sure to set it high enough that someone on the opposite side of the bed doesn't trigger it.
14 changes: 14 additions & 0 deletions static/bed-presence-mk1/webtools.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
layout: default
title: Bed Presence for ESPHome
header_type: post
subtitle: ESP Web Tools
---

# Installation

You can use the button below to install the pre-built firmware directly to your device via USB from the browser. Note this has already been done from the factory.

<esp-web-install-button manifest="../manifest.json"></esp-web-install-button>

<script type="module" src="https://unpkg.com/esp-web-tools@10/dist/web/install-button.js?module"></script>
57 changes: 18 additions & 39 deletions static/index.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,23 @@
---
layout: default
title: Elevated Sensors Documentation
header_type: splash
subtitle: Starter pack
title: Documentation
header_type: hero
subtitle: Get started with your Elevated Sensor
---
<!-- # header_type: hero # hero, splash, none, post, base -->

The documentation covers topics around the installation, setup, configuration, and usage of products from Elevated Sensors

# Bed Presence for ESPHome

[Purchase Sensor](https://www.elevatedsensors.com/store/p/bed-presence-for-esphome)

[Getting Started]({% link bed-presence-mk1/getting-started.md %})

Sensor Explanation

[ESP Webtools]({% link bed-presence-mk1/webtools.md %})

<img src="/assets/images/bed-presence.png" width="300">
<img src="/assets/images/sensors.png" width="300">

<span class="fa-solid fa-bed-pulse"></span>


Click [**Use this template**](https://github.com/dieghernan/chulapa-101/generate) button above for cloning this repo and get started with [Chulapa Jekyll theme](https://github.com/dieghernan/chulapa).

Contains basic configuration to get you a site with:

- Sample posts and [paginated blog index](./blog/).
- Sample collection with Markdown and kramdown cheatsheets and [collection index](./cheatsheets).
- Archive pages for posts grouped by year, category, and tag.
- Demo page with the different Bootstrap components and how they look with the actual skin settings.
- Sample 404 page.
- Site search with Lunr.
- Sample `_config` with minimal configuration. `primary` color is set to <span class="text-primary">LightSkyBlue</span> and `autothemer` is enabled. [Learn how to customize your site](https://dieghernan.github.io/chulapa/docs/03-theming).
- Sample `algolia-search.yml` for using Algolia+GitHub Actions.
- Sample files for extending the theme with your own scripts and css.

On addition, `jekyll-sitemap` generates your sitemap on [./sitemap.xml](./sitemap.xml), and Chulapa generates an Atom feed on [./atom.xml](./atom.xml) and a RSS 2.0 feed on [./rss.xml](./rss.xml).

[Configure as necessary](https://dieghernan.github.io/chulapa/docs/02-config) and replace sample content with your own.

The documentation covers topics around the installation, setup, configuration, and usage of products from Elevated Sensors.

# Projects
<div class="row">
<div class="col-lg-6">
<div class="card text-center border-primary mb-3" style="max-width: 20rem;">
<div class="card-header">Bed Presence for ESPHome</div>
<div class="card-body">
<span class="fa-solid fa-bed-pulse fa-5x"></span>
<p class="card-text">A dual bed occupancy sensosr.</p>
<a href="{% link bed-presence-mk1/index.md%}" class="btn btn-outline-warning stretched-link">Get Started</a>
</div>
</div>
</div>
</div>

0 comments on commit c959c0f

Please sign in to comment.