PatriotActivity (community library)

Summary

Name Value
Name PatriotActivity
Version 5.0.0
Installs 609
License MIT
Author Ron Lisle
URL http://www.github.com/rlisle/Patriot
Repository http://www.github.com/rlisle/Patriot
Download .tar.gz

Allow Alexa to set a state not associated with an actual hardware device. Patriot provides support for controlling IoT devices using Alexa and iOS devices. This plugin adds the ability to add a virtual device (activity) that Alexa can control, but does not have an associated hardware device.

Example Build Testing

Device OS Version:

This table is generated from an automated build. Success only indicates that the code compiled successfully.

Library Read Me

This content is provided by the library maintainer and has not been validated or approved.

PatriotPseudoDevice

A Patriot plugin to support adding Alexa commands without devices.

This library is used to support commands without hardware. This can be useful for setting a mode not associates with any particular device. For example, GuestMode is used to disable turning on the lamp in the guest bedroom that would otherwise be turned on in the morning when I wake up.

Usage

Include this library in any Photon sketch to add a pseudo device.

#include <IoT.h>
#include <PatriotPseudoDevice.h>

IoT *iot;

void setup() {
iot = IoT::getInstance();
iot->setControllerName("myPhoton");
iot->begin();

// Create your device
PseudoDevice *guestMode = new PseudoDevice();

// Add it to IoT
iot->addDevice(guestMode);
}

void loop() {
iot->loop();
}

Documentation

Refer to the Patriot Github repository and documentation for more information.

Contributing

Here's how you can make changes to this library and eventually contribute those changes back.

To get started, clone the library from GitHub to your local machine.

Change the name of the library in library.properties to something different. You can add your name at then end.

Modify the sources in and with the new behavior.

To compile an example, use particle compile examples/usage command in Particle CLI or use our Desktop IDE.

After your changes are done you can upload them with particle library upload or Upload command in the IDE. This will create a private (only visible by you) library that you can use in other projects. Do particle library add IoT_myname to add the library to a project on your machine or add the IoT_myname library to a project on the Web IDE or Desktop IDE.

At this point, you can create a GitHub pull request with your changes to the original library.

If you wish to make your library public, use particle library publish or Publish command.

LICENSE

Copyright 2019 Ron Lisle

Refer to the included LICENSE file.

Browse Library Files