Notifications not working?

Hi there

we’ve had a power outage two days ago and ever since I experience some issues with notifications: they are simply not working.
Nothing has changed in my setup, other rules which do not trigger notifications are working, too.
Some more hints:

  • openhab cloud is online, I can remotely access and change item states
  • notifications in general (i.e. if I send a notification manually from openhabcloud) are working, too.

Simple example of one of the rules which is not working:

rule "Es klingelt"
    Item KW_EG changed
        sendNotification ("","Jemand klingelt")

Anyone has any idea?
Also, how do I actually debug rules and or notifications, what to I have to type into the karaf console to set the log level into debug or some other state which might give me more insight into why notifications are not working currently?


On windows-system you find the logs in …/openhab/userdata/log/ and …/logs/
or in \OPENHABIANPI\openHAB-share\openhab2-logs and \OPENHABIANPI\openHAB-share\openhab2-userdata\log

Karaf-comands are:
ssh openhab@localhost -p 8101
log:get, log:set debug and log:display


thanks. I set log level for the openhabcloud to trace in the meantime and do not find anything in the logs. All I find re the cloud is this:

2017-08-04 11:54:44.015 [INFO ] [io.openhabcloud.internal.CloudClient] - Connected to the openHAB Cloud service (UUID = xxxxxxxxxxxxxxxxxxxxxxxx, base URL = http://localhost:8080)

Just for my understanding: Shouldn’t there be some kind of log level entry if I trigger a notification for the openhabcloud?
Last thing I can think of right now is to install wireshark on my raspberrypi and see whether there is some traffic from my openhab to the openhabcloud at all.

After set to debug or trace if find notification-entrys in my log.
Are the values in the uuid and secret-file correct?

yes, uuid and secret are correct. I’ve double-checked and even updated, although there were no changes.

Maybe another thing which is interesting: The last notification I received was from a rule which involved an item which was not initialized after the last restart…
The item is a Fritz DECT plug, which I hardly use and did not initialize therefore. Nevertheless the following rule was triggered and sent a notification.

rule "Es klingelt"
    Item Fritz_DECT changed
        sendNotification ("","Jemand klingelt")

My log

15:02:25.628 [INFO ] [smarthome.event.ItemCommandEvent    ] - Item 'sendNotification' received command ON
15:02:25.661 [DEBUG] [io.socket.parser.Parser             ] - encoded io.socket.parser.Packet@5ebd66 as 2["notification",{"message":"Hello world!","userId":""}]

Is your rule called?

Well - my rules are generally called which I found out by trial.

How do I set the log level to show my rules, i.e. which package do I have to set to debug?

And what log did you show in your message? Usually a message like “Item xxx received command on” shows up in the event log, doesn’t it?

Anyway, filtering the log for some of the keywords which are in your log do not show up anything.

My example

		Item sendNotification received command
logInfo("xxx","sendNotification xxx")
		sendNotification("", "Hello world!")

just wanted to let you know how this played out eventually. It didn’t really. This is what happens.

After you posted your tip, all of a sudden notifications worked again. Not because I did anything, but…randomly.

Then, couple of weeks later, openhab cloud went suddenly offline. That was an error in the raspberry pi. I’m suspecting the SD is starting to corrupt. Anyway, after a reboot the pi was fine again, openhab online - but no notifications.
I ended up uninstalling the cloud, deleting UUID and secret, AND deleting my openhab cloud account, setting up a new one, re-installing the cloud binding and then entering the new UUID and secret in the account details. Then it worked again for a while (3 weeks).

Tonight, the same thing again: trouble with the pi, cloud offline. Did the same thing (re-installing, deleting and registering a new account. But notifications are not working again.

I did use your example then, too. And the log says “notifications are working” (which is what I put instead of your “sendNotification xxx” - but I do not receive any. If I manually send a notification from my cloud, it works.

So somewhere between my pi and the cloud, notifications apparently get lost.

Any ideas?

Sidenote: I read that SD card corruption on the pi is not uncommon. I will try to move my OH installation to a different computer (an old netbook I have) and see whether it’s more reliable then. And if notifications will work then. However, I decided to upgrade the netbook with an SSD, as soon as I have this, I’ll send an update.

anyone figured this out ?

I also have the same problem, notifications just stopped.

switching to DEBUG mode, I see "No connection, notification is not sent"
One post mentioned the same problem with multiple network connections, but this is no the case in my setup.

What is your setup?
In my case it turned out to be the corrupt SD card. So if you use a raspberry pi, make sure your logs don’t write to the SD card.

Also: the myopenhab cloud was down yesterday, I had trouble for a couple of hours, too…

I’m having a similar issue but for the moment it’s working fine.

Next time it happens I’ll try and see if it’s down to SD card corruption (seems a very likely candidate), I’d certainly back up your configuration in case your SD card goes pop.

In the mean time I will investigate how to get the logs to write to a ramdisk