All Projects â†’ netbeast â†’ bigfoot

netbeast / bigfoot

Licence: MIT license
🐾 Quickly connect IoT devices with a great UX

Programming Languages

javascript
184084 projects - #8 most used programming language
python
139335 projects - #7 most used programming language
go
31211 projects - #10 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to bigfoot

ssdp-client
The most lightweight asynchronous Java SSDP (Simple Service Discovery Protocol) Client
Stars: ✭ 46 (-16.36%)
Mutual labels:  discovery, ssdp
ytcast
cast YouTube videos to your smart TV from command-line
Stars: ✭ 674 (+1125.45%)
Mutual labels:  ssdp
Browser Extension Json Discovery
Browser (Chrome, Firefox) extension for JSON discovery
Stars: ✭ 157 (+185.45%)
Mutual labels:  discovery
Netdisco
🔎 Python library to scan local network for services and devices.
Stars: ✭ 240 (+336.36%)
Mutual labels:  discovery
Resilient.js
Fault tolerant and reactive HTTP client for node.js and browsers
Stars: ✭ 172 (+212.73%)
Mutual labels:  discovery
redis-registry
Service registry and discovery for Node.js on top of Redis
Stars: ✭ 26 (-52.73%)
Mutual labels:  discovery
Gourmet map
垎äŋĄå°į¨‹åēã€ŒįžŽéŖŸåœ°å›žã€â€”—“发įŽ°æœ€åœ°é“įš„įžŽéŖŸâ€
Stars: ✭ 129 (+134.55%)
Mutual labels:  discovery
oidc
Easy to use OpenID Connect client and server library written for Go and certified by the OpenID Foundation
Stars: ✭ 475 (+763.64%)
Mutual labels:  discovery
wordlists
Aggregated wordlist pulled from commonly used tools for discovery, enumeration, fuzzing, and exploitation.
Stars: ✭ 94 (+70.91%)
Mutual labels:  discovery
Sonobuoy
Sonobuoy is a diagnostic tool that makes it easier to understand the state of a Kubernetes cluster by running a set of Kubernetes conformance tests and other plugins in an accessible and non-destructive manner.
Stars: ✭ 2,442 (+4340%)
Mutual labels:  discovery
Filebuster
An extremely fast and flexible web fuzzer
Stars: ✭ 176 (+220%)
Mutual labels:  discovery
Stm32f4 uvc camera
STM32F4-Discovery USB Device UVC Camera examples
Stars: ✭ 173 (+214.55%)
Mutual labels:  discovery
watson-discovery-food-reviews
Combine Watson Knowledge Studio and Watson Discovery to discover customer sentiment from product reviews
Stars: ✭ 36 (-34.55%)
Mutual labels:  discovery
Zabbix Haproxy
HAProxy Zabbix Discovery and Template
Stars: ✭ 169 (+207.27%)
Mutual labels:  discovery
Marathon Consul
Integrates Marathon apps with Consul service discovery.
Stars: ✭ 174 (+216.36%)
Mutual labels:  discovery
Rxbonjour
⚠ī¸ THIS PROJECT IS ARCHIVED. No further development is scheduled.
Stars: ✭ 153 (+178.18%)
Mutual labels:  discovery
PLtools
整į†ä¸€äē›å†…įŊ‘常į”¨æ¸—透小åˇĨå…ˇ
Stars: ✭ 227 (+312.73%)
Mutual labels:  discovery
nix bsd mac inventory
Collect Inventory data from *Nix, BSD and mac OS and upload to Device42
Stars: ✭ 17 (-69.09%)
Mutual labels:  discovery
FSEC-VM
Backend logic implementation for Vulnerability Management System
Stars: ✭ 19 (-65.45%)
Mutual labels:  discovery
SegSwap
(CVPRW 2022) Learning Co-segmentation by Segment Swapping for Retrieval and Discovery
Stars: ✭ 46 (-16.36%)
Mutual labels:  discovery

The Bigfoot project

A toolbet for IoT software tools that work together.

  1. Discover devices automatically
  2. Have pre-made or many compatible user interfaces
  3. Simple, lightweight APIs

How does it work?

concept

Get started

This guide will allow you to mock up your first connected device in less than a minute.

  1. Download Yeti Smart Home

Any Bigfoot-compatible software would work. Bigfoot is currently fairly young, so this is the first end user software tool that supports it. You can also contribute IoT open source software as part of the Netbeast Dashboard to implement Bigfoot.

  1. Choose a sample scaffold from the Bigfoot Project.
git clone https://github.com/netbeast/bigfoot-node
cd bigfoot-node/samples/mock-device
npm install
npm start

This is a sample in node.js. There are also samples in bigfoot-golang and python. We are looking for collaborators to create samples in other languages such as lua. Please send us a pull request!

  1. Explore devices in Yeti

Done 👏đŸŊ

Discovery

Allow your device to be discovered by Yeti or any other Bigfoot client.

var Server = require('node-ssdp').Server

server = new Server({
  sourcePort: 1900,
  udn: 'my-unique-string-identidier', 
})

server.addUSN('bigfoot:all')

server.start()

process.on('exit', function() {
  server.stop() // advertise shutting down and stop listening
})

Check out the repo for examples in golang, python or other languages.

Congratulations, your device is alive!

found values

At the right you have the bare values of your device. It still has no functionality, so it will fail when you try to control it.

Let's keep learning...

Ping

This is intended to be the most lightweight method to check that connectivity to your accessory works. If you implement an interface through HTTP (as described in skills) we'd only need to specify the port where the service is running as the location parameter:

const Ssdp = require('node-ssdp')
const express = require('express')
const app = express()

// respond with "hello world" when a GET request is made to the homepage
app.get('/', function (req, res) {
  res.send('hello world')
})

const httpServer = app.listen(3000, function () {
  const addr = httpServer.address().address
  const port = httpServer.address().port
  console.log('👾  Bigfoor ping sample started on %s:%s', addr, port)

  ssdpServer = new Ssdp.Server({
    location: `${addr}:${port}`,
    sourcePort: 1900,
  })
  ssdpServer.addUSN('bigfoot:all')
  ssdpServer.start()
})

process.on('exit', function() {
  ssdpServer.stop() // advertise shutting down and stop listening
  app.stop() // close express server
})

As you'd notice already, our device is still pretty dumb. We can only see it appears in our Yeti (Bigfoot compatible) device. This is because we had not specified any skill or topic that it can work as. So let's move on now.

Skills

With skills we plan to refer the capabilities of what an accessory can do. For example, the simplest interface we can implement is a webview for Bigfoot compatible software:

// node/samples/webapp
const Ssdp = require('node-ssdp')
const express = require('express')
const ip = require('ip')
const app = express()

// Serve a web application to use as user interface or show data
app.use(express.static('public'))

const httpServer = app.listen(3000, function () {
  const addr = httpServer.address().address
  const port = httpServer.address().port
  console.log('👾 Bigfoot webapp example started on %s:%s', addr, port)

  ssdpServer = new Ssdp.Server({
    location: `http://${ip.address()}:${port}`,
    udn: 'Bigfoot_very-unique-bigfoot',
    sourcePort: 1900,
  })
  ssdpServer.addUSN('bigfoot:web')
  ssdpServer.start()
})

process.on('exit', function() {
  ssdpServer.stop() // advertise shutting down and stop listening
  app.stop() // close express server
})

After discovery or a request for your skills descriptor you must be able to communicate the things you are able to do, and let the other parties be aware of them. Skills are grouped in topics, so when you declare a topic every other Bigfoot compatible machine understands how to communicate with it immediately.

To declare an interface you'd only need to specify the topic on the USN:

ssdpServer.addUSN('bigfoot:bulb')
// or 
ssdpServer.addUSN('bigfoot:app')

And Bigfoot compatible devices are going to interpret it as different devices.

Available topics

  • App: exposes an app through a webserver, so the developer can implement its own interface
  • Bridge: a device that can find and talk to other devices
  • Bulb: to control lightning systems
  • Music : things that can consume
  • Thermostat: a heat / cold system
  • Switch: a plug or system with two states (on/off)
  • Sensor: an accessory with a read-only state, with keys and values to display

Implementing a topic

To understand Bigfoot messages you must only implement a protocol to listen to the primitives and then specify it under location. The switch topic is the simplest because you only have to understand ON / OFF set requests and to return the state. This will be done by HTTP POST and GET methods respectively.

// node/samples/mock-device
const Ssdp = require('node-ssdp')
const express = require('express')
var bodyParser = require('body-parser')
const ip = require('ip')
const app = express()

let state = {
  power: 1,
  color: '#ffff00',
  brightness: 80,
  temperature: 50,
}

app.use(bodyParser.json())

app.get('/', function (req, res) {
  // Here you can return the switch state
  console.log('\n State requested:')
  console.log(state)
  res.json(state)
})

app.post('/', function (req, res) {
  // Maybe perform some validation, change any device internal handling and then
  // return back the state
  state = req.body.state || state
  console.log('\n State changed:')
  console.log(state)
  res.json(state)
})

const httpServer = app.listen(3000, function () {
  const addr = httpServer.address().address
  const port = httpServer.address().port
  console.log('👾 Bigfoot device mock started on %s:%s', addr, port)

  ssdpServer = new Ssdp.Server({
    suppressRootDeviceAdvertisements: true,
    location: `http://${ip.address()}:${port}`,
    sourcePort: 1900,
  })
  ssdpServer.addUSN('bigfoot:bulb')
  ssdpServer.start()
})

process.on('exit', function() {
  ssdpServer.stop() // advertise shutting down and stop listening
  app.stop() // close express server
})

Topics stand for a kind of device and groups a set of variables or dimensions to be used. It is a shortcut for the skills of an accessory. For example if the topic of your thing is light or bulb the rest of the parties will immediately know that you must support a certain state.

State

Said of accessory values that can change without necessary user input. They reflect the nature of the appliance; Whether a bulb is on or off, a thermometer reads 30ÂēC or a movement sensor detects presence.

/* @flow */
export type BulbState = {
  power: 0 | 1,
  brightness: number, // percentage 0-100
  hue?: number, // degrees 0-360
  saturation?: number, // percentage 0-100
  color?: string, // hex conversion of the values above
}

*_ Flow is used to describe data types and interfaces throughout the codebase

These are the topics supported by Netbeast Dashboard so far:

/* @flow */
export type BulbState = {
  power: 0 | 1,
  brightness: number, // percentage 0-100
  hue?: number, // degrees 0-360
  saturation?: number, // percentage 0-100
  color?: string, // hex conversion of the values above
}

export type SwitchState = { power: PowerState }

export type MusicState = {
  status: 'playing' | 'paused',
  volume: number, // Not sure still that this is a percentage
  track: Url,
  position?: number,
  playlist?: Array<Object>,
  // rest to be defined
}

export type ThermostatState = {
  power: 0 | 1,
  temperature: number,
  units: 'celsius', 'farenheit',
  mode?: string,
}

Accessory properties

Accessory values that require user input through a software client to change, or simply don't. This can be true for the accessory name, icon, label, room they belong, etc. The device MAC address or unique ID are typical immutable properties.

Changing the accessory name

By accessing the route /accessory, it should return all its qualities (both properties and state). For instance, this is how Yeti serializes a Philips Hue bulb:

    {
      "id": "[UNIQUE IMMUTABLE STRING]",
      "name": "Front Lamp",
      "topic": "Bulb",
      "brand": "PhilipsHue",
      "room_label": "Bedroom",
      "bridge": {
        "id": "[UNIQUE IMMUTABLE STRING]",
        "ip": "192.168.1.101:80",
        "userId": "[SECRET UNIQUE STRING]"
      },
      "state": {
        "brightness": 98,
        "color": "#f90025",
        "colormode": "hue",
        "power": 0,
        "temperature": 6535.9477124183
      }
   }

If a Bigfoot accessory comes with a certain name, that's what will be portrayed in Yeti Smart Home, or what should be displayed in other clients. By implementing both GET and POST at the route /accessory you will have an appliance with a custom name, that is synced across clients.

You can add a "bigfoot" field with information about the supported protocols and versioning:

"bigfoot": {
  "version": "0.1.0",
  "network_ssid": "netbeast",
  "network_pass": [SECRET STRING]
}

Create a bridge

You can use special topics as app or bridge to connect with accessories that are outside current compatible protocols with the target Bigfoot client (i.e. Yeti)

🚧 This section is in construction

Roadmap

  • Define the scope of the project
  • Website
  • Open channels for collaborators
  • Write strategies
    • Get Started
    • Discovery
    • Ping
    • State Mutations
    • Properties /accessory
    • Pairing devices
    • Reactive events
    • Notifications
  • Node.js
    • Code samples
    • Working samples with virtual devices
    • Working samples with real devices
  • Go
    • Code samples
  • Python
    • Code samples

But you are still offering a protocol?

Not at all. Bigfoot project aims to gather a set of strategies over existing protocols and industry standards to make it easier for developers and manufacturers to create IoT experiences together. As React brought us that to representation interfaces, Bigfoot wants you to be able to create React-like hardware responses in a network environment with a set of simple and functional APIs.

Bigfoot topics is a suggested data structure that works out of the box with other tools in the belt. Because, you know, we need things working together :)

Anyway, those topics are borrowed from many other smart home devices, IoT services and other established protocols. We are going to build translators so you can use this schema as a middleware utility. But this is not opinionated and completely optional. As a matter of fact they will have a raw method alternative to access all the params obscured by any tools, in case you want access to the internals of the things you are working with.

Contributing

Bigfoot is an Open Source Project. This means that:

Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project.

Read the Design Principles to understand the resoning behind our decision making. See the CONTRIBUTING.md guide for more details.

Sponsors

This project is a reality today thanks to its contributors and sponsors. We are proud to be part of the Toptal Open Source grant program, and compatible with Yeti

works with yeti Toptal OSS
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].