Skip to content

Latest commit

 

History

History
80 lines (50 loc) · 1.92 KB

upnp.md

File metadata and controls

80 lines (50 loc) · 1.92 KB

H4P Flyer

H4P_UPNPServer

Shortname upnp

The primary purpose of H4P_UPNPServer is to provide Amazon Alexa voice control and pass the voice commands to either a H4P_BinarySwitch or a H4P_BinaryThing. A beneficial side-effect is that the device also appears in the Windows10 "Network Explorer" which provides a quick route to the built-in webserver.

upnp


Contents


Usage

This plugin is a "singleton" - there may be only one single instance of it in the app. It may be instantiated as any name the user chooses, prefix all API calls below with than name.

H4P_UPNPServer alexa(...

Dependencies

H4P_WiFi

and either

H4P_BinarySwitch

or

H4P_BinaryThing

Commands Added

  • name/N payload N is the new "Friendly name by whcih Alexa knows the device

Service Commands

stop / start have no effect

Callback functions

N/A


API

/* constructor:
name = Alexa / UPNP "Friendly Name"
*/
H4P_UPNPServer(const string& name="");
//
void friendlyName(const string& name); // change Friendly name

Many of the sketches in the XTRAS folder show H4P_UPNPServer in use.


(c) 2021 Phil Bowles [email protected]