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)

antezz 2010-10-31 21:30

Re: [Announce] N900 Notifier
 
Yes the server.py got over 80 lines, but the print you showed was from N900 and the N900 should run client.py which is not as much code.

Anyway, take this : http:www.antezz.com/files/server-0.4.py (rightclick save as...)

Edit it, go to line 76 and change it to your PC internal IP, then you just fire it up with python and same thing on N900, take the CLIENT.py edit the host to your PCs internal IP and fire it up with python.

badboyuk 2010-10-31 21:41

Re: [Announce] N900 Notifier
 
Thanks for your help guys!

Okay I now see what was wrong but now i dont get any errors, i just tested it....but no notification on pc about the call

antezz 2010-10-31 21:46

Re: [Announce] N900 Notifier
 
Check the server.py output, its probly the systemvaribel that isnt set up to growl. Try fire up server.py within the growl folder and try again.

badboyuk 2010-10-31 21:53

Re: [Announce] N900 Notifier
 
Quote:

Originally Posted by antezz (Post 858976)
Check the server.py output, its probly the systemvaribel that isnt set up to growl. Try fire up server.py within the growl folder and try again.

ive done it again and growl picks it up an adds the application but when i test it no notification of call comes up. X-terminal shows the contact name and number without errors.

antezz 2010-10-31 21:57

Re: [Announce] N900 Notifier
 
Open up growl and go to security tab, remove pass for lan apps and check allow network and try again.

badboyuk 2010-10-31 22:00

Re: [Announce] N900 Notifier
 
Quote:

Originally Posted by antezz (Post 858983)
Open up growl and go to security tab, remove pass for lan apps and check allow network and try again.

hmm still nothing.....removed pass and network already checked to allow.

Ive also checked windows firewall and allowed it all ports, plus the port is also forwrded and open in the router.

antezz 2010-10-31 22:05

Re: [Announce] N900 Notifier
 
Well, if the server.py shows that it got the message it should show up, have you tried to send a SMS to? Shouldnt make a difference but you could try lol, im kinda out of ideas.

You could try change "os.system(command)" on line 63 to something like
Quote:

os.system("echo debug")
To see if it prints debug in console on new call/message, else you could try

Quote:

os.system("growlnotify hello")
To see if it shows a notify to check if its something wrong with my switches lol.

Edit: i just read your PM lol, are you running the server.py in python editor to? the os.system will only work in CMD i think, that could by why growl wont show up.

badboyuk 2010-10-31 22:44

Re: [Announce] N900 Notifier
 
Quote:

Originally Posted by antezz (Post 858988)
Well, if the server.py shows that it got the message it should show up, have you tried to send a SMS to? Shouldnt make a difference but you could try lol, im kinda out of ideas.

You could try change "os.system(command)" on line 63 to something like

To see if it prints debug in console on new call/message, else you could try



To see if it shows a notify to check if its something wrong with my switches lol.

Edit: i just read your PM lol, are you running the server.py in python editor to? the os.system will only work in CMD i think, that could by why growl wont show up.

Ok ive got growl working with system variables, and now i can start it from anywhere.

But still no notifications are coming up. Tried sms and call.

antezz 2010-10-31 22:53

Re: [Announce] N900 Notifier
 
Then it should work just fine if you run the script from terminal (CMD).

Quote:

python server.py
If you haven't added python folder to path you need to cd to the python folder or write full path to it.

Else i can't help, can't figure out whats wrong if the terminal doesn't output any errors and its hard to debug something when you cant do it your self.

badboyuk 2010-10-31 23:20

Re: [Announce] N900 Notifier
 
Quote:

Originally Posted by antezz (Post 859029)
Then it should work just fine if you run the script from terminal (CMD).



If you haven't added python folder to path you need to cd to the python folder or write full path to it.

Else i can't help, can't figure out whats wrong if the terminal doesn't output any errors and its hard to debug something when you cant do it your self.

ok ive added that to the environment and got that working, it came up ready to recieve.

What do i do with growl? just leave the app open or do i need to do a command for that?

I think it might be im not running it correctly altho all the setup is good

antezz 2010-10-31 23:26

Re: [Announce] N900 Notifier
 
So you got it working?

Ye growl need to run its the program that shows notifications. If you wanna hide the CMD window from server.py you can just make a bat-file containing "python c:\path\to\file\server.py" then make a .vbs file containing :

Quote:

Set WshShell = CreateObject("WScript.Shell")
WshShell.Run chr(34) & "d:\path\to\bat\n900growl.bat" & Chr(34), 0
Set WshShell = Nothing
then you run the .vbs file and it should run the bat file with no window. thats what i did since i failed with making a service of the .py file with AnySrv, it just started and stopped lol, well well it works atleast.

And on N900 theres alot of ways to run stuff in background. a noob-friendly and simple way is to use the "nohup client.py &" command

badboyuk 2010-10-31 23:30

Re: [Announce] N900 Notifier
 
Quote:

Originally Posted by antezz (Post 859051)
So you got it working?

Ye growl need to run its the program that shows notifications. If you wanna hide the CMD window from server.py you can just make a bat-file containing "python c:\path\to\file\server.py" then make a .vbs file containing :



then you run the .vbs file and it should run the bat file with no window. thats what i did since i failed with making a service of the .py file with AnySrv, it just started and stopped lol, well well it works atleast.

And on N900 theres alot of ways to run stuff in background. a noob-friendly and simple way is to use the "nohup client.py &" command

i still get no notification tho? I havent done the bat file or vbs yet as I need to see why its not working. Can i use notepad to copy and paste that code then rename to .vbs?

badboyuk 2010-10-31 23:35

Re: [Announce] N900 Notifier
 
oh it worked!

Although it came up like this
http://i55.tinypic.com/2dc8jdg.png

badboyuk 2010-10-31 23:39

Re: [Announce] N900 Notifier
 
okay I managed to fix that error and now growl displayed a notification! and no errors this time.
For some reason windows had removed the variable I added, so just added it in again.

I shall try and create that vbs file

antezz 2010-10-31 23:41

Re: [Announce] N900 Notifier
 
Haha, gratz! making the bat and vbs file is easy cake. :3

badboyuk 2010-10-31 23:53

Re: [Announce] N900 Notifier
 
ive got the bat file which i used notepad to make but i cant get the vbs file. Can you recommend a simple or good app?

antezz 2010-10-31 23:59

Re: [Announce] N900 Notifier
 
you can use notepad, just rightclick and make a text file name it "something.vbs" open it with notepad and copy paste the vbs code in my previous post then you edit the file path to the bat of yours.

Then you run the .vbs file just by dubbelclick it, and tada! You should now see nothing.. but still get notifications thru growl.

badboyuk 2010-11-01 00:06

Re: [Announce] N900 Notifier
 
yeah i already did but it didnt work....i just checked again and its all working now!
I realised 1 of the major problems.....i can only have 1 set variable in windows, so everytime i added a new or diff 1, it would remove the previous 1, so any error messages i wasnt seeing them until i went to command prompt and ran them from there to see.

This is great!

Thank you very much Antez & to others for the help!

antezz 2010-11-01 00:10

Re: [Announce] N900 Notifier
 
are you separating them with ; ?

c:\python;c:\growl

like that?

Edit: if you wanna thank me theres a "thank you"-button. :rolleyes:

badboyuk 2010-11-01 00:26

Re: [Announce] N900 Notifier
 
Quote:

Originally Posted by antezz (Post 859095)
are you separating them with ; ?

c:\python;c:\growl

like that?

Edit: if you wanna thank me theres a "thank you"-button. :rolleyes:

:O ohhhh thanks bro!

An ive hit the button :) Cheers man

badboyuk 2010-11-01 12:46

Re: [Announce] N900 Notifier
 
I tried running the vbs file today and its not working. So I done python server.py in cmd and getting an error. Not sure why tho? I didnt change anything.

http://i53.tinypic.com/3462tqa.png

badboyuk 2010-11-01 13:10

Re: [Announce] N900 Notifier
 
its ok got it sorted.

badboyuk 2010-11-01 13:27

Re: [Announce] N900 Notifier
 
ok i figured it out, its not working on the gprs connection today, im pretty sure i was running on it last nite hmm
But on the wifi its all working.

badboyuk 2010-11-01 13:42

Re: [Announce] N900 Notifier
 
Quote:

Originally Posted by antezz (Post 859051)
So you got it working?

Ye growl need to run its the program that shows notifications. If you wanna hide the CMD window from server.py you can just make a bat-file containing "python c:\path\to\file\server.py" then make a .vbs file containing :



then you run the .vbs file and it should run the bat file with no window. thats what i did since i failed with making a service of the .py file with AnySrv, it just started and stopped lol, well well it works atleast.

And on N900 theres alot of ways to run stuff in background. a noob-friendly and simple way is to use the "nohup client.py &" command

The nohup command doesnt work for me or doesnt do much. Terminal still runs and i get no notifications.
Running the normal way (python client.py) works and shows notifications.

legendsohai 2010-11-01 14:13

Re: [Announce] N900 Notifier
 
hmm~~ just wondering, if possible to use it to send/reply a message

etonline 2010-11-01 14:14

Re: [Announce] N900 Notifier
 
Quote:

Originally Posted by badboyuk (Post 859628)
The nohup command doesnt work for me or doesnt do much. Terminal still runs and i get no notifications.
Running the normal way (python client.py) works and shows notifications.

How about "screen"?



A question...
is it compatible with python 3.1?
I can't run it on my WIndows
Quote:

server.py Line41
if detect_os() == "Linux":
^
TabError: inconsistent use of tabs and spaces in indentation

raily 2010-11-01 14:19

Re: [Announce] N900 Notifier
 
so this works over wifi, correct? what if there is no hotspot available?

badboyuk 2010-11-01 15:51

Re: [Announce] N900 Notifier
 
Quote:

Originally Posted by raily (Post 859672)
so this works over wifi, correct? what if there is no hotspot available?

Then without a wifi connection it will not be able to inform you of any notifications........however if it does manage to connect to a wifi and you had any calls/txts then it will inform you of them.
I guess its ideal for home/office use as your phone might be lying about somewhere so would come in handy.

Hopefully future update will fix this issue, but for now im glad at least it works! :)

b0unc3 2010-11-01 16:02

Re: [Announce] N900 Notifier
 
Quote:

Originally Posted by raily (Post 859672)
so this works over wifi, correct? what if there is no hotspot available?

I use it with a (manual) usb connection.

antezz 2010-11-01 16:06

Re: [Announce] N900 Notifier
 
Well, it's kinda simple why it's not working outside your wi-fi.

You see, you used internal IP which only works inside the same network.
In order to get it work on all networks you need to use your PCs external IP and insert into the client.py but then you need to open the port you use in your router/firewall to.

ejasmudar 2010-11-01 16:14

Re: [Announce] N900 Notifier
 
i haven't tried this but one question. Unlike the android notifier, this currently does not support notification over bluetooth rite?

antezz 2010-11-01 16:25

Re: [Announce] N900 Notifier
 
@ejasmudar

It's a TCP server/client in python, so your answer for now is no.

badboyuk 2010-11-01 16:54

Re: [Announce] N900 Notifier
 
Quote:

Originally Posted by antezz (Post 859811)
Well, it's kinda simple why it's not working outside your wi-fi.

You see, you used internal IP which only works inside the same network.
In order to get it work on all networks you need to use your PCs external IP and insert into the client.py but then you need to open the port you use in your router/firewall to.

Yeah but then there would be the issue of constantly changing the ip, as its a dynamic ip.
But cool I might check it out to test it.

antezz 2010-11-01 17:09

Re: [Announce] N900 Notifier
 
There's tool to use like no-ip and others that gives you an subdomain and software that updates the subdomain to contain your dyn IP.

Then you can use your subdomain like "myn900.no-ip.org" and it will always contain your PCs IP.

cipper 2010-11-01 22:28

Re: [Announce] N900 Notifier
 
anybody found a way to start the client from an if-up.d/script?

holy sh**, I tried thousand ways but none works!

badboyuk 2010-11-02 00:26

Re: [Announce] N900 Notifier
 
Quote:

Originally Posted by antezz (Post 859892)
There's tool to use like no-ip and others that gives you an subdomain and software that updates the subdomain to contain your dyn IP.

Then you can use your subdomain like "myn900.no-ip.org" and it will always contain your PCs IP.

Thanks for that! but im now thinking what is best in terms of battery usage.......to keep my wifi on all day or 3g.......hmmmm

badboyuk 2010-11-02 03:25

Re: [Announce] N900 Notifier
 
Quote:

Originally Posted by antezz (Post 859892)
There's tool to use like no-ip and others that gives you an subdomain and software that updates the subdomain to contain your dyn IP.

Then you can use your subdomain like "myn900.no-ip.org" and it will always contain your PCs IP.

in a way to thank you I have created a guide to help others trying to setup the n900 notifier on windows :)

http://www.youtube.com/watch?v=BnTi7Pj3AKM

antezz 2010-11-02 03:35

Re: [Announce] N900 Notifier
 
Ye i saw that, got echofon for firefox so i saw MeeGoExperts twitter about it. Hopefully it will help the less nerdy windows users.

We should also thank scottuss for making the server and client! :3

badboyuk 2010-11-02 11:38

Re: [Announce] N900 Notifier
 
Thanks Scottuss for making this possible! I look forward to future updates and projects =)

Marcus 2010-11-02 17:42

Re: [Announce] N900 Notifier
 
Having a few problems; when running the client.py on my n900, it gives this error:
ImportError: No module named gobject

What do I need to install?


All times are GMT. The time now is 18:52.

vBulletin® Version 3.8.8