Neues Modul: Signalbot (Integration für den Signal Messenger) via signal-cli

Begonnen von Adimarantis, 31 Januar 2021, 19:16:19

Vorheriges Thema - Nächstes Thema

Adimarantis

Die Nummer einfach nochmal neu zu registrieren hat keine Nachteile. Üblicherweise brauchts dann auch gar kein Captcha etc. mehr.
Kannst du Nachrichten empfangen?
Evtl. ist da auch nur ein "trust" Problem.
Sowas hatte ich nach meinen Tests - nachdem ich einmal eine Nachricht in Richtung Signalbot geschickt hatte, gings auch wieder in die andere Richtung.
Raspberry 4 + HM-MOD-RPI-PCB (pivCCU) + RfxTrx433XL + 2xRaspberry 1
Module: 50_Signalbot, 52_I2C_ADS1x1x , 58_RPI_1Wire, (50_SPI_MAX31865)

Aeroschmelz

Das war es tatsächlich. Ich konnte Nachrichten empfangen und danach auch wieder senden. Danke für die Hilfe.

HarryT

Hi

I checked the wifi and the forum for an answer, but no luck.

I was trying to send a signal message to my friend and get and error. To make it easier, if I do this from the cli:

dbus-send --system --type=method_call --print-reply --dest=org.asamk.Signal /org/asamk/Signal/_xxxxxxxxxx org.asamk.Signal.sendMessage string:Hallo array:string: string:+xxxxxxxxx
Error org.asamk.Signal.Error.Failure: Failure:
Failed to send message:
Unregistered user "+xxxxxxxx"
nnnnnnnnnnnn
:
The numbers are correct and it works fine if I message to my own smartphone.

I see my number in var/lib/signal-cli/data/+xxxxxx.d

How can I add the number of my friend so I can send her a message too?

Thanks for a hint where I can find how to solve this.

{HT}
FHEM 6.3 auf Raspberry Pi3  (1,2 Ghz)
RFXTRX433XL, ZWave, KFL200 and ConBeeIII
Raspberry Pi1 (0,7 Ghz) and Raspberry Pi4 for testing
German reading skills are good.

Adimarantis

I have been seeing similar errors in cases when there was no trusted connection (so in this case: Your friend does not trust your signal-cli)
One thing that helped in my case was first sending a message the other way round (have your friend send something to signal-cli).
You could also use the commands to establish trust and exchange fingerprints.

Let me know if that helps. The "unregistered user" is misleading and we should probably open an issue with signal-cli to provide a better error message, if it really is the trust issue.
Raspberry 4 + HM-MOD-RPI-PCB (pivCCU) + RfxTrx433XL + 2xRaspberry 1
Module: 50_Signalbot, 52_I2C_ADS1x1x , 58_RPI_1Wire, (50_SPI_MAX31865)

HarryT

Hi

First sending a message from my friends phone did not help.
ExecStart=/opt/signal/bin/signal-cli --trust-new-identities=always --config /var/lib/signal-cli daemon --system
in signal-service didn´t help either.

Is there somewhere a link/hint how to establish trust?  (in German is no problem (for reading))

{HT}
FHEM 6.3 auf Raspberry Pi3  (1,2 Ghz)
RFXTRX433XL, ZWave, KFL200 and ConBeeIII
Raspberry Pi1 (0,7 Ghz) and Raspberry Pi4 for testing
German reading skills are good.

HarryT

info:

/var/lib/signal-cli $ sudo -E -u signal-cli /opt/signal/bin/signal-cli -c /var/lib/signal-cli -a +xxxxxxxxx send -m "testmessage" +xxxxxxx
User +xxxxxxxx is not registered.

Doesn´t help either
FHEM 6.3 auf Raspberry Pi3  (1,2 Ghz)
RFXTRX433XL, ZWave, KFL200 and ConBeeIII
Raspberry Pi1 (0,7 Ghz) and Raspberry Pi4 for testing
German reading skills are good.

Adimarantis

As described in the (German) Wiki https://wiki.fhem.de/wiki/Signalbot you can establish trust by
sudo -E -u signal-cli /opt/signal/bin/signal-cli --config /var/lib/signal-cli -u +49<Eigene Nummer> trust -a +49<zu vertrauende Nummer>
What happens when your friend sends a message to signal-cli? Do you receive it? Does he get an error?
Raspberry 4 + HM-MOD-RPI-PCB (pivCCU) + RfxTrx433XL + 2xRaspberry 1
Module: 50_Signalbot, 52_I2C_ADS1x1x , 58_RPI_1Wire, (50_SPI_MAX31865)

HarryT

Hi

I tried this already. No luck

sudo -E -u signal-cli /opt/signal/bin/signal-cli --config /var/lib/signal-cli -u +ooooooooooo trust -a +ffffffffff
The user +ffffffffff is not registered.

If my friend sends a message, it seems to work well. In fhem I can see the message send from my friends phone.

However early today the my friends phone give the double hook as a sign it was read. At the moment it gives only a single hook.

Any ideas?
FHEM 6.3 auf Raspberry Pi3  (1,2 Ghz)
RFXTRX433XL, ZWave, KFL200 and ConBeeIII
Raspberry Pi1 (0,7 Ghz) and Raspberry Pi4 for testing
German reading skills are good.

Adimarantis

As the problem seems to appear totally independant of FHEM, I suggest to open an issue with signal-cli at
https://github.com/AsamK/signal-cli/issues

As I have briefly seen the same behavior in my tests, I believe you're after a bug in signal-cli and as the problem is persistent with your installation, you should be the one to report it.

I checked the commit messages from signal-cli 0.11.7 to the current 0.11.8 and don't see anything that sounds related to your problem, but you probably should try it with 0.11.8 first.
I just checked and 0.11.8 uses the same native library, so you can just edit the installer to
SIGNALVERSION="0.11.8"and it should update your installation without issues.
Raspberry 4 + HM-MOD-RPI-PCB (pivCCU) + RfxTrx433XL + 2xRaspberry 1
Module: 50_Signalbot, 52_I2C_ADS1x1x , 58_RPI_1Wire, (50_SPI_MAX31865)

Adimarantis

Nachdem ich das jetzt kurz bei mir getestet habe, ist der Installer jetzt offiziell auf signal-cli 0.11.8 aktualisiert.
Raspberry 4 + HM-MOD-RPI-PCB (pivCCU) + RfxTrx433XL + 2xRaspberry 1
Module: 50_Signalbot, 52_I2C_ADS1x1x , 58_RPI_1Wire, (50_SPI_MAX31865)

HarryT

Hi

Just to inform you, I updated to 0.11.8 without problems.

My main problem is not changed. I am searching on the signal-cli info before filing a bugreport.

{HT}
FHEM 6.3 auf Raspberry Pi3  (1,2 Ghz)
RFXTRX433XL, ZWave, KFL200 and ConBeeIII
Raspberry Pi1 (0,7 Ghz) and Raspberry Pi4 for testing
German reading skills are good.

Adimarantis

Es gibt eine Möglichkeit signal-cli komplett als eine ausführbare Datei zu übersetzen.
Anleitung siehe
https://github.com/AsamK/signal-cli/blob/master/README.md#user-content-building-a-native-binary-with-graalvm-experimental

Ist aber nur für echte 64Bit (amd64, aarch64) möglich.
Auf dem Raspberry ist das aufgrund des immensen Speicherbedarfs nicht ganz so einfach. Wen es interessiert, ich habe ein entsprechendes (gezipptes) Binary mal hier hochgeladen
http://bublath.de/signal-cli.zip

Angeblich ist das dann performanter und braucht weniger Speicher (wobei das executable 110MB hat, aber kein eigenes Java mehr braucht)
Raspberry 4 + HM-MOD-RPI-PCB (pivCCU) + RfxTrx433XL + 2xRaspberry 1
Module: 50_Signalbot, 52_I2C_ADS1x1x , 58_RPI_1Wire, (50_SPI_MAX31865)

HarryT

Hi

I am lost.

I removed /opt/signal and used the current signal_install.sh.

The script says:
  LIBRARYVERSION="0.22.0"

However if I run signal-cli with verbose options it reports:
  INFO  LibSignal - [libsignal]: rust/bridge/jni/src/logging.rs:156: Initializing libsignal version:0.20.0

The developer of signal-cli tells me I should upgrade to libsignal version: 0.22.0

How can I do that?

{HT}


FHEM 6.3 auf Raspberry Pi3  (1,2 Ghz)
RFXTRX433XL, ZWave, KFL200 and ConBeeIII
Raspberry Pi1 (0,7 Ghz) and Raspberry Pi4 for testing
German reading skills are good.

octek0815

Moin,

ist es möglich die registrierte Rufnummer zu ändern?

Grüße
Olli

Adimarantis

@HarryT:
Hmmm not sure - maybe I made a mistake with the versions for aarch64
Check out this site:
https://github.com/exquo/signal-libs-build/releases/tag/libsignal_v0.22.2

It automatically builds the library for a couple of platforms. I'm actually considering using this source in the future, instead of building them myself.

sudo to the signal-cli user, then go to /opt/signal-cli/lib
copy the lib.so there
to update the embedded library execute:
zip -u libsignal-client-*.jar libsignal_jni.sothen restart the service.
Raspberry 4 + HM-MOD-RPI-PCB (pivCCU) + RfxTrx433XL + 2xRaspberry 1
Module: 50_Signalbot, 52_I2C_ADS1x1x , 58_RPI_1Wire, (50_SPI_MAX31865)