Page 3 of 4

Re: Intergas Incomfort Heater control

Posted: Monday 12 December 2016 21:44
by artificia
anandus wrote:For what it's worth, here is the (Dutch) API-documentation:
http://www.filedropper.com/lan2rfgatewayhttpinterface
Hi, is it possible to re-upload the httpinterface documentation. It is not available already.

Thanks,

Jack

Re: Intergas Incomfort Heater control

Posted: Thursday 15 December 2016 16:33
by hbbrink
JeroenZeist wrote:Recently I bought a Intergas HREco 36 Heater (CV Ketel). It is connected to a simple Honeywell Round Modulation thermostat and a Incomfort Lan2RF Gateway with Incomfort app (iOS). I wanted to control the thermostat via Domoticz so build a script.

Required hardware:
- Intergas heater with RF
- Intergas Incomfor Lan2RF gateway
- A physicl thermostat

Required virtual sensors in Domoticz:
1. Virtual temperature sensor for actual temperature measured by thermostat
2. Virtual temperature sensor for currently set temperature setpoint in the physical thermostat
3. Virtual Thermostat setpoint

The script has 3 main functions:
1. Monitor current temperature in the room where the thermostat is placed and update a virtual temperature sensor
2. Monitor whether the temperature setpoint is changed via the physical thermostat or the app and update the virtual thermostat setpoint
3. Monitor whether you have changed the virtual thermostat setpoint in Domoticz and update the physical thermostat

Both the IDX and Name of the virtual devices are required in both scripts. Please udpate the config on the top of the scripts.
Also the scripts uses a library JSON.lua. This should be placed with the scripts in the /scripts/lua folder of Domoticz.
hi Jeroen,
Can you tell me how i can change the temperatur in domoticz.?
Perhabs in Dutch :oops:
i can see the indoor temp en the thermastat temp but i want to change de thermostat temp so the heating goos on.

Herbert

Re: Intergas Incomfort Heater control

Posted: Friday 16 December 2016 13:21
by JeroenZeist
hbbrink wrote:
hi Jeroen,
Can you tell me how i can change the temperatur in domoticz.?
Perhabs in Dutch :oops:
i can see the indoor temp en the thermastat temp but i want to change de thermostat temp so the heating goos on.

Herbert
You have to create a virtual device, type: Thermostat, SetPoint in Domoticz and put the name and IDX in both the scripts.

Re: Intergas Incomfort Heater control

Posted: Friday 16 December 2016 14:50
by artificia
Hi all,

Can anyone explain what is the different between
setpoint and setpoint override

Thanks,

Jack

Re: Intergas Incomfort Heater control

Posted: Tuesday 27 December 2016 9:30
by tonadam
tonadam wrote:Cool I found you guys. Didn't release others into domoticz where using the "Intergas Incomfort Heater control" as well. The reviews for the IOS app where not that promising, but it has been working out reasonably well. Before I started using domotics, I used a self written perl script to be able to read and set the temperature from the command line.

Now testing the LUA scripts. Basic functions seem to work. Many thanks for publishing these Jeroen, that saves me a lot work.

Btw, my gateway reports the following firmware:

Firmware version: IC3-ICN-V1.06
Build date: Oct 20 2014 00:08:00

Does anybody know if there is a more recent version, and if so how to update it?

I did see a couple of times that the script started to loop on:

2016-02-27 18:50:20.216 LUA: Difference between Virtual thermostat and set temp
2016-02-27 18:50:20.216 LUA: Virtual thermostat is updated later then physical thermostat
2016-02-27 18:50:20.216 LUA: Calculated value to set temperature (used by lan2rf gateway): 90
2016-02-27 18:50:20.216 LUA: URL to change temperature setpoint: http://X.X.X.X/data.json?heater=0&setpo ... rmostat=0×

Somehow it was unable to set the temp to whatever it thought it should be.
Looking at the website

Room setpoint 1: would still be at the old temp.
Room setpoint override 1: and would be set correctly by the LUA script. (room_temp_set_1_lsb)

So it kept on trying/looping to set the temperature. Need to look further into that. First will try the lame approach of rebooting the Intergas controller. ;)
First of all, I'm really interested in the firmware versions, when Jeroen's script works out of the box. To get the firmware version, connect using a browser to your gateway IP. On the first page it's displayed. I have "Firmware version: IC3-ICN-V1.06"

Now, the problem I have is, that when I change the temperature via Domoticz, the lua script script_device_intergasincomfort.lua, will continue to change the override temp on the gateway. On the average every 5 seconds. The temp never actually changes, so this loop does not stop and effectively creates a DOS attack on the gateway.

Changing the temp with 1 HTTP request works well- I use that often from cron, and also implemented that in my scripts that detect if we are home. My theory is that because of the loop the temp never gets updated, since the override temp is constantly set again.

To test this I made the following change, I added a 'user variable', that gets updated when the temp is set. It will only update the temp if the last update timestamp for that variable and the 'virtual thermostat' are not equal. So effectively it will only update it once.

Before this patch works, go via the Webinterface to:

Settings - More options, User variables:

add:

Name: intergas.lastupdate
Type: String
Value: test

Code: Select all

@@ -38,8 +38,15 @@
 			if debug then print("Lastupdated temperature is later then virtual thermostat setpoint") end
 			commandArray[4] = {['OpenURL']=domoticzaddress..'/json.htm?param=udevice&type=command&idx='..idxsetthermostat..'&nvalue=0&svalue='..otherdevices_svalues[currentlyset]}
 		elseif otherdevices_lastupdate[thermostatname] > otherdevices_lastupdate[currentlyset] then
-			if debug then print("Virtual thermostat is updated later then physical thermostat") end
-			SetTemperature(otherdevices_svalues[thermostatname])
+		
+			if debug then 
+				print("Tijd thermostatname gezet: "..otherdevices_lastupdate[thermostatname]);
+				print("Tijd intergas update: "..uservariables_lastupdate['intergas.lastupdate']);
+   			end
+			if ( uservariables_lastupdate['intergas.lastupdate'] < otherdevices_lastupdate[thermostatname] ) then
+				if debug then print("Virtual thermostat is updated later then physical thermostat") end
+				SetTemperature(otherdevices_svalues[thermostatname])
+			end
 		end
 	end
 end
@@ -51,10 +58,11 @@
 	url='http://'..lan2rf..'/data.json?heater=0&setpoint='..tosettempcalc..'&thermostat=0×'
 	if debug then print("URL to change temperature setpoint: "..url) end
 	if debug then print("Test thermostat setpoint: "..tosettemp) end
+	commandArray['Variable:intergas.lastupdate']= tostring("updated")
 	commandArray[5] = {['OpenURL']=url}
 end
 
 -- Incomfort -----------------------------------------------------------------------------------------------------
 commandArray = {}
 UpdateVirtualThermostat()
-return commandArray 
\ No newline at end of file
+return commandArray
And now it works, it will only do 1 http request. After about 2 minutes the boiler will actually start using the override temp.

Down side, if the update fails, it will never try again. Some error checking, if the HTTP request actually succeeded, before updating 'intergas.lastupdate' could improve that.

Re: Intergas Incomfort Heater control

Posted: Thursday 19 January 2017 21:35
by etamminga
Hi,
I've developed a Domoticz 'driver' for the LAN2RF gateway. It's available in the Beta release as of today.
Please try it and let me know how it works for you.
Regards,
Erik

Re: Intergas Incomfort Heater control

Posted: Friday 20 January 2017 11:38
by benotje
okay I want to test
but what Poort should I use for it
Regards,
Benno

Re: Intergas Incomfort Heater control

Posted: Friday 20 January 2017 12:41
by benotje
benotje wrote:okay I want to test
but what Poort should I use for it
Regards,
Benno
Yes port 80 works
I must thank you
this is really cool

Regards,
Benno.

Re: Intergas Incomfort Heater control

Posted: Thursday 26 January 2017 12:16
by ScoTech
Hi There,

First post here and I will hope to contribute to the community myself.
Currently working on some sensors for my Pets (Bearded Dragons (Reptiles)) control and dashboard stuff.

@etamminga
Yesterday I got some solar panels and a new Boiler (Intergas) currently testing your 'driver'. Do you need some specific feedback sir?
I can read temp sens en boiler pressure and controle the setpoint. Also believe its working. If you need anything specific please give me a pm or question.
heat2.jpg
heat2.jpg (82.59 KiB) Viewed 3141 times
heat1.jpg
heat1.jpg (72.53 KiB) Viewed 3141 times

Re: Intergas Incomfort Heater control

Posted: Thursday 26 January 2017 12:49
by etamminga
Great to see it is working. Any feedback is welcome.
Regards, Erik


Verzonden vanaf mijn iPhone met Tapatalk

Re: Intergas Incomfort Heater control

Posted: Friday 27 January 2017 15:57
by Doomic
wanna say THANKS! this project was on my "things to do" list for a long time. great i finaly found this post.
Changed the JSON path in the time.lua file to the install dir of domoticz. Perhaps this can be placed at the top of the script as well?
And not sure if i could override the exsisting json.lua file in the domoticz install dir... guess it is only a sample file, however i changed the name of your json file.
But looks like it works great.

Re: Intergas Incomfort Heater control

Posted: Monday 20 February 2017 14:57
by declan
First Thanks for iT, iT works great.
Maby you can add the return temperture of the cv and the power use

Re: Intergas Incomfort Heater control

Posted: Sunday 30 April 2017 12:17
by JeroenZeist
Good work etamminga, many thanks. Seems to integrate better than my .lua scripts. I tried your version earlier but my Domoticz instance became unstable, not sure whether that was caused by your driver. Seems to be ok now.
One remark, when changing the setpoint temperature on the physical thermostan in the living room the 'Room Thermostat Setpoint' is updated, however the device to control the setpoint in Domoticz 'Room Override Setpoint' does not update (it doesn't either in the web interface of the gateway).
Personally I think it is nice if one Thermostat device in Domoticz shows the actual setpoint and that it can be used to change that Setpoint.
What do you think?

Update 1-5-2017: Never mind, seems to work okay. Think it only happened the first time after configuring the plugin.

Re: Intergas Incomfort Heater control

Posted: Monday 15 May 2017 17:18
by Palermo
Hi all,
I have an question.

I own a intergas heater and if installed the LAN2RF module. This works fine.
On my phone i control the heater.

Now i also installed domiticz and a saw in the hardware options the Intergas InComfort LAN2RF Gateway.
So i selected this option and i enterd the IP address of the module with Port 80.

Now i`m receiving an error

Code: Select all

Error: InComfort: Error getting current state
Do i have still follow the installation procedure as explained in the beginning of this topic..

Greetings
Palermo

Re: Intergas Incomfort Heater control

Posted: Sunday 03 September 2017 18:48
by tonadam
Erik, upgraded last week and this seems to work great. Many Thanks!

Re: Intergas Incomfort Heater control

Posted: Sunday 05 November 2017 10:42
by Desolator
etamminga wrote:
Thursday 19 January 2017 21:35
Hi,
I've developed a Domoticz 'driver' for the LAN2RF gateway. It's available in the Beta release as of today.
Please try it and let me know how it works for you.
Regards,
Erik
Nice! Works like a charm.

Re: Intergas Incomfort Heater control

Posted: Sunday 05 November 2017 10:47
by Desolator
declan wrote:
Monday 20 February 2017 14:57
First Thanks for iT, iT works great.
Maby you can add the return temperture of the cv and the power use
Mine is different?

Image

And i looked into the API documentation (posted earlier) and could not find any power or return temperature strings...

Re: Intergas Incomfort Heater control

Posted: Wednesday 22 November 2017 0:05
by tonadam
My wife and daughter sometimes set the room thermostate to ridiculous temperatures like 26 degrees or so. They think the room will then warm up quicker, I can't convince them setting it directly to the desired temp will work as well. I 'addressed' that using this script:

scripts/lua/script_device_incomfort.lua:

Code: Select all

--  Maximum acceptable temperature
local max_temp = 22
--  Room Override Setpoint
local idx_override_setpoint = 2244
--
local temp_device = "Room Thermostat Setpoint"
local temp = tonumber(otherdevices_svalues[temp_device])

commandArray = {}
  if ( devicechanged['Room Thermostat Setpoint'] ) then
    if (temp > max_temp ) then
      print("Room Thermostat Setpoint too high: "..temp)
--    commandArray['Room Override Setpoint']='22'
      commandArray['OpenURL']='localhost:8080/json.htm?type=command&param=udevice&idx='..idx_override_setpoint..'&nvalue=0&svalue='..max_temp
      commandArray['SendNotification']='Incomfort CV#Temp was too high '..temp..'#0'
    end
  end
return commandArray
This will override a temp > 22 to 22. Works very well.

The code is not optimal, as I didn't get it working to set 'Room Override Setpoint' directly. Until I find out why, I use the workaround by setting the override via an API call on port 8080.

Adjust IDX, to correct number found in the devices table.

It uses dzVents: https://www.domoticz.com/wiki/Events

Re: Intergas Incomfort Heater control

Posted: Friday 02 March 2018 13:49
by Martijn684
Hi Erik,

Really nice driver, thank you!! I got a LAN2RF gateway just for this - so that I can log what's happening with the heating system.
At home, the Intergas HRE parameters are set to a LT/HT (2 zone) system (parameter A = 7).
The LT zone is controlled using a wired Honeywell round, the HT zone using an RF Honeywell round (T87RF2025).

According to Intergas, this LT/HT setup only allows you to control the LT temperature using the LAN2RF gateway.
I can see that the Domoticz device for the setpoint of thermostat 2 shows a different temperature than the RF thermostat,
so that seems to confirm their statement.

Of course, that does not stop me from trying: I tried to control the HT zone setpoint using the override for thermostat 2.
To my surprise, this results in a change of thermostat 1 (the LT thermostat) after a few minutes.
I guess that this has purely to do with the LAN2RF firmware and nothing with your driver - at least, I could not see anyting wrong in the code.

Do you have any experience with a 2 zone setup?
etamminga wrote:
Thursday 26 January 2017 12:49
Great to see it is working. Any feedback is welcome.
Regards, Erik


Verzonden vanaf mijn iPhone met Tapatalk

Re: Intergas Incomfort Heater control

Posted: Tuesday 13 November 2018 22:37
by TomHeino
Hi guys/girls,

I've just bought a Incomfort gateway with a Honeywell Round Modulation thermostat, with firmware version IC3-ICN-V1.12
In the app i only can see my fan and pressure.
I want to see temperatures.
Did i bought an old version :oops: ?
Or can i update the gateway?

I want to program the gateway in my domoticz (i have a Rasberry PI).
Can some one please explain me step by step what to do and how to program (i;m still a program newb)?

If u want u can send me a private message, maybe we can contact by phone or by email.

greetings, Tom