Compare commits

...

5 Commits

Author SHA1 Message Date
Paul Wieland 52ed86323c
Merge ee1a970647 into 9714d659ea 2024-12-18 11:31:18 -10:00
Paul Wieland 9714d659ea update driver instructions 2024-12-18 16:19:18 -05:00
Paul Wieland b2f6ec1379 high ceiling & day light sensor adjustments
Ceilings that are higher than the sensor capabilities result in out of range (-1) readings.
Daylight, water on the floor and other environment changes can also cause the sensor to read out of range. This change results in 30 readings of -1 to be VehicleDetected false.
2024-12-06 14:40:34 -05:00
Paul Wieland ee1a970647 ref: main 2024-11-12 13:47:57 -05:00
Paul Wieland fda14ac1b5 revert build to main branch 2024-11-12 13:45:54 -05:00
13 changed files with 19 additions and 21 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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);

View File

@ -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 &amp; 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>

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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