Skip to content
This repository has been archived by the owner on Mar 7, 2019. It is now read-only.

theLMGN/dotRemote

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dotRemote

Remote library for controlling Pimoroni Display-O-Tron HATs remotly using websockets!

Why?

  • Data only accessible from a device that isn't your Pi
  • Easier debugging/development, using a full IDE/Text editor, and your favorite debugger, keyboard, and whatever you use to code!
  • More language support

How do I use it?

Connection

Connect using websockets to your Pi's IP adress and the port specified in config.py

On connection from a local IP address (this can be changed in the config.py, though I wouldn't recommend it) you should see a message like this

    {"type": "welcome", "error": false}

Or, if you're not connecting from a local IP address

    {"type": "forbidden", "error": true}

Sending commands

The general command structure is as follows:

    {"module": "{module}", "command": "{command}"}

Additional arguments may be added as necessary

You could also add your own internal arguments and they will sent back to you (see below)

An example is as follows:

    {"module": "lcd", "command": "set_contrast", "contrast": 30}

This would correspond to

lcd.set_contrast(30)

as shown as in the DotHat documentation

We try to maintain the method names and arguments names as in the docs. Check lcd.py or backlight.py if you're stuck.

Recieving messages

The general return structure is as follows

    {"type": "response", "return": {return value},"invoker": {the message you sent that corresponded to this action.}}

About

Remote DotHat controller using Websockets and Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages