I noticed this afternoon that the plugin throws it's toys out of the pram if I ihaven't set a file path in the plugin config, but I have checked the box to save CSV in a device.
(Disclaimer: I did this on purpose to see if it broke!)
It's probably worth defaulting the CSV path to either your plugin folder or to ~/Documents/Octopus rather than to "" so that the CSV has somewhere to save to.
This is three lines of code I have in the Sense plugin which also has the option to save CSVs:
- Code: Select all
self.csvPath = "{}/Preferences/Plugins/{}".format(indigo.server.getInstallFolderPath(), self.pluginId)
self.csvActive = "{}/Preferences/Plugins/{}/activeLog.csv".format(indigo.server.getInstallFolderPath(), self.pluginId)
self.csvDaily = "{}/Preferences/Plugins/{}/dailyLog.csv".format(indigo.server.getInstallFolderPath(), self.pluginId)
Peeter