Created
August 24, 2017 02:10
-
-
Save yamamaya/d4ff89f9076aa9f2fdff29e58ace8124 to your computer and use it in GitHub Desktop.
NETDWARF obsidianからSMSを送る。シャットダウンしてENによるトリガーで起動。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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