Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sendNotification and sendBroadcastNotification not working inside DSL rule #4412

Open
daftndaze opened this issue Oct 8, 2024 · 2 comments
Labels
bug An unexpected problem or unintended behavior of the Core

Comments

@daftndaze
Copy link

daftndaze commented Oct 8, 2024

I am not receiving notifications in myopenhab anymore. Worked befor for years and stopped working out of a sudden. I think I haven't changed any relevant thing in my openhab configuration.

myopenhab states that my openhab instance is online.

I have searched the community and could not find a suitable answer/help.

Expected Behavior

Notification sent should apear in myopenhab notification tab and on my devices (smartphones with Android).

Current Behavior

Notifications does not reach myopenhab nor the smartphones.
Log says the cloud service is connected. When the sendNotification is executed, openhab states, that it is not connected.

2024-10-08 18:55:44.394 [DEBUG] [o.openhabcloud.internal.CloudService] - bundle org.openhab.io.openhabcloud:4.2.0 (306)[org.openhab.io.openhabcloud.internal.CloudService(595)] : ConfigurableComponentHolder configuration updated for pid org.openhab.openhabcloud with change count 43
2024-10-08 18:55:44.395 [DEBUG] [o.openhabcloud.internal.CloudService] - bundle org.openhab.io.openhabcloud:4.2.0 (306)[org.openhab.io.openhabcloud.internal.CloudService(595)] : Querying state active
2024-10-08 18:55:44.396 [DEBUG] [o.openhabcloud.internal.CloudService] - bundle org.openhab.io.openhabcloud:4.2.0 (306)[org.openhab.io.openhabcloud.internal.CloudService(595)] : Querying state active
2024-10-08 18:55:44.397 [DEBUG] [o.openhabcloud.internal.CloudService] - bundle org.openhab.io.openhabcloud:4.2.0 (306)[org.openhab.io.openhabcloud.internal.CloudService(595)] : invoking modified: modified: parameters [org.apache.felix.scr.impl.helper.ReadOnlyDictionary]
2024-10-08 18:55:44.398 [DEBUG] [o.openhabcloud.internal.CloudService] - Using secret at '/openhab/userdata/openhabcloud/secret' with content '13...H9'
2024-10-08 18:55:44.399 [DEBUG] [o.openhabcloud.internal.CloudService] - UUID = 31...6d, secret = 13...H9
2024-10-08 18:55:44.400 [INFO ] [io.openhabcloud.internal.CloudClient] - Shutting down openHAB Cloud service connection
2024-10-08 18:55:44.401 [DEBUG] [o.openhabcloud.internal.CloudService] - Using secret at '/openhab/userdata/openhabcloud/secret' with content '13...H9'
2024-10-08 18:55:44.401 [WARN ] [io.openhabcloud.internal.CloudClient] - Socket.IO disconnected: io client disconnect
2024-10-08 18:55:44.402 [INFO ] [io.openhabcloud.internal.CloudClient] - Disconnected from the openHAB Cloud service (UUID = 31...6d, base URL = http://localhost:8080)
2024-10-08 18:55:44.404 [DEBUG] [io.openhabcloud.internal.CloudClient] - Socket.IO CLOSE: forced close
2024-10-08 18:55:44.413 [DEBUG] [o.openhabcloud.internal.CloudService] - bundle org.openhab.io.openhabcloud:4.2.0 (306)[org.openhab.io.openhabcloud.internal.CloudService(595)] : invoked modified: modified
2024-10-08 18:55:44.413 [TRACE] [io.openhabcloud.internal.CloudClient] - Manager.EVENT_TRANSPORT
2024-10-08 18:55:44.413 [DEBUG] [o.openhabcloud.internal.CloudService] - bundle org.openhab.io.openhabcloud:4.2.0 (306)[org.openhab.io.openhabcloud.internal.CloudService(595)] : No change in target property for dependency $000: currently registered: true
2024-10-08 18:55:44.414 [DEBUG] [o.openhabcloud.internal.CloudService] - bundle org.openhab.io.openhabcloud:4.2.0 (306)[org.openhab.io.openhabcloud.internal.CloudService(595)] : No change in target property for dependency $001: currently registered: true
2024-10-08 18:55:44.414 [TRACE] [io.openhabcloud.internal.CloudClient] - Transport.EVENT_REQUEST_HEADERS
2024-10-08 18:55:44.415 [DEBUG] [io.openhabcloud.internal.CloudClient] - Socket.IO connecting
2024-10-08 18:55:44.416 [DEBUG] [o.openhabcloud.internal.CloudService] - bundle org.openhab.io.openhabcloud:4.2.0 (306)[org.openhab.io.openhabcloud.internal.CloudService(595)] : No change in target property for dependency $002: currently registered: true
2024-10-08 18:55:44.417 [DEBUG] [o.openhabcloud.internal.CloudService] - bundle org.openhab.io.openhabcloud:4.2.0 (306)[org.openhab.io.openhabcloud.internal.CloudService(595)] : No change in target property for dependency osgi.ds.satisfying.condition: currently registered: true
2024-10-08 18:55:44.417 [DEBUG] [o.openhabcloud.internal.CloudService] - bundle org.openhab.io.openhabcloud:4.2.0 (306)[org.openhab.io.openhabcloud.internal.CloudService(595)] : Querying state active
2024-10-08 18:55:44.419 [DEBUG] [ons.NotificationModuleHandlerFactory] - bundle org.openhab.io.openhabcloud:4.2.0 (306)[org.openhab.io.openhabcloud.internal.actions.NotificationModuleHandlerFactory(597)] : dm $000 tracking 7 SingleStatic modified {org.openhab.io.openhabcloud.internal.CloudService, org.openhab.core.events.EventSubscriber, org.openhab.core.model.script.engine.action.ActionService}={service.id=1119, mode=remote, service.bundleid=306, service.scope=bundle, osgi.ds.satisfying.condition.target=(osgi.condition.id=true), component.name=org.openhab.io.openhabcloud.internal.CloudService, service.config.label=openHAB Cloud, component.id=595, service.config.factory=false, baseURL=https://myopenhab.org, service.config.category=io, service.config.description.uri=io:openhabcloud, service.pid=[org.openhab.openhabcloud, org.openhab.openhabcloud]} (enter)
2024-10-08 18:55:44.419 [DEBUG] [ons.NotificationModuleHandlerFactory] - bundle org.openhab.io.openhabcloud:4.2.0 (306)[org.openhab.io.openhabcloud.internal.actions.NotificationModuleHandlerFactory(597)] : dm $000 tracking 7 SingleStatic modified {org.openhab.io.openhabcloud.internal.CloudService, org.openhab.core.events.EventSubscriber, org.openhab.core.model.script.engine.action.ActionService}={service.id=1119, mode=remote, service.bundleid=306, service.scope=bundle, osgi.ds.satisfying.condition.target=(osgi.condition.id=true), component.name=org.openhab.io.openhabcloud.internal.CloudService, service.config.label=openHAB Cloud, component.id=595, service.config.factory=false, baseURL=https://myopenhab.org, service.config.category=io, service.config.description.uri=io:openhabcloud, service.pid=[org.openhab.openhabcloud, org.openhab.openhabcloud]} (exit)
2024-10-08 18:55:44.420 [DEBUG] [o.openhabcloud.internal.CloudService] - bundle org.openhab.io.openhabcloud:4.2.0 (306)[org.openhab.io.openhabcloud.internal.CloudService(595)] : ImmediateComponentHolder Finished configuring the dependency managers for component for pid org.openhab.openhabcloud 
2024-10-08 18:55:44.420 [DEBUG] [o.openhabcloud.internal.CloudService] - bundle org.openhab.io.openhabcloud:4.2.0 (306)[org.openhab.io.openhabcloud.internal.CloudService(595)] : ImmediateComponentHolder Will not enable component for pid org.openhab.openhabcloud: holder enabled state: true, metadata enabled: true 
2024-10-08 18:55:44.496 [DEBUG] [io.openhabcloud.internal.CloudClient] - Socket.IO OPEN
2024-10-08 18:55:44.498 [TRACE] [io.openhabcloud.internal.CloudClient] - Socket.IO Packet: CONNECT (0)
2024-10-08 18:55:44.499 [DEBUG] [io.openhabcloud.internal.CloudClient] - Socket.IO connected
2024-10-08 18:55:44.499 [INFO ] [io.openhabcloud.internal.CloudClient] - Connected to the openHAB Cloud service (UUID = 31...6d, base URL = http://localhost:8080)
2024-10-08 18:56:09.498 [DEBUG] [io.openhabcloud.internal.CloudClient] - Socket.IO ping
2024-10-08 18:56:09.510 [DEBUG] [io.openhabcloud.internal.CloudClient] - Socket.IO pong: 12 ms
2024-10-08 18:56:11.589 [INFO ] [nhab.core.model.script.Say something] - Quatschi Quatschi!
2024-10-08 18:56:11.590 [DEBUG] [b.io.openhabcloud.NotificationAction] - sending notification 'Hallo Welt, nur an someemail!' to user [email protected]
2024-10-08 18:56:11.591 [DEBUG] [o.openhabcloud.internal.CloudService] - Sending message 'Hallo Welt, nur an someemail!' to user id [email protected]
2024-10-08 18:56:11.591 [DEBUG] [io.openhabcloud.internal.CloudClient] - No connection, notification is not sent
2024-10-08 18:56:11.592 [DEBUG] [b.io.openhabcloud.NotificationAction] - sending broadcast notification 'Hallo Welt, an alle!' to all users
2024-10-08 18:56:11.592 [DEBUG] [o.openhabcloud.internal.CloudService] - Sending broadcast message 'Hallo Welt, an alle!' to all users
2024-10-08 18:56:11.593 [DEBUG] [io.openhabcloud.internal.CloudClient] - No connection, notification is not sent
2024-10-08 18:56:12.594 [INFO ] [nhab.core.model.script.Say something] - Say something wurde durchlaufen.
2024-10-08 18:56:34.511 [DEBUG] [io.openhabcloud.internal.CloudClient] - Socket.IO ping
2024-10-08 18:56:34.523 [DEBUG] [io.openhabcloud.internal.CloudClient] - Socket.IO pong: 12 ms
2024-10-08 18:56:59.524 [DEBUG] [io.openhabcloud.internal.CloudClient] - Socket.IO ping
2024-10-08 18:56:59.536 [DEBUG] [io.openhabcloud.internal.CloudClient] - Socket.IO pong: 12 ms
2024-10-08 18:57:24.537 [DEBUG] [io.openhabcloud.internal.CloudClient] - Socket.IO ping
2024-10-08 18:57:24.549 [DEBUG] [io.openhabcloud.internal.CloudClient] - Socket.IO pong: 12 ms
2024-10-08 18:57:49.550 [DEBUG] [io.openhabcloud.internal.CloudClient] - Socket.IO ping
2024-10-08 18:57:49.562 [DEBUG] [io.openhabcloud.internal.CloudClient] - Socket.IO pong: 12 ms
2024-10-08 18:58:14.563 [DEBUG] [io.openhabcloud.internal.CloudClient] - Socket.IO ping
2024-10-08 18:58:14.577 [DEBUG] [io.openhabcloud.internal.CloudClient] - Socket.IO pong: 13 ms
2024-10-08 18:58:39.577 [DEBUG] [io.openhabcloud.internal.CloudClient] - Socket.IO ping
2024-10-08 18:58:39.592 [DEBUG] [io.openhabcloud.internal.CloudClient] - Socket.IO pong: 14 ms
2024-10-08 18:59:04.592 [DEBUG] [io.openhabcloud.internal.CloudClient] - Socket.IO ping
2024-10-08 18:59:04.604 [DEBUG] [io.openhabcloud.internal.CloudClient] - Socket.IO pong: 12 ms

Steps to Reproduce (for Bugs)

sendNotification("[email protected]", "Hallo Welt, nur an someemail!")
sendBroadcastNotification("Hallo Welt, an alle!")

Context

I don't get notified on my smartphones about things that happen or get switched.

Your Environment

  • Version used: openhab version 4.2.0 and offical maketplace bindings.
  • Environment name and version (e.g. Chrome 111, Java 17, Node.js 18.15, ...):
  • Operating System and version (desktop or mobile, Windows 11, Raspbian Bullseye, ...): Docker on Synology
@daftndaze daftndaze added the bug An unexpected problem or unintended behavior of the Core label Oct 8, 2024
@lolodomo
Copy link
Contributor

I received mail notifications today in the Android app coming from a DSL rule. I am running 4.3 milestone 2. Just to say there is not a general problem with sendNotification but rather a specific problem with your setup

@daftndaze
Copy link
Author

Thank you very much for your comment.

I am using a different (stable) version. The fact that you receive notifications and I don't may also be due to a bug in 4.2.0. During my research, I also read about cases in which only some users were affected in the past.

What is strange is that my openHAB instance is online and my log says Connected to the openHAB Cloud service. As soon as I send a notification, I get No connection, notification is not sent (in trace mode). See attached log file.

When I restarted openHAB, I noticed that notifications are still being sent shortly after the start and also arrive on myopenhab and on my smartphone. After a short time, the notifications stop working.

I have checked my configuration several times and have not been able to find any changes or misconfigurations. Even restarting the openHAB Cloud binding does not bring any change.

I will try out the stable version 4.2.2 at the weekend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of the Core
Projects
None yet
Development

No branches or pull requests

2 participants