Signal Binding

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

Hi, i run openhab 3.4.0.M2 and i think i successfully setup the “linked” binding…
When i send a message to my self over my rule, the Signal Client notifys me for a new message. But i can’t see any new message. Signal tell’ s me that the conversation was updated. Somtimes the log says that there is a decryption error. Does anybody has Tip for me?

Hello,
if I remember correctly I had the same behavior with the Linked Signal account. After that I sent messages to my wife for testing. That worked. The messages didn’t show up in my history either.

Later I set up a Dedicated Signal account for OH with one of my fixnet numbers so I can message myself and I am happy now.

Thank you for your tip, i will try it. Did this mean that i can’t send messages to myself with the “linked signal binding”?

I think so, but that’s just a guess. Also, I’m not sure how Signal should handle it if such a message had to appear in my history or in the “Notiz für mich” chat.

Hi folks,
thanks for the binding, hopefully an option to replace the telegram binding.
Using a standalone bridge, by sending messages to my cellphone the signal account seems not to be provisioning some kind of ID for identification.

Hello,

I am having trouble linking a secondary device.

Sorry for the delay.

I don’t know how to help you on this case. Because “it works for me”, and there is not so many ways of doing the registration :sweat_smile:
I also use the linked mode, with several other third party devices also accessing it, and it works OK for all of them…
The only difference is that you use an iPhone, but I would be very surprised if it is the root cause.
Does someone else tried with an iPhone ?

Could you please share some log from the openHAB log files ?
Did you retry another time ? It could have been a temporary failure on the signal server.

1 Like

Thank you for your tip, i will try it. Did this mean that i can’t send messages to myself with the “linked signal binding”?

Oh my, I can’t believe I didn’t test this before !!
Sorry. Indeed, I can reproduce your issue.

I just tried to fix it by copying some code from signal-cli (it seems that sending a message to oneself is not the same as sending message to another one), but for now to no avail.

I think I will have to take a deep breath and dive in the infamous signal code to understand what I did wrong.

In the meantime, I will update the open post to add the known bug.