ThingSpeak Temperature and Humidity IoT Device

In this blog post I will show you how to build a temperature and humidity IoT device with an ESP8266 NodeMCU board and a DHT11 sensor that sends data to a ThingSpeak channel. It is divided in five parts:

  1. Prerequisites
  2. Set Up Android IDE
  3. Prepare the Breadboard
  4. Write the Code
  5. Watch it Working

Prerequisites

There are just a few components need to build this device:

  • ESP8266 NodeMCU board (or a similar ESP8266 board with I/O pins)
  • DHT temperature/humidity sensor (in this case it is a DHT11, but you can also use others, like the DHT22)
  • USB power bank
  • Breadboard (to connect the sensor with the board)

Continue…

Java Spring Boot REST Application Part 2: Queries

In the first part we created a simple REST application to provide access to our employees data. But in most of the cases you also need to query the data. Spring Data Repositories provide a simple way to do so. Let’s take the employees repository interface we’ve created and add an additional method for searching employees by their last name.

package at.grisa.example.rest_example;

import java.util.List;

import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.query.Param;

public interface EmployeeRepository extends PagingAndSortingRepository<Employee, Long> {
 List<Employee> findByLastNameIgnoreCase(@Param("lastName") String lastName);
}

Spring Data automatically recognizes the method findByLastNameIgnoreCase as a query by parsing the method name.

Continue…

Java Spring Boot REST Application

RESTful webservices are a simple and effective way to provide access to your application’s data. With Spring Boot you are able to create such an interface within minutes. The example code can be found here on GitHub.

Start by creating a new Maven project and set the spring-boot-starter-parent artifact as parent. For the RESTful interface you need the spring-boot-starter-rest and for the database access the spring-boot-starter-data dependency. In this example the embedded in-memory database H2 is used.
Continue…

Install Kodi MediaCenter on Amazon FireTV Stick

kodi_title

With the combination of the Amazon FireTV Stick and Kodi, you are able to build your own media center for just 39€. But the Kodi app is not available in the Amazon App Store, so you will have to follow these steps to install it it on your FireTV Stick:

  1. from the Home screen, go to Settings => System => Developer Options and enable „Apps from Unknown Sources
  2. go to the App Store and install „ES File Explorer
  3. start „ES File Explorer“ when installed
    1. add a new favorite
    2. as path enter „http://fs.bpx.li
    3. as name enter „AppStarter“
    4. save the new favorite and open it to download the AppStarter .zip
    5. open the .zip file and select AppStarter.apk to install
  4. open AppStarter when installed
  5. there you can install Kodi by selecting Update => Kodi => Update to latest Version
  6. now Kodi is installed on your FireTV Stick