Skip to content

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

Install a Raspbee II on a Raspberry Pi

A while ago I got a recommendation to look into a Raspbee (from dresden elektronik) as Zigbee gateway. That looked like fun, therefore I ordered one of the devices. The first step is the installation of the Pi itself and then the software for the Raspbee. 

For various reasons I decided to use a dedicated Pi for this, and don't install this on the openHAB Pi already running here:

  • The Raspbee needs software from a closed repository
  • During installation and configuration I don't have to reboot my openHAB system all the time
  • The headless install runs a webserver, this conflicts with the redirect I have on port 80 on the openHAB system
  • I still have a couple Raspberry Pi B+ here, which I don't need for other projects

 

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

Raspberry Pi watchdog for openHAB

The openHAB display in the kitchen is still the problem child. Occasionally it just stops, other times it does not refresh the HABpanel, even though it has a connection to the openHAB server. Then there is the problem with the network card in the Pi. And - ok, that's a server-side problem - occasionally the weather stops updating. All in all that's a lot of trouble for a display which is just supposed to run standalone.

In the latest iteration I looked into activating the integrated hardware watchdog in the Raspberry Pi. Checking the temperature it never goes above ~55°C celcius, even though the display is in an almost closed frame and can't exchange much heat with the environment. But nevertheless occasionally the Pi just halts, and stops operating.

 

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

openhab2: check if alive

As mentioned in my previous openHAB blog post: it seems to be too much to ask to have a reliable and working display in the kitchen.

Another problem I found is that the weather data occasionally does not update. Everything seems to work, no errors in the log, just no updated data. Of course this results in outdated weather info in the kitchen, and the threat that "someone" will buy a regular weather station and render my 7" Raspberry display useless.

After fighting with logs and debugging and not finding any real clue, I decided to tackle this problem from another angle, and regularly check if the weather data is up to date.

 

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

Ansible, delegate_to and set_fact

Another Ansible upgrade, another Playbook failing.

I have a number Playbooks which run on virtual machines. Some tasks are "outsourced" to the physical machine where the VM is running on, using "delegate_to". One of the tasks (which I haven't used in a while, because I rarely touch this machine) stopped working, and instead throws a "variable undefined" error. But from the beginning, here is the VM Playbook:

- block:
  - include: server-part.yml
  delegate_to: "{{ ansible_host }}"
  delegate_facts: True

That's the short form of it, and the $ansible_host variable holds the physical server address. That part is working. In "server-part.yml" I have the following:

# re-do the gather_facts task for the host
- action: setup

- name: Determine network interface name
  set_fact:
    main_interface: "{{ item }}"
  with_items:
    "{{ hostvars[physicalhost]['ansible_interfaces'] }}"
  when: item is match("^e[tn]")
  changed_when: false

- name: Verify interface name is set
  fail:
    msg: "Could not determine network interface name!"
  when: main_interface is not defined

The only physical network interface in this server is "eth0", that's still the case. There are a couple reasons why I still scan the list of interfaces, instead of just depending on "eth0". The main reason however is that this part also works with the enumeration systemd is doing with network interfaces (they have "en" names, instead of "eth"). But suddenly $main_interface in the next step is no longer defined.

Digging deeper (aka: -vvvv) it shows that Ansible is setting the correct interface name in the "set_fact" task, but then the variable is no longer defined immediately after that. What? I'm not sure I had to use this Playbook since my host was upgraded to Ansible 2.8.3, but I couldn't find any issues matching this problem either.

 

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

Local cachíng of Ansible Facts

Every time Ansible runs a Playbook, the first step (by default) is gathering facts about the target system:

PLAY [all-systems]

TASK [Gathering Facts]
ok: [host1]
ok: [host2]

This step is implicit, and it is not necessary (but possible) to add the gather facts step to every Playbook. The module which retrieves all the information is "setup", and by default it tries to gather as much information about the target system as possible. When the "setup" task is added as an extra step in the Playbook, the information about the destination system is refreshed and updated:

  tasks:
    - name: Refresh destination information
      setup:

That might be necessary when a Playbook changed vital system settings.

Gathering the facts is a time-consuming process, and for a short Playbook it is quite possible that this is the longest-running task. And it's repeated every time the Playbook runs.

Ansible provides Cache plugins which can store the gathered facts. If the system facts don't change between Playbook runs, this will greatly speed up the runtime of Playbooks. The facts cache can be stored in JSON files, in a Redis DB, in a Memcache, and a few other options. The simplest way, without additional tools required, is the "jsonfile" cache. Central implementations like Redis or Memcache allow multiple Ansible controller hosts to use the same facts cache, whereas local caches like "JSON" are only available on a single host, and every Ansible controller must build and maintain it's own cache.

 

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

Create and renew Let's Encrypt certificates using Ansible - and the acme_certificate module

About two years ago I blogged about how to create and renew Let's Encrypt certificates using Ansible. Back then, the "letsencrypt" module was State of the Art. This changed, and with all the Let's Encrypt API changes, the Ansible module changed quite a lot, and is now "acme_certificate". ACME stands for: Automatic Certificate Management Environment, and is the idea that every step along the way of creating and renewing certificates should be automated. No more manual creation of CSR (Certificate Signing Request), sending them per mail or manually uploading them to a CA website, enter your credit card details, and at some point get a mail back with the new signed certificate. All of this (except the credit card - you no longer need one) can be automated, and handled in a matter of seconds.

Time to write an updated blog post for the new module.

 

Continue reading "Create and renew Let's Encrypt certificates using Ansible - and the acme_certificate module"
  • Twitter
  • Bookmark Create and renew Let's Encrypt certificates using Ansible - and the acme_certificate module at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg Create and renew Let's Encrypt certificates using Ansible - and the acme_certificate module
  • Bloglines Create and renew Let's Encrypt certificates using Ansible - and the acme_certificate module
  • Technorati Create and renew Let's Encrypt certificates using Ansible - and the acme_certificate module
  • Fark this: Create and renew Let's Encrypt certificates using Ansible - and the acme_certificate module
  • Bookmark Create and renew Let's Encrypt certificates using Ansible - and the acme_certificate module at YahooMyWeb
  • Bookmark Create and renew Let's Encrypt certificates using Ansible - and the acme_certificate module at Furl.net
  • Bookmark Create and renew Let's Encrypt certificates using Ansible - and the acme_certificate module at reddit.com
  • Bookmark Create and renew Let's Encrypt certificates using Ansible - and the acme_certificate module at blinklist.com
  • Bookmark Create and renew Let's Encrypt certificates using Ansible - and the acme_certificate module at Spurl.net
  • Bookmark Create and renew Let's Encrypt certificates using Ansible - and the acme_certificate module at Simpy.com
  • Bookmark Create and renew Let's Encrypt certificates using Ansible - and the acme_certificate module at blogmarks
  • Bookmark Create and renew Let's Encrypt certificates using Ansible - and the acme_certificate module with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca

Ansible: Use errors="ignore" instead of skip

Another Ansible upgrade deprecation warning, which appears in Ansible 2.8:

TASK [send email] *************************************************************************************************************************************************************************************************************************************************************
[DEPRECATION WARNING]: Use errors="ignore" instead of skip. This feature will be removed in version 2.12. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.

Found so many in the last time that I added a new Tag: Deprecation.

 

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

_ansible_item_label changes in Ansible 2.8

The Ansible 2.8 upgrade brought a few failing Playbooks. I ran into the following error:

TASK [Demo Task] ************************************************************************************************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'dict object' has no attribute '_ansible_item_label'\n\nThe error appears to be in '/path/to/ansible/playbook.yml': line 76, column 5, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n  - name: Demo Task\n    ^ here\n"}

Well, seems like another upgrade with another major change. Don't you like that?

 

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

Hide the mouse cursor on a Raspberry Pi

The openHAB HABpanel we have in the kitchen runs on a Raspberry Pi and uses a touchscreen display. The browser starts in fullscreen mode, and shows a specific HABpanel screen for this display. That's all nice, but by default the mouse cursor is in the way. Let's get rid of it.

 

Continue reading "Hide the mouse cursor on a Raspberry Pi"
  • Twitter
  • Bookmark Hide the mouse cursor on a Raspberry Pi at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg Hide the mouse cursor on a Raspberry Pi
  • Bloglines Hide the mouse cursor on a Raspberry Pi
  • Technorati Hide the mouse cursor on a Raspberry Pi
  • Fark this: Hide the mouse cursor on a Raspberry Pi
  • Bookmark Hide the mouse cursor on a Raspberry Pi at YahooMyWeb
  • Bookmark Hide the mouse cursor on a Raspberry Pi at Furl.net
  • Bookmark Hide the mouse cursor on a Raspberry Pi at reddit.com
  • Bookmark Hide the mouse cursor on a Raspberry Pi at blinklist.com
  • Bookmark Hide the mouse cursor on a Raspberry Pi at Spurl.net
  • Bookmark Hide the mouse cursor on a Raspberry Pi at Simpy.com
  • Bookmark Hide the mouse cursor on a Raspberry Pi at blogmarks
  • Bookmark Hide the mouse cursor on a Raspberry Pi with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca