Zeev's GlozmanIlya SherSophie T
Published © MIT

Toggle an LED with Real HTTPS to Raspberry PI - No Public IP

A simple, easy & free way to expose Raspberry Pi to the Web w/a real public SSL certificate + e2e encryption. No public IP/port forwarding.

EasyProtip1 hour9,143
Toggle an LED with Real HTTPS to Raspberry PI - No Public IP

Things used in this project

Hardware components

Raspberry Pi 3 Model B
Raspberry Pi 3 Model B
female
×1
LED (generic)
LED (generic)
×1
Jumper wires (generic)
Jumper wires (generic)
×1

Software apps and online services

beame-insta-ssl
beame.io beame-insta-ssl

Story

Read more

Schematics

Pin Connections

Raspberry pins wad1hjthys

Code

sample node gpio server

JavaScript
this is a basic server that provides on /off of a led
var http = require('http');
var url = require('url');
var Gpio = require('onoff').Gpio;

var led = new Gpio(14, 'out');

http.createServer(function (req, res) {

  res.writeHead(200, {'Content-Type': 'text/html'});
  var command = url.parse(req.url).pathname.slice(1);
  switch(command) {
    case "on":
      led.writeSync(1);
      res.end("It's ON");
      break;
    case "off":
      led.writeSync(0);
      res.end("It's OFF");
      break;
    default:
      res.end('Hello? yes, this is pi!');
  }

}).listen(1337);
console.log("Our on off server is listenting on port 1334");

beame-sdk

this is the core sdk that is used in beame-insta-ssl

expose your device via SSL/TLS

Make your device publicly accessible.

Credits

Zeev's Glozman

Zeev's Glozman

7 projects • 19 followers
developer, engineer, security researcher.
Ilya Sher

Ilya Sher

3 projects • 3 followers
Sophie T

Sophie T

5 projects • 0 followers

Comments

Add projectSign up / Login