Skip to content

Instantly share code, notes, and snippets.

@yamamaya
Created August 24, 2017 02:10
Show Gist options
  • Save yamamaya/d4ff89f9076aa9f2fdff29e58ace8124 to your computer and use it in GitHub Desktop.
Save yamamaya/d4ff89f9076aa9f2fdff29e58ace8124 to your computer and use it in GitHub Desktop.
NETDWARF obsidianからSMSを送る。シャットダウンしてENによるトリガーで起動。
from NDCore import ConnectLib, SMSLib
def main():
# ネットワークに接続する
print 'Connecting...',
ConnectLib.connect()
print 'OK'
  # SMSを送信する
phone_number = 'xxxxxxxxxxx'
message_ucs2 = '306B308330FC3093' #にゃーん(UCS2エンコードをHEX文字列で)
print 'Sending message...',
SMSLib.send_ucs2(phone_number, message_ucs2)
print 'OK'
  # シャットダウン
print 'Shutdown'
PowerLib.shutdown()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment