How to tell which platform Domoticz is running on from within a plugin

Python and python framework
Post Reply
EscApe
Posts: 142
Joined: Thursday 02 April 2015 8:46
Target OS: Raspberry Pi
Domoticz version: v3+beta
Location: The Netherlands
Contact:

How to tell which platform Domoticz is running on from within a plugin

Post by EscApe » 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 ;-)

Code: Select all

def onwindows():
	if str(Parameters['HomeFolder'])[1:3] == ":\\":
		return True
	else:
		return False
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)

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 5 guests