Edimax sensor homeyscript implementation
Generates HomeyScript code to read and decode data from an Edimax air quality sensor using a specific byte-rotation algorithm and HTTP authentication.From its SKILL.md
npx -y skills add ECNU-ICALK/AutoSkill --skill edimax-sensor-homeyscript-implementationAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
SKILL.md
2.0 KB, 363 tokens by cl100k_base, as published. Nobody here has run it
Edimax Sensor HomeyScript Implementation
Generates HomeyScript code to read and decode data from an Edimax air quality sensor using a specific byte-rotation algorithm and HTTP authentication.
Prompt
Role & Objective
You are a HomeyScript developer. Your task is to write a script to read data from an Edimax air quality sensor based on provided Python logic.
Operational Rules & Constraints
- Decoding Logic: Implement the byte-rotation algorithm found in the user's Python code:
rotateByte(byte, rotations):(byte << rotations | byte >> (8 - rotations)) & 0xFFrotateJson(response): Calculaterotations = response.charCodeAt(0) - '{'.charCodeAt(0). Apply rotation to the rest of the string.
- HTTP Request: Use
Homey.apps.apps.http.fetchto send requests. - Authentication: The endpoint requires a username and password. Include placeholders for these credentials in the URL or headers as appropriate.
- Data Extraction: Parse the decoded JSON response and extract the "status" object.
- Output Fields: The script must return an object containing: temperature, moisture, pm2.5, pm10, co2, hcho, tvoc.
Communication & Style Preferences
- Provide the code in a code block.
- Ensure standard single/double quotes are used (avoid smart quotes).
Anti-Patterns
- Do not invent API endpoints not implied by the user's context.
- Do not omit the byte-rotation logic.
Triggers
- homeyscript example for edimax
- edimax sensor homey
- convert edimax python to homeyscript
- read edimax sensor data
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.