On my machine it’s less than 2 seconds for the message to arrive
Thank’s for your great work @mbitard
On my machine it’s less than 2 seconds for the message to arrive
Thank’s for your great work @mbitard
Finally I could test the hassio addon in a little x86 Server.
I made a automation and when I trigger it the message is on my phone within 3 seconds.
Any plans for multiple recipient’s?
You can have multiple recipients! Just add something like this to your config:
signalmessenger:
notify:
- name: signal
platform: signalmessenger
destinations:
- '+1234567899'
- '+1234567891'
But I also wonder if attachments are already supported @mbitard?
I’m working on the attachments
I have something working on my machine, I released the 10.0.0 version, if anyone wants to try it and give me some feedback, please do
I broke the compatibility with the 9.x version (by pure lazyness), don’t forget to update the custom_component part.
That was fast! From working to new major release in 5 hours
I just gave it a shot right away and upgraded the hassio signal addon to v10. Beside that I caught the new custom component files and copied them over to hassio where they belong. I also restarted my home assistant.
Now I can see that the signal addon comes up proper and also receives message in the console (with the signal-cli configuration file I made before) but sending isn’t successful anymore. The log doesn’t print any line when I trigger a event which always worked with the last version. Even though I don’t no if the log was printing lines as I never payed attention to this - just remind the incoming messages logs and they work.
Any ideas? Did I missed something to upgrade?
Spotted, let me correct it, sorry
Done, the error was in the custom_component, sorry.
Can you grab the new version and test it?
I did (notify.py) uploaded it to my hassio machine, restarted the addon and tried again without luck. It still can receive but nothing in the logs when I trigger my automation to send a message via addon.
Do I need to restart home assistant also?
Also I found out this (suspicious) line in the log when starting the addon:
Hass.io Add-on: Signal
Addon for wrapping signal inside docker
-----------------------------------------------------------
Add-on version: 10.0.0
You are running the latest version of this add-on.
parse error: Expected string key before ':' at line 1, column 4
[12:10:03] ERROR: Unknown HTTP error occured
System: (amd64 / qemux86-64)
Home Assistant version: 0.100.3
Supervisor version: 192
Yes, actually, it’s the only thing you need to restart, the addon is fine by itself
I see this error too, I assume it’s because I’ve badly configured the addon, but I have not investigated why yet, mainly because it still works. But yes, it’s an error, and I should fix it at some point. If anybody has an idea.
I did it by now and I can send text messages again.
I didn’t had success sending a media file but I guess it’s due the fact my syntax is not right.
Any idea how a proper syntax will look like in the automation ‘wizard’ ?
with this one here I don’t get any message
If the syntax is right it works great! Thank you!
So what’s actually missing to make your hassio addon official? Maybe a receive function which actually works already in the addon itself. Question is just how to expose it to home assistant I guess
You’re welcome.
The problem I see with this addon is that it is not standalone, it needs a component installed in home assistant too, I’m not sure it could be an official one as is.
I think I’ll work on adding the capacity to receive messages, that way we could query intents from home assistant and reply via signal. Then I’ll think about making this addon official (I don’t know how to do that by the way :))
Hi, this looks really good, will the pre-compiled binaries run on an ARM cpu Raspberry Pi 4?
Or will I need to build the binaries myself?
EDIT: Looks like the binaries are universal, I just downloaded, uncompresses and it all works, great stuff.
Is anyone using the dbus method to send messages? Apparently this should be the fastest way…
@Codec303 Yes, this addon https://github.com/agileek/hassio-addons uses dbus to speed up communication. You can try it, it comes with a custom component you’ll have to install too, in the same repository.
Thanks @mbitard for packaging this up. In my setup hassio (2.12 w/ HA 0.101.3), it’s unclear if the custom component has loaded fully.
The pycache gets created under /config/custom_components/signalmessenger/
directory. Along with a warning message of using a custom integration for signalmessenger which has not been tested by Home Assistant
. However the notify.signal
service doesn’t present any descriptions of the YAML syntax (while in the Dev Tools > Services). Actually, this just looks like an oversight in notify.py
code.
I assume the signal-cli +PHONE_NUMBER
file needs to be placed under /config/.signal/
based on the configuration, however it doesn’t seem to be picking this up, any thoughts on how to debug this further? Thanks much.
[snip]
* Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
User is not registered.
Error org.freedesktop.DBus.Error.ServiceUnknown: The name org.asamk.Signal was not provided by any .service files
172.30.32.1 - - [09/Nov/2019 19:31:28] "POST /message HTTP/1.1" 200 -
Error org.freedesktop.DBus.Error.ServiceUnknown: The name org.asamk.Signal was not provided by any .service files
172.30.32.1 - - [09/Nov/2019 19:32:18] "POST /message HTTP/1.1" 200 -
You’re welcome @dorkmatt
You have 2 separate issues:
The first one, you don’t have any description when you try to play with the service in the developer tools of home assistant, and that’s my fault, I’m adding the documentation now so others won’t have this issue.
The second one is tougher, it’s about the registration process of the signal-cli. If you succesfully registered the number using signal-cli, all you have to do is copy what’s in $HOME/.local/share/signal-cli/data/
inside your home assistant configuration folder. Inside this folder I have this tree:
.
├── attachments
│ └── a_file_with_numbers
└── data
├── +330102030405
├── +330102030405.d
│ └── msg-cache
│ ├── +330102030406
│ │ └── 1569069693916_1569069735757
│ └── +330102030407
Do you have the same structure?
I sent a few test messages, and yes it is far faster using DBus, it takes around 8 seconds to send a message without DBus and it’s less than 2 seconds to send a message using DBus on my lowly RPi4.
I’m afraid I’m not running HassIO however, I’m using HA under VENV, can I just use the custom component to send DBus messages? Right now I’m just using the dbus-send
command to send messages and while it works, a proper HA component would be a far nicer solution.