Skip to content

Deutscher Wetterdienst notifications in openHAB and Telegram

The "Deutscher Wetterdienst" DWD (German Weather Service) provices a service which sends out alarms for upcoming events, like heavy rain, storm, blizzard, strong winds ect. This service is only available for Germany. And it has a binding for openHAB. Time to integrate this, activate a number of regions I'm interested in, and send notifications to our mobile phones.

At this point I'm really happy that I deploy my openHAB with Ansible, I can use the Template module and loop over the Items, Things and Rules.

The Binding can "track" multiple regions, so called Cell IDs. I'm interested in 4 different Cells (the list is available here), your mileage might vary. For each reagion there can be multiple messages - and although every single example I found only assumes there is only one message (warningCount=1), I already had a situation where a Cell had two warnings. That information likely goes missing if you set warningCount to 1. Given how much configuration overhead it is when you add more channels, I can understand why most examples stay at "1" for warningCount. Doubling the number doubles the number of Items (12 -> 24). However since I deploy everything in a template, that's not a problem here.

I started this with a generous warningCount=5 - and in my templates I just loop from 1 to 5, and over every Cell, and generate all the necessary Things and Rules for every channel.

Ok, the details:

 

Continue reading "Deutscher Wetterdienst notifications in openHAB and Telegram"
  • Twitter
  • Bookmark Deutscher Wetterdienst notifications in openHAB and Telegram at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg Deutscher Wetterdienst notifications in openHAB and Telegram
  • Bloglines Deutscher Wetterdienst notifications in openHAB and Telegram
  • Technorati Deutscher Wetterdienst notifications in openHAB and Telegram
  • Fark this: Deutscher Wetterdienst notifications in openHAB and Telegram
  • Bookmark Deutscher Wetterdienst notifications in openHAB and Telegram at YahooMyWeb
  • Bookmark Deutscher Wetterdienst notifications in openHAB and Telegram at Furl.net
  • Bookmark Deutscher Wetterdienst notifications in openHAB and Telegram at reddit.com
  • Bookmark Deutscher Wetterdienst notifications in openHAB and Telegram at blinklist.com
  • Bookmark Deutscher Wetterdienst notifications in openHAB and Telegram at Spurl.net
  • Bookmark Deutscher Wetterdienst notifications in openHAB and Telegram at Simpy.com
  • Bookmark Deutscher Wetterdienst notifications in openHAB and Telegram at blogmarks
  • Bookmark Deutscher Wetterdienst notifications in openHAB and Telegram with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca

openHAB and Tankerkönig gas prices + Telegram integration

In Germany, every gas station must report gas prices online, to the "Markttransparenzstelle für Kraftstoffe". Businesses and users can then fetch this data and provide services. One of these companies is Tankerkönig, and there's also a Binding for openHAB.

If you are interested in gas prices for certain gas stations, you need to sign up for a (free) API key, and figure out the IDs of the gas stations. For that go to this website, Position the blue marker on the location you are interested in, and then click on all the gas stations you want to include. Finally click on "Tankstellen übernehmen" - this will open a JSON with the data, from there extract the "id" (and possibly the other data as well).

 

Continue reading "openHAB and Tankerkönig gas prices + Telegram integration"
  • Twitter
  • Bookmark openHAB and Tankerkönig gas prices + Telegram integration at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg openHAB and Tankerkönig gas prices + Telegram integration
  • Bloglines openHAB and Tankerkönig gas prices + Telegram integration
  • Technorati openHAB and Tankerkönig gas prices + Telegram integration
  • Fark this: openHAB and Tankerkönig gas prices + Telegram integration
  • Bookmark openHAB and Tankerkönig gas prices + Telegram integration at YahooMyWeb
  • Bookmark openHAB and Tankerkönig gas prices + Telegram integration at Furl.net
  • Bookmark openHAB and Tankerkönig gas prices + Telegram integration at reddit.com
  • Bookmark openHAB and Tankerkönig gas prices + Telegram integration at blinklist.com
  • Bookmark openHAB and Tankerkönig gas prices + Telegram integration at Spurl.net
  • Bookmark openHAB and Tankerkönig gas prices + Telegram integration at Simpy.com
  • Bookmark openHAB and Tankerkönig gas prices + Telegram integration at blogmarks
  • Bookmark openHAB and Tankerkönig gas prices + Telegram integration with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca

Monitor additional details in Telegraf with the "Exec" input filter

After installing Telegraf and hooking up everything into InfluxDB, I was missing the status of my backups. Every system here creates encrypted backups every night, and stores them on a central NAS, and off-site. But I want to know statistics about the backups, and see if something is not working.

I'm using Restic for the backups (will blog about this another time). However Telegraf does not support Restic directly, I need a few workarounds. This blog post however is not directly about monitoring the backups, but about how to write your own plugin for Telegraf.

 

Continue reading "Monitor additional details in Telegraf with the "Exec" input filter"
  • Twitter
  • Bookmark Monitor additional details in Telegraf with the "Exec" input filter at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg Monitor additional details in Telegraf with the "Exec" input filter
  • Bloglines Monitor additional details in Telegraf with the "Exec" input filter
  • Technorati Monitor additional details in Telegraf with the "Exec" input filter
  • Fark this: Monitor additional details in Telegraf with the "Exec" input filter
  • Bookmark Monitor additional details in Telegraf with the "Exec" input filter at YahooMyWeb
  • Bookmark Monitor additional details in Telegraf with the "Exec" input filter at Furl.net
  • Bookmark Monitor additional details in Telegraf with the "Exec" input filter at reddit.com
  • Bookmark Monitor additional details in Telegraf with the "Exec" input filter at blinklist.com
  • Bookmark Monitor additional details in Telegraf with the "Exec" input filter at Spurl.net
  • Bookmark Monitor additional details in Telegraf with the "Exec" input filter at Simpy.com
  • Bookmark Monitor additional details in Telegraf with the "Exec" input filter at blogmarks
  • Bookmark Monitor additional details in Telegraf with the "Exec" input filter with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca

Install Telegraf using Ansible

I have an InfluxDB up and running in my network, and decided to monitor all (well, all possible - the QNAP seems to be a problem) devices. That's quite easy to do by installing Telegraf as a server agent, and add some configuration. Everything is deployed using Ansible, so I can re-use the same Playbook for many devices.

 

Continue reading "Install Telegraf using Ansible"
  • Twitter
  • Bookmark Install Telegraf using Ansible at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg Install Telegraf using Ansible
  • Bloglines Install Telegraf using Ansible
  • Technorati Install Telegraf using Ansible
  • Fark this: Install Telegraf using Ansible
  • Bookmark Install Telegraf using Ansible at YahooMyWeb
  • Bookmark Install Telegraf using Ansible at Furl.net
  • Bookmark Install Telegraf using Ansible at reddit.com
  • Bookmark Install Telegraf using Ansible at blinklist.com
  • Bookmark Install Telegraf using Ansible at Spurl.net
  • Bookmark Install Telegraf using Ansible at Simpy.com
  • Bookmark Install Telegraf using Ansible at blogmarks
  • Bookmark Install Telegraf using Ansible with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca

Add InfluxDB settings in Telegraf using Ansible: [WARNING]: The value [...] (type list) in a string field was converted to "[...]" (type string)

I'm in the process of updating my entire home setup, and integrate everything properly. Part of this process is to automate everything, and use Ansible Playbooks to deploy devices and configurations.

Today: install Telegraf and send data to InfluxDB

Along the way something broke, and Ansible doesn't really like me anymore. But let's start at the beginning.

In the Telegraf configuration in "/etc/telegraf/telegraf.conf" one can specify output plugins. One of them (probably the most used one) is "InfluxDB". The InfluxDB instance(s) are specified as a [...] list. In Ansible I somehow need to have this list as a string, and write it into the configuration file. This happens:

TASK [Update telegraf.conf InfluxDB settings] ***************************************************
changed: [localhost] => (item={'section': '[outputs.influxdb]', 'option': 'urls', 'value': ['http://192.168.xxx.xxx:8086'], 'state': 'present'})
[WARNING]: The value ['http://192.168.xxx.xxx:8086'] (type list) in a string field was converted to "['http://192.168.xxx.xxx:8086']" (type string). If this does not look like what you expect, quote the entire value to ensure it does not change.

Looks nasty ...

 

Continue reading "Add InfluxDB settings in Telegraf using Ansible: [WARNING]: The value [...] (type list) in a string field was converted to "[...]" (type string)"
  • Twitter
  • Bookmark Add InfluxDB settings in Telegraf using Ansible: [WARNING]: The value [...] (type list) in a string field was converted to "[...]" (type string) at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg Add InfluxDB settings in Telegraf using Ansible: [WARNING]: The value [...] (type list) in a string field was converted to "[...]" (type string)
  • Bloglines Add InfluxDB settings in Telegraf using Ansible: [WARNING]: The value [...] (type list) in a string field was converted to "[...]" (type string)
  • Technorati Add InfluxDB settings in Telegraf using Ansible: [WARNING]: The value [...] (type list) in a string field was converted to "[...]" (type string)
  • Fark this: Add InfluxDB settings in Telegraf using Ansible: [WARNING]: The value [...] (type list) in a string field was converted to "[...]" (type string)
  • Bookmark Add InfluxDB settings in Telegraf using Ansible: [WARNING]: The value [...] (type list) in a string field was converted to "[...]" (type string) at YahooMyWeb
  • Bookmark Add InfluxDB settings in Telegraf using Ansible: [WARNING]: The value [...] (type list) in a string field was converted to "[...]" (type string) at Furl.net
  • Bookmark Add InfluxDB settings in Telegraf using Ansible: [WARNING]: The value [...] (type list) in a string field was converted to "[...]" (type string) at reddit.com
  • Bookmark Add InfluxDB settings in Telegraf using Ansible: [WARNING]: The value [...] (type list) in a string field was converted to "[...]" (type string) at blinklist.com
  • Bookmark Add InfluxDB settings in Telegraf using Ansible: [WARNING]: The value [...] (type list) in a string field was converted to "[...]" (type string) at Spurl.net
  • Bookmark Add InfluxDB settings in Telegraf using Ansible: [WARNING]: The value [...] (type list) in a string field was converted to "[...]" (type string) at Simpy.com
  • Bookmark Add InfluxDB settings in Telegraf using Ansible: [WARNING]: The value [...] (type list) in a string field was converted to "[...]" (type string) at blogmarks
  • Bookmark Add InfluxDB settings in Telegraf using Ansible: [WARNING]: The value [...] (type list) in a string field was converted to "[...]" (type string) with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca

openHAB and Telegram Bot

openHAB 2 comes with a Telegram binding which allows to run a Telgram Bot. This bot can both send messages to users and groups, and can receive commands and respond to them. That's useful: your home automation system can send all kind of details to your mobile phone.

For this to make it work it needs a couple things:

First of all a mobile phone with the Telegram app on it. You can either have the bot message you directly, but this only works for one person. Or you create a group, and have the bot send the messages to the group instead. Find out about the group ID here.

Then you need to create a Telegram Bot. Instructions are available here.

And everything needs to be hooked up in openHAB.

 

Continue reading "openHAB and Telegram Bot"
  • Twitter
  • Bookmark openHAB and Telegram Bot at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg openHAB and Telegram Bot
  • Bloglines openHAB and Telegram Bot
  • Technorati openHAB and Telegram Bot
  • Fark this: openHAB and Telegram Bot
  • Bookmark openHAB and Telegram Bot at YahooMyWeb
  • Bookmark openHAB and Telegram Bot at Furl.net
  • Bookmark openHAB and Telegram Bot at reddit.com
  • Bookmark openHAB and Telegram Bot at blinklist.com
  • Bookmark openHAB and Telegram Bot at Spurl.net
  • Bookmark openHAB and Telegram Bot at Simpy.com
  • Bookmark openHAB and Telegram Bot at blogmarks
  • Bookmark openHAB and Telegram Bot with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca

Move InfluxDB data directory to a SDcard

For my openHAB system I installed InfluxDB (on a separate) Raspberry Pi. The Pi has a 32 GB SDcard, but that is not enough for storing all the data, and that Pi has additional work to do as well. For that reason I also attached a 1 TB disk to the Pi, and mounted it on /data. Now all I have to do is move the InfluxDB data directory to /data.

 

Continue reading "Move InfluxDB data directory to a SDcard"
  • Twitter
  • Bookmark Move InfluxDB data directory to a SDcard at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg Move InfluxDB data directory to a SDcard
  • Bloglines Move InfluxDB data directory to a SDcard
  • Technorati Move InfluxDB data directory to a SDcard
  • Fark this: Move InfluxDB data directory to a SDcard
  • Bookmark Move InfluxDB data directory to a SDcard at YahooMyWeb
  • Bookmark Move InfluxDB data directory to a SDcard at Furl.net
  • Bookmark Move InfluxDB data directory to a SDcard at reddit.com
  • Bookmark Move InfluxDB data directory to a SDcard at blinklist.com
  • Bookmark Move InfluxDB data directory to a SDcard at Spurl.net
  • Bookmark Move InfluxDB data directory to a SDcard at Simpy.com
  • Bookmark Move InfluxDB data directory to a SDcard at blogmarks
  • Bookmark Move InfluxDB data directory to a SDcard with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca

raspi-config automated

While I installed the Raspberry Pi with the Raspbee board on it, I had to modify the settings for the serial device. That's done using the raspi-config tool on Raspbian.

However since I'm into automation, I don't want to start "raspi-config" manually, but had to figure out how to do that in an automated way.

 

 

Continue reading "raspi-config automated"
  • Twitter
  • Bookmark raspi-config automated at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg raspi-config automated
  • Bloglines raspi-config automated
  • Technorati raspi-config automated
  • Fark this: raspi-config automated
  • Bookmark raspi-config automated at YahooMyWeb
  • Bookmark raspi-config automated at Furl.net
  • Bookmark raspi-config automated at reddit.com
  • Bookmark raspi-config automated at blinklist.com
  • Bookmark raspi-config automated at Spurl.net
  • Bookmark raspi-config automated at Simpy.com
  • Bookmark raspi-config automated at blogmarks
  • Bookmark raspi-config automated with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca

New OpenWeatherMap channels missing after openHAB upgrade from 2.4 to 2.5

A while ago I upgraded openHAB from version 2.4 to 2.5. That comes with the usual share of problems, but eventually I got it working.

For an unrelated project I wanted to use the OpenWeatherMap setup I have to improve the daily weather forecast with icons.

The binding provices ids for the current weather condition and the current weather icon. That can be used to load the icon from the OWM website. Went to my setup and added two new Items:

String	homeCurrentConditionID	"Current condition ID [%s]"	{ channel="openweathermap:weather-and-forecast:home:current#condition-id" }
String	homeCurrentIconID	"Current icon ID [%s]"		{ channel="openweathermap:weather-and-forecast:home:current#icon-id" }

Used Ansible to deploy everything to the Raspberry running openHAB. And then wondered because only the "homeCurrentConditionID" item came online, not the "homeCurrentIconID". After searching around and browsing the community forum, it turns out that the "icon-id" channel is new in 2.5, and will not automatically installed if the OpenWeatherMap binding was already used in 2.4. WT* ...

One has to remove all the OWM things ("openweathermap:weather-api:home" and "openweathermap:weather-and-forecast:home") and reinstall everything, in order to get the new channels working. That is really unexpected, and not user friendly.

After mumbling a while over my options I went ahead, created a new backup, and then removed the two items. One did get stuck along the way, a long Java trace appeared in the logfile, and I had to force remove it. Then - for good measueres - I also uninstalled the binding, and restarted openHAB.

Afterwards I re-deployed my Ansible Playbook, which installs the binding, takes care of the binding configuration, and adds the Things again. After everything came online, the homeCurrentIconID Item is also populated. Why is everything in openHAB so complicated?

  • Twitter
  • Bookmark New OpenWeatherMap channels missing after openHAB upgrade from 2.4 to 2.5 at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg New OpenWeatherMap channels missing after openHAB upgrade from 2.4 to 2.5
  • Bloglines New OpenWeatherMap channels missing after openHAB upgrade from 2.4 to 2.5
  • Technorati New OpenWeatherMap channels missing after openHAB upgrade from 2.4 to 2.5
  • Fark this: New OpenWeatherMap channels missing after openHAB upgrade from 2.4 to 2.5
  • Bookmark New OpenWeatherMap channels missing after openHAB upgrade from 2.4 to 2.5 at YahooMyWeb
  • Bookmark New OpenWeatherMap channels missing after openHAB upgrade from 2.4 to 2.5 at Furl.net
  • Bookmark New OpenWeatherMap channels missing after openHAB upgrade from 2.4 to 2.5 at reddit.com
  • Bookmark New OpenWeatherMap channels missing after openHAB upgrade from 2.4 to 2.5 at blinklist.com
  • Bookmark New OpenWeatherMap channels missing after openHAB upgrade from 2.4 to 2.5 at Spurl.net
  • Bookmark New OpenWeatherMap channels missing after openHAB upgrade from 2.4 to 2.5 at Simpy.com
  • Bookmark New OpenWeatherMap channels missing after openHAB upgrade from 2.4 to 2.5 at blogmarks
  • Bookmark New OpenWeatherMap channels missing after openHAB upgrade from 2.4 to 2.5 with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca