class testSmsSetIPManager(Abstract):#
def __init__(self):
self.timer = osTimer()
- # self.newip = "test.iot.socket.thisiot.com"
+ self.newip = "test.iot.socket.thisiot.com"
+ self.newcom = 9999
# self.newip = "device.miwitracker.com"
# self.newcom = 8505
- self.newip = "api.xcloudtech.com"
- self.newcom = 9000
+ # self.newip = "api.xcloudtech.com"
+ # self.newcom = 9000
+
# "8.134.110.49"#默认大锤服务器 在大锤服务器更改要连接新的服务器地址
- # self.newcom = 9999
- # 31379
- # self.new_key = "3JyCjsw4ryXKzjzudayY"
- # self.new_pid = "qAELPTKmFanR4RHe"
+
+ self.new_key = "3JyCjsw4ryXKzjzudayY"
+ self.new_pid = "qAELPTKmFanR4RHe"
- self.new_key = "bZld0ALsZTt15tKEZhOlLPgbsO75BLTP"
- self.new_pid = "SZKW"
+ # self.new_key = "bZld0ALsZTt15tKEZhOlLPgbsO75BLTP"
+ # self.new_pid = "SZKW"
# self.new_key = ""
# self.new_pid = "3G"
def server_init(server_type = None):
#服务器选择1,防走丢,2大锤,3三基同创,4童信 5云米
if server_type == None:
- server_type = 1
+ server_type = 2
#print("server_init:server_type:{}".format(server_type))
d_server_addr = "api.xcloudtech.com"
d_server_port = 9000
self.reconnect_flag = 0
def publish_timer_cb(self, *args):
EventMesh.publish(constants.PROTOCOL.LK_SEND)
- # self.authen_set()
+ self.authen_set()
def authen_set(self):
sever_state = EventMesh.publish("get_server_state")#获取修改服务器状态
if sever_state != None:
pid = data_tmp["bid"]#产品型号
port = data_tmp["port"]#端口号
- host = "api.xcloudtech.com"#童信
- port = 9000
-
- secretKey = "bZld0ALsZTt15tKEZhOlLPgbsO75BLTP"
- pid = "SZKW"
if secretKey != '':
EventMesh.publish("set_new_key", str(secretKey))#获取pid和key
if pid != '':
def handler(self, data):
# 这里接收数据
- print("handler -> {}".format(data))
+ # print("handler -> {}".format(data))
# if data.startswith('Init;'):
# data = data[5:]
# EventMesh.publish(constants.EVENT.SET_KEY, {"value": ujson.loads(data)['KEY']})