Signal Binding [4.3.0.0;5.0.0.0)

Sorry but the account was registered a month ago or so - and it does work communicating between other devices.
Activating the TRACE-level for the mentioned Packages leads to the following.

I

`10:12:24.039 [DEBUG] [.internal.handler.SignalBridgeHandler] - Initializing signal
10:12:24.044 [DEBUG] [.internal.handler.SignalBridgeHandler] - Now trying to start Signal for account +497XXXXXXXXX
10:12:24.049 [TRACE] [.signal.manager.storage.SignalAccount] - Opening account file
10:12:24.057 [TRACE] [.signal.manager.storage.SignalAccount] - Loading account file 378944
10:12:24.073 [TRACE] [ignal.manager.storage.AccountDatabase] - Current database version: 27 Program database version: 27
10:12:24.518 [INFO ] [hab.event.ThingStatusInfoChangedEvent] - Thing ‘signal:signallinkedbridge:74dde14b63’ changed from OFFLINE (COMMUNICATION_ERROR): IOException - Connection closed! to OFFLINE (CONFIGURATION_PENDING): Waiting for QR code scan

I thinc there is another problem regarding the linking-process.
What network settings need to be present between my andoid-device and openhab?
I get the “network error” on the android-device. But the “IOException - Connection closed!” happens independently from that.

Both devices have IP-adresses from the same local network.

Nothing. Both must have access to internet, that’s all.
The network traffic is with the signal server as an intermediary.

10:12:24.039 [DEBUG] [.internal.handler.SignalBridgeHandler] - Initializing signal 10:12:24.044 [DEBUG] [.internal.handler.SignalBridgeHandler] - Now trying to start Signal for account +497XXXXXXXXX 10:12:24.049 [TRACE] [.signal.manager.storage.SignalAccount] - Opening account file 10:12:24.057 [TRACE] [.signal.manager.storage.SignalAccount] - Loading account file 378944 10:12:24.073 [TRACE] [ignal.manager.storage.AccountDatabase] - Current database version: 27 Program database version: 27 10:12:24.518 [INFO ] [hab.event.ThingStatusInfoChangedEvent] - Thing ‘signal:signallinkedbridge:74dde14b63’ changed from OFFLINE (COMMUNICATION_ERROR): IOException - Connection closed! to OFFLINE (CONFIGURATION_PENDING): Waiting for QR code scan

Hum, I see nothing wrong here. The binding is connected to the Signal server, and waits for the server to announce that a phone is scanning the QR code.

Sorry if my question seems dumb, but did you scan the QR code from the signal application or from another external application ? (it must be from within the signal app, in the linked devices menu).
I also see on internet that it can happens if the signal app is too old. Is it up to date ?

Yes I updated the signal app of course.

I even tried to switch my android-device an moved my account over to this.
I found this as well:
https://support.signal.org/hc/en-us/articles/360007320451-Troubleshooting-multiple-devices
Could the problem persist because I use a landline number which I registered for the use in openhab instead of my mobile number?

Where does this “connection closed”-error come from?

This is a remnant from your last attempt. When the linking procedure failed during your last attempt, the status went to “connection closed” after a timeout (the timeout was for waiting for the signal server to announce that the QR code is successfully scanned).
And now, as you are making another attempt, this failed status is no longer relevant : the new status is again “waiting for QR code scan”.

Does it means you used a phone number XXX in the openHAB signal thing configuration and a signal application linked to a YYY number to scan the resulting QR code ? If so, then yes, it is the issue.

In the signal binding, there are two different bridge things for two different account type, you cannot mix them.

Say you have a number XXX you want to use in the openHAB signal binding. There is two cases:

  • XXX is a phone number, not used in any signal account. (Or it is already used but you are OK with deregistering it, and any signal app using this phone number will be deactivated). You want openHAB to be the sole account for this number.
    You have to use the “Signal account” thing, and enter the XXX number in the configuration. You will receive a phone call or a SMS with a validation code, and use this code in openHAB during the following onboarding process (see documentation).
    This openHAB “Signal account” thing will be the main account for this phone number. If you use this number again in any signal application, you will break the openHAB registration.
    You should use this if you have a spare landline number.

  • OR, XXX is a mobile phone number already used (for example an android phone using the signal app). You don’t want to deregister it and want to continue using the signal account on your phone, so you want to share it with openHAB. You then have to use the “Signal Linked Device” bridge thing. You enter XXX in the thing configuration, and then with the phone holding the XXX number, you scan the QR code from the signal application. openHAB will then be the “linked device” and will receive a copy of all messages, and also can send messages on behalf of your phone.

Oh, I am completely clear about the two opperation modes and “thing-configuration”.
I invested nearly two days to set up an account solely for openhab. As - back then - registering didn’t work out as the call from signal to my landline number didn’t come in I switched to the linked mode using a second phone (and the landline number in the signal account). The signal setup is completely ok now on the phone an I can send and receive messages from one phone to the other.

But when I scan the QR-Code from OpenHub Signal binding the signal app on the phone says “network error” (“Netzwerkfehler” in German). How can I find out what number is encoded in the qr code in openhub? Could that be an issue as I played around with many different numbers?

And now I received the following:

12:19:16.977 [INFO ] [hab.event.ThingStatusInfoChangedEvent] - Thing 'signal:signallinkedbridge:74dde14b63' changed from OFFLINE (CONFIGURATION_PENDING): Incomplete registration: NO_VALID_USER null to OFFLINE (CONFIGURATION_PENDING): Waiting for QR code scan
12:19:39.273 [INFO ] [ager.internal.ProvisioningManagerImpl] - Received link information from +497XXXXXXX, linking in progress ...
12:19:39.282 [TRACE] [.signal.manager.storage.SignalAccount] - Opening account file
12:19:39.286 [TRACE] [.signal.manager.storage.SignalAccount] - Loading account file 378944
12:19:39.306 [TRACE] [ignal.manager.storage.AccountDatabase] - Current database version: 27 Program database version: 27
12:19:39.318 [DEBUG] [ager.internal.ProvisioningManagerImpl] - Account is a primary device.
12:19:39.325 [INFO ] [hab.event.ThingStatusInfoChangedEvent] - Thing 'signal:signallinkedbridge:74dde14b63' changed from OFFLINE (CONFIGURATION_PENDING): Waiting for QR code scan to OFFLINE (CONFIGURATION_PENDING): Incomplete registration: NO_VALID_USER null

Ah, this is way better !
openHAB receives the QR code scan event from the signal server.

So, this exception could have two causes:

  • the phone number is not in the right format (i.e. international format, starting with+XX with XX as the country code)
  • I suspect this is the one: the signal-cli local database already has an account with this number. I think that there is some remains from your previous attempts. Can you please delete all your signal things, stop the binding (or openHAB to be sure), delete the OPENHAB_USERDATA/signal directory and restart. Then you can retry the registration process.

Hi, this really made the difference! Now it works.
THANKS a lot!

OK, now the communication works with one other number (Landline on openhub linked with my old phone AND my andoid phone with signal app and my mobile number).
BUT: I added two more users on the old phone. Sending an receiving messages from the phone works. But trying to send a signal message from openhub to one of those contacts gives me this:

9:45:55.948 [DEBUG] [.internal.handler.SignalBridgeHandler] - Sending message to +49176XXXXXXXX
09:45:55.959 [TRACE] [signal.manager.helper.RecipientHelper] - Querying CDSI for 1 new numbers (0 previous), isPartialRefresh=true
09:45:58.003 [WARN ] [ignal.internal.protocol.SignalService] - Cannot send message to +49176XXXXXXXX, cause recipient unregistered
09:45:58.008 [DEBUG] [.internal.handler.SignalBridgeHandler] - Receiving delivery status from +49176XXXXXXXX

What is needed here?

Hello,

Signal is picky about recipients, and about who is OK to communicate with who. Anti spam protection, I guess ? As far as i know, Signal don’t have a clear policy about this.

So I only have suppositions and related advices:

  • Try sending from the other contacts (from the mobile signal app) to openHAB first : maybe this operation can “whitelist” your openHAB number.
  • If you still cannot send message from openHAB, you should now at least have a new “conversation” thing in your openHAB inbox. One is added for every number trying to contact the openHAB managed signal account. This conversation may have the phone number, as it is registered in Signal phone directory, or an UUID (numbers and letters). You can use the UUID as a recipient if it doesn’t work with the phone number.

I would REALLY like if Signal could have a clear, stable API and an open policy to work with.

Let me know if it works, I should add something in the documentation.

I just tried what @maxheartrate suggested and used the long number from the logs. I can send out a message with this one!

I will try the conversation-thing you suggested as well 
 just a moment.

Yes, working with a conversation-item works as well.

After upgrading to OH 4.3.5 the signal binding was missing (as it was like updating to other versions before). But this time re installing the binding from the marketplace did not work (but no error messasge was shown). Even more every other thing with different bindings changed from ONLINE to UNINITIALIZED. After a while also the jetty webserver was not working any more and reported a 404 error. SSH was still working and told be the OH service is running.

After rebooting it looks normal but the Add-on Store says the Signal binding is installed, but the signal bridge reports “Handler factory not found”.

Any idea what is going wrong?

It seems to be an openHAB related error, I can only give you some general advices that you probably already tried:

  • stop the signal thing and restart it
  • stop the signal bundle from the cli, and restart it
  • restart openHAB
  • remove and reinstall the signal binding

“Handler factory not found” means that, at the time, no binding has registered to the openHAB core to take care of thing with the prefix “signal”.

I could not restart the binding because if the handler missing error.

After a couple of restarts and cleaning the cache the signal binding was not shown as installed in the Add-on Store. Also in the CLI bundle:list did not show signal.

Then I tried to reinstall the signal binding. After a short while every other binding and also many other services like the webserver stopped and OH was not usable any more. Here some of the latest logs from frontail:

[INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'thingname' changed from ONLINE to UNINITIALIZED
[INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'thingname' changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)
[INFO ] [basic.internal.servlet.WebAppServlet] - Stopped Basic UI
[WARN ] [org.eclipse.jetty.io.ManagedSelector] - java.nio.channels.ClosedSelectorException

Then I stopped the OH service via command line and rebooted. OH came up and showed the signal binding as installed in the Add-on Store, even though it was not shown via CLI bundle:list.

Looks like somwthing with the things installation is broken.

After some restarts, perhaps clearing the cache via openhabian-config helped. I could install the signal binding again via Add-on store and reach startLevel 100.
Seems to be not related to this particular binding, since I found similar problems in the forum with other bindings.

1 Like