undiscoverables initial version

This commit is contained in:
Data-Monkey
2023-05-17 12:55:34 +10:00
parent c54156ca1e
commit 95a7dcc7fc
3 changed files with 277 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
#!/usr/bin/env python
# Based on the work of https://github.com/leiweibau/Pi.Alert
# python3 /home/pi/pialert/front/plugins/website_monitor/script.py urls=http://google.com,http://bing.com
import sys
import pathlib
from plugin_helper import Plugin_Objects, Plugin_Object
sys.dont_write_bytecode = True
curPath = str(pathlib.Path(__file__).parent.resolve())
log_file = curPath + '/script.log'
result_file = curPath + '\last_result.log'
FAKE_DEVICES = ["routerXX","hubZZ"]
def main():
print("Hello")
devices = Plugin_Objects( result_file )
for fake_dev in FAKE_DEVICES:
devices.add_object(fake_dev, fake_dev, fake_dev, fake_dev, "", "", "", "")
devices.write_result_file()
return devices
#===============================================================================
# BEGIN
#===============================================================================
if __name__ == '__main__':
d = main()