Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
kcech committed Nov 24, 2020
1 parent ba3abd6 commit ff7b6b5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 21 deletions.
6 changes: 0 additions & 6 deletions docs/tutorials.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ Sentilo using various existing platforms and languages.

------------------------------------

`Java Client Tutorial`_
|spring-framework.png|

Java library that allows
Expand All @@ -24,7 +23,6 @@ through its REST API Client

------------------------------------

`RaspberryPi Client`_
|raspberrypi.jpeg|

Independent platform library
Expand All @@ -36,7 +34,6 @@ API Client

....................................

`Arduino Client`_
|arduino-mega-2560-r3.jpg|

A simple Arduino library that
Expand All @@ -46,9 +43,6 @@ Platform

------------------------------------

.. _Java Client Tutorial: ./tutorials/java_client_tutorial.html
.. _RaspberryPi Client: ./tutorials/raspberrypi_tutorial.html
.. _Arduino Client: ./tutorials/arduino_tutorial.html

.. |java_logo.jpg| image:: _static/images/tutorials/java_logo.jpg
:width: 202px
Expand Down
27 changes: 13 additions & 14 deletions docs/tutorials/java_client_tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,30 +31,30 @@ environment:
install it as a *Maven dependency* into your project (please, see the
**pom file** in the project form more information)
- Tomcat 7+
- Some other Maven dependencies (you can see them in the **pom file** of
the example project):
- If you don't have access to a working Sentilo instance, you might as well use our ` Sentilo VM </use_a_virtual_machine.html>`__.

- Hibernate
- Spring
- And some other…

The example
-----------

The code
~~~~~~~~

You must download the sample webapp project from Git repository:
Please download this sample webapp project from Git repository:
https://github.com/sentilo/sentilo-client-sample-java

Once you have the project, open it with Eclipse or another IDE and
construct it using *Maven* goals: **clean package**, for downloading
dependencies, compile the code and package it.

After that your project is compiled and packaged, you can deploy it in a
Tomcat 7 webapp container. We recommend that you use Eclipse or STS
Spring IDE to develop and open this example, and deploy it with the
Apache deployment plugins.
After your project is compiled and packaged, you can deploy it in a
Tomcat webapp container (standalone or the one your IDE provides).

.. note::

In case you use our VM on the same machine as Tomcat of this example, you might have a problem with port 8080 already being used.
That's because Virtualbox will NAT the VM's Tomcat on 8080 to port 8080 on your host machine. If it's your case,
you should change the port of your Tomcat to, for example, 8888.

Now you can then navigate into the project and edit the source code.

Expand All @@ -63,8 +63,7 @@ The properties file

You must modify the properties file :literal:`application.properties` located
in :literal:`src/main/resources/properties` in order to provide your correct
Sentilo Platform Client configurations. There’re some values that are
for testing purposes, and they may not be changed.
Sentilo Platform Client configurations.

.. code:: properties
Expand All @@ -80,7 +79,7 @@ for testing purposes, and they may not be changed.
rest.client.sensor=sample-sensor-java
rest.client.sensor.type=status
rest.client.sensor.dataType=TEXT
rest.client.sensor.location=41.387015,2.170047
rest.client.sensor.location=41.387015 2.170047
This settings should be updated:

Expand Down Expand Up @@ -388,7 +387,7 @@ the Tomcat deployments directory, and start it.

You must access to this url (we assume that you’re in your localhost and
your port is the 8080, the default values):
http://localhost:8080/sentilo-samples
http://localhost:8080/sentilo-samples (http://localhost:8888/sentilo-samples if using VM )

And then you must see a result page like this:

Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/raspberrypi_tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ hardware. Now we can take a look to the example code.
The next files was included into the library directory, so you have they
into your working directory.

Note that you can download these all example files from
Note that you can download all these files from
https://github.com/sentilo/sentilo-client-sample-nodejs.

actuator.js
Expand Down

0 comments on commit ff7b6b5

Please sign in to comment.