mirror of
https://gitlab.sectorq.eu/jaydee/python.git
synced 2025-12-13 18:24:53 +01:00
init
This commit is contained in:
129
Rhasspy-LED-4mic.py
Normal file
129
Rhasspy-LED-4mic.py
Normal file
@@ -0,0 +1,129 @@
|
||||
#!/usr/bin/env python
|
||||
from apa102_pi.driver import apa102
|
||||
from pixel_ring import pixel_ring
|
||||
from gpiozero import LED
|
||||
from time import sleep
|
||||
import paho.mqtt.client as mqtt
|
||||
import RPi.GPIO as GPIO
|
||||
import json
|
||||
import os
|
||||
import time
|
||||
|
||||
rhasspyConfig = '/home/jd/.config/rhasspy/profiles/en/profile.json'
|
||||
|
||||
counter = 0
|
||||
LED_ST = "on"
|
||||
mute = "off"
|
||||
siteId = ""
|
||||
MQTThost = ""
|
||||
|
||||
GPIO.setmode(GPIO.BCM)
|
||||
GPIO.setup(5, GPIO.OUT)
|
||||
GPIO.output(5, GPIO.HIGH)
|
||||
|
||||
power = LED(5)
|
||||
power.on()
|
||||
pixel_ring.set_brightness(20)
|
||||
pixel_ring.change_pattern('echo')
|
||||
pixel_ring.wakeup()
|
||||
time.sleep(2)
|
||||
|
||||
with open(rhasspyConfig,'r', encoding='UTF-8') as file:
|
||||
obj = json.loads(file.read())
|
||||
MQTTconfig = json.dumps(obj["mqtt"])
|
||||
MQTTconfig = MQTTconfig.replace("\"mqtt\": ","")
|
||||
MQTTconfig = json.loads(MQTTconfig)
|
||||
siteId = MQTTconfig["site_id"]
|
||||
MQTThost = MQTTconfig["host"]
|
||||
MQTThost = MQTThost.strip('"')
|
||||
if "port" in json.dumps(MQTTconfig):
|
||||
MQTTport = MQTTconfig["port"]
|
||||
MQTTport = MQTTport.strip('"')
|
||||
MQTTport = int(MQTTport)
|
||||
else:
|
||||
MQTTport = 1883
|
||||
|
||||
strip = apa102.APA102(num_led=12)
|
||||
strip.clear_strip()
|
||||
|
||||
def on_disconnect():
|
||||
# for i in range(0,12):
|
||||
# strip.set_pixel(i,0,59,0,7)
|
||||
# strip.show()
|
||||
pixel_ring.wakeup()
|
||||
|
||||
for i in range(0,12):
|
||||
strip.set_pixel(i,255,0,0,30)
|
||||
strip.show()
|
||||
time.sleep(3)
|
||||
def on_connect(client, userdata, flags, rc):
|
||||
print("Connected with result code " + str(rc))
|
||||
client.subscribe("hermes/dialogueManager/sessionEnded/#")
|
||||
client.subscribe("hermes/hotword/toggleOff/#")
|
||||
client.subscribe("hermes/hotword/toggleOn/#")
|
||||
client.subscribe("hermes/asr/stopListening")
|
||||
client.subscribe("hermes/hotword/hey siri_raspberry-pi/detected")
|
||||
client.subscribe("hermes/asr/textCaptured")
|
||||
|
||||
for i in range(0,12):
|
||||
strip.set_pixel(i,0,127,0,7)
|
||||
strip.show()
|
||||
sleep(2)
|
||||
for i in range(0,12):
|
||||
strip.set_pixel(i,0,255,0,0)
|
||||
strip.show()
|
||||
def on_message(client, userdata, msg):
|
||||
jsonData = json.loads(msg.payload)
|
||||
if msg.topic == "hermes/hotword/hey siri_raspberry-pi/detected" and jsonData["siteId"] == siteId and LED_ST == "on":
|
||||
# for i in range(0,12):
|
||||
# strip.set_pixel(i,0,100,0,7)
|
||||
# strip.show()
|
||||
pixel_ring.think()
|
||||
|
||||
elif msg.topic == "hermes/asr/textCaptured" and jsonData["siteId"] == siteId:
|
||||
# for i in range(0,12):
|
||||
# strip.set_pixel(i,0,255,0,0)
|
||||
# strip.show()
|
||||
pixel_ring.wakeup()
|
||||
time.sleep(0.3)
|
||||
pixel_ring.off()
|
||||
time.sleep(0.3)
|
||||
pixel_ring.wakeup()
|
||||
time.sleep(0.3)
|
||||
pixel_ring.off()
|
||||
elif msg.topic == "hermes/asr/stopListening":
|
||||
#pixel_ring.off()
|
||||
pass
|
||||
elif msg.topic == "hermes/hotword/toggleOn":
|
||||
# for i in range(0,12):
|
||||
# strip.set_pixel(i,0,99,0,0)
|
||||
# strip.show()
|
||||
#pixel_ring.off() for i in range(0,12):
|
||||
# strip.set_pixel(i,255,0,0,7)
|
||||
# strip.show()
|
||||
# time.sleep(0.2)
|
||||
# pixel_ring.off()
|
||||
# time.sleep(0.3)
|
||||
# for i in range(0,12):
|
||||
# strip.set_pixel(i,255,0,0,7)
|
||||
# strip.show()
|
||||
# time.sleep(0.2)
|
||||
pass
|
||||
else:
|
||||
# for i in range(0,12):
|
||||
# strip.set_pixel(i,0,99,0,0)
|
||||
# strip.show()
|
||||
pass
|
||||
# for i in range(0,12):
|
||||
# strip.set_pixel(i,0,127,255,7)
|
||||
# sleep(0.1)
|
||||
# strip.show()
|
||||
|
||||
client = mqtt.Client()
|
||||
client.username_pw_set("jaydee", password="jaydee1")
|
||||
client.on_connect = on_connect
|
||||
client.on_disconnect = on_disconnect
|
||||
client.on_message = on_message
|
||||
client.connect(MQTThost, MQTTport, 15)
|
||||
|
||||
client.loop_forever()
|
||||
12
aida_send.py
Normal file
12
aida_send.py
Normal file
@@ -0,0 +1,12 @@
|
||||
import python_aida64
|
||||
import json
|
||||
from pprint import pprint
|
||||
data = python_aida64.getData()
|
||||
print(json.dumps(data))
|
||||
print(data["sys"][5]["value"])
|
||||
stats = {}
|
||||
for i in data:
|
||||
for j in data[i]:
|
||||
stats[j["id"]] = j["value"]
|
||||
|
||||
print(json.dumps(stats))
|
||||
101
auto_import.py
Normal file
101
auto_import.py
Normal file
@@ -0,0 +1,101 @@
|
||||
import os
|
||||
from posixpath import ismount
|
||||
import sys
|
||||
import time
|
||||
import subprocess
|
||||
import datetime
|
||||
import shutil
|
||||
import json
|
||||
|
||||
_DEST = "/share/Photo/imported"
|
||||
_DEV = ""
|
||||
_DEV_MOUNT = "/share/external/DEV3304_1/"
|
||||
_DEV_DIR = "/share/external/DEV3304_1/DCIM/100GOPRO"
|
||||
_IMP_FILE = "/share/external/DEV3304_1/auto_import"
|
||||
_DEV_DATA = "/share/external/DEV3304_1/MISC/version.txt"
|
||||
|
||||
|
||||
|
||||
|
||||
#sys.exit()
|
||||
while True:
|
||||
if os.path.ismount(_DEV_MOUNT):
|
||||
if os.path.exists(_DEV_DATA):
|
||||
file = open(_DEV_DATA, 'r')
|
||||
content = file.read()
|
||||
file.close()
|
||||
strToReplace = ','
|
||||
replacementStr = ''
|
||||
strToReplaceReversed = strToReplace[::-1]
|
||||
replacementStrReversed = replacementStr[::-1]
|
||||
|
||||
strValue = content[::-1].replace(strToReplaceReversed, replacementStrReversed, 1)[::-1]
|
||||
c = content.replace("\n","")
|
||||
|
||||
print("--------------")
|
||||
print(c[-2])
|
||||
print("--------------")
|
||||
print(strValue)
|
||||
_DEV_CONT = json.loads(strValue)
|
||||
wifimac = _DEV_CONT["wifi mac"]
|
||||
if wifimac == "2474f742c017":
|
||||
_DEV = "gopro9_1"
|
||||
print("gopro9_1 registered")
|
||||
|
||||
if os.path.exists(_IMP_FILE) and _DEV == "":
|
||||
print("path exist")
|
||||
time.sleep(5)
|
||||
if _DEV == "":
|
||||
file = open(_IMP_FILE, 'r')
|
||||
content = file.read()
|
||||
_DEV = json.loads(content)["device"]
|
||||
file.close()
|
||||
x = datetime.datetime.now()
|
||||
print(x.year)
|
||||
_DAT = x.strftime("%Y%m%d")
|
||||
if len(os.listdir(_DEV_DIR)) == 0:
|
||||
print("Folder is empty!")
|
||||
myCmd = "umount /share/external/DEV3304_1"
|
||||
status, output = subprocess.getstatusoutput(myCmd)
|
||||
time.sleep(5)
|
||||
continue
|
||||
myCmd = "/sbin/hal_app --se_buzzer enc_id=0,mode=101;sleep 1;/sbin/hal_app --se_buzzer enc_id=0,mode=101;sleep 1;/sbin/hal_app --se_buzzer enc_id=0,mode=101"
|
||||
status, output = subprocess.getstatusoutput(myCmd)
|
||||
if not _DEV == "":
|
||||
if os.path.exists(_DEV_DIR):
|
||||
for filename in os.listdir(_DEV_DIR):
|
||||
print(filename)
|
||||
c_time = os.path.getctime("{}/{}".format(_DEV_DIR,filename))
|
||||
dt_c = datetime.datetime.fromtimestamp(c_time)
|
||||
print(dt_c)
|
||||
_CDAT = dt_c.strftime("%Y-%m-%d")
|
||||
print(_CDAT)
|
||||
_FDEST = "{}/{}/{}".format(_DEST,_DEV, _CDAT)
|
||||
if not os.path.exists(_FDEST):
|
||||
cmnd = "mkdir -p {}".format(_FDEST)
|
||||
status, output = subprocess.getstatusoutput(cmnd)
|
||||
print("Moving file {} into {}".format(filename, _FDEST))
|
||||
try:
|
||||
shutil.move("{}/{}".format(_DEV_DIR,filename),_FDEST)
|
||||
except:
|
||||
try:
|
||||
shutil.move("{}/{}".format(_DEV_DIR,filename),"{}/{}".format(_FDEST,filename))
|
||||
except:
|
||||
print("failed to move file {}".format(filename))
|
||||
print("Umounting")
|
||||
myCmd = "umount /share/external/DEV3304_1"
|
||||
status, output = subprocess.getstatusoutput(myCmd)
|
||||
print(output)
|
||||
print(status)
|
||||
myCmd = "/sbin/hal_app --se_buzzer enc_id=0,mode=100"
|
||||
subprocess.getstatusoutput(myCmd)
|
||||
time.sleep(5)
|
||||
else:
|
||||
print("Nothing to import")
|
||||
time.sleep(5)
|
||||
else:
|
||||
print("Unknown device")
|
||||
time.sleep(5)
|
||||
else:
|
||||
print("Usb does not connected")
|
||||
time.sleep(5)
|
||||
864
build/mqtt_srv/Analysis-00.toc
Normal file
864
build/mqtt_srv/Analysis-00.toc
Normal file
@@ -0,0 +1,864 @@
|
||||
(['X:\\__GITHUB\\python\\mqtt_srv.pyw'],
|
||||
['X:\\__GITHUB\\python'],
|
||||
['codecs'],
|
||||
['C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks\\__pycache__',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\rthooks',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\rthooks\\__pycache__',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks'],
|
||||
{},
|
||||
[],
|
||||
[],
|
||||
False,
|
||||
False,
|
||||
False,
|
||||
{},
|
||||
'3.10.2 (tags/v3.10.2:a58ebcc, Jan 17 2022, 14:12:15) [MSC v.1929 64 bit '
|
||||
'(AMD64)]',
|
||||
[('pyi_rth_inspect',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\Lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_inspect.py',
|
||||
'PYSOURCE'),
|
||||
('pyi_rth_subprocess',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\Lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_subprocess.py',
|
||||
'PYSOURCE'),
|
||||
('pyi_rth_pkgutil',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\Lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_pkgutil.py',
|
||||
'PYSOURCE'),
|
||||
('pyi_rth_multiprocessing',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\Lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_multiprocessing.py',
|
||||
'PYSOURCE'),
|
||||
('mqtt_srv',
|
||||
'\\\\192.168.77.106\\Data\\__GITHUB\\python\\mqtt_srv.pyw',
|
||||
'PYSOURCE')],
|
||||
[('multiprocessing.popen_spawn_posix',
|
||||
'C:\\Program Files\\Python310\\lib\\multiprocessing\\popen_spawn_posix.py',
|
||||
'PYMODULE'),
|
||||
('multiprocessing.resource_tracker',
|
||||
'C:\\Program Files\\Python310\\lib\\multiprocessing\\resource_tracker.py',
|
||||
'PYMODULE'),
|
||||
('threading', 'C:\\Program Files\\Python310\\lib\\threading.py', 'PYMODULE'),
|
||||
('_threading_local',
|
||||
'C:\\Program Files\\Python310\\lib\\_threading_local.py',
|
||||
'PYMODULE'),
|
||||
('contextlib',
|
||||
'C:\\Program Files\\Python310\\lib\\contextlib.py',
|
||||
'PYMODULE'),
|
||||
('signal', 'C:\\Program Files\\Python310\\lib\\signal.py', 'PYMODULE'),
|
||||
('multiprocessing.util',
|
||||
'C:\\Program Files\\Python310\\lib\\multiprocessing\\util.py',
|
||||
'PYMODULE'),
|
||||
('multiprocessing.forkserver',
|
||||
'C:\\Program Files\\Python310\\lib\\multiprocessing\\forkserver.py',
|
||||
'PYMODULE'),
|
||||
('multiprocessing.connection',
|
||||
'C:\\Program Files\\Python310\\lib\\multiprocessing\\connection.py',
|
||||
'PYMODULE'),
|
||||
('multiprocessing.resource_sharer',
|
||||
'C:\\Program Files\\Python310\\lib\\multiprocessing\\resource_sharer.py',
|
||||
'PYMODULE'),
|
||||
('xmlrpc.client',
|
||||
'C:\\Program Files\\Python310\\lib\\xmlrpc\\client.py',
|
||||
'PYMODULE'),
|
||||
('xmlrpc',
|
||||
'C:\\Program Files\\Python310\\lib\\xmlrpc\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('gzip', 'C:\\Program Files\\Python310\\lib\\gzip.py', 'PYMODULE'),
|
||||
('argparse', 'C:\\Program Files\\Python310\\lib\\argparse.py', 'PYMODULE'),
|
||||
('textwrap', 'C:\\Program Files\\Python310\\lib\\textwrap.py', 'PYMODULE'),
|
||||
('copy', 'C:\\Program Files\\Python310\\lib\\copy.py', 'PYMODULE'),
|
||||
('gettext', 'C:\\Program Files\\Python310\\lib\\gettext.py', 'PYMODULE'),
|
||||
('_compression',
|
||||
'C:\\Program Files\\Python310\\lib\\_compression.py',
|
||||
'PYMODULE'),
|
||||
('xml.parsers.expat',
|
||||
'C:\\Program Files\\Python310\\lib\\xml\\parsers\\expat.py',
|
||||
'PYMODULE'),
|
||||
('xml.parsers',
|
||||
'C:\\Program Files\\Python310\\lib\\xml\\parsers\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('xml', 'C:\\Program Files\\Python310\\lib\\xml\\__init__.py', 'PYMODULE'),
|
||||
('xml.sax.expatreader',
|
||||
'C:\\Program Files\\Python310\\lib\\xml\\sax\\expatreader.py',
|
||||
'PYMODULE'),
|
||||
('xml.sax.saxutils',
|
||||
'C:\\Program Files\\Python310\\lib\\xml\\sax\\saxutils.py',
|
||||
'PYMODULE'),
|
||||
('xml.sax',
|
||||
'C:\\Program Files\\Python310\\lib\\xml\\sax\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('xml.sax.handler',
|
||||
'C:\\Program Files\\Python310\\lib\\xml\\sax\\handler.py',
|
||||
'PYMODULE'),
|
||||
('xml.sax._exceptions',
|
||||
'C:\\Program Files\\Python310\\lib\\xml\\sax\\_exceptions.py',
|
||||
'PYMODULE'),
|
||||
('xml.sax.xmlreader',
|
||||
'C:\\Program Files\\Python310\\lib\\xml\\sax\\xmlreader.py',
|
||||
'PYMODULE'),
|
||||
('http.client',
|
||||
'C:\\Program Files\\Python310\\lib\\http\\client.py',
|
||||
'PYMODULE'),
|
||||
('ssl', 'C:\\Program Files\\Python310\\lib\\ssl.py', 'PYMODULE'),
|
||||
('calendar', 'C:\\Program Files\\Python310\\lib\\calendar.py', 'PYMODULE'),
|
||||
('http', 'C:\\Program Files\\Python310\\lib\\http\\__init__.py', 'PYMODULE'),
|
||||
('email.message',
|
||||
'C:\\Program Files\\Python310\\lib\\email\\message.py',
|
||||
'PYMODULE'),
|
||||
('email.policy',
|
||||
'C:\\Program Files\\Python310\\lib\\email\\policy.py',
|
||||
'PYMODULE'),
|
||||
('email.contentmanager',
|
||||
'C:\\Program Files\\Python310\\lib\\email\\contentmanager.py',
|
||||
'PYMODULE'),
|
||||
('email.quoprimime',
|
||||
'C:\\Program Files\\Python310\\lib\\email\\quoprimime.py',
|
||||
'PYMODULE'),
|
||||
('string', 'C:\\Program Files\\Python310\\lib\\string.py', 'PYMODULE'),
|
||||
('email.headerregistry',
|
||||
'C:\\Program Files\\Python310\\lib\\email\\headerregistry.py',
|
||||
'PYMODULE'),
|
||||
('email._header_value_parser',
|
||||
'C:\\Program Files\\Python310\\lib\\email\\_header_value_parser.py',
|
||||
'PYMODULE'),
|
||||
('email.iterators',
|
||||
'C:\\Program Files\\Python310\\lib\\email\\iterators.py',
|
||||
'PYMODULE'),
|
||||
('email.generator',
|
||||
'C:\\Program Files\\Python310\\lib\\email\\generator.py',
|
||||
'PYMODULE'),
|
||||
('email._encoded_words',
|
||||
'C:\\Program Files\\Python310\\lib\\email\\_encoded_words.py',
|
||||
'PYMODULE'),
|
||||
('email.charset',
|
||||
'C:\\Program Files\\Python310\\lib\\email\\charset.py',
|
||||
'PYMODULE'),
|
||||
('email.encoders',
|
||||
'C:\\Program Files\\Python310\\lib\\email\\encoders.py',
|
||||
'PYMODULE'),
|
||||
('email.base64mime',
|
||||
'C:\\Program Files\\Python310\\lib\\email\\base64mime.py',
|
||||
'PYMODULE'),
|
||||
('email._policybase',
|
||||
'C:\\Program Files\\Python310\\lib\\email\\_policybase.py',
|
||||
'PYMODULE'),
|
||||
('email.header',
|
||||
'C:\\Program Files\\Python310\\lib\\email\\header.py',
|
||||
'PYMODULE'),
|
||||
('email.errors',
|
||||
'C:\\Program Files\\Python310\\lib\\email\\errors.py',
|
||||
'PYMODULE'),
|
||||
('email.utils',
|
||||
'C:\\Program Files\\Python310\\lib\\email\\utils.py',
|
||||
'PYMODULE'),
|
||||
('email._parseaddr',
|
||||
'C:\\Program Files\\Python310\\lib\\email\\_parseaddr.py',
|
||||
'PYMODULE'),
|
||||
('email',
|
||||
'C:\\Program Files\\Python310\\lib\\email\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('quopri', 'C:\\Program Files\\Python310\\lib\\quopri.py', 'PYMODULE'),
|
||||
('uu', 'C:\\Program Files\\Python310\\lib\\uu.py', 'PYMODULE'),
|
||||
('optparse', 'C:\\Program Files\\Python310\\lib\\optparse.py', 'PYMODULE'),
|
||||
('email.parser',
|
||||
'C:\\Program Files\\Python310\\lib\\email\\parser.py',
|
||||
'PYMODULE'),
|
||||
('email.feedparser',
|
||||
'C:\\Program Files\\Python310\\lib\\email\\feedparser.py',
|
||||
'PYMODULE'),
|
||||
('decimal', 'C:\\Program Files\\Python310\\lib\\decimal.py', 'PYMODULE'),
|
||||
('_pydecimal',
|
||||
'C:\\Program Files\\Python310\\lib\\_pydecimal.py',
|
||||
'PYMODULE'),
|
||||
('contextvars',
|
||||
'C:\\Program Files\\Python310\\lib\\contextvars.py',
|
||||
'PYMODULE'),
|
||||
('numbers', 'C:\\Program Files\\Python310\\lib\\numbers.py', 'PYMODULE'),
|
||||
('base64', 'C:\\Program Files\\Python310\\lib\\base64.py', 'PYMODULE'),
|
||||
('hmac', 'C:\\Program Files\\Python310\\lib\\hmac.py', 'PYMODULE'),
|
||||
('hashlib', 'C:\\Program Files\\Python310\\lib\\hashlib.py', 'PYMODULE'),
|
||||
('struct', 'C:\\Program Files\\Python310\\lib\\struct.py', 'PYMODULE'),
|
||||
('selectors', 'C:\\Program Files\\Python310\\lib\\selectors.py', 'PYMODULE'),
|
||||
('tempfile', 'C:\\Program Files\\Python310\\lib\\tempfile.py', 'PYMODULE'),
|
||||
('shutil', 'C:\\Program Files\\Python310\\lib\\shutil.py', 'PYMODULE'),
|
||||
('zipfile', 'C:\\Program Files\\Python310\\lib\\zipfile.py', 'PYMODULE'),
|
||||
('py_compile',
|
||||
'C:\\Program Files\\Python310\\lib\\py_compile.py',
|
||||
'PYMODULE'),
|
||||
('importlib.machinery',
|
||||
'C:\\Program Files\\Python310\\lib\\importlib\\machinery.py',
|
||||
'PYMODULE'),
|
||||
('importlib',
|
||||
'C:\\Program Files\\Python310\\lib\\importlib\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('importlib._common',
|
||||
'C:\\Program Files\\Python310\\lib\\importlib\\_common.py',
|
||||
'PYMODULE'),
|
||||
('importlib._adapters',
|
||||
'C:\\Program Files\\Python310\\lib\\importlib\\_adapters.py',
|
||||
'PYMODULE'),
|
||||
('typing', 'C:\\Program Files\\Python310\\lib\\typing.py', 'PYMODULE'),
|
||||
('importlib.abc',
|
||||
'C:\\Program Files\\Python310\\lib\\importlib\\abc.py',
|
||||
'PYMODULE'),
|
||||
('importlib._abc',
|
||||
'C:\\Program Files\\Python310\\lib\\importlib\\_abc.py',
|
||||
'PYMODULE'),
|
||||
('importlib._bootstrap',
|
||||
'C:\\Program Files\\Python310\\lib\\importlib\\_bootstrap.py',
|
||||
'PYMODULE'),
|
||||
('importlib._bootstrap_external',
|
||||
'C:\\Program Files\\Python310\\lib\\importlib\\_bootstrap_external.py',
|
||||
'PYMODULE'),
|
||||
('importlib.metadata',
|
||||
'C:\\Program Files\\Python310\\lib\\importlib\\metadata\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('importlib.metadata._itertools',
|
||||
'C:\\Program Files\\Python310\\lib\\importlib\\metadata\\_itertools.py',
|
||||
'PYMODULE'),
|
||||
('importlib.metadata._functools',
|
||||
'C:\\Program Files\\Python310\\lib\\importlib\\metadata\\_functools.py',
|
||||
'PYMODULE'),
|
||||
('importlib.metadata._collections',
|
||||
'C:\\Program Files\\Python310\\lib\\importlib\\metadata\\_collections.py',
|
||||
'PYMODULE'),
|
||||
('importlib.metadata._meta',
|
||||
'C:\\Program Files\\Python310\\lib\\importlib\\metadata\\_meta.py',
|
||||
'PYMODULE'),
|
||||
('importlib.metadata._adapters',
|
||||
'C:\\Program Files\\Python310\\lib\\importlib\\metadata\\_adapters.py',
|
||||
'PYMODULE'),
|
||||
('importlib.metadata._text',
|
||||
'C:\\Program Files\\Python310\\lib\\importlib\\metadata\\_text.py',
|
||||
'PYMODULE'),
|
||||
('csv', 'C:\\Program Files\\Python310\\lib\\csv.py', 'PYMODULE'),
|
||||
('importlib.readers',
|
||||
'C:\\Program Files\\Python310\\lib\\importlib\\readers.py',
|
||||
'PYMODULE'),
|
||||
('importlib.util',
|
||||
'C:\\Program Files\\Python310\\lib\\importlib\\util.py',
|
||||
'PYMODULE'),
|
||||
('tarfile', 'C:\\Program Files\\Python310\\lib\\tarfile.py', 'PYMODULE'),
|
||||
('lzma', 'C:\\Program Files\\Python310\\lib\\lzma.py', 'PYMODULE'),
|
||||
('bz2', 'C:\\Program Files\\Python310\\lib\\bz2.py', 'PYMODULE'),
|
||||
('logging',
|
||||
'C:\\Program Files\\Python310\\lib\\logging\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('pickle', 'C:\\Program Files\\Python310\\lib\\pickle.py', 'PYMODULE'),
|
||||
('pprint', 'C:\\Program Files\\Python310\\lib\\pprint.py', 'PYMODULE'),
|
||||
('dataclasses',
|
||||
'C:\\Program Files\\Python310\\lib\\dataclasses.py',
|
||||
'PYMODULE'),
|
||||
('inspect', 'C:\\Program Files\\Python310\\lib\\inspect.py', 'PYMODULE'),
|
||||
('dis', 'C:\\Program Files\\Python310\\lib\\dis.py', 'PYMODULE'),
|
||||
('opcode', 'C:\\Program Files\\Python310\\lib\\opcode.py', 'PYMODULE'),
|
||||
('ast', 'C:\\Program Files\\Python310\\lib\\ast.py', 'PYMODULE'),
|
||||
('_compat_pickle',
|
||||
'C:\\Program Files\\Python310\\lib\\_compat_pickle.py',
|
||||
'PYMODULE'),
|
||||
('multiprocessing.process',
|
||||
'C:\\Program Files\\Python310\\lib\\multiprocessing\\process.py',
|
||||
'PYMODULE'),
|
||||
('multiprocessing.context',
|
||||
'C:\\Program Files\\Python310\\lib\\multiprocessing\\context.py',
|
||||
'PYMODULE'),
|
||||
('multiprocessing.popen_forkserver',
|
||||
'C:\\Program Files\\Python310\\lib\\multiprocessing\\popen_forkserver.py',
|
||||
'PYMODULE'),
|
||||
('multiprocessing.sharedctypes',
|
||||
'C:\\Program Files\\Python310\\lib\\multiprocessing\\sharedctypes.py',
|
||||
'PYMODULE'),
|
||||
('multiprocessing.heap',
|
||||
'C:\\Program Files\\Python310\\lib\\multiprocessing\\heap.py',
|
||||
'PYMODULE'),
|
||||
('bisect', 'C:\\Program Files\\Python310\\lib\\bisect.py', 'PYMODULE'),
|
||||
('multiprocessing.pool',
|
||||
'C:\\Program Files\\Python310\\lib\\multiprocessing\\pool.py',
|
||||
'PYMODULE'),
|
||||
('multiprocessing.dummy',
|
||||
'C:\\Program Files\\Python310\\lib\\multiprocessing\\dummy\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('multiprocessing.dummy.connection',
|
||||
'C:\\Program Files\\Python310\\lib\\multiprocessing\\dummy\\connection.py',
|
||||
'PYMODULE'),
|
||||
('queue', 'C:\\Program Files\\Python310\\lib\\queue.py', 'PYMODULE'),
|
||||
('multiprocessing.queues',
|
||||
'C:\\Program Files\\Python310\\lib\\multiprocessing\\queues.py',
|
||||
'PYMODULE'),
|
||||
('multiprocessing.synchronize',
|
||||
'C:\\Program Files\\Python310\\lib\\multiprocessing\\synchronize.py',
|
||||
'PYMODULE'),
|
||||
('multiprocessing.managers',
|
||||
'C:\\Program Files\\Python310\\lib\\multiprocessing\\managers.py',
|
||||
'PYMODULE'),
|
||||
('multiprocessing.shared_memory',
|
||||
'C:\\Program Files\\Python310\\lib\\multiprocessing\\shared_memory.py',
|
||||
'PYMODULE'),
|
||||
('secrets', 'C:\\Program Files\\Python310\\lib\\secrets.py', 'PYMODULE'),
|
||||
('multiprocessing.reduction',
|
||||
'C:\\Program Files\\Python310\\lib\\multiprocessing\\reduction.py',
|
||||
'PYMODULE'),
|
||||
('multiprocessing.popen_fork',
|
||||
'C:\\Program Files\\Python310\\lib\\multiprocessing\\popen_fork.py',
|
||||
'PYMODULE'),
|
||||
('multiprocessing.popen_spawn_win32',
|
||||
'C:\\Program Files\\Python310\\lib\\multiprocessing\\popen_spawn_win32.py',
|
||||
'PYMODULE'),
|
||||
('multiprocessing.spawn',
|
||||
'C:\\Program Files\\Python310\\lib\\multiprocessing\\spawn.py',
|
||||
'PYMODULE'),
|
||||
('runpy', 'C:\\Program Files\\Python310\\lib\\runpy.py', 'PYMODULE'),
|
||||
('pkgutil', 'C:\\Program Files\\Python310\\lib\\pkgutil.py', 'PYMODULE'),
|
||||
('zipimport', 'C:\\Program Files\\Python310\\lib\\zipimport.py', 'PYMODULE'),
|
||||
('multiprocessing',
|
||||
'C:\\Program Files\\Python310\\lib\\multiprocessing\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('getpass', 'C:\\Program Files\\Python310\\lib\\getpass.py', 'PYMODULE'),
|
||||
('nturl2path',
|
||||
'C:\\Program Files\\Python310\\lib\\nturl2path.py',
|
||||
'PYMODULE'),
|
||||
('ftplib', 'C:\\Program Files\\Python310\\lib\\ftplib.py', 'PYMODULE'),
|
||||
('netrc', 'C:\\Program Files\\Python310\\lib\\netrc.py', 'PYMODULE'),
|
||||
('shlex', 'C:\\Program Files\\Python310\\lib\\shlex.py', 'PYMODULE'),
|
||||
('mimetypes', 'C:\\Program Files\\Python310\\lib\\mimetypes.py', 'PYMODULE'),
|
||||
('http.cookiejar',
|
||||
'C:\\Program Files\\Python310\\lib\\http\\cookiejar.py',
|
||||
'PYMODULE'),
|
||||
('stringprep',
|
||||
'C:\\Program Files\\Python310\\lib\\stringprep.py',
|
||||
'PYMODULE'),
|
||||
('tracemalloc',
|
||||
'C:\\Program Files\\Python310\\lib\\tracemalloc.py',
|
||||
'PYMODULE'),
|
||||
('_py_abc', 'C:\\Program Files\\Python310\\lib\\_py_abc.py', 'PYMODULE'),
|
||||
('ping3',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\ping3\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('ping3.enums',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\ping3\\enums.py',
|
||||
'PYMODULE'),
|
||||
('ping3.errors',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\ping3\\errors.py',
|
||||
'PYMODULE'),
|
||||
('psutil',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\psutil\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('psutil._psaix',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\psutil\\_psaix.py',
|
||||
'PYMODULE'),
|
||||
('glob', 'C:\\Program Files\\Python310\\lib\\glob.py', 'PYMODULE'),
|
||||
('psutil._pssunos',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\psutil\\_pssunos.py',
|
||||
'PYMODULE'),
|
||||
('psutil._psbsd',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\psutil\\_psbsd.py',
|
||||
'PYMODULE'),
|
||||
('xml.etree.ElementTree',
|
||||
'C:\\Program Files\\Python310\\lib\\xml\\etree\\ElementTree.py',
|
||||
'PYMODULE'),
|
||||
('xml.etree.cElementTree',
|
||||
'C:\\Program Files\\Python310\\lib\\xml\\etree\\cElementTree.py',
|
||||
'PYMODULE'),
|
||||
('xml.etree.ElementInclude',
|
||||
'C:\\Program Files\\Python310\\lib\\xml\\etree\\ElementInclude.py',
|
||||
'PYMODULE'),
|
||||
('xml.etree.ElementPath',
|
||||
'C:\\Program Files\\Python310\\lib\\xml\\etree\\ElementPath.py',
|
||||
'PYMODULE'),
|
||||
('xml.etree',
|
||||
'C:\\Program Files\\Python310\\lib\\xml\\etree\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('psutil._psosx',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\psutil\\_psosx.py',
|
||||
'PYMODULE'),
|
||||
('psutil._pswindows',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\psutil\\_pswindows.py',
|
||||
'PYMODULE'),
|
||||
('psutil._pslinux',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\psutil\\_pslinux.py',
|
||||
'PYMODULE'),
|
||||
('psutil._psposix',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\psutil\\_psposix.py',
|
||||
'PYMODULE'),
|
||||
('psutil._compat',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\psutil\\_compat.py',
|
||||
'PYMODULE'),
|
||||
('psutil._common',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\psutil\\_common.py',
|
||||
'PYMODULE'),
|
||||
('curses',
|
||||
'C:\\Program Files\\Python310\\lib\\curses\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('curses.has_key',
|
||||
'C:\\Program Files\\Python310\\lib\\curses\\has_key.py',
|
||||
'PYMODULE'),
|
||||
('__future__',
|
||||
'C:\\Program Files\\Python310\\lib\\__future__.py',
|
||||
'PYMODULE'),
|
||||
('requests',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\requests\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('requests.status_codes',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\requests\\status_codes.py',
|
||||
'PYMODULE'),
|
||||
('requests.structures',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\requests\\structures.py',
|
||||
'PYMODULE'),
|
||||
('requests.compat',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\requests\\compat.py',
|
||||
'PYMODULE'),
|
||||
('http.cookies',
|
||||
'C:\\Program Files\\Python310\\lib\\http\\cookies.py',
|
||||
'PYMODULE'),
|
||||
('requests.models',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\requests\\models.py',
|
||||
'PYMODULE'),
|
||||
('idna',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\idna\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('idna.intranges',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\idna\\intranges.py',
|
||||
'PYMODULE'),
|
||||
('idna.core',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\idna\\core.py',
|
||||
'PYMODULE'),
|
||||
('idna.uts46data',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\idna\\uts46data.py',
|
||||
'PYMODULE'),
|
||||
('idna.idnadata',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\idna\\idnadata.py',
|
||||
'PYMODULE'),
|
||||
('idna.package_data',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\idna\\package_data.py',
|
||||
'PYMODULE'),
|
||||
('requests.hooks',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\requests\\hooks.py',
|
||||
'PYMODULE'),
|
||||
('requests.cookies',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\requests\\cookies.py',
|
||||
'PYMODULE'),
|
||||
('requests.auth',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\requests\\auth.py',
|
||||
'PYMODULE'),
|
||||
('requests._internal_utils',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\requests\\_internal_utils.py',
|
||||
'PYMODULE'),
|
||||
('urllib3.util',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\urllib3\\util\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('urllib3.util.wait',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\util\\wait.py',
|
||||
'PYMODULE'),
|
||||
('urllib3.util.url',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\util\\url.py',
|
||||
'PYMODULE'),
|
||||
('urllib3.packages.six',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\urllib3\\packages\\six.py',
|
||||
'PYMODULE'),
|
||||
('urllib3.packages',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\urllib3\\packages\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('urllib3.util.timeout',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\urllib3\\util\\timeout.py',
|
||||
'PYMODULE'),
|
||||
('urllib3.util.ssl_',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\util\\ssl_.py',
|
||||
'PYMODULE'),
|
||||
('urllib3.util.ssltransport',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\urllib3\\util\\ssltransport.py',
|
||||
'PYMODULE'),
|
||||
('urllib3.util.retry',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\util\\retry.py',
|
||||
'PYMODULE'),
|
||||
('urllib3.util.response',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\urllib3\\util\\response.py',
|
||||
'PYMODULE'),
|
||||
('urllib3.util.request',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\urllib3\\util\\request.py',
|
||||
'PYMODULE'),
|
||||
('urllib3.util.connection',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\urllib3\\util\\connection.py',
|
||||
'PYMODULE'),
|
||||
('urllib3.contrib._appengine_environ',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\urllib3\\contrib\\_appengine_environ.py',
|
||||
'PYMODULE'),
|
||||
('urllib3.filepost',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\filepost.py',
|
||||
'PYMODULE'),
|
||||
('urllib3.fields',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\fields.py',
|
||||
'PYMODULE'),
|
||||
('requests.api',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\requests\\api.py',
|
||||
'PYMODULE'),
|
||||
('requests.sessions',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\requests\\sessions.py',
|
||||
'PYMODULE'),
|
||||
('requests.adapters',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\requests\\adapters.py',
|
||||
'PYMODULE'),
|
||||
('urllib3.contrib.socks',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\urllib3\\contrib\\socks.py',
|
||||
'PYMODULE'),
|
||||
('urllib3.connectionpool',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\urllib3\\connectionpool.py',
|
||||
'PYMODULE'),
|
||||
('urllib3.util.ssl_match_hostname',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\urllib3\\util\\ssl_match_hostname.py',
|
||||
'PYMODULE'),
|
||||
('ipaddress', 'C:\\Program Files\\Python310\\lib\\ipaddress.py', 'PYMODULE'),
|
||||
('urllib3.util.queue',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\util\\queue.py',
|
||||
'PYMODULE'),
|
||||
('urllib3.util.proxy',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\util\\proxy.py',
|
||||
'PYMODULE'),
|
||||
('urllib3.request',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\request.py',
|
||||
'PYMODULE'),
|
||||
('urllib3.connection',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\connection.py',
|
||||
'PYMODULE'),
|
||||
('urllib3._version',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\_version.py',
|
||||
'PYMODULE'),
|
||||
('urllib3._collections',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\_collections.py',
|
||||
'PYMODULE'),
|
||||
('urllib3.response',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\response.py',
|
||||
'PYMODULE'),
|
||||
('urllib3.poolmanager',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\poolmanager.py',
|
||||
'PYMODULE'),
|
||||
('requests.__version__',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\requests\\__version__.py',
|
||||
'PYMODULE'),
|
||||
('requests.utils',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\requests\\utils.py',
|
||||
'PYMODULE'),
|
||||
('requests.certs',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\requests\\certs.py',
|
||||
'PYMODULE'),
|
||||
('certifi',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\certifi\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('certifi.core',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\certifi\\core.py',
|
||||
'PYMODULE'),
|
||||
('importlib.resources',
|
||||
'C:\\Program Files\\Python310\\lib\\importlib\\resources.py',
|
||||
'PYMODULE'),
|
||||
('requests.packages',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\requests\\packages.py',
|
||||
'PYMODULE'),
|
||||
('urllib3.exceptions',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\exceptions.py',
|
||||
'PYMODULE'),
|
||||
('urllib3.contrib.pyopenssl',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\urllib3\\contrib\\pyopenssl.py',
|
||||
'PYMODULE'),
|
||||
('urllib3.packages.backports.makefile',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\urllib3\\packages\\backports\\makefile.py',
|
||||
'PYMODULE'),
|
||||
('urllib3.packages.backports',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\urllib3\\packages\\backports\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('urllib3.contrib',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\urllib3\\contrib\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('charset_normalizer',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\charset_normalizer\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('charset_normalizer.version',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\charset_normalizer\\version.py',
|
||||
'PYMODULE'),
|
||||
('charset_normalizer.utils',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\charset_normalizer\\utils.py',
|
||||
'PYMODULE'),
|
||||
('charset_normalizer.constant',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\charset_normalizer\\constant.py',
|
||||
'PYMODULE'),
|
||||
('charset_normalizer.assets',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\charset_normalizer\\assets\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('charset_normalizer.models',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\charset_normalizer\\models.py',
|
||||
'PYMODULE'),
|
||||
('charset_normalizer.cd',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\charset_normalizer\\cd.py',
|
||||
'PYMODULE'),
|
||||
('charset_normalizer.md',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\charset_normalizer\\md.py',
|
||||
'PYMODULE'),
|
||||
('charset_normalizer.legacy',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\charset_normalizer\\legacy.py',
|
||||
'PYMODULE'),
|
||||
('charset_normalizer.api',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\charset_normalizer\\api.py',
|
||||
'PYMODULE'),
|
||||
('requests.exceptions',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\requests\\exceptions.py',
|
||||
'PYMODULE'),
|
||||
('urllib3',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('random', 'C:\\Program Files\\Python310\\lib\\random.py', 'PYMODULE'),
|
||||
('statistics',
|
||||
'C:\\Program Files\\Python310\\lib\\statistics.py',
|
||||
'PYMODULE'),
|
||||
('fractions', 'C:\\Program Files\\Python310\\lib\\fractions.py', 'PYMODULE'),
|
||||
('getopt', 'C:\\Program Files\\Python310\\lib\\getopt.py', 'PYMODULE'),
|
||||
('ctypes',
|
||||
'C:\\Program Files\\Python310\\lib\\ctypes\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('ctypes._endian',
|
||||
'C:\\Program Files\\Python310\\lib\\ctypes\\_endian.py',
|
||||
'PYMODULE'),
|
||||
('datetime', 'C:\\Program Files\\Python310\\lib\\datetime.py', 'PYMODULE'),
|
||||
('_strptime', 'C:\\Program Files\\Python310\\lib\\_strptime.py', 'PYMODULE'),
|
||||
('json', 'C:\\Program Files\\Python310\\lib\\json\\__init__.py', 'PYMODULE'),
|
||||
('json.encoder',
|
||||
'C:\\Program Files\\Python310\\lib\\json\\encoder.py',
|
||||
'PYMODULE'),
|
||||
('json.decoder',
|
||||
'C:\\Program Files\\Python310\\lib\\json\\decoder.py',
|
||||
'PYMODULE'),
|
||||
('json.scanner',
|
||||
'C:\\Program Files\\Python310\\lib\\json\\scanner.py',
|
||||
'PYMODULE'),
|
||||
('subprocess',
|
||||
'C:\\Program Files\\Python310\\lib\\subprocess.py',
|
||||
'PYMODULE'),
|
||||
('socket', 'C:\\Program Files\\Python310\\lib\\socket.py', 'PYMODULE'),
|
||||
('platform', 'C:\\Program Files\\Python310\\lib\\platform.py', 'PYMODULE'),
|
||||
('getmac',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\getmac\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('getmac.getmac',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\getmac\\getmac.py',
|
||||
'PYMODULE'),
|
||||
('uuid', 'C:\\Program Files\\Python310\\lib\\uuid.py', 'PYMODULE'),
|
||||
('paho.mqtt.client',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\paho\\mqtt\\client.py',
|
||||
'PYMODULE'),
|
||||
('paho.mqtt',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\paho\\mqtt\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('paho',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\paho\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('paho.mqtt.subscribeoptions',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\paho\\mqtt\\subscribeoptions.py',
|
||||
'PYMODULE'),
|
||||
('paho.mqtt.reasoncodes',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\paho\\mqtt\\reasoncodes.py',
|
||||
'PYMODULE'),
|
||||
('paho.mqtt.packettypes',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\paho\\mqtt\\packettypes.py',
|
||||
'PYMODULE'),
|
||||
('paho.mqtt.properties',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\paho\\mqtt\\properties.py',
|
||||
'PYMODULE'),
|
||||
('paho.mqtt.matcher',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\paho\\mqtt\\matcher.py',
|
||||
'PYMODULE'),
|
||||
('asyncio.log',
|
||||
'C:\\Program Files\\Python310\\lib\\asyncio\\log.py',
|
||||
'PYMODULE'),
|
||||
('asyncio',
|
||||
'C:\\Program Files\\Python310\\lib\\asyncio\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('asyncio.unix_events',
|
||||
'C:\\Program Files\\Python310\\lib\\asyncio\\unix_events.py',
|
||||
'PYMODULE'),
|
||||
('asyncio.windows_events',
|
||||
'C:\\Program Files\\Python310\\lib\\asyncio\\windows_events.py',
|
||||
'PYMODULE'),
|
||||
('asyncio.windows_utils',
|
||||
'C:\\Program Files\\Python310\\lib\\asyncio\\windows_utils.py',
|
||||
'PYMODULE'),
|
||||
('asyncio.selector_events',
|
||||
'C:\\Program Files\\Python310\\lib\\asyncio\\selector_events.py',
|
||||
'PYMODULE'),
|
||||
('asyncio.proactor_events',
|
||||
'C:\\Program Files\\Python310\\lib\\asyncio\\proactor_events.py',
|
||||
'PYMODULE'),
|
||||
('asyncio.base_subprocess',
|
||||
'C:\\Program Files\\Python310\\lib\\asyncio\\base_subprocess.py',
|
||||
'PYMODULE'),
|
||||
('asyncio.threads',
|
||||
'C:\\Program Files\\Python310\\lib\\asyncio\\threads.py',
|
||||
'PYMODULE'),
|
||||
('asyncio.subprocess',
|
||||
'C:\\Program Files\\Python310\\lib\\asyncio\\subprocess.py',
|
||||
'PYMODULE'),
|
||||
('asyncio.streams',
|
||||
'C:\\Program Files\\Python310\\lib\\asyncio\\streams.py',
|
||||
'PYMODULE'),
|
||||
('asyncio.queues',
|
||||
'C:\\Program Files\\Python310\\lib\\asyncio\\queues.py',
|
||||
'PYMODULE'),
|
||||
('asyncio.runners',
|
||||
'C:\\Program Files\\Python310\\lib\\asyncio\\runners.py',
|
||||
'PYMODULE'),
|
||||
('asyncio.base_events',
|
||||
'C:\\Program Files\\Python310\\lib\\asyncio\\base_events.py',
|
||||
'PYMODULE'),
|
||||
('concurrent.futures',
|
||||
'C:\\Program Files\\Python310\\lib\\concurrent\\futures\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('concurrent.futures.thread',
|
||||
'C:\\Program Files\\Python310\\lib\\concurrent\\futures\\thread.py',
|
||||
'PYMODULE'),
|
||||
('concurrent.futures.process',
|
||||
'C:\\Program Files\\Python310\\lib\\concurrent\\futures\\process.py',
|
||||
'PYMODULE'),
|
||||
('concurrent.futures._base',
|
||||
'C:\\Program Files\\Python310\\lib\\concurrent\\futures\\_base.py',
|
||||
'PYMODULE'),
|
||||
('concurrent',
|
||||
'C:\\Program Files\\Python310\\lib\\concurrent\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('asyncio.trsock',
|
||||
'C:\\Program Files\\Python310\\lib\\asyncio\\trsock.py',
|
||||
'PYMODULE'),
|
||||
('asyncio.staggered',
|
||||
'C:\\Program Files\\Python310\\lib\\asyncio\\staggered.py',
|
||||
'PYMODULE'),
|
||||
('asyncio.tasks',
|
||||
'C:\\Program Files\\Python310\\lib\\asyncio\\tasks.py',
|
||||
'PYMODULE'),
|
||||
('asyncio.base_tasks',
|
||||
'C:\\Program Files\\Python310\\lib\\asyncio\\base_tasks.py',
|
||||
'PYMODULE'),
|
||||
('asyncio.locks',
|
||||
'C:\\Program Files\\Python310\\lib\\asyncio\\locks.py',
|
||||
'PYMODULE'),
|
||||
('asyncio.mixins',
|
||||
'C:\\Program Files\\Python310\\lib\\asyncio\\mixins.py',
|
||||
'PYMODULE'),
|
||||
('asyncio.sslproto',
|
||||
'C:\\Program Files\\Python310\\lib\\asyncio\\sslproto.py',
|
||||
'PYMODULE'),
|
||||
('asyncio.transports',
|
||||
'C:\\Program Files\\Python310\\lib\\asyncio\\transports.py',
|
||||
'PYMODULE'),
|
||||
('asyncio.protocols',
|
||||
'C:\\Program Files\\Python310\\lib\\asyncio\\protocols.py',
|
||||
'PYMODULE'),
|
||||
('asyncio.futures',
|
||||
'C:\\Program Files\\Python310\\lib\\asyncio\\futures.py',
|
||||
'PYMODULE'),
|
||||
('asyncio.exceptions',
|
||||
'C:\\Program Files\\Python310\\lib\\asyncio\\exceptions.py',
|
||||
'PYMODULE'),
|
||||
('asyncio.events',
|
||||
'C:\\Program Files\\Python310\\lib\\asyncio\\events.py',
|
||||
'PYMODULE'),
|
||||
('asyncio.coroutines',
|
||||
'C:\\Program Files\\Python310\\lib\\asyncio\\coroutines.py',
|
||||
'PYMODULE'),
|
||||
('asyncio.base_futures',
|
||||
'C:\\Program Files\\Python310\\lib\\asyncio\\base_futures.py',
|
||||
'PYMODULE'),
|
||||
('asyncio.format_helpers',
|
||||
'C:\\Program Files\\Python310\\lib\\asyncio\\format_helpers.py',
|
||||
'PYMODULE'),
|
||||
('asyncio.constants',
|
||||
'C:\\Program Files\\Python310\\lib\\asyncio\\constants.py',
|
||||
'PYMODULE')],
|
||||
[('VCRUNTIME140.dll',
|
||||
'C:\\Program Files\\Python310\\VCRUNTIME140.dll',
|
||||
'BINARY'),
|
||||
('python310.dll', 'C:\\Program Files\\Python310\\python310.dll', 'BINARY'),
|
||||
('_multiprocessing',
|
||||
'C:\\Program Files\\Python310\\DLLs\\_multiprocessing.pyd',
|
||||
'EXTENSION'),
|
||||
('pyexpat', 'C:\\Program Files\\Python310\\DLLs\\pyexpat.pyd', 'EXTENSION'),
|
||||
('_ssl', 'C:\\Program Files\\Python310\\DLLs\\_ssl.pyd', 'EXTENSION'),
|
||||
('_decimal', 'C:\\Program Files\\Python310\\DLLs\\_decimal.pyd', 'EXTENSION'),
|
||||
('_hashlib', 'C:\\Program Files\\Python310\\DLLs\\_hashlib.pyd', 'EXTENSION'),
|
||||
('select', 'C:\\Program Files\\Python310\\DLLs\\select.pyd', 'EXTENSION'),
|
||||
('_lzma', 'C:\\Program Files\\Python310\\DLLs\\_lzma.pyd', 'EXTENSION'),
|
||||
('_bz2', 'C:\\Program Files\\Python310\\DLLs\\_bz2.pyd', 'EXTENSION'),
|
||||
('_queue', 'C:\\Program Files\\Python310\\DLLs\\_queue.pyd', 'EXTENSION'),
|
||||
('unicodedata',
|
||||
'C:\\Program Files\\Python310\\DLLs\\unicodedata.pyd',
|
||||
'EXTENSION'),
|
||||
('_elementtree',
|
||||
'C:\\Program Files\\Python310\\DLLs\\_elementtree.pyd',
|
||||
'EXTENSION'),
|
||||
('psutil._psutil_windows',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\psutil\\_psutil_windows.pyd',
|
||||
'EXTENSION'),
|
||||
('_ctypes', 'C:\\Program Files\\Python310\\DLLs\\_ctypes.pyd', 'EXTENSION'),
|
||||
('_socket', 'C:\\Program Files\\Python310\\DLLs\\_socket.pyd', 'EXTENSION'),
|
||||
('_uuid', 'C:\\Program Files\\Python310\\DLLs\\_uuid.pyd', 'EXTENSION'),
|
||||
('_overlapped',
|
||||
'C:\\Program Files\\Python310\\DLLs\\_overlapped.pyd',
|
||||
'EXTENSION'),
|
||||
('_asyncio', 'C:\\Program Files\\Python310\\DLLs\\_asyncio.pyd', 'EXTENSION'),
|
||||
('libcrypto-1_1.dll',
|
||||
'C:\\Program Files\\Python310\\DLLs\\libcrypto-1_1.dll',
|
||||
'BINARY'),
|
||||
('libssl-1_1.dll',
|
||||
'C:\\Program Files\\Python310\\DLLs\\libssl-1_1.dll',
|
||||
'BINARY'),
|
||||
('python3.dll', 'C:\\Program Files\\Python310\\python3.dll', 'BINARY'),
|
||||
('libffi-7.dll',
|
||||
'C:\\Program Files\\Python310\\DLLs\\libffi-7.dll',
|
||||
'BINARY')],
|
||||
[],
|
||||
[],
|
||||
[('base_library.zip',
|
||||
'X:\\__GITHUB\\python\\build\\mqtt_srv\\base_library.zip',
|
||||
'DATA'),
|
||||
('certifi\\py.typed',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\certifi\\py.typed',
|
||||
'DATA'),
|
||||
('certifi\\cacert.pem',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\certifi\\cacert.pem',
|
||||
'DATA')],
|
||||
[])
|
||||
115
build/mqtt_srv/EXE-00.toc
Normal file
115
build/mqtt_srv/EXE-00.toc
Normal file
@@ -0,0 +1,115 @@
|
||||
('X:\\__GITHUB\\python\\dist\\mqtt_srv.exe',
|
||||
False,
|
||||
False,
|
||||
False,
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\PyInstaller\\bootloader\\images\\icon-windowed.ico',
|
||||
None,
|
||||
False,
|
||||
False,
|
||||
'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"><assemblyIdentity type="win32" name="mqtt_srv" processorArchitecture="amd64" version="1.0.0.0"/><trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"><security><requestedPrivileges><requestedExecutionLevel level="asInvoker" uiAccess="false"/></requestedPrivileges></security></trustInfo><dependency><dependentAssembly><assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" language="*" processorArchitecture="*" version="6.0.0.0" publicKeyToken="6595b64144ccf1df"/></dependentAssembly></dependency><compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"><application><supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/><supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/><supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/><supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/><supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/></application></compatibility><application xmlns="urn:schemas-microsoft-com:asm.v3"><windowsSettings><longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware></windowsSettings></application></assembly>',
|
||||
True,
|
||||
True,
|
||||
False,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
'X:\\__GITHUB\\python\\build\\mqtt_srv\\mqtt_srv.pkg',
|
||||
[('PYZ-00.pyz', 'X:\\__GITHUB\\python\\build\\mqtt_srv\\PYZ-00.pyz', 'PYZ'),
|
||||
('struct',
|
||||
'X:\\__GITHUB\\python\\build\\mqtt_srv\\localpycs\\struct.pyc',
|
||||
'PYMODULE'),
|
||||
('pyimod01_archive',
|
||||
'X:\\__GITHUB\\python\\build\\mqtt_srv\\localpycs\\pyimod01_archive.pyc',
|
||||
'PYMODULE'),
|
||||
('pyimod02_importers',
|
||||
'X:\\__GITHUB\\python\\build\\mqtt_srv\\localpycs\\pyimod02_importers.pyc',
|
||||
'PYMODULE'),
|
||||
('pyimod03_ctypes',
|
||||
'X:\\__GITHUB\\python\\build\\mqtt_srv\\localpycs\\pyimod03_ctypes.pyc',
|
||||
'PYMODULE'),
|
||||
('pyimod04_pywin32',
|
||||
'X:\\__GITHUB\\python\\build\\mqtt_srv\\localpycs\\pyimod04_pywin32.pyc',
|
||||
'PYMODULE'),
|
||||
('pyiboot01_bootstrap',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\PyInstaller\\loader\\pyiboot01_bootstrap.py',
|
||||
'PYSOURCE'),
|
||||
('pyi_rth_inspect',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\Lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_inspect.py',
|
||||
'PYSOURCE'),
|
||||
('pyi_rth_subprocess',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\Lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_subprocess.py',
|
||||
'PYSOURCE'),
|
||||
('pyi_rth_pkgutil',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\Lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_pkgutil.py',
|
||||
'PYSOURCE'),
|
||||
('pyi_rth_multiprocessing',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\Lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_multiprocessing.py',
|
||||
'PYSOURCE'),
|
||||
('mqtt_srv',
|
||||
'\\\\192.168.77.106\\Data\\__GITHUB\\python\\mqtt_srv.pyw',
|
||||
'PYSOURCE'),
|
||||
('VCRUNTIME140.dll',
|
||||
'C:\\Program Files\\Python310\\VCRUNTIME140.dll',
|
||||
'BINARY'),
|
||||
('python310.dll', 'C:\\Program Files\\Python310\\python310.dll', 'BINARY'),
|
||||
('_multiprocessing',
|
||||
'C:\\Program Files\\Python310\\DLLs\\_multiprocessing.pyd',
|
||||
'EXTENSION'),
|
||||
('pyexpat', 'C:\\Program Files\\Python310\\DLLs\\pyexpat.pyd', 'EXTENSION'),
|
||||
('_ssl', 'C:\\Program Files\\Python310\\DLLs\\_ssl.pyd', 'EXTENSION'),
|
||||
('_decimal', 'C:\\Program Files\\Python310\\DLLs\\_decimal.pyd', 'EXTENSION'),
|
||||
('_hashlib', 'C:\\Program Files\\Python310\\DLLs\\_hashlib.pyd', 'EXTENSION'),
|
||||
('select', 'C:\\Program Files\\Python310\\DLLs\\select.pyd', 'EXTENSION'),
|
||||
('_lzma', 'C:\\Program Files\\Python310\\DLLs\\_lzma.pyd', 'EXTENSION'),
|
||||
('_bz2', 'C:\\Program Files\\Python310\\DLLs\\_bz2.pyd', 'EXTENSION'),
|
||||
('_queue', 'C:\\Program Files\\Python310\\DLLs\\_queue.pyd', 'EXTENSION'),
|
||||
('unicodedata',
|
||||
'C:\\Program Files\\Python310\\DLLs\\unicodedata.pyd',
|
||||
'EXTENSION'),
|
||||
('_elementtree',
|
||||
'C:\\Program Files\\Python310\\DLLs\\_elementtree.pyd',
|
||||
'EXTENSION'),
|
||||
('psutil._psutil_windows',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\psutil\\_psutil_windows.pyd',
|
||||
'EXTENSION'),
|
||||
('_ctypes', 'C:\\Program Files\\Python310\\DLLs\\_ctypes.pyd', 'EXTENSION'),
|
||||
('_socket', 'C:\\Program Files\\Python310\\DLLs\\_socket.pyd', 'EXTENSION'),
|
||||
('_uuid', 'C:\\Program Files\\Python310\\DLLs\\_uuid.pyd', 'EXTENSION'),
|
||||
('_overlapped',
|
||||
'C:\\Program Files\\Python310\\DLLs\\_overlapped.pyd',
|
||||
'EXTENSION'),
|
||||
('_asyncio', 'C:\\Program Files\\Python310\\DLLs\\_asyncio.pyd', 'EXTENSION'),
|
||||
('libcrypto-1_1.dll',
|
||||
'C:\\Program Files\\Python310\\DLLs\\libcrypto-1_1.dll',
|
||||
'BINARY'),
|
||||
('libssl-1_1.dll',
|
||||
'C:\\Program Files\\Python310\\DLLs\\libssl-1_1.dll',
|
||||
'BINARY'),
|
||||
('python3.dll', 'C:\\Program Files\\Python310\\python3.dll', 'BINARY'),
|
||||
('libffi-7.dll',
|
||||
'C:\\Program Files\\Python310\\DLLs\\libffi-7.dll',
|
||||
'BINARY'),
|
||||
('base_library.zip',
|
||||
'X:\\__GITHUB\\python\\build\\mqtt_srv\\base_library.zip',
|
||||
'DATA'),
|
||||
('certifi\\py.typed',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\certifi\\py.typed',
|
||||
'DATA'),
|
||||
('certifi\\cacert.pem',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\certifi\\cacert.pem',
|
||||
'DATA')],
|
||||
[],
|
||||
False,
|
||||
False,
|
||||
1669484603,
|
||||
[('runw.exe',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\PyInstaller\\bootloader\\Windows-64bit\\runw.exe',
|
||||
'EXECUTABLE')])
|
||||
106
build/mqtt_srv/PKG-00.toc
Normal file
106
build/mqtt_srv/PKG-00.toc
Normal file
@@ -0,0 +1,106 @@
|
||||
('X:\\__GITHUB\\python\\build\\mqtt_srv\\mqtt_srv.pkg',
|
||||
{'BINARY': 1,
|
||||
'DATA': 1,
|
||||
'EXECUTABLE': 1,
|
||||
'EXTENSION': 1,
|
||||
'PYMODULE': 1,
|
||||
'PYSOURCE': 1,
|
||||
'PYZ': 0,
|
||||
'SPLASH': 1},
|
||||
[('PYZ-00.pyz', 'X:\\__GITHUB\\python\\build\\mqtt_srv\\PYZ-00.pyz', 'PYZ'),
|
||||
('struct',
|
||||
'X:\\__GITHUB\\python\\build\\mqtt_srv\\localpycs\\struct.pyc',
|
||||
'PYMODULE'),
|
||||
('pyimod01_archive',
|
||||
'X:\\__GITHUB\\python\\build\\mqtt_srv\\localpycs\\pyimod01_archive.pyc',
|
||||
'PYMODULE'),
|
||||
('pyimod02_importers',
|
||||
'X:\\__GITHUB\\python\\build\\mqtt_srv\\localpycs\\pyimod02_importers.pyc',
|
||||
'PYMODULE'),
|
||||
('pyimod03_ctypes',
|
||||
'X:\\__GITHUB\\python\\build\\mqtt_srv\\localpycs\\pyimod03_ctypes.pyc',
|
||||
'PYMODULE'),
|
||||
('pyimod04_pywin32',
|
||||
'X:\\__GITHUB\\python\\build\\mqtt_srv\\localpycs\\pyimod04_pywin32.pyc',
|
||||
'PYMODULE'),
|
||||
('pyiboot01_bootstrap',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\PyInstaller\\loader\\pyiboot01_bootstrap.py',
|
||||
'PYSOURCE'),
|
||||
('pyi_rth_inspect',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\Lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_inspect.py',
|
||||
'PYSOURCE'),
|
||||
('pyi_rth_subprocess',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\Lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_subprocess.py',
|
||||
'PYSOURCE'),
|
||||
('pyi_rth_pkgutil',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\Lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_pkgutil.py',
|
||||
'PYSOURCE'),
|
||||
('pyi_rth_multiprocessing',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\Lib\\site-packages\\PyInstaller\\hooks\\rthooks\\pyi_rth_multiprocessing.py',
|
||||
'PYSOURCE'),
|
||||
('mqtt_srv',
|
||||
'\\\\192.168.77.106\\Data\\__GITHUB\\python\\mqtt_srv.pyw',
|
||||
'PYSOURCE'),
|
||||
('VCRUNTIME140.dll',
|
||||
'C:\\Program Files\\Python310\\VCRUNTIME140.dll',
|
||||
'BINARY'),
|
||||
('python310.dll', 'C:\\Program Files\\Python310\\python310.dll', 'BINARY'),
|
||||
('_multiprocessing',
|
||||
'C:\\Program Files\\Python310\\DLLs\\_multiprocessing.pyd',
|
||||
'EXTENSION'),
|
||||
('pyexpat', 'C:\\Program Files\\Python310\\DLLs\\pyexpat.pyd', 'EXTENSION'),
|
||||
('_ssl', 'C:\\Program Files\\Python310\\DLLs\\_ssl.pyd', 'EXTENSION'),
|
||||
('_decimal', 'C:\\Program Files\\Python310\\DLLs\\_decimal.pyd', 'EXTENSION'),
|
||||
('_hashlib', 'C:\\Program Files\\Python310\\DLLs\\_hashlib.pyd', 'EXTENSION'),
|
||||
('select', 'C:\\Program Files\\Python310\\DLLs\\select.pyd', 'EXTENSION'),
|
||||
('_lzma', 'C:\\Program Files\\Python310\\DLLs\\_lzma.pyd', 'EXTENSION'),
|
||||
('_bz2', 'C:\\Program Files\\Python310\\DLLs\\_bz2.pyd', 'EXTENSION'),
|
||||
('_queue', 'C:\\Program Files\\Python310\\DLLs\\_queue.pyd', 'EXTENSION'),
|
||||
('unicodedata',
|
||||
'C:\\Program Files\\Python310\\DLLs\\unicodedata.pyd',
|
||||
'EXTENSION'),
|
||||
('_elementtree',
|
||||
'C:\\Program Files\\Python310\\DLLs\\_elementtree.pyd',
|
||||
'EXTENSION'),
|
||||
('psutil._psutil_windows',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\psutil\\_psutil_windows.pyd',
|
||||
'EXTENSION'),
|
||||
('_ctypes', 'C:\\Program Files\\Python310\\DLLs\\_ctypes.pyd', 'EXTENSION'),
|
||||
('_socket', 'C:\\Program Files\\Python310\\DLLs\\_socket.pyd', 'EXTENSION'),
|
||||
('_uuid', 'C:\\Program Files\\Python310\\DLLs\\_uuid.pyd', 'EXTENSION'),
|
||||
('_overlapped',
|
||||
'C:\\Program Files\\Python310\\DLLs\\_overlapped.pyd',
|
||||
'EXTENSION'),
|
||||
('_asyncio', 'C:\\Program Files\\Python310\\DLLs\\_asyncio.pyd', 'EXTENSION'),
|
||||
('libcrypto-1_1.dll',
|
||||
'C:\\Program Files\\Python310\\DLLs\\libcrypto-1_1.dll',
|
||||
'BINARY'),
|
||||
('libssl-1_1.dll',
|
||||
'C:\\Program Files\\Python310\\DLLs\\libssl-1_1.dll',
|
||||
'BINARY'),
|
||||
('python3.dll', 'C:\\Program Files\\Python310\\python3.dll', 'BINARY'),
|
||||
('libffi-7.dll',
|
||||
'C:\\Program Files\\Python310\\DLLs\\libffi-7.dll',
|
||||
'BINARY'),
|
||||
('base_library.zip',
|
||||
'X:\\__GITHUB\\python\\build\\mqtt_srv\\base_library.zip',
|
||||
'DATA'),
|
||||
('certifi\\py.typed',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\certifi\\py.typed',
|
||||
'DATA'),
|
||||
('certifi\\cacert.pem',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\certifi\\cacert.pem',
|
||||
'DATA')],
|
||||
False,
|
||||
False,
|
||||
False,
|
||||
[],
|
||||
None,
|
||||
None,
|
||||
None)
|
||||
BIN
build/mqtt_srv/PYZ-00.pyz
Normal file
BIN
build/mqtt_srv/PYZ-00.pyz
Normal file
Binary file not shown.
770
build/mqtt_srv/PYZ-00.toc
Normal file
770
build/mqtt_srv/PYZ-00.toc
Normal file
@@ -0,0 +1,770 @@
|
||||
('X:\\__GITHUB\\python\\build\\mqtt_srv\\PYZ-00.pyz',
|
||||
[('multiprocessing.popen_spawn_posix',
|
||||
'C:\\Program Files\\Python310\\lib\\multiprocessing\\popen_spawn_posix.py',
|
||||
'PYMODULE'),
|
||||
('multiprocessing.resource_tracker',
|
||||
'C:\\Program Files\\Python310\\lib\\multiprocessing\\resource_tracker.py',
|
||||
'PYMODULE'),
|
||||
('threading', 'C:\\Program Files\\Python310\\lib\\threading.py', 'PYMODULE'),
|
||||
('_threading_local',
|
||||
'C:\\Program Files\\Python310\\lib\\_threading_local.py',
|
||||
'PYMODULE'),
|
||||
('contextlib',
|
||||
'C:\\Program Files\\Python310\\lib\\contextlib.py',
|
||||
'PYMODULE'),
|
||||
('signal', 'C:\\Program Files\\Python310\\lib\\signal.py', 'PYMODULE'),
|
||||
('multiprocessing.util',
|
||||
'C:\\Program Files\\Python310\\lib\\multiprocessing\\util.py',
|
||||
'PYMODULE'),
|
||||
('multiprocessing.forkserver',
|
||||
'C:\\Program Files\\Python310\\lib\\multiprocessing\\forkserver.py',
|
||||
'PYMODULE'),
|
||||
('multiprocessing.connection',
|
||||
'C:\\Program Files\\Python310\\lib\\multiprocessing\\connection.py',
|
||||
'PYMODULE'),
|
||||
('multiprocessing.resource_sharer',
|
||||
'C:\\Program Files\\Python310\\lib\\multiprocessing\\resource_sharer.py',
|
||||
'PYMODULE'),
|
||||
('xmlrpc.client',
|
||||
'C:\\Program Files\\Python310\\lib\\xmlrpc\\client.py',
|
||||
'PYMODULE'),
|
||||
('xmlrpc',
|
||||
'C:\\Program Files\\Python310\\lib\\xmlrpc\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('gzip', 'C:\\Program Files\\Python310\\lib\\gzip.py', 'PYMODULE'),
|
||||
('argparse', 'C:\\Program Files\\Python310\\lib\\argparse.py', 'PYMODULE'),
|
||||
('textwrap', 'C:\\Program Files\\Python310\\lib\\textwrap.py', 'PYMODULE'),
|
||||
('copy', 'C:\\Program Files\\Python310\\lib\\copy.py', 'PYMODULE'),
|
||||
('gettext', 'C:\\Program Files\\Python310\\lib\\gettext.py', 'PYMODULE'),
|
||||
('_compression',
|
||||
'C:\\Program Files\\Python310\\lib\\_compression.py',
|
||||
'PYMODULE'),
|
||||
('xml.parsers.expat',
|
||||
'C:\\Program Files\\Python310\\lib\\xml\\parsers\\expat.py',
|
||||
'PYMODULE'),
|
||||
('xml.parsers',
|
||||
'C:\\Program Files\\Python310\\lib\\xml\\parsers\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('xml', 'C:\\Program Files\\Python310\\lib\\xml\\__init__.py', 'PYMODULE'),
|
||||
('xml.sax.expatreader',
|
||||
'C:\\Program Files\\Python310\\lib\\xml\\sax\\expatreader.py',
|
||||
'PYMODULE'),
|
||||
('xml.sax.saxutils',
|
||||
'C:\\Program Files\\Python310\\lib\\xml\\sax\\saxutils.py',
|
||||
'PYMODULE'),
|
||||
('xml.sax',
|
||||
'C:\\Program Files\\Python310\\lib\\xml\\sax\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('xml.sax.handler',
|
||||
'C:\\Program Files\\Python310\\lib\\xml\\sax\\handler.py',
|
||||
'PYMODULE'),
|
||||
('xml.sax._exceptions',
|
||||
'C:\\Program Files\\Python310\\lib\\xml\\sax\\_exceptions.py',
|
||||
'PYMODULE'),
|
||||
('xml.sax.xmlreader',
|
||||
'C:\\Program Files\\Python310\\lib\\xml\\sax\\xmlreader.py',
|
||||
'PYMODULE'),
|
||||
('http.client',
|
||||
'C:\\Program Files\\Python310\\lib\\http\\client.py',
|
||||
'PYMODULE'),
|
||||
('ssl', 'C:\\Program Files\\Python310\\lib\\ssl.py', 'PYMODULE'),
|
||||
('calendar', 'C:\\Program Files\\Python310\\lib\\calendar.py', 'PYMODULE'),
|
||||
('http', 'C:\\Program Files\\Python310\\lib\\http\\__init__.py', 'PYMODULE'),
|
||||
('email.message',
|
||||
'C:\\Program Files\\Python310\\lib\\email\\message.py',
|
||||
'PYMODULE'),
|
||||
('email.policy',
|
||||
'C:\\Program Files\\Python310\\lib\\email\\policy.py',
|
||||
'PYMODULE'),
|
||||
('email.contentmanager',
|
||||
'C:\\Program Files\\Python310\\lib\\email\\contentmanager.py',
|
||||
'PYMODULE'),
|
||||
('email.quoprimime',
|
||||
'C:\\Program Files\\Python310\\lib\\email\\quoprimime.py',
|
||||
'PYMODULE'),
|
||||
('string', 'C:\\Program Files\\Python310\\lib\\string.py', 'PYMODULE'),
|
||||
('email.headerregistry',
|
||||
'C:\\Program Files\\Python310\\lib\\email\\headerregistry.py',
|
||||
'PYMODULE'),
|
||||
('email._header_value_parser',
|
||||
'C:\\Program Files\\Python310\\lib\\email\\_header_value_parser.py',
|
||||
'PYMODULE'),
|
||||
('email.iterators',
|
||||
'C:\\Program Files\\Python310\\lib\\email\\iterators.py',
|
||||
'PYMODULE'),
|
||||
('email.generator',
|
||||
'C:\\Program Files\\Python310\\lib\\email\\generator.py',
|
||||
'PYMODULE'),
|
||||
('email._encoded_words',
|
||||
'C:\\Program Files\\Python310\\lib\\email\\_encoded_words.py',
|
||||
'PYMODULE'),
|
||||
('email.charset',
|
||||
'C:\\Program Files\\Python310\\lib\\email\\charset.py',
|
||||
'PYMODULE'),
|
||||
('email.encoders',
|
||||
'C:\\Program Files\\Python310\\lib\\email\\encoders.py',
|
||||
'PYMODULE'),
|
||||
('email.base64mime',
|
||||
'C:\\Program Files\\Python310\\lib\\email\\base64mime.py',
|
||||
'PYMODULE'),
|
||||
('email._policybase',
|
||||
'C:\\Program Files\\Python310\\lib\\email\\_policybase.py',
|
||||
'PYMODULE'),
|
||||
('email.header',
|
||||
'C:\\Program Files\\Python310\\lib\\email\\header.py',
|
||||
'PYMODULE'),
|
||||
('email.errors',
|
||||
'C:\\Program Files\\Python310\\lib\\email\\errors.py',
|
||||
'PYMODULE'),
|
||||
('email.utils',
|
||||
'C:\\Program Files\\Python310\\lib\\email\\utils.py',
|
||||
'PYMODULE'),
|
||||
('email._parseaddr',
|
||||
'C:\\Program Files\\Python310\\lib\\email\\_parseaddr.py',
|
||||
'PYMODULE'),
|
||||
('email',
|
||||
'C:\\Program Files\\Python310\\lib\\email\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('quopri', 'C:\\Program Files\\Python310\\lib\\quopri.py', 'PYMODULE'),
|
||||
('uu', 'C:\\Program Files\\Python310\\lib\\uu.py', 'PYMODULE'),
|
||||
('optparse', 'C:\\Program Files\\Python310\\lib\\optparse.py', 'PYMODULE'),
|
||||
('email.parser',
|
||||
'C:\\Program Files\\Python310\\lib\\email\\parser.py',
|
||||
'PYMODULE'),
|
||||
('email.feedparser',
|
||||
'C:\\Program Files\\Python310\\lib\\email\\feedparser.py',
|
||||
'PYMODULE'),
|
||||
('decimal', 'C:\\Program Files\\Python310\\lib\\decimal.py', 'PYMODULE'),
|
||||
('_pydecimal',
|
||||
'C:\\Program Files\\Python310\\lib\\_pydecimal.py',
|
||||
'PYMODULE'),
|
||||
('contextvars',
|
||||
'C:\\Program Files\\Python310\\lib\\contextvars.py',
|
||||
'PYMODULE'),
|
||||
('numbers', 'C:\\Program Files\\Python310\\lib\\numbers.py', 'PYMODULE'),
|
||||
('base64', 'C:\\Program Files\\Python310\\lib\\base64.py', 'PYMODULE'),
|
||||
('hmac', 'C:\\Program Files\\Python310\\lib\\hmac.py', 'PYMODULE'),
|
||||
('hashlib', 'C:\\Program Files\\Python310\\lib\\hashlib.py', 'PYMODULE'),
|
||||
('struct', 'C:\\Program Files\\Python310\\lib\\struct.py', 'PYMODULE'),
|
||||
('selectors', 'C:\\Program Files\\Python310\\lib\\selectors.py', 'PYMODULE'),
|
||||
('tempfile', 'C:\\Program Files\\Python310\\lib\\tempfile.py', 'PYMODULE'),
|
||||
('shutil', 'C:\\Program Files\\Python310\\lib\\shutil.py', 'PYMODULE'),
|
||||
('zipfile', 'C:\\Program Files\\Python310\\lib\\zipfile.py', 'PYMODULE'),
|
||||
('py_compile',
|
||||
'C:\\Program Files\\Python310\\lib\\py_compile.py',
|
||||
'PYMODULE'),
|
||||
('importlib.machinery',
|
||||
'C:\\Program Files\\Python310\\lib\\importlib\\machinery.py',
|
||||
'PYMODULE'),
|
||||
('importlib',
|
||||
'C:\\Program Files\\Python310\\lib\\importlib\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('importlib._common',
|
||||
'C:\\Program Files\\Python310\\lib\\importlib\\_common.py',
|
||||
'PYMODULE'),
|
||||
('importlib._adapters',
|
||||
'C:\\Program Files\\Python310\\lib\\importlib\\_adapters.py',
|
||||
'PYMODULE'),
|
||||
('typing', 'C:\\Program Files\\Python310\\lib\\typing.py', 'PYMODULE'),
|
||||
('importlib.abc',
|
||||
'C:\\Program Files\\Python310\\lib\\importlib\\abc.py',
|
||||
'PYMODULE'),
|
||||
('importlib._abc',
|
||||
'C:\\Program Files\\Python310\\lib\\importlib\\_abc.py',
|
||||
'PYMODULE'),
|
||||
('importlib._bootstrap',
|
||||
'C:\\Program Files\\Python310\\lib\\importlib\\_bootstrap.py',
|
||||
'PYMODULE'),
|
||||
('importlib._bootstrap_external',
|
||||
'C:\\Program Files\\Python310\\lib\\importlib\\_bootstrap_external.py',
|
||||
'PYMODULE'),
|
||||
('importlib.metadata',
|
||||
'C:\\Program Files\\Python310\\lib\\importlib\\metadata\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('importlib.metadata._itertools',
|
||||
'C:\\Program Files\\Python310\\lib\\importlib\\metadata\\_itertools.py',
|
||||
'PYMODULE'),
|
||||
('importlib.metadata._functools',
|
||||
'C:\\Program Files\\Python310\\lib\\importlib\\metadata\\_functools.py',
|
||||
'PYMODULE'),
|
||||
('importlib.metadata._collections',
|
||||
'C:\\Program Files\\Python310\\lib\\importlib\\metadata\\_collections.py',
|
||||
'PYMODULE'),
|
||||
('importlib.metadata._meta',
|
||||
'C:\\Program Files\\Python310\\lib\\importlib\\metadata\\_meta.py',
|
||||
'PYMODULE'),
|
||||
('importlib.metadata._adapters',
|
||||
'C:\\Program Files\\Python310\\lib\\importlib\\metadata\\_adapters.py',
|
||||
'PYMODULE'),
|
||||
('importlib.metadata._text',
|
||||
'C:\\Program Files\\Python310\\lib\\importlib\\metadata\\_text.py',
|
||||
'PYMODULE'),
|
||||
('csv', 'C:\\Program Files\\Python310\\lib\\csv.py', 'PYMODULE'),
|
||||
('importlib.readers',
|
||||
'C:\\Program Files\\Python310\\lib\\importlib\\readers.py',
|
||||
'PYMODULE'),
|
||||
('importlib.util',
|
||||
'C:\\Program Files\\Python310\\lib\\importlib\\util.py',
|
||||
'PYMODULE'),
|
||||
('tarfile', 'C:\\Program Files\\Python310\\lib\\tarfile.py', 'PYMODULE'),
|
||||
('lzma', 'C:\\Program Files\\Python310\\lib\\lzma.py', 'PYMODULE'),
|
||||
('bz2', 'C:\\Program Files\\Python310\\lib\\bz2.py', 'PYMODULE'),
|
||||
('logging',
|
||||
'C:\\Program Files\\Python310\\lib\\logging\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('pickle', 'C:\\Program Files\\Python310\\lib\\pickle.py', 'PYMODULE'),
|
||||
('pprint', 'C:\\Program Files\\Python310\\lib\\pprint.py', 'PYMODULE'),
|
||||
('dataclasses',
|
||||
'C:\\Program Files\\Python310\\lib\\dataclasses.py',
|
||||
'PYMODULE'),
|
||||
('inspect', 'C:\\Program Files\\Python310\\lib\\inspect.py', 'PYMODULE'),
|
||||
('dis', 'C:\\Program Files\\Python310\\lib\\dis.py', 'PYMODULE'),
|
||||
('opcode', 'C:\\Program Files\\Python310\\lib\\opcode.py', 'PYMODULE'),
|
||||
('ast', 'C:\\Program Files\\Python310\\lib\\ast.py', 'PYMODULE'),
|
||||
('_compat_pickle',
|
||||
'C:\\Program Files\\Python310\\lib\\_compat_pickle.py',
|
||||
'PYMODULE'),
|
||||
('multiprocessing.process',
|
||||
'C:\\Program Files\\Python310\\lib\\multiprocessing\\process.py',
|
||||
'PYMODULE'),
|
||||
('multiprocessing.context',
|
||||
'C:\\Program Files\\Python310\\lib\\multiprocessing\\context.py',
|
||||
'PYMODULE'),
|
||||
('multiprocessing.popen_forkserver',
|
||||
'C:\\Program Files\\Python310\\lib\\multiprocessing\\popen_forkserver.py',
|
||||
'PYMODULE'),
|
||||
('multiprocessing.sharedctypes',
|
||||
'C:\\Program Files\\Python310\\lib\\multiprocessing\\sharedctypes.py',
|
||||
'PYMODULE'),
|
||||
('multiprocessing.heap',
|
||||
'C:\\Program Files\\Python310\\lib\\multiprocessing\\heap.py',
|
||||
'PYMODULE'),
|
||||
('bisect', 'C:\\Program Files\\Python310\\lib\\bisect.py', 'PYMODULE'),
|
||||
('multiprocessing.pool',
|
||||
'C:\\Program Files\\Python310\\lib\\multiprocessing\\pool.py',
|
||||
'PYMODULE'),
|
||||
('multiprocessing.dummy',
|
||||
'C:\\Program Files\\Python310\\lib\\multiprocessing\\dummy\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('multiprocessing.dummy.connection',
|
||||
'C:\\Program Files\\Python310\\lib\\multiprocessing\\dummy\\connection.py',
|
||||
'PYMODULE'),
|
||||
('queue', 'C:\\Program Files\\Python310\\lib\\queue.py', 'PYMODULE'),
|
||||
('multiprocessing.queues',
|
||||
'C:\\Program Files\\Python310\\lib\\multiprocessing\\queues.py',
|
||||
'PYMODULE'),
|
||||
('multiprocessing.synchronize',
|
||||
'C:\\Program Files\\Python310\\lib\\multiprocessing\\synchronize.py',
|
||||
'PYMODULE'),
|
||||
('multiprocessing.managers',
|
||||
'C:\\Program Files\\Python310\\lib\\multiprocessing\\managers.py',
|
||||
'PYMODULE'),
|
||||
('multiprocessing.shared_memory',
|
||||
'C:\\Program Files\\Python310\\lib\\multiprocessing\\shared_memory.py',
|
||||
'PYMODULE'),
|
||||
('secrets', 'C:\\Program Files\\Python310\\lib\\secrets.py', 'PYMODULE'),
|
||||
('multiprocessing.reduction',
|
||||
'C:\\Program Files\\Python310\\lib\\multiprocessing\\reduction.py',
|
||||
'PYMODULE'),
|
||||
('multiprocessing.popen_fork',
|
||||
'C:\\Program Files\\Python310\\lib\\multiprocessing\\popen_fork.py',
|
||||
'PYMODULE'),
|
||||
('multiprocessing.popen_spawn_win32',
|
||||
'C:\\Program Files\\Python310\\lib\\multiprocessing\\popen_spawn_win32.py',
|
||||
'PYMODULE'),
|
||||
('multiprocessing.spawn',
|
||||
'C:\\Program Files\\Python310\\lib\\multiprocessing\\spawn.py',
|
||||
'PYMODULE'),
|
||||
('runpy', 'C:\\Program Files\\Python310\\lib\\runpy.py', 'PYMODULE'),
|
||||
('pkgutil', 'C:\\Program Files\\Python310\\lib\\pkgutil.py', 'PYMODULE'),
|
||||
('zipimport', 'C:\\Program Files\\Python310\\lib\\zipimport.py', 'PYMODULE'),
|
||||
('multiprocessing',
|
||||
'C:\\Program Files\\Python310\\lib\\multiprocessing\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('getpass', 'C:\\Program Files\\Python310\\lib\\getpass.py', 'PYMODULE'),
|
||||
('nturl2path',
|
||||
'C:\\Program Files\\Python310\\lib\\nturl2path.py',
|
||||
'PYMODULE'),
|
||||
('ftplib', 'C:\\Program Files\\Python310\\lib\\ftplib.py', 'PYMODULE'),
|
||||
('netrc', 'C:\\Program Files\\Python310\\lib\\netrc.py', 'PYMODULE'),
|
||||
('shlex', 'C:\\Program Files\\Python310\\lib\\shlex.py', 'PYMODULE'),
|
||||
('mimetypes', 'C:\\Program Files\\Python310\\lib\\mimetypes.py', 'PYMODULE'),
|
||||
('http.cookiejar',
|
||||
'C:\\Program Files\\Python310\\lib\\http\\cookiejar.py',
|
||||
'PYMODULE'),
|
||||
('stringprep',
|
||||
'C:\\Program Files\\Python310\\lib\\stringprep.py',
|
||||
'PYMODULE'),
|
||||
('tracemalloc',
|
||||
'C:\\Program Files\\Python310\\lib\\tracemalloc.py',
|
||||
'PYMODULE'),
|
||||
('_py_abc', 'C:\\Program Files\\Python310\\lib\\_py_abc.py', 'PYMODULE'),
|
||||
('ping3',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\ping3\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('ping3.enums',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\ping3\\enums.py',
|
||||
'PYMODULE'),
|
||||
('ping3.errors',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\ping3\\errors.py',
|
||||
'PYMODULE'),
|
||||
('psutil',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\psutil\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('psutil._psaix',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\psutil\\_psaix.py',
|
||||
'PYMODULE'),
|
||||
('glob', 'C:\\Program Files\\Python310\\lib\\glob.py', 'PYMODULE'),
|
||||
('psutil._pssunos',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\psutil\\_pssunos.py',
|
||||
'PYMODULE'),
|
||||
('psutil._psbsd',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\psutil\\_psbsd.py',
|
||||
'PYMODULE'),
|
||||
('xml.etree.ElementTree',
|
||||
'C:\\Program Files\\Python310\\lib\\xml\\etree\\ElementTree.py',
|
||||
'PYMODULE'),
|
||||
('xml.etree.cElementTree',
|
||||
'C:\\Program Files\\Python310\\lib\\xml\\etree\\cElementTree.py',
|
||||
'PYMODULE'),
|
||||
('xml.etree.ElementInclude',
|
||||
'C:\\Program Files\\Python310\\lib\\xml\\etree\\ElementInclude.py',
|
||||
'PYMODULE'),
|
||||
('xml.etree.ElementPath',
|
||||
'C:\\Program Files\\Python310\\lib\\xml\\etree\\ElementPath.py',
|
||||
'PYMODULE'),
|
||||
('xml.etree',
|
||||
'C:\\Program Files\\Python310\\lib\\xml\\etree\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('psutil._psosx',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\psutil\\_psosx.py',
|
||||
'PYMODULE'),
|
||||
('psutil._pswindows',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\psutil\\_pswindows.py',
|
||||
'PYMODULE'),
|
||||
('psutil._pslinux',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\psutil\\_pslinux.py',
|
||||
'PYMODULE'),
|
||||
('psutil._psposix',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\psutil\\_psposix.py',
|
||||
'PYMODULE'),
|
||||
('psutil._compat',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\psutil\\_compat.py',
|
||||
'PYMODULE'),
|
||||
('psutil._common',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\psutil\\_common.py',
|
||||
'PYMODULE'),
|
||||
('curses',
|
||||
'C:\\Program Files\\Python310\\lib\\curses\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('curses.has_key',
|
||||
'C:\\Program Files\\Python310\\lib\\curses\\has_key.py',
|
||||
'PYMODULE'),
|
||||
('__future__',
|
||||
'C:\\Program Files\\Python310\\lib\\__future__.py',
|
||||
'PYMODULE'),
|
||||
('requests',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\requests\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('requests.status_codes',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\requests\\status_codes.py',
|
||||
'PYMODULE'),
|
||||
('requests.structures',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\requests\\structures.py',
|
||||
'PYMODULE'),
|
||||
('requests.compat',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\requests\\compat.py',
|
||||
'PYMODULE'),
|
||||
('http.cookies',
|
||||
'C:\\Program Files\\Python310\\lib\\http\\cookies.py',
|
||||
'PYMODULE'),
|
||||
('requests.models',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\requests\\models.py',
|
||||
'PYMODULE'),
|
||||
('idna',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\idna\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('idna.intranges',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\idna\\intranges.py',
|
||||
'PYMODULE'),
|
||||
('idna.core',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\idna\\core.py',
|
||||
'PYMODULE'),
|
||||
('idna.uts46data',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\idna\\uts46data.py',
|
||||
'PYMODULE'),
|
||||
('idna.idnadata',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\idna\\idnadata.py',
|
||||
'PYMODULE'),
|
||||
('idna.package_data',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\idna\\package_data.py',
|
||||
'PYMODULE'),
|
||||
('requests.hooks',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\requests\\hooks.py',
|
||||
'PYMODULE'),
|
||||
('requests.cookies',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\requests\\cookies.py',
|
||||
'PYMODULE'),
|
||||
('requests.auth',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\requests\\auth.py',
|
||||
'PYMODULE'),
|
||||
('requests._internal_utils',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\requests\\_internal_utils.py',
|
||||
'PYMODULE'),
|
||||
('urllib3.util',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\urllib3\\util\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('urllib3.util.wait',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\util\\wait.py',
|
||||
'PYMODULE'),
|
||||
('urllib3.util.url',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\util\\url.py',
|
||||
'PYMODULE'),
|
||||
('urllib3.packages.six',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\urllib3\\packages\\six.py',
|
||||
'PYMODULE'),
|
||||
('urllib3.packages',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\urllib3\\packages\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('urllib3.util.timeout',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\urllib3\\util\\timeout.py',
|
||||
'PYMODULE'),
|
||||
('urllib3.util.ssl_',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\util\\ssl_.py',
|
||||
'PYMODULE'),
|
||||
('urllib3.util.ssltransport',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\urllib3\\util\\ssltransport.py',
|
||||
'PYMODULE'),
|
||||
('urllib3.util.retry',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\util\\retry.py',
|
||||
'PYMODULE'),
|
||||
('urllib3.util.response',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\urllib3\\util\\response.py',
|
||||
'PYMODULE'),
|
||||
('urllib3.util.request',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\urllib3\\util\\request.py',
|
||||
'PYMODULE'),
|
||||
('urllib3.util.connection',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\urllib3\\util\\connection.py',
|
||||
'PYMODULE'),
|
||||
('urllib3.contrib._appengine_environ',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\urllib3\\contrib\\_appengine_environ.py',
|
||||
'PYMODULE'),
|
||||
('urllib3.filepost',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\filepost.py',
|
||||
'PYMODULE'),
|
||||
('urllib3.fields',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\fields.py',
|
||||
'PYMODULE'),
|
||||
('requests.api',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\requests\\api.py',
|
||||
'PYMODULE'),
|
||||
('requests.sessions',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\requests\\sessions.py',
|
||||
'PYMODULE'),
|
||||
('requests.adapters',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\requests\\adapters.py',
|
||||
'PYMODULE'),
|
||||
('urllib3.contrib.socks',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\urllib3\\contrib\\socks.py',
|
||||
'PYMODULE'),
|
||||
('urllib3.connectionpool',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\urllib3\\connectionpool.py',
|
||||
'PYMODULE'),
|
||||
('urllib3.util.ssl_match_hostname',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\urllib3\\util\\ssl_match_hostname.py',
|
||||
'PYMODULE'),
|
||||
('ipaddress', 'C:\\Program Files\\Python310\\lib\\ipaddress.py', 'PYMODULE'),
|
||||
('urllib3.util.queue',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\util\\queue.py',
|
||||
'PYMODULE'),
|
||||
('urllib3.util.proxy',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\util\\proxy.py',
|
||||
'PYMODULE'),
|
||||
('urllib3.request',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\request.py',
|
||||
'PYMODULE'),
|
||||
('urllib3.connection',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\connection.py',
|
||||
'PYMODULE'),
|
||||
('urllib3._version',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\_version.py',
|
||||
'PYMODULE'),
|
||||
('urllib3._collections',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\_collections.py',
|
||||
'PYMODULE'),
|
||||
('urllib3.response',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\response.py',
|
||||
'PYMODULE'),
|
||||
('urllib3.poolmanager',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\poolmanager.py',
|
||||
'PYMODULE'),
|
||||
('requests.__version__',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\requests\\__version__.py',
|
||||
'PYMODULE'),
|
||||
('requests.utils',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\requests\\utils.py',
|
||||
'PYMODULE'),
|
||||
('requests.certs',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\requests\\certs.py',
|
||||
'PYMODULE'),
|
||||
('certifi',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\certifi\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('certifi.core',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\certifi\\core.py',
|
||||
'PYMODULE'),
|
||||
('importlib.resources',
|
||||
'C:\\Program Files\\Python310\\lib\\importlib\\resources.py',
|
||||
'PYMODULE'),
|
||||
('requests.packages',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\requests\\packages.py',
|
||||
'PYMODULE'),
|
||||
('urllib3.exceptions',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\exceptions.py',
|
||||
'PYMODULE'),
|
||||
('urllib3.contrib.pyopenssl',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\urllib3\\contrib\\pyopenssl.py',
|
||||
'PYMODULE'),
|
||||
('urllib3.packages.backports.makefile',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\urllib3\\packages\\backports\\makefile.py',
|
||||
'PYMODULE'),
|
||||
('urllib3.packages.backports',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\urllib3\\packages\\backports\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('urllib3.contrib',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\urllib3\\contrib\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('charset_normalizer',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\charset_normalizer\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('charset_normalizer.version',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\charset_normalizer\\version.py',
|
||||
'PYMODULE'),
|
||||
('charset_normalizer.utils',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\charset_normalizer\\utils.py',
|
||||
'PYMODULE'),
|
||||
('charset_normalizer.constant',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\charset_normalizer\\constant.py',
|
||||
'PYMODULE'),
|
||||
('charset_normalizer.assets',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\charset_normalizer\\assets\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('charset_normalizer.models',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\charset_normalizer\\models.py',
|
||||
'PYMODULE'),
|
||||
('charset_normalizer.cd',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\charset_normalizer\\cd.py',
|
||||
'PYMODULE'),
|
||||
('charset_normalizer.md',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\charset_normalizer\\md.py',
|
||||
'PYMODULE'),
|
||||
('charset_normalizer.legacy',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\charset_normalizer\\legacy.py',
|
||||
'PYMODULE'),
|
||||
('charset_normalizer.api',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\charset_normalizer\\api.py',
|
||||
'PYMODULE'),
|
||||
('requests.exceptions',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\requests\\exceptions.py',
|
||||
'PYMODULE'),
|
||||
('urllib3',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\urllib3\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('random', 'C:\\Program Files\\Python310\\lib\\random.py', 'PYMODULE'),
|
||||
('statistics',
|
||||
'C:\\Program Files\\Python310\\lib\\statistics.py',
|
||||
'PYMODULE'),
|
||||
('fractions', 'C:\\Program Files\\Python310\\lib\\fractions.py', 'PYMODULE'),
|
||||
('getopt', 'C:\\Program Files\\Python310\\lib\\getopt.py', 'PYMODULE'),
|
||||
('ctypes',
|
||||
'C:\\Program Files\\Python310\\lib\\ctypes\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('ctypes._endian',
|
||||
'C:\\Program Files\\Python310\\lib\\ctypes\\_endian.py',
|
||||
'PYMODULE'),
|
||||
('datetime', 'C:\\Program Files\\Python310\\lib\\datetime.py', 'PYMODULE'),
|
||||
('_strptime', 'C:\\Program Files\\Python310\\lib\\_strptime.py', 'PYMODULE'),
|
||||
('json', 'C:\\Program Files\\Python310\\lib\\json\\__init__.py', 'PYMODULE'),
|
||||
('json.encoder',
|
||||
'C:\\Program Files\\Python310\\lib\\json\\encoder.py',
|
||||
'PYMODULE'),
|
||||
('json.decoder',
|
||||
'C:\\Program Files\\Python310\\lib\\json\\decoder.py',
|
||||
'PYMODULE'),
|
||||
('json.scanner',
|
||||
'C:\\Program Files\\Python310\\lib\\json\\scanner.py',
|
||||
'PYMODULE'),
|
||||
('subprocess',
|
||||
'C:\\Program Files\\Python310\\lib\\subprocess.py',
|
||||
'PYMODULE'),
|
||||
('socket', 'C:\\Program Files\\Python310\\lib\\socket.py', 'PYMODULE'),
|
||||
('platform', 'C:\\Program Files\\Python310\\lib\\platform.py', 'PYMODULE'),
|
||||
('getmac',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\getmac\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('getmac.getmac',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\getmac\\getmac.py',
|
||||
'PYMODULE'),
|
||||
('uuid', 'C:\\Program Files\\Python310\\lib\\uuid.py', 'PYMODULE'),
|
||||
('paho.mqtt.client',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\paho\\mqtt\\client.py',
|
||||
'PYMODULE'),
|
||||
('paho.mqtt',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\paho\\mqtt\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('paho',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\paho\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('paho.mqtt.subscribeoptions',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\paho\\mqtt\\subscribeoptions.py',
|
||||
'PYMODULE'),
|
||||
('paho.mqtt.reasoncodes',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\paho\\mqtt\\reasoncodes.py',
|
||||
'PYMODULE'),
|
||||
('paho.mqtt.packettypes',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\paho\\mqtt\\packettypes.py',
|
||||
'PYMODULE'),
|
||||
('paho.mqtt.properties',
|
||||
'C:\\Program '
|
||||
'Files\\Python310\\lib\\site-packages\\paho\\mqtt\\properties.py',
|
||||
'PYMODULE'),
|
||||
('paho.mqtt.matcher',
|
||||
'C:\\Program Files\\Python310\\lib\\site-packages\\paho\\mqtt\\matcher.py',
|
||||
'PYMODULE'),
|
||||
('asyncio.log',
|
||||
'C:\\Program Files\\Python310\\lib\\asyncio\\log.py',
|
||||
'PYMODULE'),
|
||||
('asyncio',
|
||||
'C:\\Program Files\\Python310\\lib\\asyncio\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('asyncio.unix_events',
|
||||
'C:\\Program Files\\Python310\\lib\\asyncio\\unix_events.py',
|
||||
'PYMODULE'),
|
||||
('asyncio.windows_events',
|
||||
'C:\\Program Files\\Python310\\lib\\asyncio\\windows_events.py',
|
||||
'PYMODULE'),
|
||||
('asyncio.windows_utils',
|
||||
'C:\\Program Files\\Python310\\lib\\asyncio\\windows_utils.py',
|
||||
'PYMODULE'),
|
||||
('asyncio.selector_events',
|
||||
'C:\\Program Files\\Python310\\lib\\asyncio\\selector_events.py',
|
||||
'PYMODULE'),
|
||||
('asyncio.proactor_events',
|
||||
'C:\\Program Files\\Python310\\lib\\asyncio\\proactor_events.py',
|
||||
'PYMODULE'),
|
||||
('asyncio.base_subprocess',
|
||||
'C:\\Program Files\\Python310\\lib\\asyncio\\base_subprocess.py',
|
||||
'PYMODULE'),
|
||||
('asyncio.threads',
|
||||
'C:\\Program Files\\Python310\\lib\\asyncio\\threads.py',
|
||||
'PYMODULE'),
|
||||
('asyncio.subprocess',
|
||||
'C:\\Program Files\\Python310\\lib\\asyncio\\subprocess.py',
|
||||
'PYMODULE'),
|
||||
('asyncio.streams',
|
||||
'C:\\Program Files\\Python310\\lib\\asyncio\\streams.py',
|
||||
'PYMODULE'),
|
||||
('asyncio.queues',
|
||||
'C:\\Program Files\\Python310\\lib\\asyncio\\queues.py',
|
||||
'PYMODULE'),
|
||||
('asyncio.runners',
|
||||
'C:\\Program Files\\Python310\\lib\\asyncio\\runners.py',
|
||||
'PYMODULE'),
|
||||
('asyncio.base_events',
|
||||
'C:\\Program Files\\Python310\\lib\\asyncio\\base_events.py',
|
||||
'PYMODULE'),
|
||||
('concurrent.futures',
|
||||
'C:\\Program Files\\Python310\\lib\\concurrent\\futures\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('concurrent.futures.thread',
|
||||
'C:\\Program Files\\Python310\\lib\\concurrent\\futures\\thread.py',
|
||||
'PYMODULE'),
|
||||
('concurrent.futures.process',
|
||||
'C:\\Program Files\\Python310\\lib\\concurrent\\futures\\process.py',
|
||||
'PYMODULE'),
|
||||
('concurrent.futures._base',
|
||||
'C:\\Program Files\\Python310\\lib\\concurrent\\futures\\_base.py',
|
||||
'PYMODULE'),
|
||||
('concurrent',
|
||||
'C:\\Program Files\\Python310\\lib\\concurrent\\__init__.py',
|
||||
'PYMODULE'),
|
||||
('asyncio.trsock',
|
||||
'C:\\Program Files\\Python310\\lib\\asyncio\\trsock.py',
|
||||
'PYMODULE'),
|
||||
('asyncio.staggered',
|
||||
'C:\\Program Files\\Python310\\lib\\asyncio\\staggered.py',
|
||||
'PYMODULE'),
|
||||
('asyncio.tasks',
|
||||
'C:\\Program Files\\Python310\\lib\\asyncio\\tasks.py',
|
||||
'PYMODULE'),
|
||||
('asyncio.base_tasks',
|
||||
'C:\\Program Files\\Python310\\lib\\asyncio\\base_tasks.py',
|
||||
'PYMODULE'),
|
||||
('asyncio.locks',
|
||||
'C:\\Program Files\\Python310\\lib\\asyncio\\locks.py',
|
||||
'PYMODULE'),
|
||||
('asyncio.mixins',
|
||||
'C:\\Program Files\\Python310\\lib\\asyncio\\mixins.py',
|
||||
'PYMODULE'),
|
||||
('asyncio.sslproto',
|
||||
'C:\\Program Files\\Python310\\lib\\asyncio\\sslproto.py',
|
||||
'PYMODULE'),
|
||||
('asyncio.transports',
|
||||
'C:\\Program Files\\Python310\\lib\\asyncio\\transports.py',
|
||||
'PYMODULE'),
|
||||
('asyncio.protocols',
|
||||
'C:\\Program Files\\Python310\\lib\\asyncio\\protocols.py',
|
||||
'PYMODULE'),
|
||||
('asyncio.futures',
|
||||
'C:\\Program Files\\Python310\\lib\\asyncio\\futures.py',
|
||||
'PYMODULE'),
|
||||
('asyncio.exceptions',
|
||||
'C:\\Program Files\\Python310\\lib\\asyncio\\exceptions.py',
|
||||
'PYMODULE'),
|
||||
('asyncio.events',
|
||||
'C:\\Program Files\\Python310\\lib\\asyncio\\events.py',
|
||||
'PYMODULE'),
|
||||
('asyncio.coroutines',
|
||||
'C:\\Program Files\\Python310\\lib\\asyncio\\coroutines.py',
|
||||
'PYMODULE'),
|
||||
('asyncio.base_futures',
|
||||
'C:\\Program Files\\Python310\\lib\\asyncio\\base_futures.py',
|
||||
'PYMODULE'),
|
||||
('asyncio.format_helpers',
|
||||
'C:\\Program Files\\Python310\\lib\\asyncio\\format_helpers.py',
|
||||
'PYMODULE'),
|
||||
('asyncio.constants',
|
||||
'C:\\Program Files\\Python310\\lib\\asyncio\\constants.py',
|
||||
'PYMODULE')])
|
||||
BIN
build/mqtt_srv/base_library.zip
Normal file
BIN
build/mqtt_srv/base_library.zip
Normal file
Binary file not shown.
BIN
build/mqtt_srv/localpycs/pyimod01_archive.pyc
Normal file
BIN
build/mqtt_srv/localpycs/pyimod01_archive.pyc
Normal file
Binary file not shown.
BIN
build/mqtt_srv/localpycs/pyimod02_importers.pyc
Normal file
BIN
build/mqtt_srv/localpycs/pyimod02_importers.pyc
Normal file
Binary file not shown.
BIN
build/mqtt_srv/localpycs/pyimod03_ctypes.pyc
Normal file
BIN
build/mqtt_srv/localpycs/pyimod03_ctypes.pyc
Normal file
Binary file not shown.
BIN
build/mqtt_srv/localpycs/pyimod04_pywin32.pyc
Normal file
BIN
build/mqtt_srv/localpycs/pyimod04_pywin32.pyc
Normal file
Binary file not shown.
BIN
build/mqtt_srv/localpycs/struct.pyc
Normal file
BIN
build/mqtt_srv/localpycs/struct.pyc
Normal file
Binary file not shown.
30
build/mqtt_srv/mqtt_srv.exe.manifest
Normal file
30
build/mqtt_srv/mqtt_srv.exe.manifest
Normal file
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<assemblyIdentity type="win32" name="mqtt_srv" processorArchitecture="amd64" version="1.0.0.0"/>
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<security>
|
||||
<requestedPrivileges>
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
<dependency>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" language="*" processorArchitecture="*" version="6.0.0.0" publicKeyToken="6595b64144ccf1df"/>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||
<application>
|
||||
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
|
||||
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
|
||||
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
|
||||
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
|
||||
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
|
||||
</application>
|
||||
</compatibility>
|
||||
<application xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<windowsSettings>
|
||||
<longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
|
||||
</windowsSettings>
|
||||
</application>
|
||||
</assembly>
|
||||
BIN
build/mqtt_srv/mqtt_srv.pkg
Normal file
BIN
build/mqtt_srv/mqtt_srv.pkg
Normal file
Binary file not shown.
70
build/mqtt_srv/warn-mqtt_srv.txt
Normal file
70
build/mqtt_srv/warn-mqtt_srv.txt
Normal file
@@ -0,0 +1,70 @@
|
||||
|
||||
This file lists modules PyInstaller was not able to find. This does not
|
||||
necessarily mean this module is required for running your program. Python and
|
||||
Python 3rd-party packages include a lot of conditional or optional modules. For
|
||||
example the module 'ntpath' only exists on Windows, whereas the module
|
||||
'posixpath' only exists on Posix systems.
|
||||
|
||||
Types if import:
|
||||
* top-level: imported at the top-level - look at these first
|
||||
* conditional: imported within an if-statement
|
||||
* delayed: imported within a function
|
||||
* optional: imported within a try-except-statement
|
||||
|
||||
IMPORTANT: Do NOT post this list to the issue-tracker. Use it as a basis for
|
||||
tracking down the missing module yourself. Thanks!
|
||||
|
||||
missing module named _posixshmem - imported by multiprocessing.resource_tracker (conditional), multiprocessing.shared_memory (conditional)
|
||||
missing module named org - imported by copy (optional)
|
||||
missing module named 'org.python' - imported by pickle (optional), xml.sax (delayed, conditional)
|
||||
missing module named 'java.lang' - imported by platform (delayed, optional), getmac.getmac (conditional, optional), xml.sax._exceptions (conditional)
|
||||
missing module named multiprocessing.BufferTooShort - imported by multiprocessing (top-level), multiprocessing.connection (top-level)
|
||||
missing module named multiprocessing.AuthenticationError - imported by multiprocessing (top-level), multiprocessing.connection (top-level)
|
||||
missing module named _posixsubprocess - imported by subprocess (optional), multiprocessing.util (delayed)
|
||||
missing module named _frozen_importlib_external - imported by importlib._bootstrap (delayed), importlib (optional), importlib.abc (optional), zipimport (top-level)
|
||||
excluded module named _frozen_importlib - imported by importlib (optional), importlib.abc (optional), zipimport (top-level)
|
||||
missing module named pep517 - imported by importlib.metadata (delayed)
|
||||
missing module named pwd - imported by posixpath (delayed, conditional), shutil (delayed, optional), tarfile (optional), pathlib (delayed, optional), subprocess (delayed, conditional, optional), netrc (delayed, conditional), getpass (delayed), psutil (optional)
|
||||
missing module named grp - imported by shutil (delayed, optional), tarfile (optional), pathlib (delayed, optional), subprocess (delayed, conditional, optional)
|
||||
missing module named posix - imported by os (conditional, optional), shutil (conditional), importlib._bootstrap_external (conditional)
|
||||
missing module named resource - imported by posix (top-level), psutil._pslinux (optional)
|
||||
missing module named multiprocessing.get_context - imported by multiprocessing (top-level), multiprocessing.pool (top-level), multiprocessing.managers (top-level), multiprocessing.sharedctypes (top-level)
|
||||
missing module named multiprocessing.TimeoutError - imported by multiprocessing (top-level), multiprocessing.pool (top-level)
|
||||
missing module named multiprocessing.set_start_method - imported by multiprocessing (top-level), multiprocessing.spawn (top-level)
|
||||
missing module named multiprocessing.get_start_method - imported by multiprocessing (top-level), multiprocessing.spawn (top-level)
|
||||
missing module named pyimod02_importers - imported by C:\Program Files\Python310\Lib\site-packages\PyInstaller\hooks\rthooks\pyi_rth_pkgutil.py (top-level)
|
||||
missing module named _scproxy - imported by urllib.request (conditional)
|
||||
missing module named termios - imported by getpass (optional), psutil._compat (delayed, optional)
|
||||
missing module named autorandr - imported by \\192.168.77.106\Data\__GITHUB\python\mqtt_srv.pyw (conditional)
|
||||
missing module named psutil._psutil_aix - imported by psutil (top-level), psutil._psaix (top-level)
|
||||
missing module named psutil._psutil_sunos - imported by psutil (top-level), psutil._pssunos (top-level)
|
||||
missing module named psutil._psutil_bsd - imported by psutil (top-level), psutil._psbsd (top-level)
|
||||
missing module named psutil._psutil_linux - imported by psutil (top-level), psutil._pslinux (top-level)
|
||||
missing module named psutil._psutil_osx - imported by psutil (conditional), psutil._psposix (conditional), psutil._psosx (top-level)
|
||||
missing module named fcntl - imported by subprocess (optional), getmac.getmac (delayed), psutil._compat (delayed, optional)
|
||||
missing module named dummy_threading - imported by requests.cookies (optional), psutil._compat (optional)
|
||||
missing module named _curses - imported by curses (top-level), curses.has_key (top-level)
|
||||
missing module named simplejson - imported by requests.compat (conditional, optional)
|
||||
missing module named StringIO - imported by urllib3.packages.six (conditional)
|
||||
runtime module named urllib3.packages.six.moves - imported by http.client (top-level), urllib3.util.response (top-level), urllib3.connectionpool (top-level), 'urllib3.packages.six.moves.urllib' (top-level), urllib3.util.queue (top-level)
|
||||
missing module named brotli - imported by urllib3.util.request (optional), urllib3.response (optional)
|
||||
missing module named brotlicffi - imported by urllib3.util.request (optional), urllib3.response (optional)
|
||||
missing module named Queue - imported by urllib3.util.queue (conditional)
|
||||
missing module named "'urllib3.packages.six.moves.urllib'.parse" - imported by urllib3.request (top-level), urllib3.poolmanager (top-level)
|
||||
missing module named socks - imported by paho.mqtt.client (optional), urllib3.contrib.socks (optional)
|
||||
missing module named 'typing.io' - imported by importlib.resources (top-level)
|
||||
missing module named cryptography - imported by urllib3.contrib.pyopenssl (top-level), requests (conditional, optional)
|
||||
missing module named 'OpenSSL.crypto' - imported by urllib3.contrib.pyopenssl (delayed)
|
||||
missing module named 'cryptography.x509' - imported by urllib3.contrib.pyopenssl (delayed, optional)
|
||||
missing module named 'cryptography.hazmat' - imported by urllib3.contrib.pyopenssl (top-level)
|
||||
missing module named 'OpenSSL.SSL' - imported by urllib3.contrib.pyopenssl (top-level)
|
||||
missing module named OpenSSL - imported by urllib3.contrib.pyopenssl (top-level)
|
||||
missing module named chardet - imported by requests.compat (optional), requests (optional), requests.packages (optional)
|
||||
missing module named unicodedata2 - imported by charset_normalizer.utils (optional)
|
||||
missing module named urllib3_secure_extra - imported by urllib3 (optional)
|
||||
missing module named vms_lib - imported by platform (delayed, optional)
|
||||
missing module named java - imported by platform (delayed)
|
||||
missing module named _winreg - imported by platform (delayed, optional)
|
||||
missing module named dns - imported by paho.mqtt.client (optional)
|
||||
missing module named urlparse - imported by paho.mqtt.client (optional)
|
||||
missing module named asyncio.DefaultEventLoopPolicy - imported by asyncio (delayed, conditional), asyncio.events (delayed, conditional)
|
||||
13794
build/mqtt_srv/xref-mqtt_srv.html
Normal file
13794
build/mqtt_srv/xref-mqtt_srv.html
Normal file
File diff suppressed because it is too large
Load Diff
51
builder.py
Normal file
51
builder.py
Normal file
@@ -0,0 +1,51 @@
|
||||
#!/usr/bin/env python3
|
||||
import getopt
|
||||
import sys
|
||||
import platform
|
||||
import subprocess
|
||||
import os
|
||||
|
||||
curos = platform.system()
|
||||
pth = os.path.abspath(__file__)
|
||||
wd = os.path.dirname(pth)
|
||||
try:
|
||||
opts, args = getopt.getopt(sys.argv[1:], "h:", ["command=", "help", "output="])
|
||||
except getopt.GetoptError as err:
|
||||
# print help information and exit:
|
||||
print(str(err)) # will print something like "option -a not recognized"
|
||||
#usage()
|
||||
sys.exit(2)
|
||||
output = None
|
||||
# QJ : getopts
|
||||
|
||||
for o, a in opts:
|
||||
if o == "-h":
|
||||
_ACTION = True
|
||||
elif o in ("-m", "--publish"):
|
||||
_MESSAGE = a
|
||||
else:
|
||||
_WIZZARD = True
|
||||
|
||||
print(wd)
|
||||
|
||||
if curos == "Windows":
|
||||
cmnd = ["scp.exe mqtt_srv.py root@192.168.77.1:/root/", "copy mqtt_srv.py mqtt_srv.pyw", "python.exe -m PyInstaller --onefile mqtt_srv.pyw --distpath .\dist", "Rmdir /Q /S .\\__pycache__", "Rmdir /Q /S .\\build"]
|
||||
#out = subprocess.Popen(cmnd.split())
|
||||
else:
|
||||
cmnd = ["cp mqtt_srv.py mqtt_srv.pyw", "python -m pyinstaller --onefile mqtt_srv.pyw --distpath ./dist", "rm -rf ./__pycache__", "rm -rf ./build"]
|
||||
|
||||
for c in cmnd:
|
||||
status, output = subprocess.getstatusoutput(c)
|
||||
print(output)
|
||||
|
||||
|
||||
if curos == "Windows":
|
||||
cmnd = ["copy .\\dist\\mqtt_srv.exe ..\\MyApp\\source\\"]
|
||||
|
||||
for c in cmnd:
|
||||
status, output = subprocess.getstatusoutput(c)
|
||||
print(output)
|
||||
|
||||
|
||||
|
||||
|
||||
65
cue.py
Normal file
65
cue.py
Normal file
@@ -0,0 +1,65 @@
|
||||
from cuesdk import CueSdk
|
||||
import time
|
||||
import subprocess
|
||||
global sdk
|
||||
sdk = CueSdk()
|
||||
sdk.connect()
|
||||
|
||||
global activity_flag
|
||||
global control_flag
|
||||
global keyboard_index
|
||||
print(sdk.protocol_details)
|
||||
keyboard_index = 0
|
||||
print(sdk.get_devices())
|
||||
print(CueSdk().get_device_count())
|
||||
def get_available_leds():
|
||||
"""
|
||||
Output: list of leds available to control
|
||||
Taken from a code sample of Cuesdk
|
||||
"""
|
||||
leds = list()
|
||||
device_count = sdk.get_device_count()
|
||||
for device_index in range(device_count):
|
||||
led_positions = sdk.get_led_positions_by_device_index(device_index)
|
||||
leds.append(led_positions)
|
||||
return leds
|
||||
|
||||
def turn_off_leds(all_leds):
|
||||
"""
|
||||
Input: list of leds
|
||||
Applies zero RGB values to all the leds available so the keyboard lights will shut off
|
||||
"""
|
||||
|
||||
print("turn off")
|
||||
cmnd = "powershell (New-Object -ComObject WScript.Shell).SendKeys('{NUMLOCK}')"
|
||||
status, output = subprocess.getstatusoutput(cmnd)
|
||||
print(status)
|
||||
print(output)
|
||||
for led in all_leds[keyboard_index]:
|
||||
print(led)
|
||||
all_leds[keyboard_index][led] = (0, 0, 0)
|
||||
sdk.set_led_colors_buffer_by_device_index(keyboard_index, all_leds[keyboard_index])
|
||||
sdk.set_led_colors_flush_buffer()
|
||||
print("sleep1")
|
||||
time.sleep(2)
|
||||
|
||||
|
||||
while True:
|
||||
time.sleep(4)
|
||||
|
||||
for i in sdk.get_devices():
|
||||
print(str(i.type))
|
||||
if str(i.type) == 'CorsairDeviceType.Keyboard':
|
||||
break
|
||||
else:
|
||||
keyboard_index += 1
|
||||
print(keyboard_index)
|
||||
colors = get_available_leds()
|
||||
print(str(sdk.get_devices()[keyboard_index].type))
|
||||
print("\nModel: " + str(sdk.get_devices()[keyboard_index]) + "\n")
|
||||
print("keyboard_index :" + str(keyboard_index))
|
||||
print("keyboard lights will shutdown after: " + str(60 / 60) + " minutes")
|
||||
print("Checking idle")
|
||||
|
||||
print(colors)
|
||||
turn_off_leds(colors)
|
||||
2
cue_con.py
Normal file
2
cue_con.py
Normal file
@@ -0,0 +1,2 @@
|
||||
from cue_sdk import *
|
||||
|
||||
BIN
dist/mqtt_srv
vendored
Normal file
BIN
dist/mqtt_srv
vendored
Normal file
Binary file not shown.
BIN
dist/mqtt_srv.exe
vendored
Normal file
BIN
dist/mqtt_srv.exe
vendored
Normal file
Binary file not shown.
BIN
dist/scan_tasmotas
vendored
Normal file
BIN
dist/scan_tasmotas
vendored
Normal file
Binary file not shown.
192
gg.py
Normal file
192
gg.py
Normal file
@@ -0,0 +1,192 @@
|
||||
import requests
|
||||
import time
|
||||
|
||||
DOMAIN = "ptz_camera"
|
||||
|
||||
ATTR_HOST = "host"
|
||||
ATTR_PROFILE = "profile"
|
||||
DEFAULT_HOST = "192.168.77.237"
|
||||
DEFAULT_PROFILE = "Profile_1"
|
||||
ATTR_PAN_TIME = "pan_time"
|
||||
DEFAULT_PANT_TIME = 0.1
|
||||
ATTR_MOVE_TIME = "move_time"
|
||||
DEFAULT_MOVE_TIME = 0.05
|
||||
DEFAULT_HEADERS = {'Content-Type':'application/soap+xml;charset=UTF8'}
|
||||
|
||||
def setup(hass, config):
|
||||
|
||||
def stop(call):
|
||||
host = call.data.get(ATTR_HOST, DEFAULT_HOST)
|
||||
print(host)
|
||||
profile = call.data.get(ATTR_PROFILE, DEFAULT_PROFILE)
|
||||
|
||||
xml = """<?xml version="1.0" encoding="utf-8"?>
|
||||
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
|
||||
xmlns:tptz="http://www.onvif.org/ver20/ptz/wsdl">
|
||||
<soap:Body>
|
||||
<tptz:Stop>
|
||||
<tptz:ProfileToken>Profile_1</tptz:ProfileToken>
|
||||
<tptz:PanTilt>true</tptz:PanTilt>
|
||||
<tptz:Zoom>true</tptz:Zoom>
|
||||
</tptz:Stop>
|
||||
</soap:Body>
|
||||
</soap:Envelope> """
|
||||
|
||||
r = requests.post('http://'+host+'/onvif/PTZ', data=xml, headers=DEFAULT_HEADERS)
|
||||
|
||||
def move_left(call):
|
||||
host = call.data.get(ATTR_HOST, DEFAULT_HOST)
|
||||
profile = call.data.get(ATTR_PROFILE, DEFAULT_PROFILE)
|
||||
move_time = call.data.get(ATTR_MOVE_TIME, DEFAULT_MOVE_TIME)
|
||||
|
||||
xml = """<?xml version="1.0" encoding="utf-8"?>
|
||||
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
|
||||
xmlns:tptz="http://www.onvif.org/ver20/ptz/wsdl"
|
||||
xmlns:tt="http://www.onvif.org/ver10/schema">
|
||||
<soap:Body>
|
||||
<tptz:ContinuousMove>
|
||||
<tptz:ProfileToken>Profile_1</tptz:ProfileToken>
|
||||
<tptz:Velocity>
|
||||
<tt:PanTilt x="-0.5" y="0"/>
|
||||
<tt:Zoom x="1"/>
|
||||
</tptz:Velocity>
|
||||
</tptz:ContinuousMove>
|
||||
</soap:Body>
|
||||
</soap:Envelope>"""
|
||||
|
||||
r = requests.post('http://'+host+'/onvif/PTZ', data=xml, headers=DEFAULT_HEADERS)
|
||||
time.sleep(move_time)
|
||||
stop(call)
|
||||
|
||||
def move_right(call):
|
||||
host = call.data.get(ATTR_HOST, DEFAULT_HOST)
|
||||
profile = call.data.get(ATTR_PROFILE, DEFAULT_PROFILE)
|
||||
move_time = call.data.get(ATTR_MOVE_TIME, DEFAULT_MOVE_TIME)
|
||||
|
||||
xml = """<?xml version="1.0" encoding="utf-8"?>
|
||||
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
|
||||
xmlns:tptz="http://www.onvif.org/ver20/ptz/wsdl"
|
||||
xmlns:tt="http://www.onvif.org/ver10/schema">
|
||||
<soap:Body>
|
||||
<tptz:ContinuousMove>
|
||||
<tptz:ProfileToken>Profile_1</tptz:ProfileToken>
|
||||
<tptz:Velocity>
|
||||
<tt:PanTilt x="0.5" y="0"/>
|
||||
<tt:Zoom x="1"/>
|
||||
</tptz:Velocity>
|
||||
</tptz:ContinuousMove>
|
||||
</soap:Body>
|
||||
</soap:Envelope>"""
|
||||
|
||||
r = requests.post('http://'+host+'/onvif/PTZ', data=xml, headers=DEFAULT_HEADERS)
|
||||
time.sleep(move_time)
|
||||
stop(call)
|
||||
|
||||
def move_up(call):
|
||||
host = call.data.get(ATTR_HOST, DEFAULT_HOST)
|
||||
profile = call.data.get(ATTR_PROFILE, DEFAULT_PROFILE)
|
||||
move_time = call.data.get(ATTR_MOVE_TIME, DEFAULT_MOVE_TIME)
|
||||
|
||||
xml = """<?xml version="1.0" encoding="utf-8"?>
|
||||
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
|
||||
xmlns:tptz="http://www.onvif.org/ver20/ptz/wsdl"
|
||||
xmlns:tt="http://www.onvif.org/ver10/schema">
|
||||
<soap:Body>
|
||||
<tptz:ContinuousMove>
|
||||
<tptz:ProfileToken>Profile_1</tptz:ProfileToken>
|
||||
<tptz:Velocity>
|
||||
<tt:PanTilt x="0" y="0.5"/>
|
||||
<tt:Zoom x="1"/>
|
||||
</tptz:Velocity>
|
||||
</tptz:ContinuousMove>
|
||||
</soap:Body>
|
||||
</soap:Envelope>"""
|
||||
|
||||
r = requests.post('http://'+host+'/onvif/PTZ', data=xml, headers=DEFAULT_HEADERS)
|
||||
time.sleep(move_time)
|
||||
stop(call)
|
||||
|
||||
def move_down(call):
|
||||
host = call.data.get(ATTR_HOST, DEFAULT_HOST)
|
||||
profile = call.data.get(ATTR_PROFILE, DEFAULT_PROFILE)
|
||||
move_time = call.data.get(ATTR_MOVE_TIME, DEFAULT_MOVE_TIME)
|
||||
|
||||
xml = """<?xml version="1.0" encoding="utf-8"?>
|
||||
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
|
||||
xmlns:tptz="http://www.onvif.org/ver20/ptz/wsdl"
|
||||
xmlns:tt="http://www.onvif.org/ver10/schema">
|
||||
<soap:Body>
|
||||
<tptz:ContinuousMove>
|
||||
<tptz:ProfileToken>Profile_1</tptz:ProfileToken>
|
||||
<tptz:Velocity>
|
||||
<tt:PanTilt x="0" y="-0.5"/>
|
||||
<tt:Zoom x="1"/>
|
||||
</tptz:Velocity>
|
||||
</tptz:ContinuousMove>
|
||||
</soap:Body>
|
||||
</soap:Envelope>"""
|
||||
|
||||
r = requests.post('http://'+host+'/onvif/PTZ', data=xml, headers=DEFAULT_HEADERS)
|
||||
time.sleep(move_time)
|
||||
stop(call)
|
||||
|
||||
def move_origin_pan(call):
|
||||
host = call.data.get(ATTR_HOST, DEFAULT_HOST)
|
||||
profile = call.data.get(ATTR_PROFILE, DEFAULT_PROFILE)
|
||||
|
||||
xml = """<?xml version="1.0" encoding="utf-8"?>
|
||||
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
|
||||
xmlns:tptz="http://www.onvif.org/ver20/ptz/wsdl"
|
||||
xmlns:tt="http://www.onvif.org/ver10/schema">
|
||||
<soap:Body>
|
||||
<tptz:ContinuousMove>
|
||||
<tptz:ProfileToken>Profile_1</tptz:ProfileToken>
|
||||
<tptz:Velocity>
|
||||
<tt:PanTilt x="-0.5" y="0"/>
|
||||
<tt:Zoom x="1"/>
|
||||
</tptz:Velocity>
|
||||
</tptz:ContinuousMove>
|
||||
</soap:Body>
|
||||
</soap:Envelope>"""
|
||||
|
||||
r = requests.post('http://'+host+'/onvif/PTZ', data=xml, headers=DEFAULT_HEADERS)
|
||||
|
||||
def move_origin_tilt(call):
|
||||
host = call.data.get(ATTR_HOST, DEFAULT_HOST)
|
||||
profile = call.data.get(ATTR_PROFILE, DEFAULT_PROFILE)
|
||||
|
||||
xml = """<?xml version="1.0" encoding="utf-8"?>
|
||||
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
|
||||
xmlns:tptz="http://www.onvif.org/ver20/ptz/wsdl"
|
||||
xmlns:tt="http://www.onvif.org/ver10/schema">
|
||||
<soap:Body>
|
||||
<tptz:ContinuousMove>
|
||||
<tptz:ProfileToken>Profile_1</tptz:ProfileToken>
|
||||
<tptz:Velocity>
|
||||
<tt:PanTilt x="0" y="-0.5"/>
|
||||
<tt:Zoom x="1"/>
|
||||
</tptz:Velocity>
|
||||
</tptz:ContinuousMove>
|
||||
</soap:Body>
|
||||
</soap:Envelope>"""
|
||||
|
||||
r = requests.post('http://'+host+'/onvif/PTZ', data=xml, headers=DEFAULT_HEADERS)
|
||||
|
||||
def move_origin(call):
|
||||
pan_time = call.data.get(ATTR_PAN_TIME, DEFAULT_PANT_TIME)
|
||||
move_origin_pan(call)
|
||||
time.sleep(pan_time)
|
||||
move_origin_tilt(call)
|
||||
|
||||
|
||||
hass.services.register(DOMAIN, "move_left", move_left)
|
||||
hass.services.register(DOMAIN, "move_right", move_right)
|
||||
hass.services.register(DOMAIN, "move_up", move_up)
|
||||
hass.services.register(DOMAIN, "move_down", move_down)
|
||||
hass.services.register(DOMAIN, "stop", stop)
|
||||
hass.services.register(DOMAIN, "move_origin", move_origin)
|
||||
hass.services.register(DOMAIN, "move_origin_pan", move_origin_pan)
|
||||
hass.services.register(DOMAIN, "move_origin_tilt", move_origin_tilt)
|
||||
|
||||
# Return boolean to indicate that initialization was successfully.
|
||||
return True
|
||||
86
ha.py
Normal file
86
ha.py
Normal file
@@ -0,0 +1,86 @@
|
||||
#!/usr/bin/python
|
||||
import subprocess
|
||||
import getopt
|
||||
import sys
|
||||
import time
|
||||
import requests
|
||||
import re
|
||||
__IP = '192.168.77.106'
|
||||
|
||||
try:
|
||||
opts, args = getopt.getopt(sys.argv[1:], "d:p:", ["destination=", "publish", "output="])
|
||||
except getopt.GetoptError as err:
|
||||
# print help information and exit:
|
||||
print(str(err)) # will print something like "option -a not recognized"
|
||||
#usage()
|
||||
sys.exit(2)
|
||||
output = None
|
||||
# QJ : getopts
|
||||
|
||||
for o, a in opts:
|
||||
if o in ("-d", "--destination"):
|
||||
__IP = a
|
||||
elif o in ("-p", "--publish"):
|
||||
_PUBLISH = True
|
||||
else:
|
||||
_WIZZARD = True
|
||||
|
||||
|
||||
__RULES = ["EMAIL993", "EMAIL25", "EMAIL143", "EMAIL995", "EMAIL465", "HTTPS", "HTTP"]
|
||||
|
||||
for i in __RULES:
|
||||
print(i)
|
||||
status, output = subprocess.getstatusoutput("uci set firewall." + i + ".dest_ip='" + __IP + "'")
|
||||
status, output = subprocess.getstatusoutput("uci commit")
|
||||
|
||||
|
||||
for i in __RULES:
|
||||
status, output = subprocess.getstatusoutput("uci get firewall." + i + ".dest_ip")
|
||||
#print(output)
|
||||
time.sleep(3)
|
||||
status, output = subprocess.getstatusoutput("/etc/init.d/firewall restart")
|
||||
|
||||
if __IP == "192.168.77.246":
|
||||
act = "start"
|
||||
print("Starting containers on Raspbian!")
|
||||
else:
|
||||
act = "stop"
|
||||
print("Stopping containers on Raspbian!")
|
||||
|
||||
status, output = subprocess.getstatusoutput("docker -H ssh://root@192.168.77.246 " + act + " mosquitto_mosquitto_1 HomeAssistant mailu_resolver_1 mailu_redis_1 mailu_smtp_1 mailu_imap_1 mailu_antispam_1 mailu_webmail_1 mailu_admin_1 mailu_front_1 nextcloud_db_1 nextcloud_app_1 webhub_client_1 nginx-proxy-manager_db_1 nginx-proxy-manager_app_1 ")
|
||||
|
||||
MQTT_BROKER = __IP
|
||||
MQTT_USER = "jaydee"
|
||||
MQTT_PASS = "jaydee1"
|
||||
|
||||
cmnd = "nmap -sP 192.168.77.*|grep \"Nmap scan report\"|egrep -o \"[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\""
|
||||
#print(cmnd)
|
||||
status, output = subprocess.getstatusoutput(cmnd)
|
||||
|
||||
print(output)
|
||||
|
||||
ips = output.splitlines()
|
||||
tasm_data = {}
|
||||
for sys_ip in ips:
|
||||
if not re.match('([0-9]{1,3}).([0-9]{1,3}).([0-9]{1,3}).([0-9]{1,3})', sys_ip):
|
||||
print("wrong ip : " + str(sys_ip))
|
||||
continue
|
||||
print("This is ip : " + sys_ip)
|
||||
|
||||
cmnd = "nmap " + sys_ip + " -p80|grep \"80/tcp open http\""
|
||||
status, output = subprocess.getstatusoutput(cmnd)
|
||||
# print("status of 80 : " + str(status))
|
||||
if status == 0:
|
||||
try:
|
||||
# url = "http://" + sys_ip + "/cm?user=admin&password=l4c1j4yd33Du5l0&cmnd=STATUS+5"
|
||||
|
||||
url = "http://" + sys_ip + "/cm?cmnd=Backlog%20MqttHost%20" + MQTT_BROKER + "%3BMqttUser%20" + MQTT_USER + "%3BMqttPassword%20" + MQTT_PASS
|
||||
print(url)
|
||||
requests.get(url)
|
||||
|
||||
except:
|
||||
#print(sys_ip + " : Not a tasmota!")
|
||||
pass
|
||||
else:
|
||||
#print(sys_ip + " : Not a listening")
|
||||
pass
|
||||
184
handle_backups.py
Normal file
184
handle_backups.py
Normal file
@@ -0,0 +1,184 @@
|
||||
import requests
|
||||
import untangle
|
||||
import socket
|
||||
import sys
|
||||
import time
|
||||
import random
|
||||
import json
|
||||
import getopt
|
||||
from urllib3.exceptions import InsecureRequestWarning
|
||||
from urllib3 import disable_warnings
|
||||
disable_warnings(InsecureRequestWarning)
|
||||
from paho.mqtt import client as mqtt_client
|
||||
import datetime
|
||||
|
||||
jobId = "0ceadf5e-0b9e-11ed-9806-9a2cbecf0a5f"
|
||||
try:
|
||||
opts, args = getopt.getopt(sys.argv[1:], "cT:", ["command=", "help", "output="])
|
||||
except getopt.GetoptError as err:
|
||||
# print help information and exit:
|
||||
print(str(err)) # will print something like "option -a not recognized"
|
||||
#usage()
|
||||
sys.exit(2)
|
||||
output = None
|
||||
# QJ : getopts
|
||||
_ACTION = "default"
|
||||
for o, a in opts:
|
||||
if o == "-c":
|
||||
_ACTION = "check"
|
||||
elif o in ("-p", "--publish"):
|
||||
_PUBLISH = True
|
||||
elif o in ("-m", "--publish"):
|
||||
_MESSAGE = a
|
||||
elif o in ("-t", "--publish"):
|
||||
_TOPIC = a
|
||||
elif o in ("-S", "--setvar"):
|
||||
_SETVAR = True
|
||||
_THR_NAME = sys.argv[2]
|
||||
_THR_VAL = sys.argv[3]
|
||||
elif o in ("-T", "--task"):
|
||||
if a == "task1":
|
||||
jobId = "0ceadf5e-0b9e-11ed-9806-9a2cbecf0a5f"
|
||||
elif a == "task2":
|
||||
jobId = "1bba7e36-6ea9-11ed-91cb-d63dc5df381e"
|
||||
else:
|
||||
_WIZZARD = True
|
||||
nasIp = "192.168.77.106"
|
||||
nasPort = "4443"
|
||||
user = "jaydee"
|
||||
password = "l4c1j4yd33Du5lo"
|
||||
|
||||
def get_sid():
|
||||
headers = {"Content-type": "application/x-www-form-urlencoded"}
|
||||
params = {
|
||||
"user": "jaydee",
|
||||
"serviceKey": 1,
|
||||
"pwd": "bDRjMWo0eWQzM0R1NWxv"
|
||||
}
|
||||
url = "https://{}:{}/cgi-bin/authLogin.cgi".format(nasIp, nasPort)
|
||||
|
||||
response = requests.get(url, headers=headers, params=params, verify=False)
|
||||
|
||||
#print("Status Code", response.status_code)
|
||||
#print("JSON Response ", response.text)
|
||||
obj = untangle.parse(response.text)
|
||||
sid = (obj.QDocRoot.authSid.cdata)
|
||||
return sid
|
||||
|
||||
def check_status():
|
||||
sid = get_sid()
|
||||
headers = {"X-QNAP-SID": sid}
|
||||
params = {}
|
||||
|
||||
url = "https://{}:{}/cc3/v1/users/system/jobs".format(nasIp, nasPort)
|
||||
response = requests.get(url, headers=headers, params=params, verify=False)
|
||||
|
||||
|
||||
|
||||
# print("JSON Response ", response.text)
|
||||
data = json.loads(response.text)
|
||||
wait_for_done = True
|
||||
while wait_for_done:
|
||||
for i in data["jobs"]:
|
||||
|
||||
#print(i["_id"])
|
||||
#print(data["jobs"][i]["_id"])
|
||||
if i["_id"] == jobId:
|
||||
# print(i)
|
||||
print(i["statistics"]["progress"])
|
||||
time.sleep(3)
|
||||
|
||||
|
||||
'''
|
||||
auth=$(curl --insecure "https://$nasIp/cgi-bin/authLogin.cgi" -H "Content-type: application/x-www-form-urlencoded" --data-urlencode "user=$user" --data-urlencode "serviceKey=1" --data-urlencode "pwd=$(echo -n $password | base64)" --silent)
|
||||
echo $auth
|
||||
sidXML=$(echo "$auth" | grep -Eo "<authSid>(.+?)</authSid>")
|
||||
sidStrip="${sidXML/<authSid><![CDATA[/}"
|
||||
sid="${sidStrip/]]><\/authSid>/}"
|
||||
curl "https://$nasIp/cc3/v1/users/system/jobs/$1?command=start" -H "X-QNAP-SID: $sid" --data-raw '{}' --silent --insecure
|
||||
curl 'https://192.168.77.106:4443/cc3/v1/users/system/jobs' -H 'X-QNAP-SID: r299e6x3' --silent --insecure
|
||||
'''
|
||||
|
||||
|
||||
|
||||
if _ACTION == "default":
|
||||
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
service_online = False
|
||||
broker = '192.168.77.106'
|
||||
port = 1883
|
||||
topic = "sectorq/systems/hbs"
|
||||
mqtt_username = 'jaydee'
|
||||
mqtt_password = 'jaydee1'
|
||||
|
||||
while not service_online:
|
||||
result = sock.connect_ex(('192.168.77.189',873))
|
||||
if result == 0:
|
||||
print("Port is open")
|
||||
service_online = True
|
||||
else:
|
||||
print("Port is not open")
|
||||
time.sleep(5)
|
||||
sock.close()
|
||||
|
||||
sid = get_sid()
|
||||
|
||||
#print("-----------------")
|
||||
#print(sid)
|
||||
#print("-----------------")
|
||||
|
||||
headers = {"X-QNAP-SID": sid}
|
||||
params = {}
|
||||
|
||||
url = "https://{}:{}/cc3/v1/users/system/jobs/{}?command=start".format(nasIp, nasPort, jobId)
|
||||
#print(url)
|
||||
response = requests.post(url, headers=headers, params=params, verify=False)
|
||||
|
||||
|
||||
#print("Status Code", response.status_code)
|
||||
#print("JSON Response ", response.text)
|
||||
client = mqtt_client.Client()
|
||||
client.username_pw_set(mqtt_username, mqtt_password)
|
||||
client.connect(broker,1883,60)
|
||||
msg = {"status":"initializing","start_time":"now","progress":0}
|
||||
client.publish(topic, json.dumps(msg));
|
||||
client.disconnect();
|
||||
|
||||
wait_for_done = True
|
||||
task1_done = False
|
||||
task2_done = False
|
||||
url = "https://{}:{}/cc3/v1/users/system/jobs".format(nasIp, nasPort)
|
||||
client = mqtt_client.Client()
|
||||
client.username_pw_set(mqtt_username, mqtt_password)
|
||||
client.connect(broker,1883,60)
|
||||
|
||||
while wait_for_done:
|
||||
response = requests.get(url, headers=headers, params=params, verify=False)
|
||||
print("Status Code", response.status_code)
|
||||
#print("JSON Response ", response.text)
|
||||
data = json.loads(response.text)
|
||||
# print(data["jobs"])
|
||||
for i in data["jobs"]:
|
||||
time.sleep(3)
|
||||
#print(i["_id"])
|
||||
#print(data["jobs"][i]["_id"])
|
||||
#if i["_id"] == jobId:
|
||||
# print(i)
|
||||
# print(i["statistics"])
|
||||
|
||||
try:
|
||||
msg = {"status":i["statistics"]["status"],"name":i["name"],"start_time":i["statistics"]["start_time"],"stop_time":i["statistics"]["stop_time"],"elapsed_time":str(datetime.timedelta(seconds=round(i["statistics"]["elapse_time"],0))),"progress":i["statistics"]["progress"]}
|
||||
|
||||
except:
|
||||
msg = {"status":i["statistics"]["status"],"name":i["name"],"start_time": i["statistics"]["start_time"]}
|
||||
client.publish(topic, json.dumps(msg));
|
||||
if i["statistics"]["status"] == "Finished":
|
||||
wait_for_done = False
|
||||
|
||||
client.disconnect();
|
||||
#curl "https://$nasIp/cc3/v1/users/system/jobs/$1?command=start" -H "X-QNAP-SID: $sid" --data-raw '{}' --silent --insecure
|
||||
|
||||
|
||||
|
||||
|
||||
if _ACTION == "check":
|
||||
check_status()
|
||||
184
handle_backups.py.bak
Normal file
184
handle_backups.py.bak
Normal file
@@ -0,0 +1,184 @@
|
||||
import requests
|
||||
import untangle
|
||||
import socket
|
||||
import sys
|
||||
import time
|
||||
import random
|
||||
import json
|
||||
import getopt
|
||||
from urllib3.exceptions import InsecureRequestWarning
|
||||
from urllib3 import disable_warnings
|
||||
disable_warnings(InsecureRequestWarning)
|
||||
from paho.mqtt import client as mqtt_client
|
||||
import datetime
|
||||
|
||||
jobId = "0ceadf5e-0b9e-11ed-9806-9a2cbecf0a5f"
|
||||
try:
|
||||
opts, args = getopt.getopt(sys.argv[1:], "cT:", ["command=", "help", "output="])
|
||||
except getopt.GetoptError as err:
|
||||
# print help information and exit:
|
||||
print(str(err)) # will print something like "option -a not recognized"
|
||||
#usage()
|
||||
sys.exit(2)
|
||||
output = None
|
||||
# QJ : getopts
|
||||
_ACTION = "default"
|
||||
for o, a in opts:
|
||||
if o == "-c":
|
||||
_ACTION = "check"
|
||||
elif o in ("-p", "--publish"):
|
||||
_PUBLISH = True
|
||||
elif o in ("-m", "--publish"):
|
||||
_MESSAGE = a
|
||||
elif o in ("-t", "--publish"):
|
||||
_TOPIC = a
|
||||
elif o in ("-S", "--setvar"):
|
||||
_SETVAR = True
|
||||
_THR_NAME = sys.argv[2]
|
||||
_THR_VAL = sys.argv[3]
|
||||
elif o in ("-T", "--task"):
|
||||
if a == "task1":
|
||||
jobId = "0ceadf5e-0b9e-11ed-9806-9a2cbecf0a5f"
|
||||
elif a == "task2":
|
||||
jobId = "1bba7e36-6ea9-11ed-91cb-d63dc5df381e"
|
||||
else:
|
||||
_WIZZARD = True
|
||||
nasIp = "192.168.77.106"
|
||||
nasPort = "4443"
|
||||
user = "jaydee"
|
||||
password = "l4c1j4yd33Du5lo"
|
||||
|
||||
def get_sid():
|
||||
headers = {"Content-type": "application/x-www-form-urlencoded"}
|
||||
params = {
|
||||
"user": "jaydee",
|
||||
"serviceKey": 1,
|
||||
"pwd": "bDRjMWo0eWQzM0R1NWxv"
|
||||
}
|
||||
url = "https://{}:{}/cgi-bin/authLogin.cgi".format(nasIp, nasPort)
|
||||
|
||||
response = requests.get(url, headers=headers, params=params, verify=False)
|
||||
|
||||
#print("Status Code", response.status_code)
|
||||
#print("JSON Response ", response.text)
|
||||
obj = untangle.parse(response.text)
|
||||
sid = (obj.QDocRoot.authSid.cdata)
|
||||
return sid
|
||||
|
||||
def check_status():
|
||||
sid = get_sid()
|
||||
headers = {"X-QNAP-SID": sid}
|
||||
params = {}
|
||||
|
||||
url = "https://{}:{}/cc3/v1/users/system/jobs".format(nasIp, nasPort)
|
||||
response = requests.get(url, headers=headers, params=params, verify=False)
|
||||
|
||||
|
||||
|
||||
# print("JSON Response ", response.text)
|
||||
data = json.loads(response.text)
|
||||
wait_for_done = True
|
||||
while wait_for_done:
|
||||
for i in data["jobs"]:
|
||||
|
||||
#print(i["_id"])
|
||||
#print(data["jobs"][i]["_id"])
|
||||
if i["_id"] == jobId:
|
||||
# print(i)
|
||||
print(i["statistics"]["progress"])
|
||||
time.sleep(3)
|
||||
|
||||
|
||||
'''
|
||||
auth=$(curl --insecure "https://$nasIp/cgi-bin/authLogin.cgi" -H "Content-type: application/x-www-form-urlencoded" --data-urlencode "user=$user" --data-urlencode "serviceKey=1" --data-urlencode "pwd=$(echo -n $password | base64)" --silent)
|
||||
echo $auth
|
||||
sidXML=$(echo "$auth" | grep -Eo "<authSid>(.+?)</authSid>")
|
||||
sidStrip="${sidXML/<authSid><![CDATA[/}"
|
||||
sid="${sidStrip/]]><\/authSid>/}"
|
||||
curl "https://$nasIp/cc3/v1/users/system/jobs/$1?command=start" -H "X-QNAP-SID: $sid" --data-raw '{}' --silent --insecure
|
||||
curl 'https://192.168.77.106:4443/cc3/v1/users/system/jobs' -H 'X-QNAP-SID: r299e6x3' --silent --insecure
|
||||
'''
|
||||
|
||||
|
||||
|
||||
if _ACTION == "default":
|
||||
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
service_online = False
|
||||
broker = '192.168.77.106'
|
||||
port = 1883
|
||||
topic = "sectorq/systems/hbs"
|
||||
mqtt_username = 'jaydee'
|
||||
mqtt_password = 'jaydee1'
|
||||
|
||||
while not service_online:
|
||||
result = sock.connect_ex(('192.168.77.189',873))
|
||||
if result == 0:
|
||||
print("Port is open")
|
||||
service_online = True
|
||||
else:
|
||||
print("Port is not open")
|
||||
time.sleep(5)
|
||||
sock.close()
|
||||
|
||||
sid = get_sid()
|
||||
|
||||
#print("-----------------")
|
||||
#print(sid)
|
||||
#print("-----------------")
|
||||
|
||||
headers = {"X-QNAP-SID": sid}
|
||||
params = {}
|
||||
|
||||
url = "https://{}:{}/cc3/v1/users/system/jobs/{}?command=start".format(nasIp, nasPort, jobId)
|
||||
#print(url)
|
||||
response = requests.post(url, headers=headers, params=params, verify=False)
|
||||
|
||||
|
||||
#print("Status Code", response.status_code)
|
||||
#print("JSON Response ", response.text)
|
||||
client = mqtt_client.Client()
|
||||
client.username_pw_set(mqtt_username, mqtt_password)
|
||||
client.connect(broker,1883,60)
|
||||
msg = {"status":"initializing","start_time":"now","progress":0}
|
||||
client.publish(topic, json.dumps(msg));
|
||||
client.disconnect();
|
||||
|
||||
wait_for_done = True
|
||||
task1_done = False
|
||||
task2_done = False
|
||||
url = "https://{}:{}/cc3/v1/users/system/jobs".format(nasIp, nasPort)
|
||||
client = mqtt_client.Client()
|
||||
client.username_pw_set(mqtt_username, mqtt_password)
|
||||
client.connect(broker,1883,60)
|
||||
|
||||
while wait_for_done:
|
||||
response = requests.get(url, headers=headers, params=params, verify=False)
|
||||
print("Status Code", response.status_code)
|
||||
#print("JSON Response ", response.text)
|
||||
data = json.loads(response.text)
|
||||
# print(data["jobs"])
|
||||
for i in data["jobs"]:
|
||||
time.sleep(3)
|
||||
#print(i["_id"])
|
||||
#print(data["jobs"][i]["_id"])
|
||||
if i["_id"] == jobId:
|
||||
# print(i)
|
||||
# print(i["statistics"])
|
||||
|
||||
try:
|
||||
msg = {"status":i["statistics"]["status"],"name":i["name"],"start_time":i["statistics"]["start_time"],"stop_time":i["statistics"]["stop_time"],"elapsed_time":str(datetime.timedelta(seconds=round(i["statistics"]["elapse_time"],0))),"progress":i["statistics"]["progress"]}
|
||||
|
||||
except:
|
||||
msg = {"status":i["statistics"]["status"],"name":i["name"],"start_time": i["statistics"]["start_time"]}
|
||||
client.publish(topic, json.dumps(msg));
|
||||
if i["statistics"]["status"] == "Finished":
|
||||
wait_for_done = False
|
||||
|
||||
client.disconnect();
|
||||
#curl "https://$nasIp/cc3/v1/users/system/jobs/$1?command=start" -H "X-QNAP-SID: $sid" --data-raw '{}' --silent --insecure
|
||||
|
||||
|
||||
|
||||
|
||||
if _ACTION == "check":
|
||||
check_status()
|
||||
5
hello_world.py
Normal file
5
hello_world.py
Normal file
@@ -0,0 +1,5 @@
|
||||
name = data.get("name", "world")
|
||||
logger.info("Hello %s", name)
|
||||
logger.error("Hello %s", name)
|
||||
logger.warning("Hello %s", name)
|
||||
hass.bus.fire(name, {"wow": "from a Python script!"})
|
||||
911
mqtt_srv-wrt.py
Normal file
911
mqtt_srv-wrt.py
Normal file
@@ -0,0 +1,911 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
from asyncio.log import logger
|
||||
import paho.mqtt.client as mqtt
|
||||
from getmac import get_mac_address
|
||||
import platform
|
||||
import socket
|
||||
import re
|
||||
import subprocess
|
||||
import os
|
||||
import json
|
||||
import sys
|
||||
import time
|
||||
import json
|
||||
import datetime
|
||||
import ctypes
|
||||
import getopt
|
||||
import random
|
||||
import requests
|
||||
|
||||
stats = {}
|
||||
VERSION = "1.0.8"
|
||||
curos = platform.system()
|
||||
host = platform.node().lower()
|
||||
print(host)
|
||||
if curos == "Windows":
|
||||
import python_aida64
|
||||
|
||||
def writeLog(msg, svr="INFO"):
|
||||
ts = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
||||
if curos == "Windows":
|
||||
log_path = "c:\Program Files\jaydee\jaydee.log"
|
||||
else:
|
||||
log_path = "/tmp/mqtt_srv.log"
|
||||
f = open(log_path, "a")
|
||||
f.write(ts + " | " + svr + " | " + str(msg) + "\n")
|
||||
f.close()
|
||||
|
||||
if host != "router" and host != "nas":
|
||||
import psutil
|
||||
|
||||
processes = list(p.name() for p in psutil.process_iter())
|
||||
# print(processes)
|
||||
count = processes.count("mqtt_srv.exe")
|
||||
if int(count) >= 3:
|
||||
writeLog("script exist")
|
||||
sys.exit()
|
||||
else:
|
||||
cmnd = "ps |grep mqtt_srv.py|grep -v grep |wc -l"
|
||||
status, output = subprocess.getstatusoutput(cmnd)
|
||||
count = output
|
||||
if int(count) >= 2:
|
||||
writeLog("script exist")
|
||||
sys.exit()
|
||||
# Stops duplicate instance from running
|
||||
|
||||
writeLog(count)
|
||||
|
||||
writeLog("Starting : " + str(VERSION))
|
||||
writeLog("Getting running proccesses", "DEBUG")
|
||||
|
||||
|
||||
writeLog("done", "DEBUG")
|
||||
|
||||
FILE_TIMESTAMP = os.path.getmtime(sys.argv[0])
|
||||
def get_sys_env(name):
|
||||
key = winreg.CreateKey(winreg.HKEY_LOCAL_MACHINE, r"System\CurrentControlSet\Control\Session Manager\Environment")
|
||||
return winreg.QueryValueEx(key, name)[0]
|
||||
|
||||
def get_user_env(name):
|
||||
key = winreg.CreateKey(winreg.HKEY_CURRENT_USER, r"Environment")
|
||||
return winreg.QueryValueEx(key, name)[0]
|
||||
|
||||
|
||||
_PUBLISH = _SETVAR = False
|
||||
try:
|
||||
opts, args = getopt.getopt(sys.argv[1:], "Sspmt:", ["command=", "help", "output="])
|
||||
except getopt.GetoptError as err:
|
||||
# print help information and exit:
|
||||
print(str(err)) # will print something like "option -a not recognized"
|
||||
#usage()
|
||||
sys.exit(2)
|
||||
output = None
|
||||
# QJ : getopts
|
||||
|
||||
for o, a in opts:
|
||||
if o == "-d":
|
||||
_ACTION = True
|
||||
elif o in ("-p", "--publish"):
|
||||
_PUBLISH = True
|
||||
elif o in ("-m", "--publish"):
|
||||
_MESSAGE = a
|
||||
elif o in ("-t", "--publish"):
|
||||
_TOPIC = a
|
||||
elif o in ("-S", "--setvar"):
|
||||
_SETVAR = True
|
||||
_THR_NAME = sys.argv[2]
|
||||
_THR_VAL = sys.argv[3]
|
||||
else:
|
||||
_WIZZARD = True
|
||||
MQTT_HOST = "192.168.77.106"
|
||||
MQTT_PORT = 1883
|
||||
|
||||
if _PUBLISH:
|
||||
# generate client ID with pub prefix randomly
|
||||
#client_id = f'python-mqtt-{random.randint(0, 1000)}'
|
||||
client_id = 'python-mqtt-1004'
|
||||
username = 'jaydee'
|
||||
password = 'jaydee1'
|
||||
|
||||
def connect_mqtt():
|
||||
def on_connect(client, userdata, flags, rc):
|
||||
if rc == 0:
|
||||
print("Connected to MQTT Broker!")
|
||||
else:
|
||||
print("Failed to connect, return code %d\n", rc)
|
||||
|
||||
client = mqtt.Client(client_id)
|
||||
client.username_pw_set(username, password)
|
||||
client.on_connect = on_connect
|
||||
client.connect(MQTT_HOST, MQTT_PORT)
|
||||
return client
|
||||
|
||||
|
||||
def publish(client):
|
||||
result = client.publish(_TOPIC, _MESSAGE)
|
||||
# result: [0, 1]
|
||||
status = result[0]
|
||||
if status == 0:
|
||||
print(f"Send `{_MESSAGE}` to topic `{_TOPIC}`")
|
||||
else:
|
||||
print(f"Failed to send message to topic {_TOPIC}")
|
||||
|
||||
client = connect_mqtt()
|
||||
publish(client)
|
||||
sys.exit()
|
||||
|
||||
if _SETVAR:
|
||||
#myCmd = "setx " + _THR_NAME + " " + _THR_VAL + " -m"
|
||||
myCmd = "setx " + _THR_NAME + " " + _THR_VAL
|
||||
subprocess.Popen(myCmd.split(), shell=True)
|
||||
sys.exit()
|
||||
|
||||
from ping3 import ping, verbose_ping
|
||||
|
||||
|
||||
|
||||
|
||||
'''
|
||||
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
|
||||
python get-pip.py
|
||||
pip3 install getmac
|
||||
pip3 install paho.mqttdasdas
|
||||
"""
|
||||
|
||||
'''
|
||||
|
||||
writeLog("Starting daemon in versin : " + VERSION)
|
||||
|
||||
VERS = '1.3'
|
||||
'''
|
||||
print("pinging")
|
||||
lala = ping(MQTT_HOST)
|
||||
|
||||
connected = 0
|
||||
while connected == 0:
|
||||
if type(lala) == float:
|
||||
print("Oleee connected")
|
||||
writeLog("Mqtt connected", "INFO")
|
||||
connected = 1
|
||||
else:
|
||||
print("blaaah not connected, waiting...(5)")
|
||||
writeLog("blaaah not connected, waiting...(5)")
|
||||
time.sleep(5)
|
||||
lala = ping(MQTT_HOST)
|
||||
'''
|
||||
|
||||
# Function to display hostname and
|
||||
# IP address
|
||||
def get_ip():
|
||||
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
||||
try:
|
||||
# doesn't even have to be reachable
|
||||
s.connect(('192.168.77.1', 1))
|
||||
IP = s.getsockname()[0]
|
||||
except ValueError:
|
||||
IP = '127.0.0.1'
|
||||
finally:
|
||||
s.close()
|
||||
return IP
|
||||
|
||||
|
||||
IP = get_ip()
|
||||
|
||||
|
||||
print("OS : " + curos)
|
||||
writeLog("OS : " + curos)
|
||||
if curos != "Windows":
|
||||
import autorandr
|
||||
else:
|
||||
import winreg
|
||||
|
||||
|
||||
if host == "raspberrypi":
|
||||
mac = str(get_mac_address("eth0"))
|
||||
elif host == "SERVER":
|
||||
mac = str(get_mac_address("enp2s0"))
|
||||
elif host == "ASUS" and curos != "Windows":
|
||||
mac = str(get_mac_address("enp3s0f1"))
|
||||
else:
|
||||
mac = str(get_mac_address("Ethernet"))
|
||||
|
||||
|
||||
print("MAC : " + mac)
|
||||
writeLog("MAC : " + mac)
|
||||
print("SYSTEM : " + host)
|
||||
writeLog("SYSTEM : " + host)
|
||||
print("IP : " + IP)
|
||||
writeLog("IP : " + IP)
|
||||
|
||||
flag_connected = 0
|
||||
# The callback for when the client receives a CONNACK response from the server.
|
||||
def on_connect(client, userdata, flags, rc):
|
||||
print("Connected with result code " + str(rc))
|
||||
writeLog("Connected with result code " + str(rc))
|
||||
global flag_connected
|
||||
flag_connected = 1
|
||||
# Subscribing in on_connect() means that if we lose the connection and
|
||||
# reconnect then subscriptions will be renewed.
|
||||
topic = "sectorq/systems/" + host.lower()
|
||||
print(topic)
|
||||
writeLog(topic)
|
||||
time.sleep(1)
|
||||
client.publish("sectorq/status", payload="{'action':'connect', 'system':'" + host.lower() + "', 'ip': '" + IP + "', 'mac':'" + mac + "', 'ver':'" + VERS + "'}", qos=0, retain=False)
|
||||
client.publish("sectorq/systems/" + host.lower() + "/stat", payload="on", qos=0, retain=True)
|
||||
if host.lower() == "router":
|
||||
print("Getting fw info")
|
||||
cmnd = "/etc/init.d/banip running"
|
||||
status, output = subprocess.getstatusoutput(cmnd)
|
||||
if status == 0:
|
||||
stats["banip"] = "running"
|
||||
else:
|
||||
stats["banip"] = "stopped"
|
||||
|
||||
cmnd = "/root/router_cmd.sh -t firewall -n TOSHIBA-WIFI -m get"
|
||||
#out = subprocess.Popen(cmnd.split())
|
||||
status, output = subprocess.getstatusoutput(cmnd)
|
||||
print(output)
|
||||
if output == 1:
|
||||
stats["fw"] = 1
|
||||
else:
|
||||
stats["fw"] = 0
|
||||
print("Getting wifi info")
|
||||
cmnd = "/root/router_cmd.sh -t wireless -m get"
|
||||
#out = subprocess.Popen(cmnd.split())
|
||||
status, output = subprocess.getstatusoutput(cmnd)
|
||||
print(output)
|
||||
if output == "allow":
|
||||
stats["macfilter"] = "allow"
|
||||
else:
|
||||
stats["macfilter"] = "off"
|
||||
client.publish("sectorq/systems/router/stats", json.dumps(stats), qos=0, retain=True)
|
||||
if host.lower() == "nas":
|
||||
print("Getting VM info")
|
||||
|
||||
cmnd = "/share/ZFS530_DATA/.qpkg/QKVM/usr/bin/virsh list --all"
|
||||
print(cmnd)
|
||||
status, output = subprocess.getstatusoutput(cmnd)
|
||||
l = 1
|
||||
lines = output.splitlines()
|
||||
VMS = {}
|
||||
for i in lines:
|
||||
l = l + 1
|
||||
if l < 4:
|
||||
continue
|
||||
line = re.split(r" {2,}", i)
|
||||
print(str(line[0].strip()) + " " + str(line[1].strip()) + " " + str(line[2].strip()))
|
||||
VMS[str(line[1].strip())] = str(line[2].strip())
|
||||
|
||||
|
||||
|
||||
for m in VMS:
|
||||
|
||||
cmnd = "/share/ZFS530_DATA/.qpkg/QKVM/usr/bin/virsh domstate " + m
|
||||
#out = subprocess.Popen(cmnd.split())
|
||||
print(cmnd)
|
||||
status, output = subprocess.getstatusoutput(cmnd)
|
||||
print(output)
|
||||
if output.strip() == "running":
|
||||
client.publish("sectorq/systems/nas/" + m, payload=1, qos=0, retain=True)
|
||||
else:
|
||||
client.publish("sectorq/systems/nas/" + m, payload=0, qos=0, retain=True)
|
||||
|
||||
|
||||
client.subscribe(topic)
|
||||
|
||||
def on_disconnect(client, userdata, rc):
|
||||
print("disconnecting reason " +str(rc))
|
||||
writeLog("disconnecting reason " +str(rc))
|
||||
client.connected_flag=False
|
||||
client.disconnect_flag=True
|
||||
global flag_connected
|
||||
flag_connected = 0
|
||||
|
||||
|
||||
# The callback for when a PUBLISH message is received from the server.
|
||||
def on_message(client, userdata, msg):
|
||||
print(msg.topic)
|
||||
print(msg.payload)
|
||||
myObj = msg.payload.decode('utf-8')
|
||||
# command = re.sub(r"^b\'|\'$", "", str(msg.payload))
|
||||
# command = json.loads(msg.payload.decode("utf-8"))
|
||||
try:
|
||||
myObj = json.loads(msg.payload)
|
||||
try:
|
||||
writeLog(myObj["action"])
|
||||
print(myObj["action"])
|
||||
except:
|
||||
print("Action not set")
|
||||
writeLog("Action not set", "WARNING")
|
||||
|
||||
try:
|
||||
print(myObj["cmd"])
|
||||
writeLog(myObj["cmd"])
|
||||
except:
|
||||
print("Cmd not set")
|
||||
writeLog("Cmd not set", "WARNING")
|
||||
|
||||
try:
|
||||
print(myObj["target"])
|
||||
writeLog(myObj["target"])
|
||||
except:
|
||||
print("Target Not Set")
|
||||
writeLog("Target Not Set", "WARNING")
|
||||
try:
|
||||
print(myObj["status"])
|
||||
writeLog(myObj["status"])
|
||||
except:
|
||||
print("Status Not Set")
|
||||
writeLog("Status Not Set")
|
||||
|
||||
try:
|
||||
print(myObj["command"])
|
||||
writeLog(myObj["command"])
|
||||
except:
|
||||
print("Command Not Set")
|
||||
writeLog("Command Not Set")
|
||||
|
||||
try:
|
||||
print(myObj["cmd_line"])
|
||||
writeLog(myObj["cmd_line"])
|
||||
except:
|
||||
print("Cmd_line Not Set")
|
||||
writeLog("Cmd_line Not Set")
|
||||
|
||||
|
||||
if myObj["cmd"] == "command":
|
||||
|
||||
print("Executing " + myObj["cmd_line"])
|
||||
writeLog("Executing " + myObj["cmd_line"])
|
||||
#os.system('start /b "' + myObj["cmd_line"] + '"')
|
||||
try:
|
||||
subprocess.Popen(myObj["cmd_line"].split(), shell=True)
|
||||
#subprocess.Popen(myObj["cmd_line"].split())
|
||||
# ctypes.windll.user32.MessageBoxW(0, myObj["cmd_line"], "Executed", 64)
|
||||
except:
|
||||
ctypes.windll.user32.MessageBoxW(0, "Your text", "Your title", 16)
|
||||
print("Executed " + myObj["cmd_line"])
|
||||
writeLog("Executed " + myObj["cmd_line"])
|
||||
|
||||
if myObj["cmd"] == "nas_cmd":
|
||||
print("Executing NAS")
|
||||
cmnd = "/share/ZFS530_DATA/.qpkg/QKVM/usr/bin/virsh domstate " + str(myObj["target"])
|
||||
print(cmnd)
|
||||
status, output = subprocess.getstatusoutput(cmnd)
|
||||
print(output)
|
||||
cmd_type = myObj["command"]
|
||||
if myObj["command"] == "start":
|
||||
if output.strip() == "paused":
|
||||
print("System suspended")
|
||||
cmd_type = "resume"
|
||||
else:
|
||||
print("System Off")
|
||||
cmd_type = "start"
|
||||
if myObj["command"] == "suspend":
|
||||
cmd_type = "shutdown"
|
||||
|
||||
|
||||
cmnd = "/share/ZFS530_DATA/.qpkg/QKVM/usr/bin/virsh " + cmd_type + " " + str(myObj["target"])
|
||||
subprocess.Popen(cmnd.split())
|
||||
print(cmnd)
|
||||
if myObj["command"] == "start":
|
||||
try:
|
||||
print("sending")
|
||||
client.publish("sectorq/systems/nas/" + str(myObj["target"]), payload=1, qos=0, retain=False)
|
||||
except:
|
||||
print("failed to execute!")
|
||||
client.publish("sectorq/systems/nas/" + str(myObj["target"]), payload="failed", qos=0, retain=False)
|
||||
else:
|
||||
try:
|
||||
print("sending")
|
||||
client.publish("sectorq/systems/nas/" + str(myObj["target"]), payload=0, qos=0, retain=False)
|
||||
except:
|
||||
print("failed to execute!")
|
||||
client.publish("sectorq/systems/nas/" + str(myObj["target"]), payload="failed", qos=0, retain=False)
|
||||
|
||||
|
||||
if myObj["cmd"] == "distrib":
|
||||
print("distributin313g")
|
||||
# os.startfile(sys.argv[0])
|
||||
#sys.exit()
|
||||
subprocess.Popen(['/bin/systemctl', 'restart', 'mqtt'])
|
||||
|
||||
if myObj["cmd"] == "uci":
|
||||
print("uci1")
|
||||
print("Executing " + myObj["cmd_line"])
|
||||
writeLog("Executing " + myObj["cmd_line"])
|
||||
|
||||
if myObj["cmd_line"] == "wireless1":
|
||||
cmnd = "/root/router_cmd.sh -t wireless -v 1 -m set"
|
||||
try:
|
||||
subprocess.Popen(cmnd.split())
|
||||
print("sending")
|
||||
stats["macfilter"] = "allow"
|
||||
client.publish("sectorq/systems/router/stats", payload=json.dumps(stats), qos=0, retain=False)
|
||||
writeLog("Payload : " + json.dumps(stats))
|
||||
except:
|
||||
print("failed to execute!")
|
||||
client.publish("sectorq/systems/router/stats", payload="failed", qos=0, retain=False)
|
||||
|
||||
elif myObj["cmd_line"] == "wireless0":
|
||||
cmnd = "/root/router_cmd.sh -t wireless -v 0 -m set"
|
||||
try:
|
||||
subprocess.Popen(cmnd.split())
|
||||
print("sending")
|
||||
stats["macfilter"] = "off"
|
||||
client.publish("sectorq/systems/router/stats", payload=json.dumps(stats), qos=0, retain=False)
|
||||
writeLog("Payload : " + json.dumps(stats))
|
||||
except:
|
||||
print("failed to execute!")
|
||||
client.publish("sectorq/systems/router/stats", payload="failed", qos=0, retain=False)
|
||||
elif myObj["cmd_line"] == "fw0":
|
||||
cmnd = "/root/router_cmd.sh -t firewall -n TOSHIBA-WIFI -p enabled -v 0 -m set"
|
||||
try:
|
||||
subprocess.Popen(cmnd.split())
|
||||
print("sending")
|
||||
stats["fw"] = 0
|
||||
client.publish("sectorq/systems/router/stats", payload=json.dumps(stats), qos=0, retain=False)
|
||||
writeLog("Payload : " + json.dumps(stats))
|
||||
except:
|
||||
print("failed to execute!")
|
||||
client.publish("sectorq/systems/router/stats", payload="failed", qos=0, retain=False)
|
||||
elif myObj["cmd_line"] == "fw1":
|
||||
cmnd = "/root/router_cmd.sh -t firewall -n TOSHIBA-WIFI -p enabled -v 1 -m set"
|
||||
try:
|
||||
#subprocess.Popen(myObj["cmd_line"].split(), shell=True)
|
||||
subprocess.Popen(cmnd.split())
|
||||
# ctypes.windll.user32.MessageBoxW(0, myObj["cmd_line"], "Executed", 64)
|
||||
print("sending")
|
||||
stats["fw"] = 1
|
||||
client.publish("sectorq/systems/router/stats", payload=json.dumps(stats), qos=0, retain=False)
|
||||
writeLog("Payload : " + json.dumps(stats))
|
||||
except:
|
||||
print("failed to execute!")
|
||||
client.publish("sectorq/systems/router/stats", payload="failed", qos=0, retain=False)
|
||||
elif myObj["cmd_line"] == "serv_dest":
|
||||
writeLog("Payload111111 : " + myObj["target"].lower())
|
||||
|
||||
if myObj["target"].lower() == "192.168.77.246":
|
||||
dest_ip = "192.168.77.246"
|
||||
elif myObj["target"].lower() == "192.168.77.106":
|
||||
dest_ip = "192.168.77.106"
|
||||
|
||||
RULES = ["EMAIL993", "EMAIL995", "EMAIL143", "EMAIL25", "EMAIL993", "EMAIL465", "HTTPS", "HTTP"]
|
||||
for i in RULES:
|
||||
cmnd = "uci set firewall.{}.dest_ip={}".format(i,dest_ip)
|
||||
writeLog(cmnd)
|
||||
subprocess.Popen(cmnd.split())
|
||||
|
||||
#cmnd = "uci set dhcp.@dnsmasq[0].address=/mqtt_broker/" + dest_ip
|
||||
#writeLog(cmnd)
|
||||
#subprocess.Popen(cmnd.split())
|
||||
time.sleep(1)
|
||||
cmnd = "uci commit"
|
||||
|
||||
subprocess.Popen(cmnd.split())
|
||||
|
||||
writeLog("Starting " + myObj["target"].lower())
|
||||
if myObj["target"].lower() == "192.168.77.246":
|
||||
dest_ip = "192.168.77.246"
|
||||
|
||||
|
||||
cmnd = "ssh root@192.168.77.246 'docker start mailu_resolver_1 mailu_redis_1 mailu_front_1 mailu_antispam_1 mailu_imap_1 mailu_admin_1 mailu_smtp_1 mailu_webmail_1 watchtower_watchtower_1 nginx-proxy-manager_db_1 nginx-proxy-manager_app_1 HomeAssistant webhub_client_1 dockermon_docker_mon_1 mosquitto_mosquitto_1 node-red_node-red_1 nextcloud_db_1 nextcloud_app_1'"
|
||||
status, output = subprocess.getstatusoutput(cmnd)
|
||||
elif myObj["target"].lower() == "192.168.77.106":
|
||||
dest_ip = "192.168.77.106"
|
||||
cmnd = "ssh root@192.168.77.246 'docker stop mailu_resolver_1 mailu_redis_1 mailu_front_1 mailu_antispam_1 mailu_imap_1 mailu_admin_1 mailu_smtp_1 mailu_webmail_1 watchtower_watchtower_1 nginx-proxy-manager_db_1 nginx-proxy-manager_app_1 HomeAssistant webhub_client_1 dockermon_docker_mon_1 mosquitto_mosquitto_1 node-red_node-red_1 nextcloud_db_1 nextcloud_app_1'"
|
||||
status, output = subprocess.getstatusoutput(cmnd)
|
||||
time.sleep(1)
|
||||
cmnd = "/etc/init.d/firewall restart"
|
||||
subprocess.Popen(cmnd.split())
|
||||
#cmnd = "/etc/init.d/dnsmasq restart"
|
||||
#subprocess.Popen(cmnd.split())
|
||||
writeLog("reconfigure iot")
|
||||
MQTT_BROKER = dest_ip
|
||||
MQTT_USER = "jaydee"
|
||||
MQTT_PASS = "jaydee1"
|
||||
|
||||
cmnd = "nmap -sP 192.168.77.*|grep \"Nmap scan report\"|egrep -o \"[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\""
|
||||
#print(cmnd)
|
||||
status, output = subprocess.getstatusoutput(cmnd)
|
||||
|
||||
# print(output)
|
||||
|
||||
ips = output.splitlines()
|
||||
tasm_data = {}
|
||||
for sys_ip in ips:
|
||||
# print("Thsis is ip : " + sys_ip)
|
||||
cmnd = "nmap " + sys_ip + " -p80|grep \"80/tcp open http\""
|
||||
status, output = subprocess.getstatusoutput(cmnd)
|
||||
# print("status of 80 : " + str(status))
|
||||
if status == 0:
|
||||
try:
|
||||
# url = "http://" + sys_ip + "/cm?user=admin&password=l4c1j4yd33Du5l0&cmnd=STATUS+5"
|
||||
|
||||
url = "http://" + sys_ip + "/cm?cmnd=Backlog%20MqttHost%20" + MQTT_BROKER + "%3BMqttUser%20" + MQTT_USER + "%3BMqttPassword%20" + MQTT_PASS
|
||||
print(url)
|
||||
requests.get(url)
|
||||
|
||||
except:
|
||||
#print(sys_ip + " : Not a tasmota!")
|
||||
pass
|
||||
else:
|
||||
#print(sys_ip + " : Not a listening")
|
||||
pass
|
||||
|
||||
|
||||
|
||||
time.sleep(1)
|
||||
cmnd = "sed -i 's/^MQTT_HOST = .*/MQTT_HOST = \"" + dest_ip + "\"/' /root/mqtt_srv.py"
|
||||
writeLog(cmnd)
|
||||
status, output = subprocess.getstatusoutput(cmnd)
|
||||
#for i in ;do uci set firewall.${i}.dest_ip=192.168.77.246;done;uci set firewall.HTTPS.dest_port='443';uci set firewall.HTTP.dest_port='80' ;uci commit;/etc/init.d/firewall restart
|
||||
else:
|
||||
pass
|
||||
#cmnd = "/root/router_cmd.sh -t wireless -v 0"
|
||||
|
||||
|
||||
print("Executed " + cmnd)
|
||||
writeLog("Executed " + cmnd)
|
||||
|
||||
|
||||
if myObj["cmd"] == "banip":
|
||||
if myObj["status"] == "ban":
|
||||
cmnd = "echo " + str(myObj["target"]) + " >> /etc/banip/banip.blacklist; /etc/init.d/banip refresh"
|
||||
elif myObj["status"] == "enable":
|
||||
cmnd = "/etc/init.d/banip resume"
|
||||
stats["banip"] = "enabled"
|
||||
elif myObj["status"] == "disable":
|
||||
cmnd = "/etc/init.d/banip suspend"
|
||||
stats["banip"] = "paused"
|
||||
writeLog(cmnd)
|
||||
status, output = subprocess.getstatusoutput(cmnd)
|
||||
|
||||
client.publish("sectorq/systems/router/stats", payload=json.dumps(stats), qos=0, retain=True)
|
||||
|
||||
if myObj["cmd"] == "vnc":
|
||||
print(myObj["target"])
|
||||
writeLog(myObj["target"])
|
||||
|
||||
# os.startfile(sys.argv[0])
|
||||
#sys.exit()
|
||||
myCmd = 'c:\\Program Files\\RealVNC\\VNC Viewer\\vncviewer.exe C:\\Users\\jaydee\\' + myObj["target"].upper() + '.vnc'
|
||||
print(myCmd)
|
||||
writeLog(myCmd)
|
||||
subprocess.Popen(myCmd.split())
|
||||
if myObj["cmd"] == "getstats":
|
||||
print("lalaa1")
|
||||
try:
|
||||
client.publish("sectorq/monitor/" + host.lower(), payload="{\"mb_temp\":" + get_user_env('mb_temp') + ",\"mem_usage\":" + get_user_env('mem_usage') + ",\"cpu_temp\":" + get_user_env('cpu_temp') + ",\"cpu_usage\":" + get_user_env('cpu_usage') + ",\"gpu_temp\":" + get_user_env('gpu_temp') + ",\"gpu_usage\":" + get_user_env('gpu_usage') + "}", qos=0, retain=False)
|
||||
print("ok")
|
||||
except:
|
||||
print("failed")
|
||||
client.publish("sectorq/monitor/" + host.lower(), payload="{\"mb_temp\":0,\"mem_usage\":0,\"cpu_temp\":0,\"cpu_usage\":0,\"gpu_temp\":0,\"gpu_usage\":0}", qos=0, retain=False)
|
||||
|
||||
print("lalaa2")
|
||||
|
||||
if myObj["cmd"] == "display":
|
||||
if curos == "Windows1":
|
||||
# os.startfile(sys.argv[0])
|
||||
#sys.exit()
|
||||
#print("reconfigure")
|
||||
myCmd = 'MonitorSwitcher.exe -load:' + myObj["target"] + '.xml'
|
||||
writeLog(myCmd)
|
||||
#writeLog(os.path.realpath(__file__))
|
||||
print("lalaa2")
|
||||
#subprocess.Popen(r'"{}"'.format(myCmd), shell=True)
|
||||
print("lalaa3")
|
||||
subprocess.Popen(myCmd.split(), shell=True,cwd=r'c:\Progra~1\jaydee')
|
||||
else:
|
||||
'''
|
||||
myCmd = ""
|
||||
if myObj["target"] == "mid":
|
||||
myCmd = "xrandr --output HDMI-2 --primary --auto --mode 1920x1080 --output DVI-I-2-1 --off --output HDMI-1 --off --output eDP-1 --off"
|
||||
elif myObj["target"] == "all":
|
||||
myCmd = "xrandr --output HDMI-2 --primary --auto --mode 1920x1080 --output DVI-I-2-1 --auto --above HDMI-2 --mode 1920x1080 --output HDMI-1 --auto --left-of HDMI-2 --mode 1920x1080 --output eDP-1 --auto --right-of HDMI-2 --mode 1920x1080"
|
||||
elif myObj["target"] == "midleft":
|
||||
myCmd = "xrandr --output HDMI-2 --primary --auto --mode 1920x1080 --output DVI-I-2-1 --off --output HDMI-1 --auto --left-of HDMI-2 --mode 1920x1080 --output eDP-1 --off"
|
||||
elif myObj["target"] == "midtop":
|
||||
myCmd = "xrandr --output HDMI-2 --primary --auto --mode 1920x1080 --output DVI-I-2-1 --auto --above HDMI-2 --mode 1920x1080 --output HDMI-1 --off --output eDP-1 --off"
|
||||
elif myObj["target"] == "midleftbuild":
|
||||
myCmd = "xrandr --output HDMI-2 --primary --auto --mode 1920x1080 --output DVI-I-2-1 --off --output HDMI-1 --auto --left-of HDMI-2 --mode 1920x1080 --output eDP-1 --auto --right-of HDMI-2 --mode 1920x1080"
|
||||
elif myObj["target"] == "midbuild":
|
||||
myCmd = "xrandr --output HDMI-2 --primary --auto --mode 1920x1080 --output DVI-I-2-1 --off --output HDMI-1 --off --output eDP-1 --auto --right-of HDMI-2 --mode 1920x1080"
|
||||
elif myObj["target"] == "midlefttop":
|
||||
myCmd = "xrandr --output HDMI-2 --primary --auto --mode 1920x1080 --output DVI-I-2-1 --auto --above HDMI-2 --mode 1920x1080 --output HDMI-1 --auto --left-of HDMI-2 --mode 1920x1080 --output eDP-1 --off"
|
||||
else:
|
||||
pass
|
||||
|
||||
if myCmd != "":
|
||||
print(myCmd)
|
||||
subprocess.Popen(myCmd.split())
|
||||
'''
|
||||
myCmd = ""
|
||||
writeLog(myObj["target"])
|
||||
if curos == "Windows":
|
||||
if myObj["target"] == "mid":
|
||||
myCmd = "DisplayFusionCommand.exe -monitorloadprofile mid"
|
||||
elif myObj["target"] == "all":
|
||||
myCmd = "DisplayFusionCommand.exe -monitorloadprofile all"
|
||||
elif myObj["target"] == "midleft":
|
||||
myCmd = "DisplayFusionCommand.exe -monitorloadprofile midleft"
|
||||
elif myObj["target"] == "midtop":
|
||||
myCmd = "DisplayFusionCommand.exe -monitorloadprofile midtop"
|
||||
elif myObj["target"] == "midleftbuild":
|
||||
myCmd = "DisplayFusionCommand.exe -monitorloadprofile midleftbuild"
|
||||
elif myObj["target"] == "midbuild":
|
||||
myCmd = "DisplayFusionCommand.exe -monitorloadprofile midbuild"
|
||||
elif myObj["target"] == "midlefttop":
|
||||
myCmd = "DisplayFusionCommand.exe -monitorloadprofile midlefttop"
|
||||
elif myObj["target"] == "build":
|
||||
myCmd = "DisplayFusionCommand.exe -monitorloadprofile build"
|
||||
elif myObj["target"] == "midtopbuild":
|
||||
myCmd = "DisplayFusionCommand.exe -monitorloadprofile midtopbuild"
|
||||
else:
|
||||
pass
|
||||
else:
|
||||
if myObj["target"] == "mid":
|
||||
myCmd = "xrandr --output HDMI-1-2 --primary --auto --mode 1920x1080 --output DVI-I-2-1 --off --output HDMI-1-1 --off --output eDP-1-1 --off"
|
||||
elif myObj["target"] == "all":
|
||||
myCmd = "xrandr --output HDMI-1-2 --primary --auto --mode 1920x1080 --output DVI-I-2-1 --auto --above HDMI-1-2 --mode 1920x1080 --output HDMI-1-1 --auto --left-of HDMI-1-2 --mode 1920x1080 --output eDP-1-1 --auto --right-of HDMI-1-2 --mode 1920x1080"
|
||||
elif myObj["target"] == "midleft":
|
||||
myCmd = "xrandr --output HDMI-1-2 --primary --auto --mode 1920x1080 --output DVI-I-2-1 --off --output HDMI-1-1 --auto --left-of HDMI-1-2 --mode 1920x1080 --output eDP-1-1 --off"
|
||||
elif myObj["target"] == "midtop":
|
||||
myCmd = "xrandr --output HDMI-1-2 --primary --auto --mode 1920x1080 --output DVI-I-2-1 --auto --above HDMI-1-2 --mode 1920x1080 --output HDMI-1-1 --off --output eDP-1-1 --off"
|
||||
elif myObj["target"] == "midleftbuild":
|
||||
myCmd = "xrandr --output HDMI-1-2 --primary --auto --mode 1920x1080 --output DVI-I-2-1 --off --output HDMI-1-1 --auto --left-of HDMI-1-2 --mode 1920x1080 --output eDP-1-1 --auto --right-of HDMI-1-2 --mode 1920x1080"
|
||||
elif myObj["target"] == "midbuild":
|
||||
myCmd = "xrandr --output HDMI-1-2 --primary --auto --mode 1920x1080 --output DVI-I-2-1 --off --output HDMI-1-1 --off --output eDP-1-1 --auto --right-of HDMI-1-2 --mode 1920x1080"
|
||||
elif myObj["target"] == "midlefttop":
|
||||
myCmd = "xrandr --output HDMI-1-2 --primary --auto --mode 1920x1080 --output DVI-I-2-1 --auto --above HDMI-1-2 --mode 1920x1080 --output HDMI-1-1 --auto --left-of HDMI-1-2 --mode 1920x1080 --output eDP-1-1 --off"
|
||||
elif myObj["target"] == "build":
|
||||
myCmd = "xrandr --output HDMI-1-2 --off --output DVI-I-2-1 --off --output HDMI-1-1 --off --output eDP-1-1 --auto --mode 1920x1080"
|
||||
else:
|
||||
pass
|
||||
|
||||
writeLog(myCmd)
|
||||
if myCmd != "":
|
||||
print(myCmd)
|
||||
subprocess.Popen(myCmd.split())
|
||||
|
||||
if myObj["cmd"] == "display2":
|
||||
# os.startfile(sys.argv[0])
|
||||
#sys.exit()
|
||||
#print("reconfigure")
|
||||
subprocess.Popen(['MultiMonitorTool.exe', '/SaveConfig', 'c:\\Program Files\\jaydee\\switcher.cfg'])
|
||||
myCmd = "powershell switcher.ps1 " + str(myObj["target"]) + " " + str(myObj["status"])
|
||||
writeLog(myCmd)
|
||||
subprocess.Popen(myCmd.split())
|
||||
time.sleep(1)
|
||||
subprocess.Popen(['MultiMonitorTool.exe', '/LoadConfig', 'c:\\Program Files\\jaydee\\switcher.cfg'])
|
||||
client.publish("sectorq/feedback", payload='{"action":"resp", "source":"ASUS", "dev":{"display' + str(myObj["target"]) + '":'+ str(myObj["status"]) +'} }' , qos=0, retain=False)
|
||||
if myObj["cmd"] == "displ":
|
||||
print("Display")
|
||||
# os.startfile(sys.argv[0])
|
||||
#sys.exit()
|
||||
subprocess.Popen(['/usr/bin/xrandr', '--output', 'HDMI-1-1', '--off'])
|
||||
|
||||
if myObj["cmd"] == "xrandr":
|
||||
if curos == "Windows":
|
||||
subprocess.Popen(['MultiMonitorTool.exe', '/LoadConfig', 'c:\\Program Files\\jaydee\\all_on.cfg'])
|
||||
else:
|
||||
print("Display")
|
||||
# os.startfile(sys.argv[0])
|
||||
#sys.exit()
|
||||
os.system("export DISPLAY=:0")
|
||||
subprocess.Popen(['/usr/bin/xrandr'])
|
||||
|
||||
if myObj["cmd"] == "suspend":
|
||||
print("suspending")
|
||||
if curos == "Windows":
|
||||
os.system("rundll32.exe powrprof.dll,SetSuspendState 0,1,0")
|
||||
#cmnd = "psshutdown -d -t 1"
|
||||
writeLog(cmnd)
|
||||
#status, output = subprocess.getstatusoutput(cmnd)
|
||||
#subprocess.Popen(["psshutdown", "-d", "-t", "1"])
|
||||
#writeLog(output)
|
||||
else:
|
||||
if host == "nas" or host == "octopi":
|
||||
subprocess.Popen(["/sbin/poweroff"])
|
||||
else:
|
||||
#subprocess.Popen(["/bin/systemctl", "suspend", "-i"])
|
||||
subprocess.Popen(["sudo", "pm-suspend"])
|
||||
if myObj["cmd"] == "stats":
|
||||
grep = subprocess.Popen(['grep', 'cpu', '/proc/stat'],
|
||||
stdout=subprocess.PIPE,
|
||||
)
|
||||
|
||||
awk = subprocess.Popen(['awk', '{print ($13-$2+$15-$4)*100/($13-$2+$15-$4+$16-$5)}'],
|
||||
stdin=grep.stdout,
|
||||
stdout=subprocess.PIPE,
|
||||
)
|
||||
|
||||
# cat <(grep 'cpu ' /proc/stat) <(sleep 1 && grep 'cpu ' /proc/stat) | awk -v RS="" '{print ($13-$2+$15-$4)*100/($13-$2+$15-$4+$16-$5)}'
|
||||
|
||||
end_of_pipe = awk.stdout
|
||||
|
||||
for line in end_of_pipe:
|
||||
# print(line.strip())
|
||||
# usage = re.sub(r"^b\'|\'$", "", (line.strip()))
|
||||
cpu = round(float(line.strip().decode("utf-8")))
|
||||
free = subprocess.Popen(['free'],
|
||||
stdout=subprocess.PIPE,
|
||||
)
|
||||
|
||||
grep = subprocess.Popen(['grep', 'Mem'],
|
||||
stdout=subprocess.PIPE,
|
||||
stdin=free.stdout,
|
||||
)
|
||||
|
||||
awk = subprocess.Popen(['awk', '{print $3/$2 * 100.0}'],
|
||||
stdin=grep.stdout,
|
||||
stdout=subprocess.PIPE,
|
||||
)
|
||||
|
||||
end_of_pipe = awk.stdout
|
||||
|
||||
for line in end_of_pipe:
|
||||
# print(line.strip())
|
||||
# mem = re.sub(r"^b\'|\'$", "", (line.strip()))
|
||||
mem = round(float(line.strip().decode("utf-8")))
|
||||
# mem = re.sub(r"^b\'|\'$", "", mem)
|
||||
# cpu = re.sub(r"^b\'|\'$", "", cpu)
|
||||
# print(mem)
|
||||
jn = {"cpu": cpu, "mem": mem}
|
||||
jn = json.dumps(jn)
|
||||
client.publish("sectorq/status/" + host, payload=jn, qos=0, retain=False)
|
||||
except:
|
||||
print("not a json!")
|
||||
|
||||
client = mqtt.Client()
|
||||
payload = "off"
|
||||
client.username_pw_set("jaydee", password="jaydee1")
|
||||
client.will_set("sectorq/systems/" + host.lower() + "/stat", payload=payload, qos=0, retain=False)
|
||||
client.on_connect = on_connect
|
||||
client.on_message = on_message
|
||||
writeLog(MQTT_HOST)
|
||||
client.connect(MQTT_HOST, MQTT_PORT, 5)
|
||||
|
||||
# client.publish("sectorq/status", payload="{'action':'connect', 'system':'" + host + "', 'ip': '" + IP + "', 'mac':'" + mac + "', 'ver':'?'}", qos=0, retain=False)
|
||||
|
||||
|
||||
# Blocking call that processes network traffic, dispatches callbacks and
|
||||
# handles reconnecting.
|
||||
# Other loop*() functions are available that give a threaded interface and a
|
||||
# manual interface.
|
||||
|
||||
if curos == "Windows":
|
||||
#client.loop_forever()
|
||||
client.loop_start()
|
||||
NEXT_CHECK = 0
|
||||
while True:
|
||||
print(VERSION)
|
||||
time.sleep(5)
|
||||
try:
|
||||
mtime = os.path.getmtime(sys.argv[0])
|
||||
except OSError:
|
||||
mtime = 0
|
||||
print(mtime)
|
||||
if NEXT_CHECK < int(time.time()):
|
||||
NEXT_CHECK = int(time.time()) + 10
|
||||
writeLog("Blalala : Next : " + str(NEXT_CHECK))
|
||||
if curos == "Windows":
|
||||
data = python_aida64.getData()
|
||||
#print(json.dumps(data))
|
||||
stats = {}
|
||||
for i in data:
|
||||
for j in data[i]:
|
||||
stats[j["id"]] = j["value"]
|
||||
|
||||
|
||||
jn = json.dumps(stats)
|
||||
client.publish("home-assistant/" + host + "/hwstats", payload=jn, qos=0, retain=False)
|
||||
#print(json.dumps(stats))
|
||||
#writeLog(json.dumps(stats))
|
||||
else:
|
||||
|
||||
|
||||
client.loop_start()
|
||||
|
||||
NEXT_CHECK = 0
|
||||
while True:
|
||||
print(VERSION)
|
||||
time.sleep(5)
|
||||
try:
|
||||
mtime = os.path.getmtime(sys.argv[0])
|
||||
except OSError:
|
||||
mtime = 0
|
||||
print(mtime)
|
||||
if NEXT_CHECK < int(time.time()):
|
||||
NEXT_CHECK = int(time.time()) + 60
|
||||
writeLog("Blalala : Next : " + str(NEXT_CHECK))
|
||||
|
||||
|
||||
if host.lower() == "router":
|
||||
cmnd = "/etc/init.d/banip status|grep \"+ status\"|awk '{ print $4 }'"
|
||||
status, output = subprocess.getstatusoutput(cmnd)
|
||||
writeLog("BanIP Status : " + str(status))
|
||||
stats["banip"] = output
|
||||
|
||||
cmnd = "ncat -z 192.168.77.106 25"
|
||||
status, output = subprocess.getstatusoutput(cmnd)
|
||||
if status == 0:
|
||||
stats["mail_nas"] = "available"
|
||||
else:
|
||||
stats["mail_nas"] = "unavailable"
|
||||
cmnd = "ncat -z 192.168.77.246 25"
|
||||
status, output = subprocess.getstatusoutput(cmnd)
|
||||
if status == 0:
|
||||
stats["mail_rasp"] = "available"
|
||||
else:
|
||||
stats["mail_rasp"] = "unavailable"
|
||||
cmnd = "/root/router_cmd.sh -t serv_dest -m get"
|
||||
status, output = subprocess.getstatusoutput(cmnd)
|
||||
stats["serv_dest"] = output
|
||||
#out = subprocess.Popen(cmnd.split())
|
||||
status, output = subprocess.getstatusoutput(cmnd)
|
||||
print("Getting fw info")
|
||||
cmnd = "/root/router_cmd.sh -t firewall -n TOSHIBA-WIFI -m get"
|
||||
#out = subprocess.Popen(cmnd.split())
|
||||
status, output = subprocess.getstatusoutput(cmnd)
|
||||
print(output)
|
||||
stats["fw"] = output
|
||||
#client.publish("sectorq/systems/router/fw", payload=str(output), qos=0, retain=True)
|
||||
print("Getting wifi info")
|
||||
cmnd = "/root/router_cmd.sh -t wireless -m get"
|
||||
#out = subprocess.Popen(cmnd.split())
|
||||
status, output = subprocess.getstatusoutput(cmnd)
|
||||
print(output)
|
||||
if output != 'allow':
|
||||
output = 'off'
|
||||
stats["macfilter"] = output
|
||||
# if output == "allow":\
|
||||
writeLog("Payload : " + str(json.dumps(stats)))
|
||||
client.publish("sectorq/systems/router/stats", payload=json.dumps(stats), qos=0, retain=True)
|
||||
#else:
|
||||
# client.publish("sectorq/systems/router/macfilter", payload=0, qos=0, retain=True)
|
||||
if host.lower() == "nas":
|
||||
print("Getting VM info")
|
||||
|
||||
cmnd = "/share/ZFS530_DATA/.qpkg/QKVM/usr/bin/virsh list --all"
|
||||
writeLog(cmnd)
|
||||
status, output = subprocess.getstatusoutput(cmnd)
|
||||
l = 1
|
||||
lines = output.splitlines()
|
||||
VMS = {}
|
||||
for i in lines:
|
||||
l = l + 1
|
||||
if l < 4:
|
||||
continue
|
||||
line = re.split(r" {2,}", i)
|
||||
print(str(line[0].strip()) + " " + str(line[1].strip()) + " " + str(line[2].strip()))
|
||||
VMS[str(line[1].strip())] = str(line[2].strip())
|
||||
|
||||
|
||||
|
||||
for m in VMS:
|
||||
|
||||
cmnd = "/share/ZFS530_DATA/.qpkg/QKVM/usr/bin/virsh domstate " + m
|
||||
#out = subprocess.Popen(cmnd.split())
|
||||
writeLog(cmnd)
|
||||
status, output = subprocess.getstatusoutput(cmnd)
|
||||
writeLog(output)
|
||||
if output.strip() == "running":
|
||||
client.publish("sectorq/systems/nas/" + m, payload=1, qos=0, retain=True)
|
||||
else:
|
||||
client.publish("sectorq/systems/nas/" + m, payload=0, qos=0, retain=True)
|
||||
|
||||
|
||||
if FILE_TIMESTAMP != mtime:
|
||||
writeLog("Script updated ! restarting...")
|
||||
#os.execv(sys.executable, ['python'] + sys.argv)
|
||||
#os.system("/share/ZFS530_DATA/.qpkg/QPython39/bin/python3 mqtt_srv.py")
|
||||
|
||||
if host.lower() == "nas":
|
||||
sys.stdout.flush()
|
||||
os.execv("/share/ZFS530_DATA/.qpkg/QPython39/bin/python3", sys.argv)
|
||||
if host.lower() == "router":
|
||||
#sys.stdout.flush()
|
||||
sys.exit()
|
||||
#os.execv("/usr/bin/python3", sys.argv)
|
||||
1185
mqtt_srv.py
Normal file
1185
mqtt_srv.py
Normal file
File diff suppressed because it is too large
Load Diff
1123
mqtt_srv.pyw
Normal file
1123
mqtt_srv.pyw
Normal file
File diff suppressed because it is too large
Load Diff
44
mqtt_srv.spec
Normal file
44
mqtt_srv.spec
Normal file
@@ -0,0 +1,44 @@
|
||||
# -*- mode: python ; coding: utf-8 -*-
|
||||
|
||||
|
||||
block_cipher = None
|
||||
|
||||
|
||||
a = Analysis(
|
||||
['mqtt_srv.pyw'],
|
||||
pathex=[],
|
||||
binaries=[],
|
||||
datas=[],
|
||||
hiddenimports=[],
|
||||
hookspath=[],
|
||||
hooksconfig={},
|
||||
runtime_hooks=[],
|
||||
excludes=[],
|
||||
win_no_prefer_redirects=False,
|
||||
win_private_assemblies=False,
|
||||
cipher=block_cipher,
|
||||
noarchive=False,
|
||||
)
|
||||
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
|
||||
|
||||
exe = EXE(
|
||||
pyz,
|
||||
a.scripts,
|
||||
a.binaries,
|
||||
a.zipfiles,
|
||||
a.datas,
|
||||
[],
|
||||
name='mqtt_srv',
|
||||
debug=False,
|
||||
bootloader_ignore_signals=False,
|
||||
strip=False,
|
||||
upx=True,
|
||||
upx_exclude=[],
|
||||
runtime_tmpdir=None,
|
||||
console=False,
|
||||
disable_windowed_traceback=False,
|
||||
argv_emulation=False,
|
||||
target_arch=None,
|
||||
codesign_identity=None,
|
||||
entitlements_file=None,
|
||||
)
|
||||
43
mqtt_srv.version
Normal file
43
mqtt_srv.version
Normal file
@@ -0,0 +1,43 @@
|
||||
# UTF-8
|
||||
#
|
||||
# For more details about fixed file info 'ffi' see:
|
||||
# http://msdn.microsoft.com/en-us/library/ms646997.aspx
|
||||
VSVersionInfo(
|
||||
ffi=FixedFileInfo(
|
||||
# filevers and prodvers should be always a tuple with four items: (1, 2, 3, 4)
|
||||
# Set not needed items to zero 0.
|
||||
filevers=(1, 0, 0, 0),
|
||||
prodvers=(1, 0, 0, 0),
|
||||
# Contains a bitmask that specifies the valid bits 'flags'r
|
||||
mask=0x3f,
|
||||
# Contains a bitmask that specifies the Boolean attributes of the file.
|
||||
flags=0x0,
|
||||
# The operating system for which this file was designed.
|
||||
# 0x4 - NT and there is no need to change it.
|
||||
OS=0x4,
|
||||
# The general type of file.
|
||||
# 0x1 - the file is an application.
|
||||
fileType=0x1,
|
||||
# The function of the file.
|
||||
# 0x0 - the function is not defined for this fileType
|
||||
subtype=0x0,
|
||||
# Creation date and time stamp.
|
||||
date=(0, 0)
|
||||
),
|
||||
kids=[
|
||||
StringFileInfo(
|
||||
[
|
||||
StringTable(
|
||||
u'040904B0',
|
||||
[StringStruct(u'CompanyName', u'Jaydee'),
|
||||
StringStruct(u'FileDescription', u'Jaydee'),
|
||||
StringStruct(u'FileVersion', u'1.0.0'),
|
||||
StringStruct(u'InternalName', u'SVN'),
|
||||
StringStruct(u'LegalCopyright', u'Copyright (c) Jaydee'),
|
||||
StringStruct(u'OriginalFilename', u'mqtt_srv.exe'),
|
||||
StringStruct(u'ProductName', u'Subversion'),
|
||||
StringStruct(u'ProductVersion', u'1.0.0 (r0)')])
|
||||
]),
|
||||
VarFileInfo([VarStruct(u'Translation', [1033, 1200])])
|
||||
]
|
||||
)
|
||||
73
omv_backups copy.py
Normal file
73
omv_backups copy.py
Normal file
@@ -0,0 +1,73 @@
|
||||
import subprocess
|
||||
import time
|
||||
import datetime
|
||||
|
||||
backups = {
|
||||
"__GITHUB":"admin@192.168.77.106:/share/Data/__GITHUB",
|
||||
"Photo":"admin@192.168.77.106:/share/Photo/Years"
|
||||
}
|
||||
|
||||
for b in backups:
|
||||
SOURCE_DIR=backups[b]
|
||||
now = datetime.datetime.now()
|
||||
BACKUP_DIR="/srv/dev-disk-by-uuid-02fbe97a-cd9a-4511-8bd5-21f8516353ee/{}".format(b)
|
||||
DATETIME = now.strftime("%Y-%m-%d_%H:%M:%S")
|
||||
BACKUP_PATH="{}/{}".format(BACKUP_DIR, DATETIME)
|
||||
LATEST_LINK="{}/latest".format(BACKUP_DIR)
|
||||
|
||||
|
||||
cmnd = "mkdir -p {}".format(BACKUP_DIR)
|
||||
status, output = subprocess.getstatusoutput(cmnd)
|
||||
print(cmnd)
|
||||
|
||||
#cmnd = "rsync -av --delete {}/ --link-dest {} --exclude=\".cache\" {}".format(SOURCE_DIR, LATEST_LINK, BACKUP_PATH)
|
||||
cmnd = ["rsync", '--info=progress2', "-avz", "--delete", SOURCE_DIR, "--link-dest", LATEST_LINK, "--exclude=\".cache\"", BACKUP_PATH]
|
||||
print(cmnd)
|
||||
|
||||
#run_list = ['rsync', '--info=progress2', '-a', 'src/', 'dest/']
|
||||
# with subprocess.Popen(
|
||||
# cmnd, stdout=subprocess.PIPE, bufsize=1, text=True
|
||||
# ) as process:
|
||||
# for line in iter(p.stdout.readline, b''):
|
||||
# print(line.strip())
|
||||
|
||||
|
||||
|
||||
process = subprocess.Popen(cmnd,
|
||||
stdout=subprocess.PIPE)
|
||||
|
||||
while process.poll() is None:
|
||||
line = process.stdout.readline()
|
||||
l = line.splitlines()
|
||||
i = -1
|
||||
a = len(l)
|
||||
#print(l[-1])
|
||||
time.sleep(3)
|
||||
print(len(l))
|
||||
while True:
|
||||
for line in reversed(l):
|
||||
print(len(line.split()))
|
||||
e = str(line).split()
|
||||
if len(e) > 4:
|
||||
print(e[2])
|
||||
print(line)
|
||||
break
|
||||
break
|
||||
|
||||
# print(l[-1])
|
||||
# #print(str(line))
|
||||
# time.sleep(3)
|
||||
#print(cmnd)
|
||||
#status, output = subprocess.getstatusoutput(cmnd)
|
||||
# rsync -av --delete \
|
||||
# "${SOURCE_DIR}/" \
|
||||
# --link-dest "${LATEST_LINK}" \
|
||||
# --exclude=".cache" \
|
||||
# "${BACKUP_PATH}"
|
||||
cmnd = "rm -rf {}".format(LATEST_LINK)
|
||||
print(cmnd)
|
||||
status, output = subprocess.getstatusoutput(cmnd)
|
||||
|
||||
cmnd = "ln -s {} {}".format(BACKUP_PATH, LATEST_LINK)
|
||||
print(cmnd)
|
||||
status, output = subprocess.getstatusoutput(cmnd)
|
||||
138
omv_backups.py
Normal file
138
omv_backups.py
Normal file
@@ -0,0 +1,138 @@
|
||||
import datetime
|
||||
import logging
|
||||
from paho.mqtt import client as mqtt_client
|
||||
import getopt
|
||||
import json
|
||||
import time
|
||||
import subprocess
|
||||
import sys
|
||||
import os
|
||||
pid = os.getpid()
|
||||
|
||||
|
||||
cmnd = "ps -ef|grep omv_backups.py|grep -v grep |grep -v {}|wc -l".format(pid)
|
||||
status, output = subprocess.getstatusoutput(cmnd)
|
||||
|
||||
print(output)
|
||||
if int(output) > 0:
|
||||
print("Running already!")
|
||||
sys.exit()
|
||||
broker = '192.168.77.106'
|
||||
port = 1883
|
||||
topic_sum = "sectorq/omv/backups"
|
||||
mqtt_username = 'jaydee'
|
||||
mqtt_password = 'jaydee1'
|
||||
|
||||
try:
|
||||
opts, args = getopt.getopt(sys.argv[1:], "am", ["command=", "help", "output="])
|
||||
except getopt.GetoptError as err:
|
||||
#usage()
|
||||
sys.exit(2)
|
||||
output = None
|
||||
# QJ : getopts
|
||||
_MODE = "manual"
|
||||
for o, a in opts:
|
||||
if o == "-a":
|
||||
_MODE = "auto"
|
||||
elif o in ("-m", "--manual"):
|
||||
_MODE = "manual"
|
||||
|
||||
|
||||
client = mqtt_client.Client()
|
||||
client.username_pw_set(mqtt_username, mqtt_password)
|
||||
client.connect(broker,1883,60)
|
||||
now = datetime.datetime.now()
|
||||
STARTTIME = now.strftime("%Y-%m-%d_%H:%M:%S")
|
||||
msg = {"mode":_MODE, "status":"started","bak_name":"complete","start_time":STARTTIME,"end_time":"in progress","progress":0}
|
||||
client.publish(topic_sum, json.dumps(msg));
|
||||
client.disconnect()
|
||||
|
||||
backups = {
|
||||
"github":
|
||||
{"source":"admin@192.168.77.106:/share/Data/__GITHUB",
|
||||
"exclude":"",
|
||||
"active": True
|
||||
},
|
||||
"photo": {
|
||||
"source":"admin@192.168.77.106:/share/Photo/Years",
|
||||
"exclude":"",
|
||||
"active":True
|
||||
},
|
||||
"docker_data":{
|
||||
"source":"admin@192.168.77.106:/share/docker_data/",
|
||||
"exclude":"",
|
||||
"active":True
|
||||
}
|
||||
}
|
||||
BACKUP_FS = "/srv/dev-disk-by-uuid-02fbe97a-cd9a-4511-8bd5-21f8516353ee"
|
||||
for b in backups:
|
||||
topic = "sectorq/omv/backups/{}".format(b.lower())
|
||||
if not backups[b]["active"]:
|
||||
print("Backup {} is not active!".format(b))
|
||||
client.connect(broker,1883,60)
|
||||
msg = {"status":"inactive","bak_name":b,"start_time":"inactive","end_time":"inactive","progress":0}
|
||||
|
||||
client.publish(topic, json.dumps(msg))
|
||||
client.disconnect()
|
||||
continue
|
||||
|
||||
SOURCE_DIR = backups[b]["source"]
|
||||
now = datetime.datetime.now()
|
||||
BACKUP_DIR="/srv/dev-disk-by-uuid-02fbe97a-cd9a-4511-8bd5-21f8516353ee/{}".format(b)
|
||||
DATETIME = now.strftime("%Y-%m-%d_%H:%M:%S")
|
||||
BACKUP_PATH="{}/{}".format(BACKUP_DIR, DATETIME)
|
||||
LATEST_LINK="{}/latest".format(BACKUP_DIR)
|
||||
msg = {"status":"started","bak_name":b,"start_time":DATETIME,"end_time":"in progress", "progress":0}
|
||||
client.connect(broker,1883,60)
|
||||
client.publish(topic, json.dumps(msg));
|
||||
client.disconnect()
|
||||
|
||||
cmnd = "mkdir -p {}".format(BACKUP_DIR)
|
||||
status, output = subprocess.getstatusoutput(cmnd)
|
||||
print(cmnd)
|
||||
|
||||
|
||||
#cmnd = "rsync -av --delete {}/ --link-dest {} --exclude=\".cache\" {}".format(SOURCE_DIR, LATEST_LINK, BACKUP_PATH)
|
||||
cmnd = "rsync --info=progress2 -avz --delete {} --link-dest {} --exclude=\".cache\" --exclude=\".git\" --exclude=\"var_lib_motioneye\" {}".format(SOURCE_DIR, LATEST_LINK, BACKUP_PATH)
|
||||
print(cmnd)
|
||||
status, output = subprocess.getstatusoutput(cmnd)
|
||||
cmnd = "rm -rf {}".format(LATEST_LINK)
|
||||
print(cmnd)
|
||||
status, output = subprocess.getstatusoutput(cmnd)
|
||||
|
||||
cmnd = "ln -s {} {}".format(BACKUP_PATH, LATEST_LINK)
|
||||
print(cmnd)
|
||||
status, output = subprocess.getstatusoutput(cmnd)
|
||||
|
||||
|
||||
#Remove old
|
||||
print("Removing old dirs")
|
||||
|
||||
#cmnd = "find {} -maxdepth 1 -type d -mtime +30 -exec rm -rf {{}} \;".format(BACKUP_DIR)
|
||||
cmnd = "find {} -maxdepth 1 -type d -mmin +30 -exec rm -rf {{}} \;".format(BACKUP_DIR)
|
||||
print(cmnd)
|
||||
#status, output = subprocess.getstatusoutput(cmnd)
|
||||
now = datetime.datetime.now()
|
||||
ENDTIME = now.strftime("%Y-%m-%d_%H:%M:%S")
|
||||
msg = {"status":"finished","bak_name":b,"start_time":DATETIME,"end_time":ENDTIME,"progress":0}
|
||||
client.connect(broker,1883,10)
|
||||
client.publish(topic, json.dumps(msg))
|
||||
client.disconnect()
|
||||
|
||||
print("Getting size of FS")
|
||||
cmnd = "du -h --max-depth=0 {}".format(BACKUP_FS)
|
||||
status, output = subprocess.getstatusoutput(cmnd)
|
||||
used_space = (output.split())[0]
|
||||
now = datetime.datetime.now()
|
||||
ENDJOB = now.strftime("%Y-%m-%d_%H:%M:%S")
|
||||
print("Size : {}".format(used_space))
|
||||
print("Sending finished status")
|
||||
msg = {"mode":_MODE,"status":"finished","bak_name":"complete","start_time":STARTTIME,"end_time":ENDJOB,"progress":0,"used_space":used_space}
|
||||
print(msg)
|
||||
client.connect(broker,1883,10)
|
||||
client.publish(topic_sum, json.dumps(msg))
|
||||
client.disconnect()
|
||||
|
||||
if _MODE == "auto":
|
||||
cmnd = "systemctl suspend"
|
||||
status, output = subprocess.getstatusoutput(cmnd)
|
||||
60
python_aida64/__init__.py
Normal file
60
python_aida64/__init__.py
Normal file
@@ -0,0 +1,60 @@
|
||||
import mmap
|
||||
from xml.etree import ElementTree as ET
|
||||
import sys
|
||||
|
||||
|
||||
def _readRawData(length):
|
||||
with mmap.mmap(
|
||||
-1, length, # anonymous file
|
||||
tagname='AIDA64_SensorValues',
|
||||
access=mmap.ACCESS_READ) as mm:
|
||||
return mm.read()
|
||||
|
||||
|
||||
def _decode(b):
|
||||
for encoding in (sys.getdefaultencoding(), 'utf-8', 'gbk'):
|
||||
try:
|
||||
return b.decode(encoding=encoding)
|
||||
except UnicodeDecodeError:
|
||||
continue
|
||||
return b.decode()
|
||||
|
||||
|
||||
def getXmlRawData() -> str:
|
||||
options = [100 * i for i in range(20, 100)] # ranges in [2k, 10k]
|
||||
low = 0
|
||||
high = len(options) - 1
|
||||
while low < high: # [low, high], stops at [low, low]
|
||||
mid = (low + high) // 2 # legit
|
||||
try:
|
||||
length = options[mid]
|
||||
raw = _readRawData(length)
|
||||
if raw[-1] == 0: # legit ending
|
||||
decoded = _decode(raw.rstrip(b'\x00'))
|
||||
return '<root>{}</root>'.format(decoded)
|
||||
else: # not long enough
|
||||
low = mid
|
||||
continue
|
||||
except PermissionError: # illegal length (too long)
|
||||
high = mid
|
||||
continue
|
||||
|
||||
|
||||
def getData() -> dict:
|
||||
data = {}
|
||||
tree = ET.fromstring(getXmlRawData())
|
||||
|
||||
for item in tree:
|
||||
if item.tag not in data:
|
||||
data[item.tag] = []
|
||||
data[item.tag].append({
|
||||
key: item.find(key).text
|
||||
for key in ('id', 'label', 'value')
|
||||
})
|
||||
return data
|
||||
|
||||
|
||||
__all__ = [
|
||||
'getXmlRawData',
|
||||
'getData'
|
||||
]
|
||||
BIN
python_aida64/__pycache__/__init__.cpython-310.pyc
Normal file
BIN
python_aida64/__pycache__/__init__.cpython-310.pyc
Normal file
Binary file not shown.
BIN
python_aida64/__pycache__/__init__.cpython-38.pyc
Normal file
BIN
python_aida64/__pycache__/__init__.cpython-38.pyc
Normal file
Binary file not shown.
84
rhasspy_led.py
Normal file
84
rhasspy_led.py
Normal file
@@ -0,0 +1,84 @@
|
||||
#!/usr/bin/env python
|
||||
from apa102_pi.driver import apa102
|
||||
from time import sleep
|
||||
import paho.mqtt.client as mqtt
|
||||
import RPi.GPIO as GPIO
|
||||
import json
|
||||
import os
|
||||
|
||||
rhasspyConfig = '/home/jd/.config/rhasspy/profiles/en/profile.json'
|
||||
|
||||
counter = 0
|
||||
LED = "on"
|
||||
mute = "off"
|
||||
siteId = ""
|
||||
MQTThost = ""
|
||||
|
||||
GPIO.setmode(GPIO.BCM)
|
||||
GPIO.setup(5, GPIO.OUT)
|
||||
GPIO.output(5, GPIO.HIGH)
|
||||
|
||||
|
||||
|
||||
|
||||
with open(rhasspyConfig,'r', encoding='UTF-8') as file:
|
||||
obj = json.loads(file.read())
|
||||
MQTTconfig = json.dumps(obj["mqtt"])
|
||||
MQTTconfig = MQTTconfig.replace("\"mqtt\": ","")
|
||||
MQTTconfig = json.loads(MQTTconfig)
|
||||
siteId = MQTTconfig["site_id"]
|
||||
MQTThost = MQTTconfig["host"]
|
||||
MQTThost = MQTThost.strip('"')
|
||||
if "port" in json.dumps(MQTTconfig):
|
||||
MQTTport = MQTTconfig["port"]
|
||||
MQTTport = MQTTport.strip('"')
|
||||
MQTTport = int(MQTTport)
|
||||
else:
|
||||
MQTTport = 1883
|
||||
|
||||
strip = apa102.APA102(num_led=12)
|
||||
strip.clear_strip()
|
||||
|
||||
def on_connect(client, userdata, flags, rc):
|
||||
print("Connected with result code " + str(rc))
|
||||
client.subscribe("hermes/dialogueManager/sessionEnded/#")
|
||||
client.subscribe("hermes/hotword/toggleOff/#")
|
||||
client.subscribe("hermes/asr/stopListening")
|
||||
for i in range(0,12):
|
||||
strip.set_pixel(i,0,127,0,7)
|
||||
strip.show()
|
||||
sleep(2)
|
||||
for i in range(0,12):
|
||||
strip.set_pixel(i,0,255,0,0)
|
||||
strip.show()
|
||||
def on_message(client, userdata, msg):
|
||||
jsonData = json.loads(msg.payload)
|
||||
if msg.topic == "hermes/hotword/toggleOff" and jsonData["siteId"] == siteId and LED == "on":
|
||||
for i in range(0,12):
|
||||
strip.set_pixel(i,0,127,0,7)
|
||||
strip.show()
|
||||
elif msg.topic == "hermes/dialogueManager/sessionEnded" and jsonData["siteId"] == siteId:
|
||||
for i in range(0,12):
|
||||
strip.set_pixel(i,0,255,0,0)
|
||||
strip.show()
|
||||
|
||||
elif msg.topic == "hermes/asr/stopListening":
|
||||
for i in range(0,12):
|
||||
strip.set_pixel(i,0,255,0,0)
|
||||
strip.show()
|
||||
|
||||
for i in range(0,12):
|
||||
strip.set_pixel(i,0,127,255,7)
|
||||
sleep(0.1)
|
||||
strip.show()
|
||||
|
||||
sleep(3)
|
||||
|
||||
|
||||
client = mqtt.Client()
|
||||
client.username_pw_set("jaydee", password="jaydee1")
|
||||
client.on_connect = on_connect
|
||||
client.on_message = on_message
|
||||
client.connect(MQTThost, MQTTport, 60)
|
||||
|
||||
client.loop_forever()
|
||||
172
scan_tasmotas.py
Normal file
172
scan_tasmotas.py
Normal file
@@ -0,0 +1,172 @@
|
||||
import paho.mqtt.client as mqtt
|
||||
from getmac import get_mac_address
|
||||
import platform
|
||||
import socket
|
||||
import re
|
||||
import subprocess
|
||||
import os
|
||||
import json
|
||||
import sys
|
||||
import time
|
||||
import json
|
||||
import datetime
|
||||
import ctypes
|
||||
import getopt
|
||||
import requests
|
||||
CHECK_MARK = "\033[0;32m\xE2\x9C\x94\033[0m"
|
||||
_MQTT_SETUP = _BACKUP = _APPLY = _WIFI_SETUP = False
|
||||
try:
|
||||
opts, args = getopt.getopt(sys.argv[1:], "wh:bm", ["command=", "help", "output=", "backup"])
|
||||
except getopt.GetoptError as err:
|
||||
# print help information and exit:
|
||||
print(str(err)) # will print something like "option -a not recognized"
|
||||
#usage()
|
||||
sys.exit(2)
|
||||
output = None
|
||||
# QJ : getopts
|
||||
|
||||
for o, a in opts:
|
||||
if o == "-h":
|
||||
_ACTION = True
|
||||
elif o in ("-b", "--backup"):
|
||||
_BACKUP = True
|
||||
elif o in ("-m", "--mqtt"):
|
||||
_MQTT_SETUP = True
|
||||
elif o in ("-w", "--wifi"):
|
||||
_WIFI_SETUP = True
|
||||
elif o in ("-a", "--apply"):
|
||||
_APPLY = True
|
||||
else:
|
||||
_WIZZARD = True
|
||||
|
||||
|
||||
|
||||
|
||||
def create_backup():
|
||||
cmnd = "nmap -sP 192.168.77.*|grep \"Nmap scan report\"|egrep -o \"[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\""
|
||||
print(cmnd)
|
||||
status, output = subprocess.getstatusoutput(cmnd)
|
||||
|
||||
print(output)
|
||||
ips = output.splitlines()
|
||||
tasm_data = {}
|
||||
for sys_ip in ips:
|
||||
# print("Thsis is ip : " + sys_ip)
|
||||
cmnd = "nmap " + sys_ip + " -p80|grep \"80/tcp open http\""
|
||||
status, output = subprocess.getstatusoutput(cmnd)
|
||||
# print("status of 80 : " + str(status))
|
||||
if status == 0:
|
||||
try:
|
||||
url = "http://" + sys_ip + "/cm?user=admin&password=l4c1j4yd33Du5l0&cmnd=STATUS+5"
|
||||
resp = requests.get(url)
|
||||
json_str = resp.content.decode('utf-8')
|
||||
tasm_data["StatusNET"] = json.loads(json_str)["StatusNET"]
|
||||
# print(tasm_data)
|
||||
url = "http://" + sys_ip + "/cm?user=admin&password=l4c1j4yd33Du5l0&cmnd=STATUS+2"
|
||||
resp = requests.get(url)
|
||||
json_str = resp.content.decode('utf-8')
|
||||
tasm_data["StatusFWR"] = json.loads(json_str)["StatusFWR"]
|
||||
url = "http://" + sys_ip + "/cm?user=admin&password=l4c1j4yd33Du5l0&cmnd=STATUS+4"
|
||||
resp = requests.get(url)
|
||||
json_str = resp.content.decode('utf-8')
|
||||
tasm_data["StatusMEM"] = json.loads(json_str)["StatusMEM"]
|
||||
print(sys_ip + " : Hostname : " + tasm_data['StatusNET']['Hostname'] + " : Version : " + tasm_data['StatusFWR']["Version"] + " : Memory : " + str(tasm_data["StatusMEM"]["ProgramFlashSize"]))
|
||||
|
||||
# cmnd = "curl \"http://" + sys_ip + "/dl?user=admin&password=l4c1j4yd33Du5l0\" -o ~/tasm_back/" + tasm_data['StatusNET']['Hostname'] + ".bin"
|
||||
#cmnd = "curl \"http://" + sys_ip + "/dl\" -o /media/server/nas-docker-data/_BACKUP/tasmota/" + tasm_data['StatusNET']['Hostname'] + ".bin"
|
||||
# print(cmnd)
|
||||
# status, output = subprocess.getstatusoutput(cmnd)
|
||||
|
||||
url = "http://" + sys_ip + "/dl?user=admin&password=l4c1j4yd33Du5l0"
|
||||
resp = requests.get(url)
|
||||
file = open("/media/nas/nas-data/_BACKUP/tasmota/" + tasm_data['StatusNET']['Hostname'] + "_" + tasm_data['StatusFWR']["Version"] + ".bin", "wb")
|
||||
file.write(resp.content)
|
||||
file.close()
|
||||
print(CHECK_MARK)
|
||||
except:
|
||||
#print(sys_ip + " : Not a tasmota!")
|
||||
pass
|
||||
else:
|
||||
#print(sys_ip + " : Not a listening")
|
||||
pass
|
||||
|
||||
|
||||
def wifi_setup():
|
||||
SSID1 = input(">> SID1 ? (default=jaydee) : ") or "jaydee"
|
||||
PASS1 = input(">> PASS1 ? (default=) : ") or ""
|
||||
SSID2 = input(">> SID2 ? (default=smart_home) : ") or "smart_home"
|
||||
PASS2 = input(">> PASS2 ? (default=) : ") or ""
|
||||
cmnd = "nmap -sP 192.168.77.*|grep \"Nmap scan report\"|egrep -o \"[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\""
|
||||
#print(cmnd)
|
||||
status, output = subprocess.getstatusoutput(cmnd)
|
||||
|
||||
# print(output)
|
||||
|
||||
ips = output.splitlines()
|
||||
for sys_ip in ips:
|
||||
|
||||
print("Thsis is ip : " + sys_ip)
|
||||
cmnd = "nmap " + sys_ip + " -p80|grep \"80/tcp open http\""
|
||||
status, output = subprocess.getstatusoutput(cmnd)
|
||||
# print("status of 80 : " + str(status))
|
||||
if status == 0:
|
||||
try:
|
||||
# url = "http://" + sys_ip + "/cm?user=admin&password=l4c1j4yd33Du5l0&cmnd=STATUS+5"
|
||||
url = "http://" + sys_ip + "/wi?s1=" + SSID1 + "&p1=" + PASS1 + "&s2=" + SSID2 + "&p2=" + PASS2 + "&h=work_lights&save="
|
||||
print(url)
|
||||
if _APPLY:
|
||||
requests.get(url)
|
||||
else:
|
||||
print("Test mode")
|
||||
|
||||
except:
|
||||
#print(sys_ip + " : Not a tasmota!")
|
||||
pass
|
||||
else:
|
||||
#print(sys_ip + " : Not a listening")
|
||||
pass
|
||||
|
||||
def mqtt_setup():
|
||||
MQTT_BROKER = input(">> MQTT Broker ? (default=192.168.77.106) : ") or "192.168.77.106"
|
||||
MQTT_USER = input(">> MQTT User ? (default=jaydee) : ") or "jaydee"
|
||||
MQTT_PASS = input(">> MQTT Password ? (default=jaydee1) : ") or "jaydee1"
|
||||
|
||||
cmnd = "nmap -sP 192.168.77.*|grep \"Nmap scan report\"|egrep -o \"[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\""
|
||||
#print(cmnd)
|
||||
status, output = subprocess.getstatusoutput(cmnd)
|
||||
|
||||
# print(output)
|
||||
|
||||
ips = output.splitlines()
|
||||
tasm_data = {}
|
||||
for sys_ip in ips:
|
||||
print("Thsis is ip : " + sys_ip)
|
||||
cmnd = "nmap " + sys_ip + " -p80|grep \"80/tcp open http\""
|
||||
status, output = subprocess.getstatusoutput(cmnd)
|
||||
# print("status of 80 : " + str(status))
|
||||
if status == 0:
|
||||
try:
|
||||
# url = "http://" + sys_ip + "/cm?user=admin&password=l4c1j4yd33Du5l0&cmnd=STATUS+5"
|
||||
|
||||
url = "http://" + sys_ip + "/cm?cmnd=Backlog%20MqttHost%20" + MQTT_BROKER + "%3BMqttUser%20" + MQTT_USER + "%3BMqttPassword%20" + MQTT_PASS
|
||||
print(url)
|
||||
if _APPLY:
|
||||
requests.get(url)
|
||||
|
||||
except:
|
||||
#print(sys_ip + " : Not a tasmota!")
|
||||
pass
|
||||
else:
|
||||
#print(sys_ip + " : Not a listening")
|
||||
pass
|
||||
|
||||
|
||||
if _BACKUP:
|
||||
create_backup()
|
||||
|
||||
|
||||
if _MQTT_SETUP:
|
||||
mqtt_setup()
|
||||
|
||||
if _WIFI_SETUP:
|
||||
wifi_setup()
|
||||
38
spotify copy.py
Normal file
38
spotify copy.py
Normal file
@@ -0,0 +1,38 @@
|
||||
import spotipy
|
||||
from spotipy.oauth2 import SpotifyOAuth
|
||||
import time
|
||||
|
||||
USERNAME = '...'
|
||||
CLIENT_ID = '...'
|
||||
CLIENT_SECRET = '...'
|
||||
SCOPE = 'user-read-currently-playing'
|
||||
|
||||
def create_spotify():
|
||||
auth_manager = SpotifyOAuth(
|
||||
scope='user-read-playback-state',
|
||||
username='jaydee',
|
||||
redirect_uri='https://ha.sectorq.eu/auth/external/callback',
|
||||
client_id='6a37229fc9a04878a608d519ea4b1d22',
|
||||
client_secret='6569f6f876234093983920de2966ff84')
|
||||
|
||||
spotify = spotipy.Spotify(auth_manager=auth_manager)
|
||||
|
||||
return auth_manager, spotify
|
||||
|
||||
def refresh_spotify(auth_manager, spotify):
|
||||
token_info = auth_manager.cache_handler.get_cached_token()
|
||||
if auth_manager.is_token_expired(token_info):
|
||||
auth_manager, spotify = create_spotify()
|
||||
return auth_manager, spotify
|
||||
|
||||
if __name__ == '__main__':
|
||||
auth_manager, spotify = create_spotify()
|
||||
|
||||
while True:
|
||||
auth_manager, spotify = refresh_spotify(auth_manager, spotify)
|
||||
playing = spotify.currently_playing()
|
||||
if playing:
|
||||
print(playing['item']['name'])
|
||||
else:
|
||||
print('Nothing is playing.')
|
||||
time.sleep(30)
|
||||
153
spotify.py
Normal file
153
spotify.py
Normal file
@@ -0,0 +1,153 @@
|
||||
#!/usr/bin/env python
|
||||
# coding: utf-8
|
||||
|
||||
import base64
|
||||
import datetime
|
||||
from urllib.parse import urlencode
|
||||
|
||||
import requests
|
||||
|
||||
|
||||
|
||||
class SpotifyAPI(object):
|
||||
access_token = None
|
||||
access_token_expires = datetime.datetime.now()
|
||||
access_token_did_expire = True
|
||||
client_id = None
|
||||
client_secret = None
|
||||
token_url = "https://accounts.spotify.com/api/token"
|
||||
|
||||
def __init__(self, client_id, client_secret, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
self.client_id = client_id
|
||||
self.client_secret = client_secret
|
||||
|
||||
def get_client_credentials(self):
|
||||
"""
|
||||
Returns a base64 encoded string
|
||||
"""
|
||||
client_id = self.client_id
|
||||
client_secret = self.client_secret
|
||||
if client_secret == None or client_id == None:
|
||||
raise Exception("You must set client_id and client_secret")
|
||||
client_creds = f"{client_id}:{client_secret}"
|
||||
client_creds_b64 = base64.b64encode(client_creds.encode())
|
||||
return client_creds_b64.decode()
|
||||
|
||||
def get_token_headers(self):
|
||||
client_creds_b64 = self.get_client_credentials()
|
||||
return {
|
||||
"Authorization": f"Basic {client_creds_b64}"
|
||||
}
|
||||
|
||||
def get_token_data(self):
|
||||
return {
|
||||
"grant_type": "client_credentials"
|
||||
}
|
||||
|
||||
def perform_auth(self):
|
||||
token_url = self.token_url
|
||||
token_data = self.get_token_data()
|
||||
token_headers = self.get_token_headers()
|
||||
print(token_url)
|
||||
print(token_data)
|
||||
print(token_headers)
|
||||
r = requests.post(token_url, data=token_data, headers=token_headers)
|
||||
if r.status_code not in range(200, 299):
|
||||
raise Exception("Could not authenticate client.")
|
||||
# return False
|
||||
data = r.json()
|
||||
now = datetime.datetime.now()
|
||||
access_token = data['access_token']
|
||||
expires_in = data['expires_in'] # seconds
|
||||
expires = now + datetime.timedelta(seconds=expires_in)
|
||||
self.access_token = access_token
|
||||
self.access_token_expires = expires
|
||||
self.access_token_did_expire = expires < now
|
||||
return True
|
||||
|
||||
def get_access_token(self):
|
||||
token = self.access_token
|
||||
expires = self.access_token_expires
|
||||
now = datetime.datetime.now()
|
||||
if expires < now:
|
||||
self.perform_auth()
|
||||
return self.get_access_token()
|
||||
elif token == None:
|
||||
self.perform_auth()
|
||||
return self.get_access_token()
|
||||
return token
|
||||
|
||||
def get_resource_header(self):
|
||||
access_token = self.get_access_token()
|
||||
headers = {
|
||||
"Authorization": f"Bearer {access_token}",
|
||||
"Accept": "application/json",
|
||||
"Content-Type": "application/json"
|
||||
}
|
||||
return headers
|
||||
|
||||
|
||||
def get_resource(self, lookup_id, resource_type='albums', version='v1'):
|
||||
endpoint = f"https://api.spotify.com/{version}/{resource_type}/{lookup_id}"
|
||||
headers = self.get_resource_header()
|
||||
r = requests.get(endpoint, headers=headers)
|
||||
if r.status_code not in range(200, 299):
|
||||
return {}
|
||||
return r.json()
|
||||
|
||||
def get_album(self, _id):
|
||||
return self.get_resource(_id, resource_type='albums')
|
||||
|
||||
def get_artist(self, _id):
|
||||
return self.get_resource(_id, resource_type='artists')
|
||||
|
||||
def base_search(self, query_params): # type
|
||||
headers = self.get_resource_header()
|
||||
endpoint = "https://api.spotify.com/v1/search"
|
||||
lookup_url = f"{endpoint}?{query_params}"
|
||||
r = requests.get(lookup_url, headers=headers)
|
||||
if r.status_code not in range(200, 299):
|
||||
return {}
|
||||
return r.json()
|
||||
|
||||
def get_devices(self): # type
|
||||
headers = self.get_resource_header()
|
||||
endpoint = "https://api.spotify.com/v1/me/player/devices"
|
||||
lookup_url = f"{endpoint}"
|
||||
print(lookup_url)
|
||||
print(headers)
|
||||
r = requests.get(lookup_url, headers=headers)
|
||||
print(r.status_code)
|
||||
if r.status_code not in range(200, 299):
|
||||
return {}
|
||||
return r.json()
|
||||
|
||||
def search(self, query=None, operator=None, operator_query=None, search_type='artist' ):
|
||||
if query == None:
|
||||
raise Exception("A query is required")
|
||||
if isinstance(query, dict):
|
||||
query = " ".join([f"{k}:{v}" for k,v in query.items()])
|
||||
if operator != None and operator_query != None:
|
||||
if operator.lower() == "or" or operator.lower() == "not":
|
||||
operator = operator.upper()
|
||||
if isinstance(operator_query, str):
|
||||
query = f"{query} {operator} {operator_query}"
|
||||
query_params = urlencode({"q": query, "type": search_type.lower()})
|
||||
print(query_params)
|
||||
return self.base_search(query_params)
|
||||
|
||||
|
||||
spotify = SpotifyAPI("6a37229fc9a04878a608d519ea4b1d22","6569f6f876234093983920de2966ff84" )
|
||||
|
||||
|
||||
spotify.perform_auth()
|
||||
|
||||
print(spotify.access_token)
|
||||
print(spotify.access_token_expires)
|
||||
|
||||
print(spotify.get_resource_header())
|
||||
|
||||
|
||||
|
||||
print(spotify.get_devices())
|
||||
4
sync_nas_rasp.py
Normal file
4
sync_nas_rasp.py
Normal file
@@ -0,0 +1,4 @@
|
||||
rsync -rP ha/* root@192.168.77.246:/share/docker_data/ha
|
||||
|
||||
|
||||
192.168.77.106
|
||||
47
test.py
Normal file
47
test.py
Normal file
@@ -0,0 +1,47 @@
|
||||
# Import LCD library
|
||||
from RPLCD import i2c
|
||||
import psutil
|
||||
|
||||
# Import sleep library
|
||||
from time import sleep
|
||||
|
||||
# constants to initialise the LCD
|
||||
lcdmode = 'i2c'
|
||||
cols = 20
|
||||
rows = 4
|
||||
charmap = 'A00'
|
||||
i2c_expander = 'PCF8574'
|
||||
|
||||
# Generally 27 is the address;Find yours using: i2cdetect -y 1
|
||||
address = 0x27
|
||||
port = 0 # 0 on an older Raspberry Pi
|
||||
|
||||
# Initialise the LCD
|
||||
lcd = i2c.CharLCD(i2c_expander, address, port=port, charmap=charmap,
|
||||
cols=cols, rows=rows)
|
||||
|
||||
|
||||
while True:
|
||||
myCmd = ""
|
||||
# Write a string on first line and move to next line
|
||||
mem_data = psutil.virtual_memory()
|
||||
net_sum = psutil.net_if_addrs()["eth0"]
|
||||
eth0_ip = (net_sum[0][1])
|
||||
cpu_load = round(psutil.getloadavg(),2)
|
||||
print(cpu_load[0])
|
||||
lcd.backlight_enabled = True
|
||||
lcd.cursor_pos = (0, 0)
|
||||
lcd.write_string('Memory : ' + str(mem_data.percent))
|
||||
lcd.crlf()
|
||||
lcd.write_string('IP : ' + str(eth0_ip))
|
||||
lcd.crlf()
|
||||
lcd.write_string('Phppot')
|
||||
lcd.crlf()
|
||||
lcd.write_string("CPU: " + str(cpu_load))
|
||||
sleep(5)
|
||||
#lcd.clear()
|
||||
# Switch off backlight
|
||||
#lcd.backlight_enabled = False
|
||||
#sleep(3)
|
||||
# Clear the LCD screen
|
||||
#lcd.close(clear=True)
|
||||
Reference in New Issue
Block a user