AutoSkill 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.
install
source · Clone the upstream repo
git clone https://github.com/ECNU-ICALK/AutoSkill
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ECNU-ICALK/AutoSkill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/SkillBank/ConvSkill/english_gpt3.5_8_GLM4.7/edimax-sensor-homeyscript-implementation" ~/.claude/skills/ecnu-icalk-autoskill-edimax-sensor-homeyscript-implementation && rm -rf "$T"
manifest:
SkillBank/ConvSkill/english_gpt3.5_8_GLM4.7/edimax-sensor-homeyscript-implementation/SKILL.mdsource content
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)) & 0xFF
: CalculaterotateJson(response)
. Apply rotation to the rest of the string.rotations = response.charCodeAt(0) - '{'.charCodeAt(0)
- HTTP Request: Use
to send requests.Homey.apps.apps.http.fetch - 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