maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [Announce] N900 Notifier (https://talk.maemo.org/showthread.php?t=64647)

cipper 2010-10-31 19:35

Re: [Announce] N900 Notifier
 
Hi guys, nice app!

I'm trying the best way to starting/stopping after network connection/disconnection. Moreover it would be nice to send messages to multiple IPs : home, work, etc.

antezz 2010-10-31 19:38

Re: [Announce] N900 Notifier
 
@cipper Growl supports forwarding notifys to other PCs

cipper 2010-10-31 19:55

Re: [Announce] N900 Notifier
 
Quote:

Originally Posted by antezz (Post 858825)
@cipper Growl supports forwarding notifys to other PCs

I don't need growl since I'm runing on debian/ubuntu. Plus I prefer to to not open ports from wan on the firewall.

cipper 2010-10-31 20:16

Re: [Announce] N900 Notifier
 
I tried with these up/down scripts for automatic run/stop:

N900:/etc/network# cat if-pre-up.d/00_notifier_up
#!/bin/sh

MYIP=`ifconfig -a wlan0 | grep "inet addr" | sed 's/inet addr://g' | awk '{print $1}'`

if [ "$MYIP" == "192.168.0.5" ]
then su user -c /home/user/bin/notifier_client_home.py &
else su user -c /home/user/bin/notifier_client_work.py &
fi

N900:/etc/network# cat if-post-down.d/00_notifier_down
#!/bin/sh

PIDS=`ps | grep "notifier_client" | grep "/home/user/bin" | awk '{ORS=" ";print $1}'`
for i in $PIDS ; do kill -9 $i ; done

N900:/etc/network#



these work fine when executed in terminal but dont work automatically on network connection/disconnection :(

badboyuk 2010-10-31 20:17

Re: [Announce] N900 Notifier
 
Okay Im not sure what ive done wrong but this is the error message I get

http://i51.tinypic.com/dxn43o.png

I hope someone can help. I am trying to get this to work with windows.

Cas07 2010-10-31 20:32

Re: [Announce] N900 Notifier
 
Quote:

Originally Posted by badboyuk (Post 858874)
Okay Im not sure what ive done wrong

It means that the variable HOST has not be set. Have you got the latest client.py and did you put the desktop pc ip address in?

Code:

HOST, PORT = "192.168.0.1", 50007

badboyuk 2010-10-31 20:35

Re: [Announce] N900 Notifier
 
Quote:

Originally Posted by Cas07 (Post 858886)
It means that the variable HOST has not be set. Have you got the latest client.py and did you put the desktop pc ip address in?

Code:

HOST, PORT = "192.168.0.1", 50007

Yeah I did, I changed it in the place where it was marked.

Server.py

# Change this to your computer's hostname
# We might do this automatically in the future!
HOST, PORT = "192.168.0.1", 50007

I changed it to this:

# Myhostname# We might do this automatically in the future!
HOST, PORT = "192.168.0.2", 50007

And i changed the port to my static ip to which i have forwarded the port.


client.py

# CHANGE THE HOSTNAME TO THE HOSTNAME OR IP OF THE PC RUNNING THE SERVER COMPONENT
HOST, PORT = "192.168.0.1", 50007

changed it to:



# Myhostname, PORT = "192.168.0.2", 50007

antezz 2010-10-31 20:37

Re: [Announce] N900 Notifier
 
http://www.antezz.com/files/images/png/growln900
Windows XP working example.

@badboyuk
That looks strange, line 85? client.py is only around 68 lines.
Try use a clean/original client.py file then change the IP to your desktop/servers internal IP.

After that you just take the server.py also change the IP to your internal IP in my case it was "192.168.0.199" then you go to line 62 and replace it with the line i posted previous, or you can change it however you want it to be formated. Thats pretty much it if you want to have "custom names" showed up on some numbers then you add them "numbers" varibel in the client.py just like the examples.

badboyuk 2010-10-31 21:21

Re: [Announce] N900 Notifier
 
Quote:

Originally Posted by antezz (Post 858895)
http://www.antezz.com/files/images/png/growln900
Windows XP working example.

@badboyuk
That looks strange, line 85? client.py is only around 68 lines.
Try use a clean/original client.py file then change the IP to your desktop/servers internal IP.

After that you just take the server.py also change the IP to your internal IP in my case it was "192.168.0.199" then you go to line 62 and replace it with the line i posted previous, or you can change it however you want it to be formated. Thats pretty much it if you want to have "custom names" showed up on some numbers then you add them "numbers" varibel in the client.py just like the examples.

Okay ive done it all again but still the same error. And there are still over 80 lines even as default, and I downloaded the file again from the site.
Im not sure what it is that im not doing right here......any suggestions?

Cas07 2010-10-31 21:29

Re: [Announce] N900 Notifier
 
Quote:

Originally Posted by badboyuk (Post 858891)
client.py

# CHANGE THE HOSTNAME TO THE HOSTNAME OR IP OF THE PC RUNNING THE SERVER COMPONENT
HOST, PORT = "192.168.0.1", 50007

changed it to:

# Myhostname, PORT = "192.168.0.2", 50007

That line should read:

Code:

HOST, PORT = "192.168.0.2", 50007
Putting a # in front of any line, comments the line out and would explain why the script would not work.


All times are GMT. The time now is 20:09.

vBulletin® Version 3.8.8