XMPP client on iOS

Functionality and usage of the OpenNethome Server
Post Reply
sajbersapiens
Posts: 8
Joined: Sat May 21, 2016 5:35 pm

XMPP client on iOS

Post by sajbersapiens »

I managed to setup two xmpp accounts.
Nethome is sending messages OK to "my" account as long as my client is active.

On my Windows PC I tried "Pidgin" http://pidgin.im/
Works fine! Client is online in the background an recieves messages.

On my iPhone I chosed "ChatSecure" https://chatsecure.org/
Works as long as the client is online. But it gets off-line if I´m not active so "MessageInteractor" send-recieve works fine, but not trigger-sebd.

Any ideas on a better iOS client?
stefangsbb
Site Admin
Posts: 313
Joined: Sun Nov 30, 2014 2:16 pm

Re: XMPP client on iOS

Post by stefangsbb »

It seems hard finding a decent one for ios, try Trillian
sajbersapiens
Posts: 8
Joined: Sat May 21, 2016 5:35 pm

Re: XMPP client on iOS

Post by sajbersapiens »

AstraChat works better, but only as long as the app is started. Good enough for now.

Still no success in sending mail though..

I tried to give user Nethome sudo rights on ssmtp command but no mail.

On LXterminal this works fine:
sudo smtp mymail@adress.com < /home/pi/message.txt

But the same command in a trigger in Nethome won´t work. Why??
stefangsbb
Site Admin
Posts: 313
Joined: Sun Nov 30, 2014 2:16 pm

Re: XMPP client on iOS

Post by stefangsbb »

It may not be enough to have the right to run the program, it may require other accesses as well. Try to write:

Code: Select all

sudo su nethome
to act as nethome, and then try to send the mail. Then you will see what kind of error you get.
sajbersapiens
Posts: 8
Joined: Sat May 21, 2016 5:35 pm

Re: XMPP client on iOS

Post by sajbersapiens »

stefangsbb wrote:It may not be enough to have the right to run the program, it may require other accesses as well. Try to write:

Code: Select all

sudo su nethome
to act as nethome, and then try to send the mail. Then you will see what kind of error you get.

Code: Select all

sudo su nethome
Works fine!

Then

Code: Select all

sudo smtp mymail@adress.com < /home/pi/message.txt
I get this message:
We trust you have received the usual lecture...
and so on..
And then I need the password for nethome :-(
stefangsbb
Site Admin
Posts: 313
Joined: Sun Nov 30, 2014 2:16 pm

Re: XMPP client on iOS

Post by stefangsbb »

Well, you cannot do "sudo" in a automated script or any command that Nethome is running. Sudo requires that you are running in an interactive session where the user can enter the root password. After you have done the sudo su nethome, you should try to do the "smtp mymail@adress.com < /home/pi/message.txt" and see what fails. I guess you need to add the nehome user to some groups to allow this.
sajbersapiens
Posts: 8
Joined: Sat May 21, 2016 5:35 pm

Re: XMPP client on iOS

Post by sajbersapiens »

Nothing fails when I do the command

Code: Select all

ssmtp mymail@adress.com < /home/pi/message.txt
in the terminal window as nethome@raspberrypi.
The mail is working.

But when I do a ValueTrigger with this command:

Code: Select all

exec,ssmtp mymail@adress.com < /home/pi/message.txt
nothing happens.

WHere can I find a error log? No error in Nethome log.
stefangsbb
Site Admin
Posts: 313
Joined: Sun Nov 30, 2014 2:16 pm

Re: XMPP client on iOS

Post by stefangsbb »

Unfortunately, you cannot see those logs. I suspect the problem is that since the command is not running in a shell, it does to have any $PATH, so it does not find the ssmtp-command. Try specifying the whole path to the ssmtp-command.
sajbersapiens
Posts: 8
Joined: Sat May 21, 2016 5:35 pm

Re: XMPP client on iOS

Post by sajbersapiens »

OK, I tried to add

Code: Select all

/usr/sbin/ssmtp mail@adrss.com > /home/pi/message.txt
but no success.
It worked in the command line on the RPi
Post Reply