Skip to content
Centralized logging system for IoT devices and remote systems
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
raya
LICENSE
README.md
auth.php
bridge.php
error_log
index.php
p_com1.php
p_info.html

README.md

pine-ctrl

Centralized logging system for IoT devices and remote systems

            _                       _        _ 
__/\___ __ (_)_ __   ___   _    ___| |_ _ __| |
\    / '_ \| | '_ \ / _ \_| |_ / __| __| '__| |
/_  _\ |_) | | | | |  __/_   _| (__| |_| |  | |
  \/ | .__/|_|_| |_|\___| |_|  \___|\__|_|  |_|
     |_|                                       

What is this?

pine+ctrl is a centralised IoT control system. It can:

  • Store collated and combined status logs from multiple devices.
  • Act as a file upload/download system for centralised cloud file storage.
  • Act as a file fetching proxy.
  • Act as a gateway to the internet from an intranet.
  • And a lot more!
Note: In accordance with HTTP standards, use GET requests to fetch data, POST to submit and alter data to/on the server.

Requirements

  • PHP 5.6+
  • 2 MiB disk space :P

Installation

  • Download the files of this repo and upload them to a server.
  • Edit the file auth.php and add a login for each device which will be accessing and making use of the system.

Syntaxxx

Authentication

Every request sent to the server must contain the following parameters: id=[device_id] and key=[auth_key].

Examples

Browser GET:

http://localhost/?id=node_1&key=randompass1

curl POST:

curl --data "id=node_1&key=randompass1" http://localhost/

File operations

Requests:

  • Upload file:   m=upload v=[file_name]
  • Check file:    m=check  v=[file_name]
  • Download file: m=down   v=[file_name]
  • Delete file:   m=delete v=[file_name]

Example:

GET request: ?m=check&v=info.txt
Possible outputs:
  1. SUCCESS: ./raya/info.txt has been deleted!
  2. ERROR: ./raya/info.txt cannot be found

Files:

All files are stored in the ./raya/ directory.
File uploads must be through multipart POST form data.

Extra:

Just ?m=upload will display an HTML upload form.


Misc. operations

Requests:

  • Echo text:   m=echo v=[text]
  • Echo IP adr: m=ip
  • You can’t perform that action at this time.