Skip to main content

Client library for ControlMyPi scripts.

Project description

ControlMyPi provides a web based service to allow simple Python scripts to be controlled from a panel over the Internet. Your Python script defines a widget layout of labels, buttons, status indicators and more for ControlMyPi to display. When a button is clicked your script will get a message. If you have some status to report, your script can send that to ControlMyPi at any time and it’ll be pushed out to your web browser.

Simple echo example:

import logging
from controlmypi import ControlMyPi

def on_msg(conn, key, value):
        if key == 'echobox':
                conn.update_status({'echo':'Echo: '+value})

logging.basicConfig(level=logging.ERROR)
p = [ [ ['E','echobox','send'],['S','echo','-'] ] ]
conn = ControlMyPi('jid@dom.com', 'pwd', 'tiny', 'Tiny', p, on_msg)
if conn.start_control():
        try:
                raw_input("Press Enter to finish\n")
        finally:
                conn.stop_control()

Please read the documentation links on ControlMyPi for more help.

Project details


Release history Release notifications

History Node

0.1.4

This version
History Node

0.1.3

History Node

0.1.2

History Node

0.1.1

History Node

0.1.0

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
ControlMyPi-0.1.3.zip (19.0 kB) Copy SHA256 hash SHA256 Source None Feb 24, 2013

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page