Signal Binding [4.0.0.0;5.0.0.0)

Really cool binding. It works out of the box with an unused line number. But as already mentioned, the sender number is not show on my mobile device. And the received message on the “Signal Conversation” thing is always NULL. The bridge trigger is receiving the messages.

Thanks for the binding! Works as described. :slight_smile:
Looking forward to have the number shown (or at least some kind of name) as there is no way for me to change it from unknown contact as you can’t even add it as contact to have it named.
Group messsage would be a nice feature as well.

Hi Thank you for the binding.This would make it so much easier for my openHab running in a docker container.
However sadly I was not able to get it working.
Added a new landline account as follows:
Put in number+capcha as described → get the call put in pin number and saved.
I get following Error:


Same if I add the thing within the .things-file.

So I tried linked device (used my landline on an old phone to create the signal account).
If scan the qr-code in openHab I get the error “No device found” within my signal app.
This also happens if I try to link my main mobile account (not the landline).
Linking the accounts on the windows app works without a problem.

could this be a location error? I’m from Austria…
Thanks for any help!

Just noticed i get the “Illegal key size” error also when trying the linked device:

Hello @Markgraf, @csowada, @Piffer,

This is very strange, because I don’t have this issue.
But you all seem to have it, and so I cannot hide behind behind my case :sweat_smile:

Has one of you tried the linked account ? I’m curious and would like to know if you have the same behaviour with it.

I found some reference to issues like yours, and it could be related to a lack of profile declaration. I tried to add code to push a profile but I have some issue with authentication (again… I hate the signal protocol). I hope I will find a solution, I will try again as soon as possible.

Another possibility : do you have a contact on the receiving phone with the phone number of the signal account used by openHAB (international format) ? Because I do (but I don’t know if it’s relevant).

1 Like

Hello @dhbl,

I think your issue is related to this.

Please ensure that you pass the CRYPTO_POLICY argument as stated here.

(If you get others issues after fixing the crypto one, you may have to delete the USERDATA/signal folder, and process with another registration, to get rid of a bad initialization)

1 Like

Thank you very much!

I currently don’t have the ability to test a linked account as I don’t want to use my main number.

I used my landline number for creating the signal account with the binding and of course I have that one added as contact. If I want to add the (unknown) contact on my phone it usually populates the number and name already, but in this case it’s just blank. If you pm me your number I could send you a test message from this account so you can see how it appears. Not sure if this would help in any way though.

Thank you so much @dalgwen! This worked perfectly.
Note: deletion of signal folder was definately necessary.

For any users using QNAP with container-station:
It is not possible to change the environment variables in the settings. If you don’t want to create a new image you need to stop the container-station (not only the openHab container).
then go to \Container\container-station-data\lib\docker\containers<containerID>
and modify config.v2.json & qnap.json files and change CRYPTO_POLICY to “unlimited”.
After restart of the container-station it works fine.

Hi ,
I’m using oh3 app on my phone and oh remote binding so I get notifications from oh server and can send instructions to server so I don’t see any need to using signal as means to interact with server (do not get me wrong maybe I still don’t get what’s the use case for signal binding I’m still new to oh thing ) .
Nevertheless I went on and installed the linked account variant and I like it so I made a widget to send and receive messages to my friends from oh :grinning: .

And now the question : Is there any way of seeing the “before last” message in received message item. As in conversation style.
New received message pushes out last one .
Same in sent message . Or one has to make some scripts and save messages to some log file .
Thank you for your time.

I tried to setup the binding.

  • I created a linked device, which goes to pending
  • reopened the thing and see the QR code
  • opened the mobile app and add a new device
  • get an info that this device will have access to my contacts and messages
  • I confirmed
  • and then I get an error that the device can’t be paired, because the service responded with an invalid answer (“Gerät konnte nicht gekoppelt werden: Ungültige Antwort des Dienstes”)

openhab.log shows

[internal.handler.SignalBridgeHandler] - Incomplete registration: QR_CODE_NEEDED Cannot send QR code to the calling service

Any idea how to solve?

EDIT: Stop/Start bündige and re-creation with a device name != “openHAB” solved the problem, thing is now ONLINE

Hello,
today, I don’t know when exactly, my signal account bridge went OFFLINE. The error message is:
CONFIGURATION_ERROR
Communication error: DeprecatedVersionException - StatusCode: 499

Does anyone know the problem or even a solution?

2022-10-05 23:06:58.641 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'signal:signalconversation:dcd1541f7a:f146d89d8e' changed from OFFLINE (BRIDGE_OFFLINE) to UNINITIALIZED
2022-10-05 23:06:58.647 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'signal:signalconversation:dcd1541f7a:f146d89d8e' changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)
2022-10-05 23:06:58.649 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'signal:signalconversation:9f93e309bb:f1303c7edf' changed from OFFLINE (BRIDGE_OFFLINE) to UNINITIALIZED
2022-10-05 23:06:58.651 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'signal:signalconversation:9f93e309bb:f1303c7edf' changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)
2022-10-05 23:06:58.652 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'signal:signalaccountbridge:9f93e309bb' changed from OFFLINE (CONFIGURATION_ERROR): Communication error: DeprecatedVersionException - StatusCode: 499 to UNINITIALIZED
2022-10-05 23:06:58.657 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'signal:signalaccountbridge:9f93e309bb' changed from UNINITIALIZED to UNINITIALIZED (DISABLED)
2022-10-05 23:06:58.658 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'signal:signalconversation:dcd1541f7a:f146d89d8e' changed from UNINITIALIZED (HANDLER_MISSING_ERROR) to UNINITIALIZED (BRIDGE_UNINITIALIZED)
2022-10-05 23:06:58.658 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'signal:signalconversation:9f93e309bb:f1303c7edf' changed from UNINITIALIZED (HANDLER_MISSING_ERROR) to UNINITIALIZED (BRIDGE_UNINITIALIZED)
2022-10-05 23:07:02.481 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'signal:signalaccountbridge:9f93e309bb' changed from UNINITIALIZED (DISABLED) to INITIALIZING
==> /logs/openhab.log <==
2022-10-05 23:07:03.018 [ERROR] [internal.handler.SignalBridgeHandler] - Communication error: DeprecatedVersionException - StatusCode: 499
org.whispersystems.signalservice.api.push.exceptions.DeprecatedVersionException: StatusCode: 499
	at org.whispersystems.signalservice.internal.push.PushServiceSocket.validateServiceResponse(PushServiceSocket.java:1758) ~[?:?]
	at org.whispersystems.signalservice.internal.push.PushServiceSocket.makeServiceRequest(PushServiceSocket.java:1706) ~[?:?]
	at org.whispersystems.signalservice.internal.push.PushServiceSocket.makeServiceRequest(PushServiceSocket.java:1688) ~[?:?]
	at org.whispersystems.signalservice.internal.push.PushServiceSocket.makeServiceBodyRequest(PushServiceSocket.java:1677) ~[?:?]
	at org.whispersystems.signalservice.internal.push.PushServiceSocket.makeServiceRequest(PushServiceSocket.java:1613) ~[?:?]
	at org.whispersystems.signalservice.internal.push.PushServiceSocket.makeServiceRequest(PushServiceSocket.java:1589) ~[?:?]
	at org.whispersystems.signalservice.internal.push.PushServiceSocket.getAvailablePreKeys(PushServiceSocket.java:599) ~[?:?]
	at org.whispersystems.signalservice.api.SignalServiceAccountManager.getPreKeysCount(SignalServiceAccountManager.java:438) ~[?:?]
	at org.openhab.binding.signal.internal.protocol.SignalService.refreshPreKeysIfNeeded(SignalService.java:243) ~[?:?]
	at org.openhab.binding.signal.internal.protocol.SignalService.start(SignalService.java:276) ~[?:?]
	at org.openhab.binding.signal.internal.handler.SignalBridgeHandler.checkAndStartServiceIfNeeded(SignalBridgeHandler.java:146) ~[?:?]
	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) [?:?]
==> /logs/events.log <==
2022-10-05 23:07:03.020 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'signal:signalaccountbridge:9f93e309bb' changed from INITIALIZING to OFFLINE (CONFIGURATION_ERROR): Communication error: DeprecatedVersionException - StatusCode: 499
2022-10-05 23:07:03.021 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'signal:signalconversation:dcd1541f7a:f146d89d8e' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING
2022-10-05 23:07:03.025 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'signal:signalconversation:dcd1541f7a:f146d89d8e' changed from INITIALIZING to OFFLINE (BRIDGE_OFFLINE)
2022-10-05 23:07:03.026 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'signal:signalconversation:9f93e309bb:f1303c7edf' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING
2022-10-05 23:07:03.029 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'signal:signalconversation:9f93e309bb:f1303c7edf' changed from INITIALIZING to OFFLINE (BRIDGE_OFFLINE)

Thanks for you proposition. I will back come to you if I cannot see another way.

No problem, we all have different use cases :smile:
I did this binding because I want to have a conversationnal agent with my home automation system.
And because I let some other people from my family access to some functionnality (open door, etc.), without them to install the openHAB application.
I’m sure there is many other use cases.

Sorry, I didn’t implement anything like this. I think your best shot is to do complicated OH scripting…

The registration is sometimes tricky, and it could be necessary to try several times.
Happy to see that you managed to get it working, though.
I see that you use a linked device, and so I have a question : do you experience the same issue than the other users, with an unknown sender for your messages ?

It seems that the global signal server deprecated this night some API or something like that !
I’m afraid that we are not the only project with this issue. I can see similar comments on the signal-cli project.
I will monitor closely and provide a fix as soon as possible.

.

Thank you for the quick reply and your work :grinning:, and hopefully a solution

I’ve cloned your git repository and applied the fix in this post and it works fine again.

Just change the USER_AGENT in
src/main/java/org/openhab/binding/signal/internal/protocol/store/Context.java from Signal-Android/5.22.3 to Signal-Android/5.51.7 in line 73. Works fine for me.

1 Like

Excellent ! Thank you.
Indeed, I just pushed the fixed version to the marketplace, and it works.

To all : if you install it from the marketplace, just remove and reinstall it.
(if you use Actions, You may have to restart openHAB because of an annoying bug " Instance is not an SignalActions class" or something like that.)

@Kai_G and @dalgwen excellent job it works fine :blush:

I am having trouble linking a secondary device.
I get a QR-code presented and the thing-status “waiting for QR-code scanning”. When I scan the QR-code on my primary device (iPhone), the QR-code can be read, and when press “Link this device” :
• the first time: the link screen closes and the device link is not made (it flips 1 process screen back on the iphone app)
• hence it scan the QR-code again: this time I get an “Illegal server response” and I can try to link again (and again and again for about 5 minutes I think) until the things-configuration-status says: “IOException connection closed”
Environment
• I running openHAB 3.3.0,
• I installed the binding via the Binding interface (marketplace section) today on 8th october 2022
• I updated my Signal app on my iPhone on 8th october 2022
• I am able to (re)link the Signal app on my laptop and on my desktop without any problem
I have 2 linked devices (laptop and desktop). OpenHAB would be the 3rd linked device. OpenHAB is not running on either of these devices