From 909e6e73e09dc4269addef3b15050e96597787c6 Mon Sep 17 00:00:00 2001 From: Alex Greenland Date: Wed, 28 Dec 2022 23:43:41 +0000 Subject: [PATCH] Update required fields --- allsky_cloud/allsky_cloud.py | 20 +++++++++---------- allsky_dewheater/allsky_dewheater.py | 14 ++++++------- allsky_discordsend/allsky_discordsend.py | 14 ++++++------- allsky_gpio/allsky_gpio.py | 4 ++-- allsky_influxdb/allsky_influxdb.py | 17 +++++++++------- .../allsky_openweathermap.py | 2 +- allsky_sqm/allsky_sqm.py | 6 +++--- module-installer.py | 2 +- 8 files changed, 41 insertions(+), 38 deletions(-) diff --git a/allsky_cloud/allsky_cloud.py b/allsky_cloud/allsky_cloud.py index a1852cb..5406a4e 100644 --- a/allsky_cloud/allsky_cloud.py +++ b/allsky_cloud/allsky_cloud.py @@ -36,13 +36,13 @@ }, "argumentdetails": { "i2caddress": { - "required": "true", + "required": "false", "description": "I2C Address", "help": "Override the standard i2c address for a device. NOTE: This value must be hex i.e. 0x76", "tab": "Sensor" }, "clearbelow" : { - "required": "true", + "required": "false", "description": "Clear Below °C", "help": "When the sky temperature is below this value the sky is assumed to be clear", "tab": "Settings", @@ -54,7 +54,7 @@ } }, "cloudyabove" : { - "required": "true", + "required": "false", "description": "Cloudy Above °C", "help": "When the sky temperature is above this value the sky is assumed to be cloudy", "tab": "Settings", @@ -75,7 +75,7 @@ } }, "k1" : { - "required": "true", + "required": "false", "description": "k1", "tab": "Advanced", "type": { @@ -86,7 +86,7 @@ } }, "k2" : { - "required": "true", + "required": "false", "description": "k2", "tab": "Advanced", "type": { @@ -97,7 +97,7 @@ } }, "k3" : { - "required": "true", + "required": "false", "description": "k3", "tab": "Advanced", "type": { @@ -108,7 +108,7 @@ } }, "k4" : { - "required": "true", + "required": "false", "description": "k4", "tab": "Advanced", "type": { @@ -119,7 +119,7 @@ } }, "k5" : { - "required": "true", + "required": "false", "description": "k5", "tab": "Advanced", "type": { @@ -130,7 +130,7 @@ } }, "k6" : { - "required": "true", + "required": "false", "description": "k6", "tab": "Advanced", "type": { @@ -141,7 +141,7 @@ } }, "k7" : { - "required": "true", + "required": "false", "description": "k7", "tab": "Advanced", "type": { diff --git a/allsky_dewheater/allsky_dewheater.py b/allsky_dewheater/allsky_dewheater.py index 8fe2c3f..204967c 100755 --- a/allsky_dewheater/allsky_dewheater.py +++ b/allsky_dewheater/allsky_dewheater.py @@ -55,7 +55,7 @@ } }, "inputpin": { - "required": "true", + "required": "false", "description": "Input Pin", "help": "The input pin for DHT type sensors, not required for i2c devices", "tab": "Sensor", @@ -64,13 +64,13 @@ } }, "i2caddress": { - "required": "true", + "required": "false", "description": "I2C Address", "help": "Override the standard i2c address for a device. NOTE: This value must be hex i.e. 0x76", "tab": "Sensor" } , "heaterpin": { - "required": "true", + "required": "false", "description": "Heater Pin", "help": "The pin the heater control relay is connected to", "tab": "Heater", @@ -99,7 +99,7 @@ } }, "frequency" : { - "required": "true", + "required": "false", "description": "Delay", "help": "The delay between sensor reads in seconds. Zero will disable this and run the check after every frame", "tab": "Dew Control", @@ -111,7 +111,7 @@ } }, "limit" : { - "required": "true", + "required": "false", "description": "Limit", "help": "If the temperature is within this many degrees of the dew point the heater will be enabled or disabled", "tab": "Dew Control", @@ -123,7 +123,7 @@ } }, "force" : { - "required": "true", + "required": "false", "description": "Forced Temperature", "help": "Always enable the heater when the ambient termperature is below this value, zero will disable this.", "tab": "Dew Control", @@ -135,7 +135,7 @@ } }, "max" : { - "required": "true", + "required": "false", "description": "Max Heater Time", "help": "The maximum time in seconds for the heater to be on. Zero will disable this.", "tab": "Dew Control", diff --git a/allsky_discordsend/allsky_discordsend.py b/allsky_discordsend/allsky_discordsend.py index ff8047e..7f632c1 100644 --- a/allsky_discordsend/allsky_discordsend.py +++ b/allsky_discordsend/allsky_discordsend.py @@ -50,7 +50,7 @@ } }, "daycount" : { - "required": "true", + "required": "false", "description": "Daytime Count", "help": "Send every (this number) frame to Discord. This is to prevent flooding the discord channels", "tab": "Day Time", @@ -62,7 +62,7 @@ } }, "dayimageurl": { - "required": "true", + "required": "false", "tab": "Day Time", "description": "The webhook url for day time images" }, @@ -77,7 +77,7 @@ } }, "nightcount" : { - "required": "true", + "required": "false", "description": "Nighttime Count", "help": "Send every (this number) frame to Discord. This is to prevent flooding the discord channels", "tab": "Night Time", @@ -89,7 +89,7 @@ } }, "nightimageurl": { - "required": "true", + "required": "false", "tab": "Night Time", "description": "The webhook url for night time images" }, @@ -104,7 +104,7 @@ } }, "startrailsimageurl": { - "required": "true", + "required": "false", "tab": "Star Trails", "description": "The webhook url for Star Trails images" }, @@ -120,7 +120,7 @@ } }, "keogramimageurl": { - "required": "true", + "required": "false", "tab": "Keograms", "description": "The webhook url for Star Keograms" }, @@ -135,7 +135,7 @@ } }, "timelapseimageurl": { - "required": "true", + "required": "false", "tab": "Timelapse", "description": "The webhook url for Timelapses" } diff --git a/allsky_gpio/allsky_gpio.py b/allsky_gpio/allsky_gpio.py index 6f18f59..a588484 100644 --- a/allsky_gpio/allsky_gpio.py +++ b/allsky_gpio/allsky_gpio.py @@ -24,7 +24,7 @@ }, "argumentdetails": { "gpio": { - "required": "true", + "required": "false", "description": "GPIO Pin", "help": "", "type": { @@ -35,7 +35,7 @@ } }, "state": { - "required": "true", + "required": "false", "description": "Pin State", "help": "", "type": { diff --git a/allsky_influxdb/allsky_influxdb.py b/allsky_influxdb/allsky_influxdb.py index 1d6f74e..f34c490 100644 --- a/allsky_influxdb/allsky_influxdb.py +++ b/allsky_influxdb/allsky_influxdb.py @@ -62,12 +62,12 @@ }, "argumentdetails": { "host": { - "required": "true", + "required": "false", "description": "Influxdb host", "help": "" }, "port": { - "required": "true", + "required": "false", "description": "Influxdb Port", "help": "", "type": { @@ -78,24 +78,27 @@ } }, "user": { - "required": "true", + "required": "false", "description": "Username", "help": "" }, "password": { - "required": "true", + "required": "false", "description": "Password", "help": "" }, "database": { - "required": "true", + "required": "false", "description": "Database", "help": "" }, "values": { - "required": "true", + "required": "false", "description": "Values", - "help": "Values to save" + "help": "Values to save", + "type": { + "fieldtype": "multivariables" + } } }, "enabled": "false" diff --git a/allsky_openweathermap/allsky_openweathermap.py b/allsky_openweathermap/allsky_openweathermap.py index 416a8c5..f2d7a41 100644 --- a/allsky_openweathermap/allsky_openweathermap.py +++ b/allsky_openweathermap/allsky_openweathermap.py @@ -102,7 +102,7 @@ def setExtraValue(path, data, extraKey, expires): global extraData value = getValue(path, data) if value is not None: - extraData[extraKey] = { + extraData["AS_" + extraKey] = { "value": value, "expires": expires } diff --git a/allsky_sqm/allsky_sqm.py b/allsky_sqm/allsky_sqm.py index fb1b1f9..c1a2d9c 100644 --- a/allsky_sqm/allsky_sqm.py +++ b/allsky_sqm/allsky_sqm.py @@ -39,7 +39,7 @@ } }, "roi": { - "required": "true", + "required": "false", "description": "Region of Interest", "help": "The area of the image to check for sky quality. Format is x1,y1,x2,y2", "type": { @@ -47,7 +47,7 @@ } }, "roifallback" : { - "required": "true", + "required": "false", "description": "Fallback %", "help": "If no ROI is set then this % of the image, from the center will be used", "type": { @@ -58,7 +58,7 @@ } }, "formula": { - "required": "true", + "required": "false", "description": "Adjustment Forumla", "help": "Formula to adjust the read value. This forumla can use only Pythons inbuilt maths functions and basic mathematical operators. Please see the documentation for more details of the formula variables available" }, diff --git a/module-installer.py b/module-installer.py index 794733b..4844ed0 100755 --- a/module-installer.py +++ b/module-installer.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 from whiptail import Whiptail import os