How to tell which platform Domoticz is running on from within a plugin
Posted: Wednesday 06 June 2018 16:53
Hi,
Is there a better way to tell which Platform Domoticz is running on besides importing extra modules (os). For now i'm using the code below to try and work around an issue on Windows. Bit of a quick and dirty solution
Besides some path redirection issue on Windows i also have to figure out why the heartbeat code is not even starting on Windows but runs just fine on Linux. But that's a different story... If anyone would like to pitch in on that one that will be appreciated!
For that issue see: http://www.domoticz.com/forum/viewtopic ... 65&t=20467 (around page 6)
Is there a better way to tell which Platform Domoticz is running on besides importing extra modules (os). For now i'm using the code below to try and work around an issue on Windows. Bit of a quick and dirty solution

Code: Select all
def onwindows():
if str(Parameters['HomeFolder'])[1:3] == ":\\":
return True
else:
return False
For that issue see: http://www.domoticz.com/forum/viewtopic ... 65&t=20467 (around page 6)