Skip to content

openHAB: detect if a ChromeCast is currently used or idle

We have a couple of Audio and Video ChromeCasts in use. For an upcoming project I need to figure out if any of them is currently used. That is different for the Audio and the Video devices: the Audio just goes idle=ON, the Video devices however load the "Backdrop" app and show pictures when idling. Google for whatever reason does not want the attached monitor to go in powersafe mode. So much for saving energy ...

All of the action needs between a few milliseconds and 2-3 seconds once you start/stop using the ChromeCast.

A previous blog post explains how I add the ChromeCast devices. And I have monitoring in place.

 

Continue reading "openHAB: detect if a ChromeCast is currently used or idle"
  • Twitter
  • Bookmark openHAB: detect if a ChromeCast is currently used or idle at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg openHAB: detect if a ChromeCast is currently used or idle
  • Bloglines openHAB: detect if a ChromeCast is currently used or idle
  • Technorati openHAB: detect if a ChromeCast is currently used or idle
  • Fark this: openHAB: detect if a ChromeCast is currently used or idle
  • Bookmark openHAB: detect if a ChromeCast is currently used or idle at YahooMyWeb
  • Bookmark openHAB: detect if a ChromeCast is currently used or idle at Furl.net
  • Bookmark openHAB: detect if a ChromeCast is currently used or idle at reddit.com
  • Bookmark openHAB: detect if a ChromeCast is currently used or idle at blinklist.com
  • Bookmark openHAB: detect if a ChromeCast is currently used or idle at Spurl.net
  • Bookmark openHAB: detect if a ChromeCast is currently used or idle at Simpy.com
  • Bookmark openHAB: detect if a ChromeCast is currently used or idle at blogmarks
  • Bookmark openHAB: detect if a ChromeCast is currently used or idle with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca

Grafana: select host for a dashboard

InfluxDB is running on a Raspberry Pi in my home network (with separate attached disk), and I installed a Grafana on top of it, to visualize crucial data.

In Grafana it is possible to define a variable for a dashboard and this variable can query the data source and use the returned list of values. Let's say the variable is $host, then the data query can use:

WHERE host =~ /^$host$/

and limit the current dashboard to the selected host. Also the variable will provide a select field at the top of the dashboard, which allows selecting the system one wants to see:

Now usually - according to the documentation - a "SHOW TAG VALUES" in the data source should be sufficient However as it is, this did not work for me, and the query came back empty:

> show tag values from system with key = host

Looks like I'm not the only one with this problem.

 

Luckily there is a way around with another query:

select distinct("host") from (select "host","load1" from system)

The result:

> select distinct("host") from (select "host","load1" from system)
name: system
time distinct
---- --------
0    host1
0    host2
0    host3
0    host4
0    host5
0    host6

Grafana ignores the "time" column and uses the second column for the host list. Voila.

  • Twitter
  • Bookmark Grafana: select host for a dashboard at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg Grafana: select host for a dashboard
  • Bloglines Grafana: select host for a dashboard
  • Technorati Grafana: select host for a dashboard
  • Fark this: Grafana: select host for a dashboard
  • Bookmark Grafana: select host for a dashboard at YahooMyWeb
  • Bookmark Grafana: select host for a dashboard at Furl.net
  • Bookmark Grafana: select host for a dashboard at reddit.com
  • Bookmark Grafana: select host for a dashboard at blinklist.com
  • Bookmark Grafana: select host for a dashboard at Spurl.net
  • Bookmark Grafana: select host for a dashboard at Simpy.com
  • Bookmark Grafana: select host for a dashboard at blogmarks
  • Bookmark Grafana: select host for a dashboard with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca

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