Hi, is it possible to re-upload the httpinterface documentation. It is not available already.anandus wrote:For what it's worth, here is the (Dutch) API-documentation:
http://www.filedropper.com/lan2rfgatewayhttpinterface
Thanks,
Jack
Moderator: leecollings
Hi, is it possible to re-upload the httpinterface documentation. It is not available already.anandus wrote:For what it's worth, here is the (Dutch) API-documentation:
http://www.filedropper.com/lan2rfgatewayhttpinterface
hi Jeroen,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.
You have to create a virtual device, type: Thermostat, SetPoint in Domoticz and put the name and IDX in both the scripts.hbbrink wrote:
hi Jeroen,
Can you tell me how i can change the temperatur in domoticz.?
Perhabs in Dutch
i can see the indoor temp en the thermastat temp but i want to change de thermostat temp so the heating goos on.
Herbert
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"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.
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
Yes port 80 worksbenotje wrote:okay I want to test
but what Poort should I use for it
Regards,
Benno
Code: Select all
Error: InComfort: Error getting current state
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¶m=udevice&idx='..idx_override_setpoint..'&nvalue=0&svalue='..max_temp
commandArray['SendNotification']='Incomfort CV#Temp was too high '..temp..'#0'
end
end
return commandArray
Users browsing this forum: No registered users and 1 guest