Example #1
0
def ping():
    from core import reply_sms, sms_type, sms_format, sms_source, sms_message, sms_modem
    import time, os, core
    print("Received ping...")
    time.sleep(0.5)
    print("Pong")
    reply_sms('Pong ' + time.strftime('%H:%M:%S - %m/%d/%Y'))
Example #2
0
def command_help():
    from core import reply_sms, sms_type, sms_format, sms_source, sms_message, sms_modem
    import time, os, core
    print('\n' + "--------------------------------------" + '\n')
    print('Here are the available commands: ')
    print('\n')
    print('HELP - prints current message')
    print('ECHO - replies eniter message back to user')
    print('TIME - current local time')
    print('UPTIME - uptime of host system')
    print('PING - replies with pong')
    print('ID - returns your DMR ID')
    print('If "TO-" and "@" are in message, will send email to address.')
    print('\n' + "--------------------------------------" + '\n')
    reply_sms(
        '1 of 4. All commands are in CAPS. ECHO - replies entier message back to user.'
    )
    reply_sms(
        '2 of 4. TIME - current local time. UPTIME - uptime of host system.')
    reply_sms('3 of 4. PING - replies with pong. ID - returns your DMR ID.')
    reply_sms(
        ' 4 of 4. If "TO-" and "@" are in message, will send email to address')
Example #3
0
def reply_dmr_id():
    from core import reply_sms, sms_type, sms_format, sms_source, sms_message, sms_modem
    import time, os, core
    print('DMR ID: ' + sms_source)
    reply_sms('Your DMR ID is ' + sms_source)
Example #4
0
def time():
    import time, os, core
    from core import reply_sms, sms_type, sms_format, sms_source, sms_message, sms_modem
    print('Getting time...')
    current_time = time.strftime('%H:%M %A %B %d, %Y - Timezone: %z')
    reply_sms(current_time)
Example #5
0
def echo():
    import time, os, core
    from core import reply_sms, sms_type, sms_format, sms_source, sms_message, sms_modem
    reply_sms(sms_message)
    print("Echoing SMS")
Example #6
0
def uptime():
    import time, os, core
    from core import reply_sms, sms_type, sms_format, sms_source, sms_message, sms_modem
    print('Getting uptime...')
    uptime = os.popen('uptime').read()
    reply_sms(str(uptime))
Example #7
0
def example3():
    from core import reply_sms
    reply_sms('This is the final test')
Example #8
0
def example():
    from core import reply_sms
    reply_sms('This is an example reply')