Notices


Reply
Thread Tools
Posts: 190 | Thanked: 129 times | Joined on Mar 2010 @ Bavaria, Germany
#41
Originally Posted by DaSilva View Post
The last version is great!
I have only one question/request:
Could you change the display of the remaining free SMS from a prediction (on update) to a real check (online)? Maybe you can make this optional in the settings menu but sometimes I am not sure if a message was really sent and then I have to close web2sms and start it again to see if the counter has changed.
Thanks!
In some future this will be an option, yes. The counter only changes once the message has been received by your recipient. As this does not always happen in some seconds, the new amount is only predicted. There are ways to find out if a message has failed to deliver, is on delivery or was received. But to detect these states a timed request has to be sent which costs both battery and traffic.

I'm going on holidays next week for about one month, so don't expect any updates in that time
 

The Following User Says Thank You to gri For This Useful Post:
maya's Avatar
Posts: 141 | Thanked: 5 times | Joined on Dec 2009 @ Brasil
#42
ok, installed the new version and now I can add the numbers of contacts. Send to a contact works fine, but sending to two or more contacts are not being sent.
 
Posts: 75 | Thanked: 78 times | Joined on Jan 2010 @ Germany
#43
Hi,

this is a great project!
I'd like to contribute by adding a sipgate.de plugin in python.
Is there any documentation about the python-plugin support? Maybe some example plugin?
I found the provider_test.py in SVN, but
- saving the Username & Password doesn't work (although the code seems to be present)
- what is the UUID used for, how should I chose one for my own plugin?
- also some other info might be nice, e.g. how I can use different message-types

Hopefully somebody can give me some hints, then I'll probably come back with a sipgate.de plugin (7,9ct worldwide SMS with your own number as sender)
 
Posts: 75 | Thanked: 78 times | Joined on Jan 2010 @ Germany
#44
Hi again,

ok, I figured out some things, and it's already kind-of-working. But I still need some things to be able to release it:

- How should I chose the UUID?
- How can I throw error messages to the GUI?
- How to use the account-balance stuff?

Which of the plugins is the most "complete" one (i.e. with balance, different message types, multiple receipients, good error checking & reporting, etc)?
I don't have accounts for any of these providers, but if I know the most complete plugin, I would create an account to be able to figure stuff out for myself…

And another enhancement request:
Would it be possible to distinguish SMS sent by this tool from normal SMS in the eventlogger-database? Maybe by using the "flag" column (is this column used by any builtin programs?)…
Would be nice, because I have a certain amount of free SMS, and I'd like to check how many I've already used…
 
NightShift79's Avatar
Posts: 417 | Thanked: 200 times | Joined on Apr 2010 @ Germany
#45
I just gave web2sms v.0.1.2-8 a try with O2germany.
and it seems to work properly. nice one!

But your O2germany web support misses some features.

- scheduled sms
- anonymous sms
- Set Text to show as Sender
- flash sms

Are you going to implement these anytime soon?

regards.
 
Posts: 190 | Thanked: 129 times | Joined on Mar 2010 @ Bavaria, Germany
#46
Originally Posted by hcm View Post
How should I chose the UUID?
Just create a new one: http://www.famkruithof.net/uuid/uuidgen

Originally Posted by hcm View Post
How can I throw error messages to the GUI?
If your class is derived from web2sms.ProviderInterface, you should be able to call "self.error.emit('text')".

Originally Posted by hcm View Post
How to use the account-balance stuff?
Simply emit "self.balanceReply.emit('text')"

Originally Posted by hcm View Post
Which of the plugins is the most "complete" one (i.e. with balance, different message types, multiple receipients, good error checking & reporting, etc)?
I don't have accounts for any of these providers, but if I know the most complete plugin, I would create an account to be able to figure stuff out for myself…
The only plugin which lacks error checking when sending is o2online. All plugins except betamax and biteSMS support account balance. Multiple recipients are supported by sloono, o2online and biteSMS. You can take most plugins except o2online as reference, this one is the oldest and has a lot of unneeded code.

To make sure your plugin works, you should consider writing it in c++. The python support may work but has never been tested (you would be the first one ) Saving of the settings in the example plugin doesn't work because I don't really do python and therefore don't know how to use the QDataStream there

Originally Posted by hcm View Post
And another enhancement request:
Would it be possible to distinguish SMS sent by this tool from normal SMS in the eventlogger-database? Maybe by using the "flag" column (is this column used by any builtin programs?)…
Would be nice, because I have a certain amount of free SMS, and I'd like to check how many I've already used…
I don't know without checking and I'm too tired now (jetlag). I'll check that soon. But you could also save a counter in your plugin settings.
 
Posts: 75 | Thanked: 78 times | Joined on Jan 2010 @ Germany
#47
Thanks for your reply!

The emit-stuff doesn't work in the loadSettings-Routine, that confused me…
Probably the Login-Code should be moved to another Routine, are there any login/initialization-Routines called once when starting the plugin and once when the settings are changed?

Anyway, it's working for me, the error checking is not very complete yet, but if a balance is shown, the connection to the server is established, and sending SMS should work (and if the balance changes, your SMS has been sent definately)

I can only test when I want to send some SMS, because its not for free (but cheaper, especially in foreign countries)

I didn't implement multiple receipients, yet.
I didn't try SMS with more than 160 chars, yet.

Feel free to test & report back

to use it, remove the .txt ending and save it in /opt/web2sms/providers/
Attached Files
File Type: txt provider_sipgate.py.txt (4.7 KB, 116 views)
 
Posts: 190 | Thanked: 129 times | Joined on Mar 2010 @ Bavaria, Germany
#48
Originally Posted by hcm View Post
The emit-stuff doesn't work in the loadSettings-Routine, that confused me…
Probably the Login-Code should be moved to another Routine, are there any login/initialization-Routines called once when starting the plugin and once when the settings are changed?
In case of your code: The SipgateProviderPlugin instance is created on program startup and the SipgateProvider instance is created when clicking on the account and the view changes to the message view (or the options are shown). Directly after creation of SipgateProvider, the settings are loaded. This happens before any signal is being connected to the provider. That's why your emits won't work there. SaveSettings is called when the program quits or you choose another provider from the main screen. Also login() is called when the screen changes to the message screen but there are the signals connected and logout() when changing the provider or the program quits. Login() can return if it's asynchronous or synchronous. Asynchronous shows up a progress dialog and waits until loginReply is emitted.

Edit:
I don't know if you missed it, but you should not initialize inside loadSettings() and saveSettings(). Take a look at the sip files here to see which classes and functions are available in python here. Especially take a look at the ProviderInterface base class. The example I wrote some time ago does not even use everything available.

Last edited by gri; 2010-09-07 at 18:09.
 
Posts: 729 | Thanked: 155 times | Joined on Dec 2009
#49
The fake remaining SMS counter for o2 has a few problems:

- After sending a SMS with 160 characters it calculates two SMS
- A SMS to more than one recipient is only counted as one SMS

Could you please add a real (optional) check? Currently I often close and start web2sms again just to make sure that the last message was sent...
Thanks in advance.
 
Posts: 75 | Thanked: 78 times | Joined on Jan 2010 @ Germany
#50
Originally Posted by gri View Post
In case of your code: The SipgateProviderPlugin instance is created on program startup and the SipgateProvider instance is created when clicking on the account and the view changes to the message view (or the options are shown). Directly after creation of SipgateProvider, the settings are loaded. This happens before any signal is being connected to the provider. That's why your emits won't work there. SaveSettings is called when the program quits or you choose another provider from the main screen. Also login() is called when the screen changes to the message screen but there are the signals connected and logout() when changing the provider or the program quits. Login() can return if it's asynchronous or synchronous. Asynchronous shows up a progress dialog and waits until loginReply is emitted.

Edit:
I don't know if you missed it, but you should not initialize inside loadSettings() and saveSettings(). Take a look at the sip files here to see which classes and functions are available in python here. Especially take a look at the ProviderInterface base class. The example I wrote some time ago does not even use everything available.
Thanks for the explanation Really appreciated

I'm not really a python-programmer, more like a hacker That's why I have some problems structuring the code the correct "python-way".

But I think I got the idea and will make the necessary changes, as well as add some more error-checking. (Maybe tomorrow, otherwise I'll be out for a week)

BTW, in case of an error while sending a message, should the sendMessageReply or error-Signal be emitted first? (For login, it's probably the same with loginReply and error)
 
Reply


 
Forum Jump


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