Git Product home page Git Product logo

thethingsystem / steward Goto Github PK

View Code? Open in Web Editor NEW
346.0 346.0 81.0 33.99 MB

The Thing System is a set of software components and network protocols that aims to fix the Internet of Things. Our steward software is written in node.js making it both portable and easily extensible. It can run on your laptop, or fit onto a small single board computer like the Raspberry Pi.

Home Page: http://thethingsystem.com

License: Other

Arduino 3.31% Objective-C 10.47% C 8.85% JavaScript 61.88% Shell 0.82% CSS 1.30% Ruby 0.09% C++ 0.49% C# 1.21% PHP 2.41% Python 3.67% HTML 5.45% Makefile 0.04% QMake 0.01%

steward's Introduction

Stories in Ready The Thing System Steward

The home has evolved from one computer in a back room to a network of computing devices all over the house. Many of these are user-facing devices, such as tablets, laptops, and desktops. However increasingly, the home network has a number of special-purpose devices—things—that turns the home network into a network not just for the user, but for their devices; a network of things.

The trouble with these things is that none of them talk to each other. They might be informing us, quantifying the world around us and allowing us to make better decisions, but it's still us that has to make the decisions, and the more things there are, the more decisions there are to make. The Internet of Things isn't connected together, not like the other Internet, the digital one. Right now its a series of—mostly proprietary—islands that don't talk to each other. We’re become a mechanical turk inside other people’s software.

iPad

The Thing System is a set of software components and network protocols that changes that. Our steward software is written in node.js making it both portable and easily extensible. It can run on your laptop, or fit onto a small single board computer like the Raspberry Pi.

The steward is heart of a system—a system of systems if you will—which is intended to fix the Internet of Things. It connects all of the things in your home, whether those things are media players such as the Roku or the Apple TV, your Nest thermostat, your INSTEON home control system, or your Philips Hue lightbulbs–whether your things are connected together via Wi-Fi, Zigbee, Z-Wave, USB or Bluetooth LE. The steward will find them and bring them together so they can talk to one another and perform magic.

Entirely open source, with open and an extensively documented API, clients which talk to the steward can be written in your favourite language.

Your first step is to go to the the wiki. Enjoy!

###License

The steward software is released under the MIT license.

Copyright (c) 2013 The Thing System, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Analytics

Build Status

steward's People

Contributors

aallan avatar ae9f avatar alexking avatar bbirand avatar carlmalamud avatar clockwerx avatar faeranne avatar joewagner avatar mrose17 avatar russnelson avatar sandeepmistry avatar siburny avatar sja avatar tmpvar avatar torkelsson avatar waffle-iron avatar webchickbot avatar zonak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

steward's Issues

Error: Cannot find module 'xmlhttprequest'

Getting the following error on startup with the current git checkout.

alert: [steward] exception diagnostic=Cannot find module 'xmlhttprequest'
alert: [steward] exception stack=[{"fileName":"module.js","lineNumber":338,"functionName":"Function.Module._resolveFilename","typeName":"Function","methodName":"Module._resolveFilename","columnNumber":15,"native":false},{"fileName":"module.js","lineNumber":280,"functionName":"Function.Module._load","typeName":"Function","methodName":"Module._load","columnNumber":25,"native":false},{"fileName":"module.js","lineNumber":364,"functionName":"Module.require","typeName":"Module","methodName":"require","columnNumber":17,"native":false},{"fileName":"module.js","lineNumber":380,"functionName":"require","typeName":"Object","methodName":null,"columnNumber":17,"native":false},{"fileName":"/home/pi/steward/steward/node_modules/yoctolib/index.js","lineNumber":15,"functionName":"","typeName":"Object","methodName":null,"columnNumber":11,"native":false},{"fileName":"module.js","lineNumber":456,"functionName":"Module._compile","typeName":"Module","methodName":"_compile","columnNumber":26,"native":false},{"fileName":"module.js","lineNumber":474,"functionName":"Object.Module._extensions..js","typeName":"Object","methodName":"Module._extensions..js","columnNumber":10,"native":false},{"fileName":"module.js","lineNumber":356,"functionName":"Module.load","typeName":"Module","methodName":"load","columnNumber":32,"native":false},{"fileName":"module.js","lineNumber":312,"functionName":"Function.Module._load","typeName":"Function","methodName":"Module._load","columnNumber":12,"native":false},{"fileName":"module.js","lineNumber":364,"functionName":"Module.require","typeName":"Module","methodName":"require","columnNumber":17,"native":false}]
uncaught exception: Error: Cannot find module 'xmlhttprequest'

Presuming it needs to be added to package.json?

HTML5/D3 client: minor internal work

  • adjust home page layout for more than three rows of devices vs. wide range of categories/groups (the "marshall's steward" problem)
  • enhance update mechanism to take care of climate and media popovers
  • make sure all deviceTypes have a popOver

Arduino examples don't compile with avr-gcc 4.7.2

I failed to compile e.g the Weatherstation example on my Debian Wheezy system using avr-gcc 4.7.2 and arduino 1.0.5, it complains about the loopPacket definitions having to be const, seems the notation has changed.

I changed the lines as follows, after which it compiled, now it runs fine and the steward running my white Debian BeagleBone sees it and gets temperature and humidity.

prog_char * const loopPacket1 PROGMEM = "{"path":"/api/v1/thing/reporting","requestID":"";
prog_char * const loopPacket2 PROGMEM = "","things":{"/device/climate/arduino/sensor":{"prototype":{"device":{"name":"Arduino with DHT-22","maker":"Arduino"},"name":true,"status":["present","absent","recent"],"properties":{"temperature":"celsius","humidity":"percentage"}},"instances":[{"name":"Weather Station","status":"present","unit":{"serial":"";
prog_char * const loopPacket3 PROGMEM = "","udn":"195a42b0-ef6b-11e2-99d0-";
prog_char * const loopPacket4 PROGMEM = "-dnt-22"},"info":{"temperature":";
prog_char * const loopPacket5 PROGMEM = ","humidity":";
prog_char * const loopPacket6 PROGMEM = "},"uptime":";
prog_char * const loopPacket7 PROGMEM = "}]}}}";

BTW. I didn't immediately find out which DHT library to use, as there are quite a few. Finally the one from adafruit worked, so maybe this could be noted in the source file?

Login button missing?

The new login button and authorisation dialog appears okay when I'm running the steward on the Mac and accessing the D3 client from localhost. However I just updated my steward on the Raspberry Pi and ran it on the Pi in a headless state, accessing it over the network. The login button and auth dialog didn't appear?

There were a couple of—possibly irrelevant—messages on the JS error console.

screenshot 2013-10-16 19 02 54
screenshot 2013-10-16 19 02 52

Thoughts?

HTML5/D3: disable apprentice code for now

i need three days straight to complete updates to the backend; i won't have that for a week or so, so let's avoid confusion in the interim.

what we have so far looks pretty good, we're just waiting on me...

HTML5/D3: wrong text shown for /device/climate/*/control

when i click on a nest or ecobee thermostat, it says "show data for last week"

if i click on that, i get the correct popup. the text leading to the popup is wrong.

also: the text for /device/sensor/arduino/water says "send alert" ... for anything under /device/sensor, there shouldn't be any actions available.

finally, i suggest that the mappings from /device/... to a particular popover be placed in the entries variable in drilldown.js rather than in the carryonFunc() function in popover.js - we really ought to keep everything in one place.

in a subsequent enhancement, i'll request that we allow wildcarding in entries as well...

HTML5/d3: Starting position of the slider in the dimmer UI control

While testing the support for a z-wave dimmer I noticed an issue with the UI in the d3 client. Whatever the level of the power is set on the device it is shown in the "arc" representation and the number next to it but when we try to make adjustments to the level the starting position of the slider does not reflect the device's current level but always starts at 41%:

screen shot 2013-10-30 at 2 35 53 pm

The actual device level is properly recorded in the system and it is showing correctly in different sections of the UI as well as in the console itself.

HTML5/D3: default drill-down and pop-overs

we are now at the point where folks other than the curators are adding devices to their own copies of the steward. this is a great milestone. however, we need to make the HTML5/D3 client a little more friendly.

as a first step: if there isn't a match in the entries table for a device type, then see if

deviceType.split('/')[2]

is defined in the entries table, e.g., for "/device/climate/foo/bar", look for "climate"

steward: three API calls missing!

delete: device (if it was created or is no longer discovered)
delete: thing to get rid of a prototype
delete: user

none of these are high priority. implementing the calls is a matter of completeness

Broken Link on Wiki Home

As far as I understand it, Github doesn't allow pull requests to the wiki repo, so I thought this the best way to raise this.

The home page Home.md of the wiki references Bonjour, but Wikipedia's lovely URL includes parentheses so the link is broken. I'd replace the link as it is with a partially encoded form:

http://en.wikipedia.org/wiki/Bonjour_%28software%29

HTML5/D3: minor nit

i guess i'm a neo-mac guy, because i think that the arrows are reversed on the more-than-five-devices-to-choose-from picker. specifically, when i click on the left arrow, i'd like the choices to scroll to the right; similarly, when i click on the right arrow, i'd like the choices to scroll to the left.

also, could we order the devices in the scroll list? primary sort key=deviceType (e.g., '/device/climate/netatmo/monitor'), and secondary sort key=name (e.g., 'Arden-Arcade')

thanks!

/mtr

HTML5/D3: Text overlap in the controls UI

If a device has a long name and we try to open the control to make adjustments (turn device on or off or set level) the text for the name of the device overlaps with the on/off button:

screen shot 2013-10-30 at 1 40 14 pm

HTML5/D3: do not repeat alerts

when adding an alert to the queue, if the same text is already being displayed or is already in the queue, then just drop it. the user should see it only once...

error creating user

I never get a QR, only a broken image icon in HTTP. In HTTPS i usually get "unauthorized."

alert: [steward] exception diagnostic=Object # has no method 'url'
alert: [steward] exception stack=[{"fileName":"[as route] (/home/ethomasii/steward/steward/api/api-manage-user.js","lineNumber":106,"functionName":"Object.exports.create","typeName":"Object","methodName":"exports.create","columnNumber":90,"native":false},{"fileName":"/home/ethomasii/steward/steward/routes/route-manage.js","lineNumber":76,"functionName":"","typeName":"WebSocket","methodName":null,"columnNumber":22,"native":false},{"fileName":"events.js","lineNumber":98,"functionName":"WebSocket.EventEmitter.emit","typeName":"WebSocket","methodName":"EventEmitter.emit","columnNumber":17,"native":false},{"fileName":"/home/ethomasii/steward/steward/node_modules/ws/lib/WebSocket.js","lineNumber":647,"functionName":"Receiver.self._receiver.ontext","typeName":"Receiver","methodName":"self._receiver.ontext","columnNumber":10,"native":false},{"fileName":"/home/ethomasii/steward/steward/node_modules/ws/lib/Receiver.js","lineNumber":397,"functionName":"Receiver.opcodes.1.finish","typeName":"Receiver","methodName":"opcodes.1.finish","columnNumber":14,"native":false},{"fileName":"/home/ethomasii/steward/steward/node_modules/ws/lib/Receiver.js","lineNumber":378,"functionName":"Receiver.expectHandler","typeName":"Receiver","methodName":"expectHandler","columnNumber":33,"native":false},{"fileName":"/home/ethomasii/steward/steward/node_modules/ws/lib/Receiver.js","lineNumber":93,"functionName":"Receiver.add","typeName":"Receiver","methodName":"add","columnNumber":24,"native":false},{"fileName":"/home/ethomasii/steward/steward/node_modules/ws/lib/WebSocket.js","lineNumber":627,"functionName":"Socket.firstHandler","typeName":"Socket","methodName":"firstHandler","columnNumber":22,"native":false},{"fileName":"events.js","lineNumber":95,"functionName":"Socket.EventEmitter.emit","typeName":"Socket","methodName":"EventEmitter.emit","columnNumber":17,"native":false},{"fileName":"_stream_readable.js","lineNumber":746,"functionName":"","typeName":"Socket","methodName":null,"columnNumber":14,"native":false}]
uncaught exception: TypeError: Object # has no method 'url'

service: TSRP simplifications

  • do not require prototype (if it already exists)
  • in prototype, do not require name or status, defaulting to true/["present","absent","recent"]
  • in prototype, specify default heartbeat rate
  • allow heartbeat-only packets

HTML5/D3: Design alpha screen with UI hints

notes below --

Design semi-alpha interstitial explaining to people the things they should click on

the steward name - to configure the steward
an icon to drill down to that thing or group of things

i.e. -

"click here to configure the steward"

or

"click here to go back"

after 8 seconds, or there's a click, it should go away.

at that point, we no longer need "TOUCH A THING FOR MORE INFO.", but keep it if you like.

RPi image doesn't seem to show koubachi sensors

Got the api key for the koubachi, entered the user_credentials in the "name" field, app_key in the "appkey" field, and got an alert that the sensor was detected - but that's all. Nothing new appearing in the web interface.

thething-koubachi-console
thething-koubachi-mainscreen

HTML5/D3: add alert marquee

when the console service pushes something that has a level of "alert", the message should be placed in a a 'marquee'

for the user to see, regardless of what screen they are on.

{
".updates": [
{
"updated": 1380762795817,
"level": "alert",
"message": "..."
"whoami": "device/115",
"name": "ecobee (things)",
"info": {
"whatami": "/device/gateway/ecobee/cloud",
"whoami": "device/115",
"name": "ecobee (things)",
"status": "ready",
"info": { ... }
}
}
]
}

"dns service error: unknown" on Ubuntu

I am trying to run it on my home theater pc, which runs Ubuntu on a first generation Intel Atom (x86). I just upgraded to the latest Ubuntu and following the steps for the Raspberry Pi, I tried running the Steward.

However, I get "uncaught exception: Error: dns service error: unknown". Output of the error is below. Full output is at http://pastebin.com/js7ztZyn .

HTML5/D3: One-Click Color Picker

When I assign a color using the color picker it only works on the first click - If I want to change the color I have to relaunch the popover

HTML5/D3: add Login button?

how hard would it be to add a button that forced a login for the client. i believe that unauthenticated access is always read-only...

HTML5/D3: better chromecast pop-up functionality for YouTube

the /device/media/chromecast/video is very powerful.

the current popup let's you enter a URL to play. i would like to have an option of searching for a youtube video and then clicking on the thumbnail to issue a play command to the chromecast.

danny - could you figure out what's possible in terms of a simple mechanism and then have a conversation with becky as to what the right paradigm is for the popup?

Problem creating users on non-localhost

We have a problem when initially logging into the d3 client for steward on the Raspberry Pi. If you go to http://steward.local:8887/client.html to create a user so that you can use https for read/write and the d3 client, it redirects to port 8888 and you get the following error when trying to create a user,

warning: [manage] wss 192.168.1.92 51035 /manage permanent=false, diagnostic=unknown api: /api/v1/user/create/admin, requestID=3, event=route

this procedure works for localhost (aka 127.0.0.1) but not if you're running the steward on a Pi and logging in from the LAN.

screenshot 2013-10-06 17 53 50

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.