feat(tapo-agent): add schedule/countdown timer API support
- Fork tapo crate to add missing schedule/timer APIs - Add get_countdown_rules, get_schedule_rules, get_next_event methods - New readings: countdown_active, countdown_remain, schedule_count, schedule_active_count, next_event_time - Add local compilation to build script alongside cross-compilation - Implement offline polling - device collection continues when server disconnects - Add more device readings: on_time, signal_level, rssi, runtime_today/month, energy_month Vendored tapo fork in tapo-fork/ with minimal changes to add schedule APIs.
This commit is contained in:
64
agents/tapo/tapo-fork/.github/workflows/rs-ci.yml
vendored
Normal file
64
agents/tapo/tapo-fork/.github/workflows/rs-ci.yml
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
name: Rust
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
tags:
|
||||
- "*"
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
checks:
|
||||
name: Rust checks
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
components: clippy, rustfmt
|
||||
- uses: davidB/rust-cargo-make@v1
|
||||
- uses: actions/checkout@v6
|
||||
- name: Run format
|
||||
run: cargo make format
|
||||
- name: Run check
|
||||
run: cargo make check
|
||||
- name: Run check doc
|
||||
run: cargo make check-doc
|
||||
- name: Run clippy
|
||||
run: cargo make clippy
|
||||
- name: Run test
|
||||
run: cargo make test
|
||||
checks_min_ver:
|
||||
name: Rust checks on the minimum supported version
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
toolchain: 1.88.0
|
||||
- uses: davidB/rust-cargo-make@v1
|
||||
- uses: actions/checkout@v6
|
||||
- name: Run check on the minimum supported version
|
||||
run: cargo +1.88.0 make check
|
||||
publish:
|
||||
name: Publish
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
|
||||
needs: [checks, checks_min_ver]
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
ref: main
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
- name: Run cargo login
|
||||
run: cargo login ${CRATES_IO_TOKEN}
|
||||
env:
|
||||
CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
|
||||
- name: Run build
|
||||
run: cargo build --package tapo --release --verbose
|
||||
- name: Run cargo publish
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
|
||||
run: cargo publish --package tapo
|
||||
Reference in New Issue
Block a user