Skip to content

Add new type of sensor data - V_TILT #1570

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

hypnosiss
Copy link

This PR adds a new value type V_TILT to the MySensors protocol.

ID: 36
Label: V_TILT
Description: Represents the tilt angle of blinds or covers with adjustable slats (0–100%).

This new type allows more accurate modeling of façade blinds (external venetian blinds), where tilt and lift are controlled separately.

Example use case:

#define CHILD_COVER 1

MyMessage posMsg(CHILD_COVER, V_PERCENTAGE); // cover position
MyMessage tiltMsg(CHILD_COVER, V_TILT);      // lamella tilt

void setup() {
  present(CHILD_COVER, S_COVER);
}

void loop() {
  send(posMsg.set(currentPosition));
  send(tiltMsg.set(currentTilt));
}

void receive(const MyMessage &message) {
  if (message.type == V_PERCENTAGE) {
    int pos = message.getInt();
    // handle open/close
  } else if (message.type == V_TILT) {
    int tilt = message.getInt();
    // handle tilt
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant