Page 2 of 2

Re: Intesisbox/Intesishome with Domoticz

Posted: Wednesday 05 August 2020 17:00
by DrMacabre
CV8R wrote: Tuesday 04 August 2020 13:50 If the Intesisbox wmp config tool cannot connect to the intesisbox then there isn't much I can help with. I recommend contacting their support. The plugin will not work unless the config tool can connect as they use the same WMP protocol.


When I open the IBOX-WMP-CONFIG application I get a spinner and a window that says "obtaining data". That always times out and I need to select the check box for Periodic Discover, then the Intesisbox appears in the tool.

Good luck!

CV8R
Please could you confirm there’s no need for anything beside the intesisbox itself to connect to the configuration tools ? Also if the configuration tools can see the intesisbox on the network if connected via wifi (opposed to directly connected to the intesisbox when set in AP mode)

Re: Intesisbox/Intesishome with Domoticz

Posted: Wednesday 05 August 2020 23:15
by CV8R
Nothing else needed and config tools (and plugin) can see the Intesisbox once the Intesisbox is connected to your WiFi.

It needs to be connected to an AirCon unit of course.

You need to go through the Intesisbox setup to connect Intesisbox to to WiFi, which is what I think you mean by AP mode. Then when Intesisbox is connected to the WiFi the tools can connect to it.

Can you ping it?

You do have an Intesisbox, the ASCII unit, and not an IntesisHome? IntesisHome is totally different and uses a web cloud connection.

I did have connection issues when I upgraded my WiFi to Ubiquiti APs. The Intesisbox would fail to connect. I had to force the UBNT controller to use all speeds on 2.4Ghz, it defaulted to disabling devices under 6Mbps or something to that effect. You can tell because the led on the Intesisbox is always flashing red to indicate not connected to wifi.

Re: Intesisbox/Intesishome with Domoticz

Posted: Thursday 06 August 2020 11:19
by DrMacabre
CV8R wrote: Wednesday 05 August 2020 23:15 Nothing else needed and config tools (and plugin) can see the Intesisbox once the Intesisbox is connected to your WiFi.

It needs to be connected to an AirCon unit of course.

You need to go through the Intesisbox setup to connect Intesisbox to to WiFi, which is what I think you mean by AP mode. Then when Intesisbox is connected to the WiFi the tools can connect to it.

Can you ping it?

You do have an Intesisbox, the ASCII unit, and not an IntesisHome? IntesisHome is totally different and uses a web cloud connection.

I did have connection issues when I upgraded my WiFi to Ubiquiti APs. The Intesisbox would fail to connect. I had to force the UBNT controller to use all speeds on 2.4Ghz, it defaulted to disabling devices under 6Mbps or something to that effect. You can tell because the led on the Intesisbox is always flashing red to indicate not connected to wifi.
Yep, the intesisbox is by default in AP mode (access point), that’s when you connect to it to setup your own wifi. From this interface, i could see my airco and interact with it (on, off, reading temps and modes) but as soon as i set the device to my own wifi, i can’t reach it. It shows on the network of course but nothing else. Yes it’s the intesisbox of course.

I tried to ping it’s IP, the first 5 or 6 didn’t reach then it started to respond. Weird.
Also it has an extremely slow ping, between 7ms and 700ms. I will put a wifi range extender next to it to see if it help. The device is in my basement and my router on the first floor.

Re: Intesisbox/Intesishome with Domoticz

Posted: Thursday 06 August 2020 12:04
by DrMacabre
Bingo, now it shows up in the configuration tool with the wifi/CPL extender.

Edit : sorry I’m such a retard, totally forgot i had to add the hardware from the menu... :mrgreen:

Re: Intesisbox/Intesishome with Domoticz

Posted: Monday 10 August 2020 3:22
by CV8R
Bingo, now it shows up in the configuration tool with the wifi/CPL extender.

Edit : sorry I’m such a retard, totally forgot i had to add the hardware from the menu... :mrgreen:
Is it working for you in Domoticz now?

Re: Intesisbox/Intesishome with Domoticz

Posted: Tuesday 11 August 2020 22:33
by DrMacabre
CV8R wrote: Monday 10 August 2020 3:22
Bingo, now it shows up in the configuration tool with the wifi/CPL extender.

Edit : sorry I’m such a retard, totally forgot i had to add the hardware from the menu... :mrgreen:
Is it working for you in Domoticz now?
it was... then a power failure trashed my sdcard today. I'm in the process of recovering everything but yes, it's working great. Thanks

Re: Intesisbox/Intesishome with Domoticz

Posted: Saturday 26 September 2020 10:04
by DrMacabre
Hello everyone,

I’m having some difficulty to set up a script to change my set temp value depending on the time. I even tried a test switch in blocky to change the temp value but it doesn’t do anything, can anyone tell me what is the correct way to set the temp value in LUA please ?

I’m currently using commandArray[‘my device’]=‘Set Level 20’ but it doesn’t do anything.
The ‘ are not right here but i can’t type the correct one on my ipad.

Re: Intesisbox/Intesishome with Domoticz

Posted: Saturday 26 September 2020 10:26
by waaren
DrMacabre wrote: Saturday 26 September 2020 10:04 I’m having some difficulty to set up a script to change my set temp value depending on the time. I even tried a test switch in blocky to change the temp value but it doesn’t do anything, can anyone tell me what is the correct way to set the temp value in LUA please ?
According to the Lua commands wiki it is

Code: Select all

commandArray['SetSetPoint:MySetPointIdx']='20.5' -- replace MySetPointIdx with the actual idx of the setpoint device

Re: Intesisbox/Intesishome with Domoticz

Posted: Saturday 20 February 2021 20:54
by lgarrido
Thanks!!! THis is amazing. You have saved me a lot of time!!!! Do you not consider uploading it to github?

CV8R wrote: Sunday 22 September 2019 23:25 Hi, here is my plugin. I'm sure its not pretty but it works!

Copy it into a folder in your plugins directory, restart domoticz and see how you go.

Code: Select all


# Basic Python Plugin Example
#
# Author: GizMoCuz
#
"""
<plugin key="BasePlug" name="IntesisBox WMP-1 Protocol" author="CV8R" version="0.0.9" >
	<description>
		<h2>IntesisBox WMP-1</h2><br/>
		<ul style="list-style-type:square">
			<li>IntesisBox WMP-1 interface for air conditioners into IP based control systems</li>
		</ul>
		<ul style="list-style-type:square">
		<h3>Configuration</h3><br/>
			<li>IP Address and Port number default 3310 </li>
		</ul>
	</description>
	<params>
		<param field="Address" label="IP Address" width="200px" required="true" default=""/>
		<param field="Port" label="Port" width="30px" required="true" default="3310"/>
		<param field="Mode1" label="Debug" width="75px">
			<options>
				<option label="True" value="Debug"/>
				<option label="False" value="Normal"  default="true" />
			</options>
		</param>
	</params>
</plugin>
"""
from typing import List


# Global var definitions
InitHeartbeatCount = 0
unitmode = "N/A"
oustandingPings = -1
lastHeartbeat = 0


# Limits as Global vars
minTempLimit = 180
maxTempLimit = 280

import Domoticz
import base64
import datetime
import re

class BasePlugin:
	enabled = True
	powerOn = 0
	runCounter = 0


	WMPConn = None
	oustandingPings = 0
	lastHeartbeat = datetime.datetime.now()

	def __init__(self):
		#self.var = 123
		return

	def onStart(self):
		Domoticz.Log("onStart called")

		Domoticz.Heartbeat(20) # Set heartbeat interval slower than default

		if Parameters["Mode1"] == "Debug":
			Domoticz.Debugging(1)

		if (len(Devices) == 0):
			Domoticz.Device(Name="Power", Unit=1, Image=16, TypeName="Switch", Used=1).Create()
			Domoticz.Device(Name="Ambient Temp", Unit=2, TypeName="Temperature", Used=1).Create()

			Options = {"LevelActions" : "|||||",
						"LevelNames" : "|Auto|Heat|Dry|Cool|Fan",
						"LevelOffHidden" : "true",
						"SelectorStyle" : "0"}
			
			Domoticz.Device(Name="Mode", Unit=3, TypeName="Selector Switch", Image=16, Options=Options, Used=1).Create()
			
			Options = {"LevelActions" : "||||",
						"LevelNames" : "|Auto|L1|L2|L3",
						"LevelOffHidden" : "true",
						"SelectorStyle" : "0"}

			Domoticz.Device(Name="Fan Speed", Unit=4, TypeName="Selector Switch", Image=7, Options=Options, Used=1).Create()

			Domoticz.Device(Name="Set Temp", Unit=5, Type=242, Subtype=1, Image=16, Used=1).Create()

			Domoticz.Device(Name="Error LED", Unit=6,  Image=13, TypeName="Switch", Used=1).Create()
			Domoticz.Device(Name="Error Text", Unit=7, TypeName="Text", Used=1).Create()

			Domoticz.Log("Device created.")

		DumpConfigToLog()

	def onStop(self):
		Domoticz.Log("onStop called")

	def onConnect(self, Connection, Status, Description):
		Domoticz.Log("onConnect called")
		global ConnectState
		Domoticz.Log("Connecting")
		if (Connection == self.WMPConn):
			if (Status == 0):
				Domoticz.Log("Connected successfully to: " + Connection.Address + ":" + Connection.Port)
				self.WMPConn.Send('ID\n') # Get ID at startup
		else:
			if (Description.find("Only one usage of each socket address") > 0):
				Domoticz.Log(Connection.Address + ":" + Connection.Port + " is busy, waiting.")
			else:
				Domoticz.Log("Failed to connect (" + str(Status) + ") to: " + Connection.Address + ":" + Connection.Port + " with error: " + Description)
			self.WMPConn = None

	def onMessage(self, Connection, Data):
		Domoticz.Debug("onMessage called")
		global unitmode
		global oustandingPings
		global lastHeartbeat
		global minTempLimit
		global maxTempLimit

		strData = Data.decode("utf-8", "ignore")
		Domoticz.Debug("onMessage called with Data: '" + str(strData) + "'")
		#msgDataListRaw = re.split(r':+|,', strData)  # type: List[str]
		msgDataListRaw = re.split(r':+|,+|\[+|\]', strData)  # split string to list of strings
		msgDataList = list(filter(None, msgDataListRaw)) # Remove consecutive delimiters note: filter does not return a list, use list to turn into list
		# Dump stripped messages in to Domoticz Log
		count = 0
		for msgData in msgDataList:
			Domoticz.Debug("Stripped Message[" + str(count) + "] = " + msgData ) # Log the messages incoming and their stripped count
			count = count + 1

		Domoticz.Debug("Resetting Ping to 0")
		oustandingPings = 0  # Reset ping counter onmessage for making sure connection is up in Heartbeat

		# Is it a status update

		if (msgDataList[0] == 'ACK'):
			Domoticz.Debug("Message Acknowledged with response: " + msgDataList[0])
		elif (msgDataList[0] == 'ERR'):
			Domoticz.Error("WMP Message ########## SENDING MESSAGE ERROR ########## with response: " + msgDataList[0])
			Devices[6].Update(nValue=1, sValue="100") # Set the Error LED switch to ON to flag for a send error
		elif (msgDataList[0] == 'LIMITS'): #Get the limits from the AC unit
			DataValues = '|'.join(msgDataList[2:])
			if (msgDataList[1] == 'ONOFF'): #Get the ONOFF limits from the AC unit
				Domoticz.Log("ONOFF Limits from unit: " + DataValues)
			elif (msgDataList[1] == 'MODE'): #Get the MODE limits from the AC unit
				Domoticz.Log("MODE Limits from unit: " + DataValues)
			elif (msgDataList[1] == 'FANSP'): #Get the FANSP limits from the AC unit
				Domoticz.Log("FANSP Limits from unit: " + DataValues)
			elif (msgDataList[1] == 'VANEUD'): #Get the VANEUD limits from the AC unit
				Domoticz.Log("VANEUD Limits from unit: " + DataValues)
			elif (msgDataList[1] == 'VANELR'): #Get the VANELR limits from the AC unit
				Domoticz.Log("VANELR Limits from unit: " + DataValues)
			elif (msgDataList[1] == 'SETPTEMP'): #Get the SETPTEMP temp limits from the AC unit
				Domoticz.Debug("SETPTEMP Temp limit values from unit: " + DataValues)
				minTempLimit = int(msgDataList[2])
				maxTempLimit = int(msgDataList[3])
				Domoticz.Status("Min Temp Limit: " + str(minTempLimit) + " Max Temp Limit: " + str(maxTempLimit))
		if (msgDataList[0] == 'CHN'):
			Domoticz.Debug("Status Update - Unit: " + msgDataList[1] + " Function: " + msgDataList[2] + " Value = " + msgDataList[3])
			# Update the status to Domoticz
			if (msgDataList[2] == 'ONOFF'):
				if (msgDataList[3] == 'ON'):
					Domoticz.Status("Update status to On")
					Devices[1].Update(nValue=1, sValue="100") # AC Power
				elif (msgDataList[3] == 'OFF'):
					Domoticz.Status("Update status to Off")
					Devices[1].Update(nValue=0, sValue="0")
			elif (msgDataList[2] == 'AMBTEMP'):
				ambtemp = str(float(msgDataList[3])/10)
				Domoticz.Log("Ambient temp")
				Domoticz.Debug("Current ambient temp: " + ambtemp + " Degrees")
				Devices[2].Update(nValue=0, sValue=ambtemp)
				#Domoticz.Debug("Resetting Ping to 0") # using AMBTEMP
				#oustandingPings = 0 # Reset ping counter for making sure connection is up in Heartbeat
			elif (msgDataList[2] == 'SETPTEMP'):
				settemp = str(int(msgDataList[3])/10)
				if (unitmode != 'FAN'):
					Domoticz.Status("Set temp is set to: " + settemp + " Degrees")
					Devices[5].Update(nValue=1, sValue=settemp) # Update the temp display in the set temp device
				else:
					Domoticz.Debug("FAN MODE setting temp to not display")
					Devices[5].Update(nValue=1, sValue="22")  # N/A to have a temp displayed
			elif (msgDataList[2] == 'MODE'):
				unitmode = msgDataList[3]
				if (unitmode == "AUTO"):
					Domoticz.Status("Mode to: " + unitmode)
					Devices[3].Update(nValue=1, sValue="10") # Auto
				elif (unitmode == "HEAT"):
					Domoticz.Status("Mode to: " + unitmode)
					Devices[3].Update(nValue=1, sValue="20") # Heat
				elif (unitmode == "DRY"):
					Domoticz.Status("Mode to: " + unitmode)
					Devices[3].Update(nValue=1, sValue="30") # Dry
				elif (unitmode == "COOL"):
					Domoticz.Status("Mode to: " + unitmode)
					Devices[3].Update(nValue=1, sValue="40") # Cool
				elif (unitmode == "FAN"):
					Domoticz.Status("Mode to: " + unitmode)
					Devices[3].Update(nValue=1, sValue="50") # Fan
				Devices[3].Refresh()
			elif (msgDataList[2] == 'FANSP'):
				fspeed = msgDataList[3]
				if (fspeed == "AUTO"):
					Domoticz.Status("Fan Speed to: " + fspeed)
					Devices[4].Update(nValue=1, sValue="10") # Fan Auto
				elif (fspeed == "1"):
					Domoticz.Status("Fan Speed to: " + fspeed)
					Devices[4].Update(nValue=1, sValue="20") # Fan Level 1
				elif (fspeed == "2"):
					Domoticz.Status("Fan Speed to: " + fspeed)
					Devices[4].Update(nValue=1, sValue="30") # Fan Level 2
				elif (fspeed == "3"):
					Domoticz.Status("Fan Speed to: " + fspeed)
					Devices[4].Update(nValue=1, sValue="40") # Fan Level 3
				Devices[4].Refresh()
			elif (msgDataList[2] == 'VANEUD'):
				vaneud = msgDataList[3]
				Domoticz.Status("Vane Up/Down: " + vaneud)
			elif (msgDataList[2] == 'VANELR'):
				vanelr = msgDataList[3]
				Domoticz.Status("Vane Left/Right: " + vanelr)
			elif (msgDataList[2] == 'ERRSTATUS'):
				errorstatus = msgDataList[3]
				if (errorstatus != "OK"):
					Domoticz.Status("Error Status: " + errorstatus)
					Devices[6].Update(nValue=1, sValue="100")  # Set the Error LED switch to ON to flag for an ERROR
				elif (errorstatus == "OK"):
					Domoticz.Status("Error Status: " + errorstatus)
					Devices[6].Update(nValue=0, sValue="0")  # Set the Error LED switch to OFF to clear ERROR
			elif (msgDataList[2] == 'ERRCODE'):
				errorcode = msgDataList[3]
				Domoticz.Status("Error Code: " + errorcode)
				Devices[7].Update(nValue=1, sValue=errorcode)  # Set error text
			else:
				Domoticz.Error("Unrecognised status command")

	def onCommand(self, Unit, Command, Level, Hue):
		Domoticz.Log("onCommand called for Unit " + str(Unit) + ": Parameter '" + str(Command) + "', Level: " + str(Level))

		if (Unit == 1):
			if (Command == "On"):
				Domoticz.Status("Sending Power ON")
				self.powerOn = 1
				self.WMPConn.Send('SET,1:ONOFF,ON\n')
			elif(Command == "Off"):
				Domoticz.Status("Sending Power OFF")
				self.powerOn = 0
				self.WMPConn.Send('SET,1:ONOFF,OFF\n')
		elif (Unit == 3):
			if (Command == "Set Level"):
				Domoticz.Debug("Sending Mode")
				if (str(Level) == '10'):
					Domoticz.Status("Sending Mode Auto")
					self.WMPConn.Send('SET,1:MODE,auto\n')
				elif (str(Level) == '20'):
					Domoticz.Status("Sending Mode Heat")
					self.WMPConn.Send('SET,1:MODE,heat\n')
				elif (str(Level) == '30'):
					Domoticz.Status("Sending Mode Dry")
					self.WMPConn.Send('SET,1:MODE,dry\n')
				elif (str(Level) == '40'):
					Domoticz.Status("Sending Mode Cool")
					self.WMPConn.Send('SET,1:MODE,cool\n')
				elif (str(Level) == '50'):
					Domoticz.Status("Sending Mode Fan")
					self.WMPConn.Send('SET,1:MODE,fan\n')
			self.WMPConn.Send('LIMITS:SETPTEMP\n') # Check temp limits again when changing modes
		elif (Unit == 4):
			if (Command == "Set Level"):
				Domoticz.Debug("Sending Fan Speed")
				if (str(Level) == '10'):
					Domoticz.Status("Sending Fan Speed Auto")
					self.WMPConn.Send('SET,1:FANSP,AUTO\n')
				elif (str(Level) == '20'):
					Domoticz.Status("Sending Fan Speed Level 1")
					self.WMPConn.Send('SET,1:FANSP,1\n')
				elif (str(Level) == '30'):
					Domoticz.Status("Sending Fan Speed Level 2")
					self.WMPConn.Send('SET,1:FANSP,2\n')
				elif (str(Level) == '40'):
					Domoticz.Status("Sending Fan Speed Level 3")
					self.WMPConn.Send('SET,1:FANSP,3\n')
		elif (Unit == 5):
			if (Command == "Set Level"):
				settemp = Level
				Domoticz.Debug("String of Set Temp raw value = " + str(Level))
				settemp = round((int((float(settemp) * 10)))/5)*5 #includes complex rounding to nearest 5
				Domoticz.Debug("Set Temp converted value = " + str(settemp))
				if settemp < minTempLimit: #Adjusting for minLimit of unit
					Domoticz.Status("Set temp point less than min limit setting to min value = " + str(minTempLimit / 10) + " Degrees")
					settemp = minTempLimit #Send the minimum of unit
				if settemp > maxTempLimit: #Adjusting for minLimit of unit
					Domoticz.Status("Set temp point greater than max limit setting to max value = " + str(maxTempLimit / 10) + " Degrees")
					settemp = maxTempLimit
			Domoticz.Status("Setting Temp to: " + str(settemp / 10) + " Degrees")
			Domoticz.Debug("Sending Set Temp to: " + str(settemp))
			self.WMPConn.Send('SET,1:SETPTEMP,' + str(settemp) + '\n')
		elif (Unit == 6):
			if (Command == "Off"):
					Domoticz.Log("User cleared the ERROR Status LED")
					Devices[6].Update(nValue=0, sValue="0")  # Set the Error LED switch to Off
		else:
			Domoticz.Error("No command available to send")

	def onNotification(self, Name, Subject, Text, Status, Priority, Sound, ImageFile):
		Domoticz.Log("Notification: " + Name + "," + Subject + "," + Text + "," + Status + "," + str(Priority) + "," + Sound + "," + ImageFile)

	def onDisconnect(self, Connection):
		Domoticz.Log("onDisconnect called")
		self.WMPConn = None

	def onHeartbeat(self):
		global InitHeartbeatCount  # Counter for first heartbeats
		global oustandingPings # Counter for the Pings for check alive using AMBTEMP
		global lastHeartbeat
		Domoticz.Debug("onHeartbeat called")
		Domoticz.Debug("onHeartbeat called, last response seen " + str(oustandingPings) + " heartbeats ago.")
		Domoticz.Debug("Heartbeat Init Count = " + str(InitHeartbeatCount))
		lastHeartbeat = datetime.datetime.now()
		if (self.WMPConn == None):
			Domoticz.Log("Connect to WMP")
			InitHeartbeatCount = 0  # reset heartbeat count
			oustandingPings = -1 # reset ping count
			self.handleConnect()
		else:
			if (self.WMPConn.Name == "WMP_Connection") and (self.WMPConn.Connected()):
				oustandingPings = oustandingPings + 1  # Increment Ping Counter, reset at AMPTEMP Status
				if InitHeartbeatCount <= 6:
					InitHeartbeatCount = InitHeartbeatCount + 1
					Domoticz.Debug("Heartbeat Init Count Incremented now = " + str(InitHeartbeatCount))
					if InitHeartbeatCount == 1: #Need to delay these inital messages or some are missed
						Domoticz.Debug("Heartbeat Init Count = " + str(InitHeartbeatCount) + " Getting ONOFF")
						self.WMPConn.Send('GET,1:ONOFF\n')
						Domoticz.Debug("Heartbeat Init Count = " + str(InitHeartbeatCount) + " Getting MODE")
						self.WMPConn.Send('GET,1:MODE\n')
						Domoticz.Debug("Heartbeat Init Count = " + str(InitHeartbeatCount) + " Getting SETPTEMP")
						self.WMPConn.Send('GET,1:SETPTEMP\n')
						Domoticz.Debug("Heartbeat Init Count = " + str(InitHeartbeatCount) + " Getting FANSP")
						self.WMPConn.Send('GET,1:FANSP\n')
					if InitHeartbeatCount == 3:
						Domoticz.Debug("Heartbeat Init Count = " + str(InitHeartbeatCount) + " Getting VANEUD")
						self.WMPConn.Send('GET,1:VANEUD\n')
						Domoticz.Debug("Heartbeat Init Count = " + str(InitHeartbeatCount) + " Getting VANELR")
						self.WMPConn.Send('GET,1:VANELR\n')
						Domoticz.Debug("Heartbeat Init Count = " + str(InitHeartbeatCount) + " Getting ERRSTATUS")
						self.WMPConn.Send('GET,1:ERRSTATUS\n')
					if InitHeartbeatCount == 4:
						Domoticz.Debug("Heartbeat Init Count = " + str(InitHeartbeatCount) + " Getting ERRCODE")
						self.WMPConn.Send('GET,1:ERRCODE\n')
					if InitHeartbeatCount == 5:
						Domoticz.Debug("Heartbeat Init Count = " + str(InitHeartbeatCount) + " Getting LIMITS ONOFF")
						self.WMPConn.Send('LIMITS:ONOFF\n')
						Domoticz.Debug("Heartbeat Init Count = " + str(InitHeartbeatCount) + " Getting LIMITS MODE")
						self.WMPConn.Send('LIMITS:MODE\n')
						Domoticz.Debug("Heartbeat Init Count = " + str(InitHeartbeatCount) + " Getting LIMITS FANSP")
						self.WMPConn.Send('LIMITS:FANSP\n')
						Domoticz.Debug("Heartbeat Init Count = " + str(InitHeartbeatCount) + " Getting LIMITS VANEUD")
						self.WMPConn.Send('LIMITS:VANEUD\n')
					if InitHeartbeatCount == 6:
						Domoticz.Debug("Heartbeat Init Count = " + str(InitHeartbeatCount) + " Getting LIMITS VANELR")
						self.WMPConn.Send('LIMITS:VANELR\n')
						Domoticz.Debug("Heartbeat Init Count = " + str(InitHeartbeatCount) + " Getting LIMITS SETPTEMP")
						self.WMPConn.Send('LIMITS:SETPTEMP\n')
						Domoticz.Heartbeat(20)  # Extending heartbeat at last Limit
				if InitHeartbeatCount == 7:  # when count gets to this number and is connected, it will not increment and commence AMBTEMP Heartbeats
					Domoticz.Debug("Getting Ambient Temp")
					self.WMPConn.Send('GET,1:AMBTEMP\n')  # Get AMBTEMP at Heartbeat to confirm connected
			if (oustandingPings == 3):
				Domoticz.Log(self.WMPConn.Name + " has not responded to 3 heartbeats terminating connection.")
				if (self.WMPConn.Connected()):
					self.WMPConn.Disconnect()
					Domoticz.Debug("Heartbeat Init Count = " + str(InitHeartbeatCount))
				self.WMPConn = None


	def handleConnect(self):
		self.WMPConn = None
		Domoticz.Debug("Settings shorter heartbeat to speed up initialisation")
		Domoticz.Heartbeat(5)  # Setting the inital hearbeat timeout used for delaying startup messages - extended in onHeartbeat after counter reached
		self.WMPConn = Domoticz.Connection(Name="WMP_Connection", Transport="TCP/IP", Protocol="Line", Address=Parameters["Address"], Port=Parameters["Port"])
		self.WMPConn.Connect()


global _plugin
_plugin = BasePlugin()

def onStart():
	global _plugin
	_plugin.onStart()

def onStop():
	global _plugin
	_plugin.onStop()

def onConnect(Connection, Status, Description):
	global _plugin
	_plugin.onConnect(Connection, Status, Description)

def onMessage(Connection, Data):
	global _plugin
	_plugin.onMessage(Connection, Data)

def onCommand(Unit, Command, Level, Hue):
	global _plugin
	_plugin.onCommand(Unit, Command, Level, Hue)

def onNotification(Name, Subject, Text, Status, Priority, Sound, ImageFile):
	global _plugin
	_plugin.onNotification(Name, Subject, Text, Status, Priority, Sound, ImageFile)

def onDisconnect(Connection):
	global _plugin
	_plugin.onDisconnect(Connection)

def onHeartbeat():
	global _plugin
	_plugin.onHeartbeat()

	# Generic helper functions
def DumpConfigToLog():
	for x in Parameters:
		if Parameters[x] != "":
			Domoticz.Debug( "'" + x + "':'" + str(Parameters[x]) + "'")
	Domoticz.Debug("Device count: " + str(len(Devices)))
	for x in Devices:
		Domoticz.Debug("Device:           " + str(x) + " - " + str(Devices[x]))
		Domoticz.Debug("Device ID:       '" + str(Devices[x].ID) + "'")
		Domoticz.Debug("Device Name:     '" + Devices[x].Name + "'")
		Domoticz.Debug("Device nValue:    " + str(Devices[x].nValue))
		Domoticz.Debug("Device sValue:   '" + Devices[x].sValue + "'")
		Domoticz.Debug("Device LastLevel: " + str(Devices[x].LastLevel))
	return

Re: Intesisbox/Intesishome with Domoticz

Posted: Monday 22 February 2021 0:51
by CV8R
You're welcome and glad it helped. No plans for Github, I am far from a developer, a tinker is all. Would be a good project for someone to take on.

Re: Intesisbox/Intesishome with Domoticz

Posted: Tuesday 23 February 2021 23:43
by lgarrido
CV8R wrote: Monday 22 February 2021 0:51 You're welcome and glad it helped. No plans for Github, I am far from a developer, a tinker is all. Would be a good project for someone to take on.
Uploaded to Github:
https://github.com/luismalddonado/Intes ... thDomoticz

You are the author:
# IntesisHome Inegration with Domoticz
#
# Author: CV8R
#

In the next days I will prepare readme, etc.

Re: Intesisbox/Intesishome with Domoticz

Posted: Wednesday 24 February 2021 10:56
by waltervl
lgarrido wrote: Tuesday 23 February 2021 23:43
CV8R wrote: Monday 22 February 2021 0:51 You're welcome and glad it helped. No plans for Github, I am far from a developer, a tinker is all. Would be a good project for someone to take on.
Uploaded to Github:
https://github.com/luismalddonado/Intes ... thDomoticz

You are the author:
# IntesisHome Inegration with Domoticz
#
# Author: CV8R
#

In the next days I will prepare readme, etc.
Thank you Igarrido. I have added it to the wiki plugin list: https://www.domoticz.com/wiki/Plugins

Please add a link to this topic on the github readme for support.