Skip to content

After trying out different components, I finally decided to look on EPS8266 as the main platform of implementing my IoT use cases. In doing so, I decided to work with Wemos chips, since they are pretty and provide the functionality I need at very low cost. These are:

  • boxed ESP8266
  • USB mini power supply
  • shields with different functionality
  • can be ordered by aliexpress

I ordered the following modules at aliexpress:

  • Wemos D1 mini (v.2.0, 4MB) (around 2,50 USD)
  • Reed switch (e.g. this one ) (around 2 USD)

After several weeks of traveling over the oceans my parts have arrived and I began to build my solution for gas consumption measuring.

continue reading…

AxonFramework

Implementation of Command Query Responsibility Segregation (CQRS) architecture in Java can be a challenging task if performed from scratch, but is very elegant using the AxonFramework. This allows for building of central concepts of CQRS and fosters the usage of event sourcing by providing different event stores for that. The main advantage of event sourcing is the possibility to trigger a replay of the events and re-create the view-side projections from that. This is particular interesting, if the view-side is using non-persistent store of the domain model projection, like cache.

AxonFramework offers two ways of event listener registration. Monitoring event processors are registered on the EventSource in a way that the event delivery is performed synchronously in the same thread. Events delivered in the past can’t be replayed for monitoring event processors. Tracking event processors are registered on the EventSource in a way that a special token is maintained for every event processor, indicating the last event the processor has received. AxonFramework tries to deliver all events between last delivered and latest to the event processor.

continue reading…

OpenHAB Ansible Docker

Since some times I’m building a smart home based on OpenHAB. After playing around with local installation and an installation on the Raspberry PI, I decided to change the hosting platform. I’m running a full-fledged HP Proliant G6 server at home (for some other reasons) which has Debian 8 installed on it. For all systems provisioned, I’m using Ansible and Docker. This article gives some insights in the installation.
continue reading…

meanjs

Mean.js is a new popular Javascript full stack using MongoDB for persistence. To be more precise it incorporates MongoDB, ExpressJS, AngularJS, and Node.js and allows for very fast and light-weight application development. The use of scaffolder Yeoman boosts creation of modules, routes, controller, views and other boilerplate Javascript code. As a result, a Single Page Application can be generated very fast. In addition a a user module with Passport authorization supporting a local and several social backend strategies is included.

In order to leverage the the backend authorization capabilities to be used ineth enterprise environment, I combined it with LDAP authorization backend. Since  passport-ldapauth implements this problem it was natural to use this component. In the following post,  I provide the configuration needed for the implementation, inspired by the author of the module.

continue reading…

During last weeks, some local building contractor was involved in reconstruction of our house and renewing the basement drainage. As a result the new basement drainage has been installed and a new hopper for the sewage pumps has been placed. To be honest, it is a lot of heavy work, performed by the builder including digging, insulating, pounding and other dirty staff – but after all the system works if sewage pump is removing the drainage water. In constrast to the earthworks, where you need much experience and human force, which I don’t have, I took over the plumbing and electrical work on the pumps. In order to have a fail-over system, I installed two pumps, where the second pump is triggered if the first one fails. In order to be able to operate on a short circuit of the first pump, I put the second pump on a separate phase (in Europe, we have three phases power supply, 220V each, shifted by 120° to each other, not like split-phase in US). Having this system installed, you get some periodic work to do: finally you want to make sure by regular testing procedures, that the second pump is operating if the first one has failed. Since I’m lazy and like inventing and constucting stuff more than executing regular test procedures, I decided to implement a monitoring system using some cheap electronic and computer components: Raspberry Pi, Tinkerforge Hardware. continue reading…

Ranked

Just started to develop a small application in Scala running on a standard enterprise java stack. You can find more details on github: https://github.com/holisticon/ranked.

Today, I’ll post some details on the persistence layer. The idea is to use Scala case classes and JPA as a persistence layer. For simple attributes it looks very cute:

/**
 * Superclass for all persistent entities.
 */
@MappedSuperclass
abstract class PersistentEntity(
  @BeanProperty @(Column @field)(name = "ID")@(Id @field)@(GeneratedValue @field)(strategy = GenerationType.AUTO) id: Long,
  @BeanProperty @(Column @field)(name = "VERSION")@(Version @field) version: Long) {
  def this() = this(-1, -1);
}

/**
 * Represents a player. A player has a name, initial and current ELO ranking.
 */
@Entity
@Table(name = "PLAYER")
case class Player(
  @BeanProperty @(Column @field)(name = "NAME") name: String) extends PersistentEntity {

  def this() = this(null);
}

/**
 * Represents a team. A team contains of et least one player and might have a name.
 */
@Entity
@Table(name = "TEAM")
case class Team(
  @BeanProperty @(Column @field)(name = "NAME") name: String) extends PersistentEntity {

  def this() = this(null);
}

Stay tuned about the development progress.

If you are interested in Xtext and its new features introduced in the upcomming version 2.0 you might want to install and try them out. Since it will be officially realeased together with Eclipse Indigo, you have to execute some manual steps. In order to be able to install the new feature, you will require to enter two additional update sites into you update manager and download the update site containing xtext itself. The following steps worked for me:

Thanks to Dennis Huebner for the hints….