Skip to main content

Python agent for TRIGGERcmd cloud service.

Project description

TRIGGERcmd Python Package

For the full TRIGGERcmd agent, visit https://triggercmd.com.

Use this package to listen for triggers sent to a computer in your TRIGGERcmd account.

Send triggers with Amazon Alexa, Google Assistant, IFTTT, Zapier, Smart Things, etc. See this page for more ways.

Usage:

import json
from triggercmd import agent

computer_id = (your triggercmd computer id)
token = (your triggercmd token)

def my_function(msg):
    print(msg)
    message = json.loads(msg)
    print("Received this trigger:", message['trigger'], "and these parameters:", message['params'])

agent.connect(computer_id, token, my_function)

Example output:

Connected
{"trigger":"Notepad","id":"13123391234567891acbf124","params":"on"}
Received this trigger: Notepad and these parameters: on
{"trigger":"Calculator","id":"13123391234567891acbf123","params":"on"}
Received this trigger: Calculator and these parameters: on
{"trigger":"Calculator","id":"13123391234567891acbf123","params":"off"}
Received this trigger: Calculator and these parameters: off

Based on this project:

https://github.com/gilsdav/python_sails_websocket_client/tree/master

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

triggercmd-0.0.27.tar.gz (17.5 kB view details)

Uploaded Source

Built Distribution

triggercmd-0.0.27-py3-none-any.whl (18.1 kB view details)

Uploaded Python 3

File details

Details for the file triggercmd-0.0.27.tar.gz.

File metadata

  • Download URL: triggercmd-0.0.27.tar.gz
  • Upload date:
  • Size: 17.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for triggercmd-0.0.27.tar.gz
Algorithm Hash digest
SHA256 e0c4d1b43a38903ff50627f0f30c7ef936772b63384cc551cafc2a18be5c1c2f
MD5 6ccba0e3dbbf7d0d5fd15da6525fffde
BLAKE2b-256 aeefe7f2de1d4e79099e08c300270b7a58c11a76aaaf8621835809d549050549

See more details on using hashes here.

File details

Details for the file triggercmd-0.0.27-py3-none-any.whl.

File metadata

  • Download URL: triggercmd-0.0.27-py3-none-any.whl
  • Upload date:
  • Size: 18.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for triggercmd-0.0.27-py3-none-any.whl
Algorithm Hash digest
SHA256 68accd66043684ad4fc4902a40d4582d922895f675485292ee6cdd69ef5a38c4
MD5 83d1331b281a585b04b48a9fe7384c36
BLAKE2b-256 4d4048a59e6cbb13d153b414bfd2b3cc1844e14b341b6c15025b01661dcc6d2f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page