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

Python and python framework

Moderator: leecollings

Post Reply
EscApe
Posts: 535
Joined: Thursday 02 April 2015 8:46
Target OS: Linux
Domoticz version: 2020+
Location: The Netherlands
Contact:

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

Post by EscApe »

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: No registered users and 1 guest