Problem with notifications and OpenHab2

Hi,

I try to use one of the following methods in my rule files sendNotification, sendBroadcastNotification or sendLogNotification but any of then are working.
My system seems correctly connected to myopenhab.

Thank you

It might be a good idea to show us your rule to find the issue.

I just can say that it is working in my environment.

I’ve started by a basically rule just to test it

 rule "testNotif"
    when   
            Time cron "	0 0/5 * 1/1 * ? *"
    then   
            sendNotification("myopenhab_login@gmail.com","text notification") // hope getting a notif on my openhab iOS app
            sendBroadcastNotification("text notification") // hope getting a notif on devices connected to myOpenHab
            sendLogNotification("text notification")// hope getting a notif on myOpenhab.org notif dashboard
  
    end

Do I have to write an import syntax ?

thank’s a lot for your help

When you log into myopenhab.org, do you see any of these notifications ?
Is your device registered under your myopenhab account ?

When I log on myopenhab I just see those notifications :
Last Friday at 1:26 PM openHAB is online
Last Friday at 1:16 PM openHAB is offline

But any of the notifications from my rule test

and my iOS device is correctly connected to my openhab account (I can execute orders on things in my home with a 3g/4G connexion …)

Not sure, but there is a space in your cron expression, try to change it to
Time cron "0 0/5 …

Unhapily, it doesn’t work better without the space in the cron expression.
I added a log trace before and after the notification’s instructions :
rule "testNotif"
when
Time cron "0 0/1 * 1/1 * ? *“
then
logInfo(“hvac”,“start notif”)
sendNotification("myopenhab_login@gmail.com”,“text notification”)
sendBroadcastNotification(“text notification”)
sendLogNotification(“text notification”)
end

and this is the result
2017-01-03 22:01:00.014 [INFO ] [.eclipse.smarthome.model.script.hvac] - start notif
2017-01-03 22:01:00.021 [INFO ] [.eclipse.smarthome.model.script.hvac] - end notif

What’s your java version ?

Hi,

I’ve installed the Hassle-free openHAB2 distribution for my raspi3, so, I suppose the java version is this one “build 1.8.0_101” (https://github.com/openhab/openhabian).
But I can’t access to my raspi with a SSH connection for the moment to confirm it.

Thank’s a lot for your help, I’m quite lost

Cédric.

If you installed openhabian, I am lost to.
Did you install my.openhab or openhabcloud ?

Both of them, maybe that’s the mistake :blush:

Yep, that could be. Please remove my.openhab

Yes, that’s also what I suggest. A lot of people mix up the old my.openhab and the new myopenhab service at the moment. Maybe also because of an not so clear documentation (both do co-exist atm).

You should delete the old my.openhab (remove the binding, remove persist file, remove any related cfg files). Then follow the guide for the new openhabcloud (aka myopenhab):

http://docs.openhab.org/addons/io/openhabcloud/readme.html

After that, check if your myopenhab.org website shows “ONLINE”. You should then check if a test message through myopenhab.org reaches your device.

Hi,

Thank’s for ur help.
I have to test when I’ll be back home.
I’ve tried uninstalling my.openhab add on from the cloud … but I get a 504 Error Gateway. I suppose that the connection use this add on …

Guys !!

It finaly works !! Thank you

:+1:

:thumbsup: :slight_smile:

Hi,

what have you done finally?
I am using openhabian latest version, only openhabcloud service… but i can get no notfication at all!
Only the information since when openhab is online etc… but no event log and no notifications!
any ideas?

oliver