# pinoccio-server

> pinoccio command server for your local network. bridges to the pinocc.io api for historical data streams and outside access!

Latest version **0.1.1** (published 2015-04-18) · 0 weekly downloads

## Install

```sh
npm install pinoccio-server
pnpm add pinoccio-server
yarn add pinoccio-server
bun add pinoccio-server
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2015-04-18 |
| First published | 2014-05-16 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 13 |
| Author | Ryan Day |
| Maintainers | soldair |

## Links

- npm: https://www.npmjs.com/package/pinoccio-server
- Repository: https://github.com/soldair/pinoccio-server
- Issues: https://github.com/soldair/pinoccio-server/issues
- npm.io page: https://npm.io/package/pinoccio-server

## Dependencies (3)

- [split](https://npm.io/package/split.md) ~0.3.0
- [through](https://npm.io/package/through.md) ~2.3.4
- [reconnect-net](https://npm.io/package/reconnect-net.md) ~0.0.0

## Recent versions

- 0.1.1 (latest) — 2015-04-18
- 0.1.0 — 2015-04-12
- 0.0.7 — 2015-02-26
- 0.0.6 — 2015-02-26
- 0.0.4 — 2014-09-04
- 0.0.3 — 2014-09-04
- 0.0.2 — 2014-09-02
- 0.0.1 — 2014-08-30
- 0.0.0 — 2014-05-16

## README

[![Build Status](https://travis-ci.org/sldair/pinoccio-server.svg)](http://travis-ci.org/soldair/pinoccio-server)

pinoccio-server
===============

a pinoccio command server for your local network. proxies to the pinocc.io api for historical data streams and outside access!

the neat thing is that if you use this server HQ will still work and you can still use the api streams to make rad things!
  
```js
var server = require('pinoccio-server');

server(function(troop){

  troop.command(1,'led.red',function(err,data){
    console.log('i set the led to red',data);
  })
  
})


```

you can use the troop stream directly if you want to implement your own server logic

```js

var commands = require('pinoccio-server/troop');
// example todo...

```

you can use the bridging directly if you want to hook things into the board api or bridge to more external servers.

i dont know if thats a good idea but we'll see ;)

```js

var bridge = require('pinoccio-server/bridge');
// example todo ....

```

### Connect your Troop to your server

#### Option 1: Using Bridge Mode

Plug in your Scout (USB), turn it on, and bridge it (in a new terminal tab)...

```
$ pinoccio bridge -v --host 127.0.0.1
```

By default, your sever will be running on localhost. We added `-v` to get verbose output, which is more fun.

#### Option 2: Using a WiFi Lead Scout

Set a new HQ address on the Lead Scout and reassociate the WiFi.

```
> hq.setaddress("YOUR_IP_ADDRESS"); wifi.reassociate;
```

Your Lead will disconnect from Pinoccio's HQ, and reconnect to your local server (you'll see some output in your terminal when it does).

If you want to make this change stick when your Lead Scout reboots, you'll need to add it to your startup function, e.g.

```
> function startup {hq.setaddress("YOUR_IP_ADDRESS"); wifi.reassociate;}
```

---
_Source: https://npm.io/package/pinoccio-server · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
