nightui/src/modules/vitalsd/aggregatorRecv.py

43 lines
899 B
Python

import subprocess
import requests
import sys
from flask import jsonify
from cyberwareAbs import Cyberware
class AggregatorRecv(Cyberware):
uuid = None
def __init__(self):
print("GadgetBridge Aggregator Reciever started")
print("[WARN] GadgetBridge Aggregator not implemented")
# def sendValue(self, url, jsonRequest):
# try:
# oldJson = json.loads(jsonRequest)
# uuidJson = {'uuid': self.uuid}
# oldJson.update(uuidJson)
# jsonWithUuid = json.dumps(oldJson)
#
# request = requests.post(url, json=jsonWithUuid)
#
# except:
# print(self.apiFailMsg)
# return 2 # 2 = No API contact.
#
# if request.status_code > 399:
# return 3 # 3 = API refused request.
#
# if request.status_code > 299:
# return 4 # 4 = API encountered an internal error.
#
# return 0 # 0 = Success
def sendAll(self):
o=0
def connectCyberware(self):
o=0
def disconnectCyberware(self):
o=0