SonyCSL / OpenECHO

Owada : Java Implementation of ECHONET Lite
GNU General Public License v3.0
36 stars 15 forks source link

Interfacing with The Thing System #4

Open KenYN opened 10 years ago

KenYN commented 10 years ago

I recently learnt about The Thing System, and it would be useful to have an OpenECHO gateway compatible with their system. It would require, at a minimum, rewriting the gateway in node.js JavaScript.

I've also raised this as an issue on their issues DB.

sowd commented 10 years ago

Hi Ken, Thank you for the information (& sorry for late reply)

Since I am not familiar with The Things System, could you teach what it does, how common it is and what we need to do to join its ecosystem.

Does it for error notification of devices? Does it do other things such as providing remote controller user interface, power monitoring, and so on?

mrose17 commented 10 years ago

@sowd - hi. i'm marshall rose one of the curators for #thethingsystem … here are answers to your questions:

to begin, please take a look at http://thethingsystem.com/ when you have a few minutes. briefly: it is an open source home autonomy server. that presently manages about 60 or so different kinds of devices. it does auto-discovery and provides a generic access layer so that you can monitor/control like items (e.g., light bulbs from different manufacturers using different access protocols, data link protocols, etc.) with the same data model (e.g., a client says "turn this bulb on" or "turn all bulbs off", and the server figures out how to do that).

there is an example UI written in HTML5/D3, sitting on top of a websockets API. that API, along with the internal APIs are all documented.

in general, the way in which we integrate to a device gateway is like this:

first, we need to know how to discover the gateway (e.g., by SSDP, port scanning, MAC OUI, etc.)

second, we need to be know how to talk to the gateway (e.g., the packet formats, datalink and transport mechanisms, etc.)

third, we need to know how to ask the gateway what devices it manages, and know how to monitor & control those devices.

fourth, if it is possible for the gateway to notify the software on changes/updates, how that happens; otherwise, we'll poll.

once we know these things, a node.js driver is written for the software. to give you an example, for the hue lights, the answers are: discovery using SSDP, talk using JSON/HTTP, use their API, polling only.

based on that, do you think it is possible for an integration to occur?