# mbed-edge-js

> Node.js library for Mbed Edge

Latest version **3.1.0** (published 2018-09-25) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install mbed-edge-js
pnpm add mbed-edge-js
yarn add mbed-edge-js
bun add mbed-edge-js
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.1.0 |
| Published | 2018-09-25 |
| First published | 2018-08-02 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 45.7 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Jan Jongboom |
| Maintainers | janjongboom1 |
| Keywords | mbed |

## Links

- npm: https://www.npmjs.com/package/mbed-edge-js
- Repository: https://github.com/armmbed/mbed-edge-js
- Homepage: https://github.com/armmbed/mbed-edge-js#readme
- Issues: https://github.com/armmbed/mbed-edge-js/issues
- npm.io page: https://npm.io/package/mbed-edge-js

## Dependencies (5)

- [request](https://npm.io/package/request.md) ^2.81.0
- [ieee-float](https://npm.io/package/ieee-float.md) ^0.6.0
- [node-int64](https://npm.io/package/node-int64.md) ^0.4.0
- [json-rpc-ws](https://npm.io/package/json-rpc-ws.md) ^5.0.0
- [es6-promisify](https://npm.io/package/es6-promisify.md) ^5.0.0

## Recent versions

- 3.1.0 (latest) — 2018-09-25
- 3.0.0 — 2018-09-09
- 2.0.0 — 2018-08-02

## README

# Mbed Edge.js

Node.js protocol translator library to manage devices through Mbed Edge. Tested against Mbed Edge v0.5.1.

Example usage:

* [Example application](example/buttons.js)
* [Mbed Cloud Bluetooth Devicelink](https://github.com/ARMmbed/cloud-bluetooth-devicelink/tree/mbed-client-service).
* [LoRa bridge](https://github.com/ARMmbed/cloud-lora-devicelink) (internal to Arm).

## How to run the example application

1. Install [Mbed Edge](https://github.com/armmbed/mbed-edge).
1. Install [Node.js](https://nodejs.org/en/) v8 or higher.
1. Clone this repository.
1. Install dependencies via:

    ```
    $ npm install
    ```

1. Start Mbed Edge via:

    ```
    $ build/bin/edge-core -o 9101
    ```

1. Run the example application:

    ```
    $ node example/buttons.js
    ```

## Running in a VM

Mbed Edge only runs on Linux, but it's useful to run the protocol translator from your host OS. To do this, use `socat` to forward events from the Edge socket to a TCP socket. On your VM run:

```
$ socat TCP-LISTEN:22223,reuseaddr,fork UNIX-CLIENT:/tmp/edge.sock
```

Then, call Mbed Edge.js via:

```
const Edge = require('mbed-edge-js');

let edge = new Edge('ws://YOUR_VM_IP:22223', 'your_protocol_translator');
```

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