Announcement

Collapse
No announcement yet.

SMS HS Server - beta 0.0.1

Collapse
This topic is closed.
X
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    SMS HS Server - beta 0.0.1

    In short, this plug-in allows HomeSeer to fire triggers based on received SMS or received calls, and trigger actions that sends out SMS. In addition SMS HS server can receive messages from other network hosts through supplied client applications. Current client applications are, GUI, GUI with configuration management, command line and “SMS HS Client” HomeSeer plug-in.


    “SMS HS Server” plug-in
    - Supports multiple clients over Ethernet, HomeSeer, GUI applications, command line application, configuration manager
    - Implements triggers “Receive SMS” and “Receive Call”
    - Access control for both messaging and configuration clients
    - Supports both TEXT and PDU SMS message format
    - Supports 7 and 16 bit (UCS2) message encoding
    - Configuration from HomeSeer configuration pages

    “SMS HS Client” plug-in
    - Implements one action “Send SMS”
    - Supports multiple servers for failover redundancy
    - Configuration from HomeSeer configuration pages







    Getting started
    - Connect an ETSI 07.05 complient modem,e.g a GSM phone, and install the required drivers.
    - Run the attached plug-in installer. It contains both the server and the client plug-in.
    - In the HS web gui -> Setup -> Interfaces, select the serial port supplied by the connected modem
    - Activate the plug-ins.
    - Verify configuration for both plug-ins, and make necessary adjustments.
    - Enable debug in case you need to troubleshoot.

    I will post the user guide once it is close to finished.

    Please note:
    - 7bit encoding have a limited subset of the alphabet, but allows 160 characters per message.
    - Localhost have always full access to the server plug-in, even if the access lists are empty.
    - Symbian based GSM phones (that I know of) does not support “New Message Indication”, that notifies about mobile terminated messages.
    - When running client applications, the interface, ISmsRemoting.dll, needs to be in the same directory as the client.


    Test results
    The plug-ins have been tested on HomeSeer 2.3.0.86 with the following GSM phones:

    # Nokia E51 (Symbian)
    Send SMS OK
    Rcv SMS NOK (Not supported)
    Rcv Call OK
    PDU mode OK
    Text mode OK

    # Sony Ericsson W890i
    Send SMS OK
    Rcv SMS OK
    Rcv Call OK
    PDU mode OK
    Text mode NOK (Not supported)

    # Sony Ericsson Z600
    Send SMS OK
    Rcv SMS OK
    Rcv Call OK (Some issues sending SMS after having received calls)
    PDU mode OK
    Text mode OK

    # Sony Ericsson V800
    Send SMS OK
    Rcv SMS OK
    Rcv Call OK
    PDU mode OK
    Text mode NOK (Not supported)

    # Sony Ericsson K500i
    Send SMS OK
    Rcv SMS OK
    Rcv Call OK
    PDU mode OK
    Text mode NOK (Not supported)

    # Ericsson T68
    Send SMS OK
    Rcv SMS OK
    Rcv Call OK
    PDU mode OK
    Text mode NOK (Not supported)

    # Siemens, MC35i, REVISION 01.03
    Send SMS OK
    Rcv SMS OK
    Rcv Call OK
    PDU mode OK
    Text mode OK

    # Sony Ericsson, 6100511-BVGR47, R4A021 CXC1122528
    Send SMS OK
    Rcv SMS OK
    Rcv Call OK
    PDU mode OK
    Text mode OK


    “SMS HS Server” default configuration values:
    Allowed users (IP addr): ""
    Allowed administrators (IP addr): ""

    Serial port: COM1
    Baud Rate: 9600
    Data Bits: 8
    Parity: None
    Stop Bits: One

    SMS Mode: PDU
    PDU Encoding: 7 bit
    Use SMS multipart: Unchecked

    Receive SMS: Unchecked
    Receive Call: Unchecked
    Use debug logging: Unchecked


    “SMS HS Client” default configuration values:
    SMS Server host: 127.0.0.1
    Client connection timeout (Sec): 5
    Client message timeout (Sec): 3
    Client message retries: 2
    Use debug logging: Unchecked


    Known issues
    - Incoming calls are sometimes not trigging the configured triggers if there are incoming and outgoing messages in transfer at the same time.
    - If a port in active use are being removed prior to disconnecting the server plug-in, the plug-in might crash.


    Thanks to
    - Eduard Gomolyako, for writing SMSPDULib used for encoding and decoding SMS
    - "codeproblem" at http://forum.codeproblem.com for adding 7-bit support and multipart to the SMSPDULib


    Let me know how it's working out for you


    Best regards,
    Skaar

    Update
    - SMS HS Server: Added two devices, "SMS Message" and "Phone Call", where the status string will change whenever a call or SMS is received.
    - SMS HS Server: Added option to use * for any phone nr to fire trigger.
    - SMS HS Client: Exposed a method that should be reachable by scripts and can be used to send SMS: public bool sendSms(string phoneNr, string text). (Not tested yet)
    - Added support for and tested with Siemens MC35i and SE BVGR47

    Screenshots
    SMS HS Server Configuration
    SMS HS Server Call trigger
    SMS HS Server SMS trigger
    SMS HS Server Devices

    SMS HS Client Configuration
    SMS HS Client SMS action

    SMS Cmd Client
    SMS GUI Client
    SMS GUI Manager, Configuration
    SMS GUI Manager, Access lists
    Attached Files
    Last edited by skaar; April 14, 2011, 08:48 AM.

    #2
    Thanks for this great plugin.
    First question is what should I do with the files in the HomeSeerSmsClients_0_0_1 map?
    Now I only run the MSI installer.
    I have installed it and SMS send with my Nokia 6230i is working fine.
    Only when I receive a SMS it gives a error and the log show this:

    13.11.2009 10:32:54.124: ERROR: Server: SmsComLib: decodePdu: System.FormatException: Kan geen herkenbare cijfers vinden.
    bij System.ParseNumbers.StringToInt(String s, Int32 radix, Int32 flags, Int32* currPos)
    bij System.Convert.ToByte(String value, Int32 fromBase)
    bij SMSPDULib.SMSBase.PopByte(String& source)
    bij SMSPDULib.SMSBase.PopServiceCenterAddress(String& source)
    bij SMSPDULib.SMSBase.Fetch(SMSBase sms, String& source)
    bij SMSPDULib.SMS.Fetch(SMS sms, String& source)
    bij SmsComLib.SmsCom.decodePdu(String pdu)
    13.11.2009 10:32:54.139: ERROR: Server: SmsComLib: Failed to decode the message pdu


    The configuration I have set on Text and not on PDU.
    Is there also a possibility to set some virtual devices where I can see the incoming SMS messages?

    Comment


      #3
      antoon,
      please activate the debug option for the plug-in in the web configuration page, and then receive another SMS, and send me the debug log.

      Currently you can only see incoming SMS in the log file, but that might change :-)

      Comment


        #4
        Here is the log.

        13.11.2009 11:38:28.116: DEBUG: Saving configuration
        13.11.2009 11:38:28.131: DEBUG: Server: Saved configuration data.
        13.11.2009 11:38:28.131: DEBUG: PagePut: Config data parsed and saved
        13.11.2009 11:38:54.695: DEBUG: Server: SmsComLib: RCV: +CMTI: "SM",4
        13.11.2009 11:38:54.711: DEBUG: Server: SmsComLib: SEND: AT+CPMS="SM"
        13.11.2009 11:38:54.727: DEBUG: Server: SmsComLib: RCV: ,+CPMS: 4,10,4,10,4,160,,OK,
        13.11.2009 11:38:55.024: DEBUG: Server: SmsComLib: SEND: AT+CMGR=4
        13.11.2009 11:38:55.649: DEBUG: Server: SmsComLib: RCV: ,+CMGR: "REC UNREAD","+316xxxxxxxx",,"09/11/13,11:38:50+04",hoi,,OK,
        13.11.2009 11:38:55.649: ERROR: Server: SmsComLib: decodePdu: System.FormatException: Kan geen herkenbare cijfers vinden.
        bij System.ParseNumbers.StringToInt(String s, Int32 radix, Int32 flags, Int32* currPos)
        bij System.Convert.ToByte(String value, Int32 fromBase)
        bij SMSPDULib.SMSBase.PopByte(String& source)
        bij SMSPDULib.SMSBase.PopServiceCenterAddress(String& source)
        bij SMSPDULib.SMSBase.Fetch(SMSBase sms, String& source)
        bij SMSPDULib.SMS.Fetch(SMS sms, String& source)
        bij SmsComLib.SmsCom.decodePdu(String pdu)
        13.11.2009 11:38:55.664: ERROR: Server: SmsComLib: Failed to decode the message pdu
        13.11.2009 11:39:38.323: DEBUG: GenPage: Creating page content
        13.11.2009 11:39:38.339: DEBUG: GenPage: Create page content completed

        Comment


          #5
          Thanks antoon, i see what's wrong, and i'll work on a fix.

          Comment


            #6
            antoon,
            i have added an update to the initial post, hspi_smsHsServer.zip. Please extract the file inside, and replace the hspi_smsHsServer.dll file in your HS install directory. Note that you have to shut down HS prior to the update.

            None of my test phones support inbound clear text messages, so i haven't had a chance to verify the fix.

            Comment


              #7
              Thanks,I will test the file and report back

              Comment


                #8
                I got the same error with the new update.
                But then I put the configuration on PDU mode and everything is working now

                Comment


                  #9
                  Hi antoon,
                  i found a phone that i could test with, and noticed that the last fix did not do it. This issue is now resolved, and it is working with my setup.

                  I have uploaded a new version where you can receive SMS in TEXT mode as well.

                  Comment


                    #10
                    OK, tested the last build and indeed the text mode is working now also.
                    Thanks.

                    Comment


                      #11
                      Is it possible with the plugin to send the status or value from a Homeseer device thru SMS?

                      Comment


                        #12
                        I'm not sure. I will look into it. I'm also looking at having a device where you can see incoming messages.

                        Comment


                          #13
                          That would be a great option.
                          Thanks,

                          Comment


                            #14
                            Sms Hs Server question

                            Can you use the Hi-Phone Desktop USB Moden and Apple Iphone for this Plugin.

                            Thank you

                            Greg mack

                            Comment


                              #15
                              If it supports ETSI 07.05, it should work. I have not tested with the modems you have, so i don't know if it works.

                              Go ahead and test, and let us know the result :-)

                              Comment

                              Working...
                              X