Signal binding

logo

The signal binding allows openHAB to exchange message with other Signal users.

Features :

  • Dedicated account/number if you have one, or an account linked to your phone number.
  • Register your account in two steps from within openHAB (including verification code, QR code)
  • Sending, receiving text messages (individual user for the moment, no group).
  • Trigger event.
  • A “send” action for your rules.

See documentation in Resources section for setup.

Changelog

Version 3.4.0 - BETA0

Initial contribution.
Dedicated account, linked account.
Basic messages (send, receive)
Trigger event
Send action

Status and future development.

Feedback welcome (do not hesitate to tell me if it works !)
I will hopefully make a pull request before the end of year, to include it officialy in openHAB.

Contribution welcome ! There is so much to do :

  • Sending image
  • Delivery and Read status (both ways)
  • Group messaging
  • … suggestion welcome

I strongly encourage you to contribute if you can, it could take ages before I have the time to implement these features.
If you want to contribute, here is some information : this binding uses the com.github.turasa:signal-service-java library. It includes the native library from exquo/signal-libs-build on github.
The signal client library is hard and the documentation is poor. I suggest you take a look at the signal-cli project to have a working example.

Resources

JAR bundle

Source and documentation

12 Likes

Cool binding! I’m on OH 3.3 myself right now, but will give this a go when 3.4 makes an entry in my smart home.
Thanks for sharing :slight_smile:

Hello,

You can totally use it with openHAB 3.3 (there is no breaking change with 3.4)
(In fact, it’s what I’m actually doing on my openHAB system)
You can install it from the marketplace.

I didn’t have any report beside myself, so I hope it will work for you.
:crossed_fingers:

Hello Gwendal,

great to have a binding for Signal. Thanks.
However I am already using the signal-cli script and call it within an openhab alarm rule by using executeCommandLine. This works well but so far I could not find a way to send messages with dynamic values e.g. temperatures.
Therefore my question:
In your example on github your example rule also just sends out a fixed message “Alert”. Does the binding provide the possibility to send dynamically created messages ? If it’s not possible I do not see any advantage of the binding compared to a straight forward way of calling the signal-cli script directly.

Yes, you can craft your text message with anything available in the script langage you use.

For example, item value are of course available in the DSL:

signalAction.sendSignal("+33123456789", "Alert ! " + room__temperature.state + " is low")

(with “room__temperature” your item name)

Do not underestimate the power of NOT having to go with the CLI route and additionnal software to install :sweat_smile:
Plus, I could be wrong, but is the CLI script solution able to receive messages and send them to openHAB easily ?
And, as I mentionned in the readme, I want to add other things that are difficult to do with the signal-script solution (send image for example)

Thanks for your quick reply.

I did not yet try to receive messages with my current solution. The most important point for me is the possibility to add item states to my Signal message. Therefore your answer sounds very good ! I will try to use the binding instead of using the signal-cli script directly.
I guess as I have already finished the Signal registration procedure it should be not too difficult.

One note about the registration : You will have to do it for the binding, wether you use signal-cli or not.

If you have a dedicated number and signal cli is the “main device” for it, then be aware that you won’t be able to also use it simultaneously with the binding : if you do process with the registration with the binding, then signal-cli will loose its access. Because only one “main” device can own a number (signal-cli OR the binding).

You can however use the openHAB binding as a “linked” (secondary) device to a mobile phone device. Signal-cli is also able to work as a secondary device. And you can have several “linked” account to a main account. So signal-cli and the binding can be secondary devices to your main mobile phone.

Take also note that the registration process is different for this two cases, thus the two binding bridge type available.

Yes, I foud in your descriptions that for creating a new Signal thing it is necessary to go through the whole registration process again. I followed your explanation and by registering another dedicated land line it works now without any problems. Two small issues are: 1) in the receiving message the senders phone number is not shown and 2) for sending an alarm message to e.g. 4 mobile numbers I had to add 4 lines with signalAction.sendSignal(“number”, “message”) to my alarm rule. But these are small issues.

Great, I’m happy to see it works for another one !

When you say “the receiving message”, do you mean with the channel “receive” for the conversation thing, or with the trigger channel “receivetrigger” for the bridge thing ? It could be the wanted behaviour, depending on the context :

  • For the channel “receive” for the conversation thing, only the message is transmitted (because you cannot receive, in this channel, message for other recipient than the one set for this conversation thing).
  • For the trigger channel “receivetrigger”, and only for this, the sender and the message received are concatened with ‘|’

Yes, don’t know when, but I would like to add a group conversation feature for this.

“the senders phone number is not shown” means after sending out a message by openHAB to a mobile phone the receiving mobile shows the message correctly but as sender not the landline number which I have registered but instead “unknown”. In my former solution with signal-cli the landline number was shown. (again: it’s a small issue!)
In my alarm rule I have five lines. The first line with val signalAction = getActions(“signal”,“signal:signalaccountbridge:Identifier”) and four lines (for 4 mobile numbers) each with signalAction.sendSignal(“number”, “message” + item.state). I did not link the trigger channel “receivetrigger” to an item (because I do not yet need to receive messages by openHAB).

Hello Gwendal,
do you know if there is Markdown support via Signal, or if emojis are possible with :dog, at the moment I’m still missing a bit of local test partners, which I can penetrate a bit :slight_smile:

Hello,

AFAIK, there is no markdown with signal.
But emoji are supported, provided that your rules are written and read with unicode support.
This is the case, for example, of the rules written from the GUI.

I just tested this :

And it works, i get the emoji on my phone.

Thank you for your test and for your answer, I just installed signal on my wife’s cell phone :grinning:

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.