Signal binding

didn’t have so much luck migrating.

java.lang.RuntimeException: Failed to get driver instance for jdbcUrl=jdbc:sqlite:/opt/openhab/userdata/signal/data/460340.d/account.db
        at com.zaxxer.hikari.util.DriverDataSource.<init>(DriverDataSource.java:114) ~[?:?]
        at com.zaxxer.hikari.pool.PoolBase.initializeDataSource(PoolBase.java:326) ~[?:?]
        at com.zaxxer.hikari.pool.PoolBase.<init>(PoolBase.java:112) ~[?:?]
        at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:93) ~[?:?]
        at com.zaxxer.hikari.HikariDataSource.<init>(HikariDataSource.java:81) ~[?:?]
        at org.asamk.signal.manager.storage.Database.getHikariDataSource(Database.java:101) ~[?:?]
        at org.asamk.signal.manager.storage.Database.initDatabase(Database.java:32) ~[?:?]
        at org.asamk.signal.manager.storage.AccountDatabase.init(AccountDatabase.java:32) ~[?:?]
        at org.asamk.signal.manager.storage.SignalAccount.lambda$48(SignalAccount.java:1114) ~[?:?]
        at org.asamk.signal.manager.storage.SignalAccount.getOrCreate(SignalAccount.java:1523) ~[?:?]
        at org.asamk.signal.manager.storage.SignalAccount.getAccountDatabase(SignalAccount.java:1112) ~[?:?]
        at org.asamk.signal.manager.storage.SignalAccount.lambda$38(SignalAccount.java:1087) ~[?:?]
        at org.asamk.signal.manager.storage.SignalAccount.getOrCreate(SignalAccount.java:1523) ~[?:?]
        at org.asamk.signal.manager.storage.SignalAccount.getRecipientStore(SignalAccount.java:1086) ~[?:?]
        at org.asamk.signal.manager.storage.SignalAccount.getProfileStore(SignalAccount.java:1091) ~[?:?]
        at org.asamk.signal.manager.storage.SignalAccount.migrateLegacyConfigs(SignalAccount.java:335) ~[?:?]
        at org.asamk.signal.manager.storage.SignalAccount.load(SignalAccount.java:182) ~[?:?]
        at org.asamk.signal.manager.SignalAccountFiles.initManager(SignalAccountFiles.java:92) ~[?:?]
        at org.asamk.signal.manager.SignalAccountFiles.initManager(SignalAccountFiles.java:80) ~[?:?]
        at org.openhab.binding.signal.internal.protocol.SignalService.start(SignalService.java:145) ~[?:?]
        at org.openhab.binding.signal.internal.handler.SignalBridgeHandler.checkAndStartServiceIfNeeded(SignalBridgeHandler.java:153) ~[?:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[?:?]
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) ~[?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
        at java.lang.Thread.run(Thread.java:829) [?:?]
Caused by: java.sql.SQLException: No suitable driver
        at java.sql.DriverManager.getDriver(DriverManager.java:298) ~[java.sql:?]
        at com.zaxxer.hikari.util.DriverDataSource.<init>(DriverDataSource.java:106) ~[?:?]
        ... 26 more

Interesting, I had seen this issue a couple of time without putting my finger on it.
Usually, I saw this when the account start to fast and the bundle is not fully ready (or maybe it’s just an impression). I don’t know exactly what causes this.
Did you try disabling / enabling the thing ? When I have this error it is usually sufficient to fix the issue.

I will also try to update the dependencies for the next beta release.

tried everything. uninstall, reboot, reinstall.

guess i found the root problem:

2023-01-01 18:19:05.387 [ERROR] [Events.Framework                    ] - FrameworkEvent ERROR
org.osgi.framework.BundleException: Could not resolve module: org.xerial.sqlite-jdbc [281]
  Another singleton bundle selected: osgi.identity; type="osgi.bundle"; version:Version="3.16.1"; osgi.identity="org.xerial.sqlite-jdbc"; singleton:="true"

EDIT: Upgrading to latest OH release fixed the problem.

just wanted to confirm that it is working on openhab 3.4 on raspiOS 64bit (raspi4 8gb), new install with latest .jar from github

i have configured a Thing of type signalconversation with my main Recipient, but how do i use this in my rules???
i can send via:

var signalAction = actions.get("signal", "signal:signalaccountbridge:FestNetzSignalAccount");
signalAction.sendSignal("+43xxxxxxxxx", "Hello world! from openhab")

but i do not want to hardcode my phone numbers in rules code…

I think I now understand why. You have the jdbc persistence addon ?
I use the sqlite 3.40 version, but this persistence addon uses the sqlite feature provided by openHAB (which is the version 3.16.1 for openHAB 3.3) → conflict !
When you switch to openHAB 3.4, the issue disappears, because openHAB 3.4 use the same sqlite version as me (3.40)

I should also use the version provided by openHAB, I will provide a new release soon to fix this.

Thanks for your feedback

Thank you very much for the feedback !
I’m pleasantly surprised by this, because I was sure this woud not work. The libc6 version is probably higher than what I thought and match the lib in my release.

In the conversation Thing, you have a channel “send”.
You just have to link this channel to an item, and then send text command to the item.

Example, if you have a Thing “ConversationWithMe” with your number, and an item named “MessageToMe” linked to the channel “send” of the Thing “ConversationWithMe”, you can use in a DSL rule:

Message_to_me.sendCommand("Hello world");

1 Like

Hello, I recently installed the Signal Binding, first of all thank you for your work.
It works just fine until now at least but I was wondering if it is possible to get the message and the number from the trigger channel and how to separate them from another. I want to send a response only to the person who send a request.
Thanks in advance

Hello,

There are two ways ro receive messages.

  • The first is with a conversation Thing and its receive channel. As the conversation is with a number and only one number, the receive channel get only the message content.

  • The second one is the receivetrigger channel, of one bridge Thing (either signalaccountbridge, or signallinkedbridge). This trigger channel receives the phonenumber AND the message content. As the documentation said :

Channel ID event
receivetrigger The number and the message received (concatened with the | character as a separator)

So you can make a rule based on a channel trigger.
For example, as a DSL rule, this will parse the event string and use the separator to get the sender and the message :

rule "Signal receive"
when
    Channel "signal:signalaccountbridge:24869a59bb:receivetrigger" triggered
then
    val split = receivedEvent.toString.split('\\|')
    val sender = split.get(0)
    val message = split.get(1)
    [ now make something with it....]
end

Of course you can use any other JSR langage, or even blockly. The documentation shows a jython script doing the same thing.

1 Like

Thank you that solved my problem
:slight_smile:

Hello,
I have installed Signal Binding and created a Linked Signal Account, Unfortunately I am not able to link openHAB, scanning the QR code but seeing the error messages “Sorry, this is not a valid device link QR code” and “Network error”.
Has anyone had the same issue and can help me to get that sorted?
Thanks in advance

Strange, I just tried with a newly linked device, and it works for me.

I have three advices:

  • disable the thing and reenable it, it will force another QR code.
  • try again tomorrow (I remember having issue during several hours and the day after it worked flawlessly)
  • maybe delete and recreate the thing

Out of curiosity:

  • Where do you live ? (I don’t think so, but I’m wondering if there are some regional particularities)
  • Do you use an android or an iphone as a main device ? (I know for a fact that it works on android but never have feedback from iphone user)
  • Do you have other linked devices to your account ? (there is a limit, 5 devices max, I think)

Thanks a lot for the response.
Please apologize I have not mentioned in my post, but I went through you advices a couple of times already, without any success.
Today I have also tried to configure a “Dedicated Signal Account” without success. I have seen the message that the Captcha is missing, even though I have requested one right before applying it to the configuration.
I have somewhere read, that there are issues with Raspberry Pi OS 64bit version, which I am using, with no more details. May that be the cause for the problems I am facing?
I am located in Germany, using an Android smartphone and have not linked any other device so far.