Feed aggregator

Dev of the Week: Sander Mak

Javalobby Syndicated Feed - Wed, 24-Sep-14 00:00
Every week here and in our newsletter, we feature a new developer/blogger from the DZone community to catch up and find out what he or she is working on now and what's coming next. Preview Text:  This week we're talking to Sander Mak, Senior Software Engineer at Luminis Technologies, JavaOne Rockstar, and featured author in DZone's...
Categories: Java

Preventing Lost Updates in Long Conversations

Javalobby Syndicated Feed - Tue, 23-Sep-14 23:00
Introduction All database statements are executed within the context of a physical transaction, even when we don’t explicitly declare transaction boundaries (BEGIN/COMMIT/ROLLBACK). Preview Text:  All database statements are executed within the context of a physical transaction, even when we don’t explicitly declare transaction boundaries...
Categories: Java

Scala Spring 4 MVC without Web.XML configuration with static resources handling

Javalobby Syndicated Feed - Tue, 23-Sep-14 23:00
This blog post is fully focused on Scala and how to use it for Spring 4 based JavaEE application development. I'll  modify the example application I've used in my blog posts previously published on my personal blog  ("Spring4Netty without Web.XML configuration on Java 8.. ").     Preview Text:  This blog post...
Categories: Java

The Best of DZone: September 16 - 23

Javalobby Syndicated Feed - Tue, 23-Sep-14 23:00
If you missed anything on DZone this week, now's your chance to catch up! Below are the most popular posts of the past week - both links from DZone.com and articles from our Zones - covering Big Data and NoSQL databases, web design and mobile development, and everything inbetween: Preview Text:  If you missed anything on DZone this week,...
Categories: Java

How to Add Existing Files to Eclipse Projects

Javalobby Syndicated Feed - Tue, 23-Sep-14 23:00
This Tip sounds very basic, but still: I get asked about this about once a week. So it must be something non-obvious in Eclipse then ;-): how to add existing files to an Eclipse project. As with many things in Eclipse, there is not a single way to do something. There are two basic ways to do this: Import Drag & Drop Copy & Paste The first is the ‘official’ way in Eclipse, the...
Categories: Java

HTML5 Game Performance on iOS 8

Javalobby Syndicated Feed - Tue, 23-Sep-14 23:00
iOS 8 has now been released, and represents a radical improvement in the performance of HTML5 games in both Safari and the web view for native apps (such as used by PhoneGap). Preview Text:  iOS 8 has now been released, and represents a radical improvement in the performance of HTML5 games in both Safari and the web view for native apps. ...
Categories: Java

How to Trace Transactions Across Every Layer of Your Distributed Software Stack

Javalobby Syndicated Feed - Tue, 23-Sep-14 23:00
APM solutions give you great visibility into any code you have control over; however, today’s systems are largely a combination of code you write along with off-the-shelf components, sitting on top of VMs/containers, and cloud-based services. Thus, full system-wide visibility requires an ability to look into your APM tool as well as log data produced from the components that you may...
Categories: Java

Hazelcast's MapLoader Pitfalls

Javalobby Syndicated Feed - Tue, 23-Sep-14 22:30
One of the core data structures provided by Hazelcast is  Preview Text:  One of the core data structures provided by Hazelcast is IMap<K, V> extendingjava.util.concurrent.ConcurrentMap - which is basically a distributed map, often used as cache Legacy Sponsored:  ...
Categories: Java

How to Resolve Maven's "Failure to Transfer" Error

Javalobby Syndicated Feed - Tue, 23-Sep-14 22:30
Here is a quick solution for those encountering the “Failure to Transfer” error in Maven. The error message will most likely look something like this Preview Text:  Here is a quick solution for those encountering the “Failure to Transfer” error in Maven. Legacy Sponsored:  ...
Categories: Java

Debugging Step by Step: Influence Debugging

Javalobby Syndicated Feed - Tue, 23-Sep-14 22:30
Influence debugging is another way of active debugging. Preview Text:  Influence debugging is an efficient active debugging method by which you can ignore a large part of your code during bug hunting. You can go backward along influences exclusively until you catch the bug. Tricky missing code errors can also be detected by this new method. ...
Categories: Java

WeIO: A Hardware and Software Platform for IoT

Javalobby Syndicated Feed - Tue, 23-Sep-14 22:30
The Internet of Things is a reality that is already upon us (as well as a hopefully-not-dystopian future), but it's most compelling when it's something you can create on your own. That's the beauty of hobbyist boards like the Raspberry Pi - you can build real, functional IoT devices to prevent heart attacks and so on. Preview Text:  The Internet of...
Categories: Java

MySQL Upgrade Best Practices

Javalobby Syndicated Feed - Tue, 23-Sep-14 22:30
Originally Written by Muhammad Irfan MySQL upgrades are necessary tasks and we field a variety of questions here at Percona Support regarding MySQL upgrade best practices. This post highlights recommended ways to upgrade MySQL in different scenarios. Preview Text:  MySQL upgrades are necessary tasks and we field a variety of questions here at...
Categories: Java

Developing Services with Apache Camel - Part I: The Inspiration

Javalobby Syndicated Feed - Tue, 23-Sep-14 22:30
In early May, my client asked me to work on a project migrating from IBM Message Broker 6.1 to an open source solution. Their reason was simple, the IBM solution was end of life and outdated. To prove how out of date it was, the Windows version required Windows XP to run. IBM WebSphere Message Broker has been replaced by IBM Integration Bus in recent years, but no upgrade...
Categories: Java

Simple Photo Filters with VintageJS and Cordova

Javalobby Syndicated Feed - Tue, 23-Sep-14 22:30
A quick demo today of something I ran into via StackOverflow. VintageJS is a JavaScript library that adds simple camera filters, like sepia and vignettes, to pictures. As long as your browser supports canvas, you can make use of the library rather easily. Here is one example, stolen from their docs. Preview Text:  A quick demo today of...
Categories: Java

Spotlight on GlassFish 4.1: #4 JAXP accessExternalSchema

Javalobby Syndicated Feed - Tue, 23-Sep-14 22:30
'Spotlight on GlassFish 4.1' is a series of posts by David Delabassee that highlights specific enhancements of the upcoming GlassFish 4.1 release. It could be a new feature, a fix, a behaviour change, a tip, etc. Preview Text:  GlassFish 4.1 supports recent JDK versions. Sometime, those newer JDKs might have some side effect as they bring new...
Categories: Java

Addressing the Problems of Big Data: Answers from 6 Experts on Twitter

Javalobby Syndicated Feed - Tue, 23-Sep-14 22:01
Monday was the official launch of DZone's 2014 Guide to Big Data and to kick off this event, we gathered a panel of six Big Data specialists to participate in DZone's first Twitter Q&A, which appeared under the #DZBigData hashtag. Preview Text:  Monday was the official launch of DZone's 2014 Guide to Big Data and to kick off this event, we...
Categories: Java

Home.Pi Reloaded – Home Automation with Ionic and MQTT

codecentric Blog - Tue, 23-Sep-14 22:00

Today I want to inform you about a new release of my home automation solution “Home.Pi”. First I want to apologize to all those whom I have not yet replied to their questions after the first post. Maybe the following article answers some of them and helps you to get it running on your own hardware or cloud service. In the meantime I experimented a lot with different technologies, e.g. Ionic Framework, Firebase, MQTT, etc. and released some new versions of Home.Pi. But in the end I was not really convinced with the solutions. The Release v3.0 was running with Firebase and it worked good, but I don’t like vendor lock-in especially for private open source projects. So I decided to move most of the stuff into the trash and implemented a really small solution which is now based on the Ionic Framework for the GUI and a lightweight Message Broker (MQTT) to connect the devices.

Architecture

sys_arch_homepi

The reason why I choose Ionic and MQTT is simple. Most of the time I control the devices over my mobile phone, so I need a great user experience here. With MQTT the GUI-Application gets decoupled from the device controllers. For deeper informations about MQTT please refer to mqtt.org. Only the services which need a direct connection to a device (e.g. to a 433 MHz-Transmitter) are running on local hardware (Raspberry Pi, Spark-https://www.spark.io/). All other components are deployed on a EC2-cloud-instance (MQTT-Broker, Google Calendar Bridge, etc.).  In the end it’s a kind of a Micro Service Architecture, where I am able to replace components very easily without interrupting the whole home automation system. Furthermore I am not restricted to a specific programming language. Basically I can use every programming language which has a supported MQTT Client. But let’s have a look on the new awesome GUI ;-):

screenshotSetup

To get it running just read the following instructions or go directly to Github for further and maybe updated instructions.

1. Install Mosca (MQTT Broker)

npm install mosca bunyan -g

2. Start the broker

mosca --http-port 8000 --http-bundle --verbose | bunyan

3. Publish the device configuration to the MQTT broker. For the first time you can leave the config as it is and simply execute the script publish-config.sh. Beforehand please make sure to modify the credentials to access your own MQTT broker inside the script.

./publish-config.sh

4. Clone the source code from Github

git clone https://github.com/denschu/homepi

5. Install some tools and build it

cd homepi
sudo npm install -g cordova ionic gulp
npm install
gulp install

5. Start a local HTTP Server with the Ionic CLI Tools

ionic serve

6. The web browser should start automatically and show up the login screen

7. Login with your credentials

As a next step you have to setup a device controller. You can find some MQTT bindings here. For the quick start I recommend to buy a Raspberry PI, a 433MHz transmitter and some cheap switches which are supported by rc-switch.  See the mqtt-exec repository to setup the MQTT binding and my old blog post to install rc-switch on the Raspberry Pi.

Build your own device controller

Actually I am running the following controllers in my home:

Unfortenately there are only 3 device types supported at the moment (on_off, dimmer, thermostats). But don’t worry, it’s really easy to add your own devices and get them running. First you have to extend the device configuration and publish it to the configuration topic (<username>/home/config).

Example:

{
"id" : "green_lamp",
"type" : "on_off",
"name" : "Green Lamp",
"topic" : "denschu/home/devices/livingroom/green_lamp/value",
"value" : false
}

id: The unique identifier of the device. The id should also be part of the topic.

type: The device type (supported values: on_off, dimmer, thermostat)

name: The name of the device shown up in the GUI

topic: The topic to subscribe to. When you modify the value in the GUI, then a “/set” will be added to the outgoing topic name. Thats important when you build your own binding later.

value: Initial value

Please follow these naming conventions for topic names:

Get a value

Template: <username>/home/devices/<room>/<device-name>/value

Example: denschu/home/devices/living_room/light1/value

Set a value

Template: <username>/home/devices/<room>/<device-name>/value/set <value>

Example: denschu/home/devices/living_room/light1/value/set true

After these steps, please guide through the setup of the above device controllers.  For detailed installation instructions just follow the links to the projects. To add a completely new device type you have to modify the GUI application. How to do that? Maybe I’ll write about it in another blog post :-)

What’s next?

After playing around with some base technologies and architectural decisions, these are the next tasks for me:

  • Create a real mobile app for iOS and Android
  • Refactor the code – Sorry, I’m not a real JS expert
  • Add some Geofencing features with Owntracks
  • Play around with HomeKit and learn some Swift
  • Improve the connection handling with the MQTT broker

When you want to help me to build some more features, then pull requests and tipps are always welcome :-)

The post Home.Pi Reloaded – Home Automation with Ionic and MQTT appeared first on codecentric Blog.

Categories: Agile, Java, TDD & BDD

3 Questions: Kai Kreuzer Discusses Home Automation and IoT

Javalobby Syndicated Feed - Tue, 23-Sep-14 22:00
Originally Written by Fred Sandsmark Preview Text:  When he was just 12 years old, Kai Kreuzer put sensors on the doors of his bedroom and began a lifelong fascination with home automation. Years later, in 2008, Kreuzer had cables, sensors, and actuators built into his new home near Darmstadt, Germany. Legacy ...
Categories: Java

Enabling Salesforce Integration for Financial Institutions

Javalobby Syndicated Feed - Tue, 23-Sep-14 22:00
Preview Text:  Financial services firms value Salesforce solutions for their ability to drive business transformation. These solutions provide customers, employees, and partners with robust anywhere, anytime functionality for sales, service, marketing and customer engagement. Legacy Sponsored:  ...
Categories: Java

OpenStack Cloud Deployments Made Easy: Heat Plugin for Cloudify

Javalobby Syndicated Feed - Tue, 23-Sep-14 22:00
[This article was written by Yoram Weinreb.] OpenStack Heat makes orchestrating the deployment of multiple OpenStack elements a breeze using its “stack” concept. Preview Text:  OpenStack Heat makes orchestrating the deployment of multiple elements a breeze using its stack concept. I will explain as well as show...
Categories: Java

Thread Slivers eBook at Amazon

Syndicate content