Skip to content

Raspberry Pi websocket server, manage raspberry pi, and accept raspi-io control

License

Notifications You must be signed in to change notification settings

amaork/raspi-ios

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Raspi-ios

Raspberry Pi raspi-io server

Features

Installation

  1. First install Python3.5, refer: Installing Python 3.5 on Raspbian

  2. Second install requires: raspi_io:

    # Install raspi-io
    $ sudo pip3.5 install git+https://github.com/amaork/raspi-io.git
    
    # Install pylibi2c
    $ sudo pip3.5 install git+https://github.com/amaork/libi2c.git
    
    # Install pylibmmal
    $ sudo pip3.5 install git+https://github.com/amaork/pylibmmal.git
  3. Finally install raspi_ios:

    $ sudo python3.5 setup.py install

    ​ or

    $ sudo pip3.5 install git+https://github.com/amaork/raspi-ios.git

Default port

raspi_ios default listen on port 9876, you can change it like this:

from raspi_ios import RaspiIOServer
server = RaspiIOServer(port=xxxx)

Usage

from raspi_ios import RaspiIOServer, RaspiGPIOHandle, RaspiQueryHandle, RaspiSerialHandle

# Create a raspi io server
server = RaspiIOServer()

# Register gpio handle (GPIO, SoftPWM support)
server.register(RaspiGPIOHandle)

# Register information query handle (raspi_io.Query)
server.register(RaspiQueryHandle)

# Register serial port handle (raspi_io.Serial)
server.register(RaspiSerialHandle)

# Running server
server.run_forever()

Run raspi-io server

$ python3.5 -m raspi_ios.io_server

About

Raspberry Pi websocket server, manage raspberry pi, and accept raspi-io control

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages