Finding out the state of a pin using cayenne

Using Pi, how can a magnetic switch on a window triggers an alert when the widow is opened.

Thank you for your help.

Mo

Hi @monekpublic

Thanks for joining the Cayenne Community, excited to see how your project comes along.

For this case, you could monitor the state of the pin with a Generic Digital Input widget from Add New > Widget > Sensors > Generic. Here is our tutorial on that particular input (using a pushbutton switch, but the same general logic applies.)

Once that is created and reading the pin value into your Cayenne dashboard, you can add trigger(s) for it via Add New > Trigger which send you SMS or email when the switch is in the desired state.