Compare commits
5 Commits
fdc5a065f9
...
52ed86323c
Author | SHA1 | Date |
---|---|---|
Paul Wieland | 52ed86323c | |
Paul Wieland | 9714d659ea | |
Paul Wieland | b2f6ec1379 | |
Paul Wieland | ee1a970647 | |
Paul Wieland | fda14ac1b5 |
|
@ -4,7 +4,7 @@ on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- ratgdo32
|
- main
|
||||||
pull_request:
|
pull_request:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 4 * * 1'
|
- cron: '0 4 * * 1'
|
||||||
|
@ -97,7 +97,7 @@ jobs:
|
||||||
|
|
||||||
|
|
||||||
consolidate:
|
consolidate:
|
||||||
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/ratgdo32'
|
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
|
||||||
name: Consolidate firmwares
|
name: Consolidate firmwares
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: build
|
needs: build
|
||||||
|
@ -119,7 +119,7 @@ jobs:
|
||||||
path: output
|
path: output
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/ratgdo32'
|
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
|
||||||
name: Deploy to GitHub Pages
|
name: Deploy to GitHub Pages
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: consolidate
|
needs: consolidate
|
||||||
|
|
|
@ -3,7 +3,7 @@ external_components:
|
||||||
- source:
|
- source:
|
||||||
type: git
|
type: git
|
||||||
url: https://github.com/ratgdo/esphome-ratgdo
|
url: https://github.com/ratgdo/esphome-ratgdo
|
||||||
ref: ratgdo32
|
ref: main
|
||||||
refresh: 1s
|
refresh: 1s
|
||||||
# - source:
|
# - source:
|
||||||
# type: local
|
# type: local
|
||||||
|
|
|
@ -4,7 +4,7 @@ external_components:
|
||||||
- source:
|
- source:
|
||||||
type: git
|
type: git
|
||||||
url: https://github.com/ratgdo/esphome-ratgdo
|
url: https://github.com/ratgdo/esphome-ratgdo
|
||||||
ref: ratgdo32
|
ref: main
|
||||||
refresh: 1s
|
refresh: 1s
|
||||||
# - source:
|
# - source:
|
||||||
# type: local
|
# type: local
|
||||||
|
|
|
@ -4,7 +4,7 @@ external_components:
|
||||||
- source:
|
- source:
|
||||||
type: git
|
type: git
|
||||||
url: https://github.com/ratgdo/esphome-ratgdo
|
url: https://github.com/ratgdo/esphome-ratgdo
|
||||||
ref: ratgdo32
|
ref: main
|
||||||
refresh: 1s
|
refresh: 1s
|
||||||
# - source:
|
# - source:
|
||||||
# type: local
|
# type: local
|
||||||
|
|
|
@ -65,7 +65,7 @@ namespace ratgdo {
|
||||||
observable<uint32_t> closing_delay { 0 };
|
observable<uint32_t> closing_delay { 0 };
|
||||||
|
|
||||||
observable<int16_t> target_distance_measurement { -1 };
|
observable<int16_t> target_distance_measurement { -1 };
|
||||||
std::vector<int16_t> distance_measurement { std::vector<int16_t>(10, -1) }; // the length of this vector determines how many in-range readings are required for presence detection to change states
|
std::vector<int16_t> distance_measurement { std::vector<int16_t>(30, -1) }; // the length of this vector determines how many in-range readings are required for presence detection to change states
|
||||||
observable<int16_t> last_distance_measurement { 0 };
|
observable<int16_t> last_distance_measurement { 0 };
|
||||||
|
|
||||||
observable<uint16_t> openings { 0 }; // number of times the door has been opened
|
observable<uint16_t> openings { 0 }; // number of times the door has been opened
|
||||||
|
|
|
@ -88,15 +88,13 @@ namespace ratgdo {
|
||||||
objCount = pDistanceData->NumberOfObjectsFound;
|
objCount = pDistanceData->NumberOfObjectsFound;
|
||||||
|
|
||||||
maxDistance = objCount == 0 ? -1 : pDistanceData->RangeData[objCount - 1].RangeMilliMeter;
|
maxDistance = objCount == 0 ? -1 : pDistanceData->RangeData[objCount - 1].RangeMilliMeter;
|
||||||
/* if(maxDistance < 0) maxDistance = -1;
|
/*
|
||||||
* if the sensor is pointed at glass, there are many error readings which will fill the
|
* if the sensor is pointed at glass, there are many error -1 readings which will fill the
|
||||||
* vector with out of range data. The sensor should be sensitive enough to detect the floor
|
* vector with out of range data. The sensor should be sensitive enough to detect the floor
|
||||||
* in most situations, unless its mounted really far away.
|
* in most situations, but daylight and/or really high ceilings can cause long distance
|
||||||
* If this doesn't work, then the vector size will have to increase substantially
|
* measurements to be out of range.
|
||||||
*/
|
*/
|
||||||
if (maxDistance > 0) {
|
|
||||||
this->parent_->set_distance_measurement(maxDistance);
|
this->parent_->set_distance_measurement(maxDistance);
|
||||||
}
|
|
||||||
|
|
||||||
// ESP_LOGD(TAG,"# obj found %d; distance %d",objCount, maxDistance);
|
// ESP_LOGD(TAG,"# obj found %d; distance %d",objCount, maxDistance);
|
||||||
|
|
||||||
|
|
|
@ -271,7 +271,7 @@
|
||||||
<h3>Drivers</h3>
|
<h3>Drivers</h3>
|
||||||
<p>If you can't connect to your ratgdo board make sure you have the right driver installed for the type of board you have.</p>
|
<p>If you can't connect to your ratgdo board make sure you have the right driver installed for the type of board you have.</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>ratgdo32 disco uses a CH9102 USB to Serial chipset. [<a href="https://www.wch-ic.com/downloads/CH343SER_EXE.html" target="_blank">driver download</a>]</li>
|
<li>ratgdo32 and ratgdo32 disco use a CH9102 USB to Serial chipset. Modern versions of Windows & macOS include the necessary drivers natively. Installing a standalone driver can create a conflict preventing you from connecting to ratgdo32.</li>
|
||||||
<li>ratgdo v2.5i uses a CH340 USB to Serial chipset. [<a href="https://www.wch-ic.com/downloads/CH341SER_EXE.html" target="_blank">driver download</a>]</li>
|
<li>ratgdo v2.5i uses a CH340 USB to Serial chipset. [<a href="https://www.wch-ic.com/downloads/CH341SER_EXE.html" target="_blank">driver download</a>]</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p>Watch the v2.5i driver and firmware installation [<a href="https://www.youtube.com/watch?v=9WecAUTC9iI">video on YouTube</a>].</p>
|
<p>Watch the v2.5i driver and firmware installation [<a href="https://www.youtube.com/watch?v=9WecAUTC9iI">video on YouTube</a>].</p>
|
||||||
|
|
|
@ -30,7 +30,7 @@ dashboard_import:
|
||||||
packages:
|
packages:
|
||||||
remote_package:
|
remote_package:
|
||||||
url: https://github.com/ratgdo/esphome-ratgdo
|
url: https://github.com/ratgdo/esphome-ratgdo
|
||||||
ref: ratgdo32
|
ref: main
|
||||||
files: [base.yaml]
|
files: [base.yaml]
|
||||||
refresh: 1s
|
refresh: 1s
|
||||||
# remote_package: !include
|
# remote_package: !include
|
||||||
|
|
|
@ -29,7 +29,7 @@ dashboard_import:
|
||||||
packages:
|
packages:
|
||||||
remote_package:
|
remote_package:
|
||||||
url: https://github.com/ratgdo/esphome-ratgdo
|
url: https://github.com/ratgdo/esphome-ratgdo
|
||||||
ref: ratgdo32
|
ref: main
|
||||||
files: [base_drycontact.yaml]
|
files: [base_drycontact.yaml]
|
||||||
refresh: 1s
|
refresh: 1s
|
||||||
# remote_package: !include
|
# remote_package: !include
|
||||||
|
|
|
@ -30,7 +30,7 @@ dashboard_import:
|
||||||
packages:
|
packages:
|
||||||
remote_package:
|
remote_package:
|
||||||
url: https://github.com/ratgdo/esphome-ratgdo
|
url: https://github.com/ratgdo/esphome-ratgdo
|
||||||
ref: ratgdo32
|
ref: main
|
||||||
files: [base_secplusv1.yaml]
|
files: [base_secplusv1.yaml]
|
||||||
refresh: 1s
|
refresh: 1s
|
||||||
# remote_package: !include
|
# remote_package: !include
|
||||||
|
|
|
@ -30,7 +30,7 @@ dashboard_import:
|
||||||
packages:
|
packages:
|
||||||
remote_package:
|
remote_package:
|
||||||
url: https://github.com/ratgdo/esphome-ratgdo
|
url: https://github.com/ratgdo/esphome-ratgdo
|
||||||
ref: ratgdo32
|
ref: main
|
||||||
files: [base.yaml]
|
files: [base.yaml]
|
||||||
refresh: 1s
|
refresh: 1s
|
||||||
# remote_package: !include
|
# remote_package: !include
|
||||||
|
|
|
@ -29,7 +29,7 @@ dashboard_import:
|
||||||
packages:
|
packages:
|
||||||
remote_package:
|
remote_package:
|
||||||
url: https://github.com/ratgdo/esphome-ratgdo
|
url: https://github.com/ratgdo/esphome-ratgdo
|
||||||
ref: ratgdo32
|
ref: main
|
||||||
files: [base_drycontact.yaml]
|
files: [base_drycontact.yaml]
|
||||||
refresh: 1s
|
refresh: 1s
|
||||||
# remote_package: !include
|
# remote_package: !include
|
||||||
|
|
|
@ -30,7 +30,7 @@ dashboard_import:
|
||||||
packages:
|
packages:
|
||||||
remote_package:
|
remote_package:
|
||||||
url: https://github.com/ratgdo/esphome-ratgdo
|
url: https://github.com/ratgdo/esphome-ratgdo
|
||||||
ref: ratgdo32
|
ref: main
|
||||||
files: [base_secplusv1.yaml]
|
files: [base_secplusv1.yaml]
|
||||||
refresh: 1s
|
refresh: 1s
|
||||||
# remote_package: !include
|
# remote_package: !include
|
||||||
|
|
Loading…
Reference in New Issue