Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
danielpeintner committed May 15, 2023
1 parent eb56c67 commit 51b39e9
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Thus, before your contribution can be accepted by the project team, contributors
* Sign-off every commit using the same email address used for your Eclipse account
* Set the Git user email address with `git config user.email "<your Eclipse account email>"`
* Add the `-s` flag when you make the commit(s), e.g. `git commit -s -m "feat: add support for magic"`
* Open a [Pull Request](https://github.com/eclipse/thingweb.node-wot/pulls)
* Open a [Pull Request](https://github.com/eclipse-thingweb/node-wot/pulls)

For more information, please see the Eclipse Committer Handbook:
https://www.eclipse.org/projects/handbook/#resources-commit
Expand Down
4 changes: 2 additions & 2 deletions content/get-involved.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ <h1>Get involved</h1>

<p>
There are various ways how you can get involved including contributions on GitHub <i class="fa fa-github "></i>: <br />
<a href="https://github.com/eclipse/thingweb.node-wot/">https://github.com/eclipse/thingweb.node-wot/</a>
<a href="https://github.com/eclipse-thingweb/node-wot/">https://github.com/eclipse-thingweb/node-wot/</a>
</p>
<ul>
<li>Create and contribute your <i>own</i> protocols bindings besides HTTP, CoAP, Websockets, ...</li>
Expand All @@ -23,7 +23,7 @@ <h2>Facts</h2>

<ul>
<li>Dual-licensed: <a href="http://www.eclipse.org/legal/epl-2.0">Eclipse Public License v. 2.0</a> and <a href="https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document">W3C Software Notice and Document License (2015-05-13)</a></li>
<li>NodeJS-based (see <a href="https://github.com/eclipse/thingweb.node-wot/#prerequisites">here</a> for detailed prerequisites)</li>
<li>NodeJS-based (see <a href="https://github.com/eclipse-thingweb/node-wot/#prerequisites">here</a> for detailed prerequisites)</li>
<li>Available through NPM (pick the packages you need: e.g., <a href="https://www.npmjs.com/package/@node-wot/core">core</a>, <a href="https://www.npmjs.com/package/@node-wot/td-tools">td-tools</a>, ...)</li>
</ul>

Expand Down
2 changes: 1 addition & 1 deletion content/hands-on-exposed-thing-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Using TypeScript gives type safety and the separation of source and build direct
Using node-wot as an npm dependency allows faster installation and also being able to install only what is needed for the given project.
For example, this way one can install only the CoAP binding if the device will only communicate with CoAP.

The source files can be found [at the examples folder of node-wot](https://github.com/eclipse/thingweb.node-wot/tree/master/examples/templates/exposed-thing). You should modify this code to match your needs.
The source files can be found [at the examples folder of node-wot](https://github.com/eclipse-thingweb/node-wot/tree/master/examples/templates/exposed-thing). You should modify this code to match your needs.

## Code Structure

Expand Down
6 changes: 3 additions & 3 deletions content/hands-on-intro-raspberry.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,13 @@ wot@node-wot:~$ npm version

### Cloning the repository

The reference implementation of the Web of Things is published in GitHub as node-wot project at [GitHub](https://github.com/eclipse/thingweb.node-wot).
The reference implementation of the Web of Things is published in GitHub as node-wot project at [GitHub](https://github.com/eclipse-thingweb/node-wot).
The project is part of the Eclipse Foundation.
Use the command below to clone the repository on your local system:

{{< highlight bash >}}
wot@node-wot:~$ sudo apt install git
wot@node-wot:~$ git clone https://github.com/eclipse/thingweb.node-wot
wot@node-wot:~$ git clone https://github.com/eclipse-thingweb/node-wot
{{< / highlight >}}

<img style="max-width:100%; height:auto; margin-left:auto; margin-right:auto; display:block;" src="../images/clone-2.gif" alt="Cloning repo"/>
Expand All @@ -144,7 +144,7 @@ Node-wot requires dependencies such as Typescript, lerna, etc.
By running the command below, those dependencies are installed:

{{< highlight bash >}}
wot@node-wot:~$ cd thingweb.node-wot
wot@node-wot:~$ cd node-wot
wot@node-wot:~$ npm install
{{< / highlight >}}

Expand Down
18 changes: 9 additions & 9 deletions content/smart-coffee-machine.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ draft: false
</aside>

## Introduction
This article is a tutorial which considers a fictional smart coffee machine in order to demonstrate the capabilities of Web of Things (WoT) and the usage of [node-wot API](https://github.com/eclipse/thingweb.node-wot).
This article is a tutorial which considers a fictional smart coffee machine in order to demonstrate the capabilities of Web of Things (WoT) and the usage of [node-wot API](https://github.com/eclipse-thingweb/node-wot).
In the world of Web of Thing properties, actions and events provided by a Thing are called Property Affordances, Action Affordances and Event Affordances, respectively.
The difference of each becomes clear as we proceed the tutorial.
So, we imagine a smart coffee machine which provides the following Property Affordances:
Expand Down Expand Up @@ -74,7 +74,7 @@ This produced TD can then be used by other Things or clients to interact with th
WoT.produce({
title: 'Smart-Coffee-Machine',
description: `A smart coffee machine with a range of capabilities.`,
support: 'git://github.com/eclipse/thingweb.node-wot.git',
support: 'git://github.com/eclipse-thingweb/node-wot.git',
'@context': [
'https://www.w3.org/2019/wot/td/v1',
],
Expand Down Expand Up @@ -114,7 +114,7 @@ WoT.produce({
})
{{< / highlight >}}

The full script is available at [node-wot GitHub repository](https://github.com/eclipse/thingweb.node-wot/blob/master/packages/examples/src/scripts/smart-coffee-machine.ts).
The full script is available at [node-wot GitHub repository](https://github.com/eclipse-thingweb/node-wot/blob/master/packages/examples/src/scripts/smart-coffee-machine.ts).
Note that, all affordances (i.e. property, action and event) should be added withing the `produce` method.

After producing the Thing, we need to initialize the properties and all required handlers.
Expand Down Expand Up @@ -386,7 +386,7 @@ WoTHelpers.fetch("http://127.0.0.1:8080/smart-coffee-machine").then(async (td) =
});
{{< / highlight >}}

The full "client" script is available at [node-wot GitHub repository](https://github.com/eclipse/thingweb.node-wot/blob/master/packages/examples/src/scripts/smart-coffee-machine-client.ts).
The full "client" script is available at [node-wot GitHub repository](https://github.com/eclipse-thingweb/node-wot/blob/master/packages/examples/src/scripts/smart-coffee-machine-client.ts).
Notice that, we are awaiting asynchronous functions to complete before proceeding, which is quite logical here.
Remember that we need the `async` keyword in the outer function in order to use `await` inside the function.
We could also chain the asynchronous `consume` method with other methods using `.then`.
Expand Down Expand Up @@ -482,14 +482,14 @@ Again, here we don't need to await for a function to complete, since subscribing

## Running scripts from node-wot repository

As it is mentioned above, these example scripts are available at [node-wot GitHub repository](https://github.com/eclipse/thingweb.node-wot/blob/master/packages/examples/src/scripts).
As it is mentioned above, these example scripts are available at [node-wot GitHub repository](https://github.com/eclipse-thingweb/node-wot/blob/master/packages/examples/src/scripts).
In order to run them do the following:

{{< highlight bash "linenos=table" >}}
# 1. Clone the repo
git clone https://github.com/eclipse/thingweb.node-wot
git clone https://github.com/eclipse-thingweb/node-wot
# 2. cd to the project's root directory
cd thingweb.node-wot
cd node-wot
# 3. Install dependencies
npm install
# 4. Build the project
Expand All @@ -505,7 +505,7 @@ node packages/cli/dist/cli.js examples/scripts/smart-coffee-machine.js
node packages/cli/dist/cli.js examples/scripts/smart-coffee-machine-client.js --clientonly
{{< / highlight >}}

If you want to add your own example scripts be sure to follow the [workflow](https://github.com/eclipse/thingweb.node-wot/tree/master/packages/examples#workflow).
If you want to add your own example scripts be sure to follow the [workflow](https://github.com/eclipse-thingweb/node-wot/tree/master/packages/examples#workflow).

In case you want to just consume a Thing you can use a tool like the [Browsified node-wot](http://plugfest.thingweb.io/webui/).
It allows you to interact with Things right from your browser.
Expand Down Expand Up @@ -548,7 +548,7 @@ The reason is simple - the client is not authorized.
Let's fix it.

We need an additional configuration file which will contain the appropriate credentials.
The configuration file contains the following and is available as [smart-coffee-machine-client.conf.json](https://github.com/eclipse/thingweb.node-wot/tree/master/examples/scripts/smart-coffee-machine-client.conf.json):
The configuration file contains the following and is available as [smart-coffee-machine-client.conf.json](https://github.com/eclipse-thingweb/node-wot/tree/master/examples/scripts/smart-coffee-machine-client.conf.json):

{{< highlight js "linenos=table" >}}
{
Expand Down
2 changes: 1 addition & 1 deletion themes/thingweb/layouts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ <h1>A Web of Things implementation</h1>
The Web of Things seeks to counter the fragmentation of the IoT through standard complementing building blocks (e.g., metadata and APIs) that enable easy integration across IoT platforms and application domains.
</p>

<p><code>node-wot</code> provides a <a href="http://www.w3.org/TR/wot-thing-description/" target="_blank">WoT Thing Description</a> parser and serializer, several "Protocol Bindings" implementing the <a href="https://w3c.github.io/wot-binding-templates/" target="_blank">WoT Binding Templates</a>, as well as a runtime system ("WoT Runtime") providing the <a href="http://www.w3.org/TR/wot-scripting-api/" target="_blank">WoT Scripting API</a> for applications. It is based on Node.js and developed under open-source licenses on <a href="https://github.com/eclipse/thingweb.node-wot" target="_blank">GitHub</a>.<br />
<p><code>node-wot</code> provides a <a href="http://www.w3.org/TR/wot-thing-description/" target="_blank">WoT Thing Description</a> parser and serializer, several "Protocol Bindings" implementing the <a href="https://w3c.github.io/wot-binding-templates/" target="_blank">WoT Binding Templates</a>, as well as a runtime system ("WoT Runtime") providing the <a href="http://www.w3.org/TR/wot-scripting-api/" target="_blank">WoT Scripting API</a> for applications. It is based on Node.js and developed under open-source licenses on <a href="https://github.com/eclipse-thingweb/node-wot" target="_blank">GitHub</a>.<br />

<code>node-wot</code> also provides a browser bundle to visualize TDs and to enable the interaction with Things from the Web browser. A simple example can be found here: <a href="http://plugfest.thingweb.io/webui/" target="_blank">WebUI</a>.
<br />
Expand Down
2 changes: 1 addition & 1 deletion themes/thingweb/layouts/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<li>|</li>
<li><a href="#">Services</a></li>
<li>|</li>-->
<li><a href="https://github.com/eclipse/thingweb.node-wot/">Project on Github</a></li>
<li><a href="https://github.com/eclipse-thingweb/node-wot/">Project on Github</a></li>
<li>|</li>
<!-- <li><a href="#">Reviews</a></li>
<li>|</li>-->
Expand Down

0 comments on commit 51b39e9

Please sign in to comment.