Intergas incomfort® | LAN2RF gateway

At home i have a Intergas HReco 36 with a LAN2RF gateway. Previous with domoticz this component was working well. I Also tried to write a component for home assistant but without any good luck. Can someone please help me to make the compoenten. I know had the code has to work.
Productlink :
http://www.intergas-verwarming.nl/zakelijk/productcategorie/incomfort/

Examples:
Python : https://github.com/bwesterb/incomfort/blob/master/src/incomfort.py

I can debug and test the code, but making it for me is a little bit to difficult.

Other Examples:
Coffee : https://github.com/sirchia/pimatic-intergasincomfort
Domoticz : https://www.domoticz.com/forum/viewtopic.php?t=7745

I’m also interested in a solution for this one :slight_smile:

The Intergas incomfort LAN2RF gateway has a convenient HTTP interface.

Here is the documentation:
http://www.filedropper.com/lan2rfgatewayhttpinterface

For example in my case I can use this HTTP GET:
http://192.168.XXX.XXX/data.json?heater=0&setpoint=150&thermostat=0

The above Python example implemented this in a rigorous way
But for simply setting temperature a simple http request coupled to a trigger in home assistant would do the job.

My intention is to couple the lights off button with a thermostat to low temperature action, conditioned on the time of day.

got it working without building a whole module :slight_smile:
see below for my config

cv_down.sh

curl 'http://192.168.XX.XX/data.json?heater=0&setpoint=100&thermostat=0'

configuration.yaml

shell_command:
  cv_down: sh ~/.homeassistant/cv_down.sh
  cv_up: sh ~/.homeassistant/cv_up.sh

scripts.yaml

turn_cv_down:
  sequence:
    service: shell_command.cv_down

turn_cv_up:
  sequence:
    service: shell_command.cv_up

automations.yaml


# All lights and CV off when holding button 4
- alias: Dimmer Woonkamer Hold Off
  trigger:
    - platform: state
      entity_id: sensor.woonkamer_dimmer
      to: '4_hold'
  action:
    - service: light.turn_off
      data:
        entity_id: light.all_hue_lights
    - service: shell_command.cv_down

Hi,

Just installed hass.io on a RPI 3 and now playing with the configuration.
I also own an incomfort LAN2RF gateway and i can set the temperature manually with curl commands to the api, but i was wondering if anybody has been able to show some virtual thermostate on the frontend.

I would like to show the current temp on the frontend and also change the temp with controls.

Thanks!

Regards,
Wimmio

I’m also looking forward to this implementation. In Domoticz it’s in the core now, see: https://github.com/domoticz/domoticz/blob/b11aff2a59bd80c9e41cca7e97816a96de618116/hardware/InComfort.cpp

Anyone got a implementation yet? Not just putting the CV down like rjghendrikx but also see the current temperatures and the possibility to change the degrees?

Anyone interested in building this for a fee? Just send me a message with your price. I’m not familiar with Python, if Home Assistant was build in PHP I could do it…

It needs a temperature sensor which reads every x seconds the http://ip-address/data.json file which look like this:

{"nodenr": 229,
"ch_temp_lsb": 88,
"ch_temp_msb": 16,
"tap_temp_lsb": 168,
"tap_temp_msb": 14,
"ch_pressure_lsb": 175,
"ch_pressure_msb": 0,
"room_temp_1_lsb": 223,
"room_temp_1_msb": 8,
"room_temp_set_1_lsb": 252,
"room_temp_set_1_msb": 8,
"room_temp_2_lsb": 255,
"room_temp_2_msb": 127,
"room_temp_set_2_lsb": 255,
"room_temp_set_2_msb": 127,
"displ_code": 126,
"IO": 0,
"serial_year": 16,
"serial_month": 5,
"serial_line": 16,
"serial_sn1": 0,
"serial_sn2": 93,
"serial_sn3": 83 ,
"room_set_ovr_1_msb": 8,
"room_set_ovr_1_lsb": 252,
"room_set_ovr_2_msb": 0,
"room_set_ovr_2_lsb": 0,
"rf_message_rssi": 34,
"rfstatus_cntr": 0}

We grab the room_temp_1_lsb (223) and room_temp_1_msb (8) and do the calculation to get the current room temp:

(223 + (8 * 256)) / 100 = 22.71 celsius

From that json file we can also get the setpoint on the thermostat in the room the same way from room_temp_set_1.

To change the temperature we just have to call http://ip-address/data.json?heater=0&setpoint=SETPOINT&thermostat=0 where we need to replace SETPOINT with 0 for 5 degrees celsius, 5 for 5.5, etc. So when we like to set the temperature to 14 degrees celsius we’ve to set it to 90, 20 degrees to 150 and so on.

That’s just for me, maybe other people want more features. In that case look at the Domoticz implementation as posted earlier.

Extra code references here: https://github.com/search?q=incomfort and the Javascript from the incomfort Internet Gateway on http://ip-address/roomthermostat.htm?heater=0:

function updateStatus(data) {
    var jsondata = JSON.parse(data);
    var room_temp1 = (jsondata.room_temp_1_lsb + jsondata.room_temp_1_msb*256) / 100;
    var room_set1 = (jsondata.room_temp_set_1_lsb + jsondata.room_temp_set_1_msb*256) / 100;
    var room_set_ovr1 = (jsondata.room_set_ovr_1_lsb + jsondata.room_set_ovr_1_msb*256) / 100;
    var room_temp2 = (jsondata.room_temp_2_lsb + jsondata.room_temp_2_msb*256) / 100;
    var room_set2 = (jsondata.room_temp_set_2_lsb + jsondata.room_temp_set_2_msb*256) / 100;
    var room_set_ovr2 = (jsondata.room_set_ovr_2_lsb + jsondata.room_set_ovr_2_msb*256) / 100; 
    if (room_temp1 != 327.67){
        document.getElementById('room_temp1').innerHTML = room_temp1;
        }
    if (room_set1 != 327.67){
        document.getElementById('room_set1').innerHTML = room_set1;
        }
    if (room_set_ovr1 != 327.67){
	document.getElementById('room_set_ovr1').innerHTML = room_set_ovr1;
	}
    if (room_temp2 != 327.67){
    document.getElementById('room_temp2').innerHTML = room_temp2;
        }
    if (room_set2 != 327.67){
	document.getElementById('room_set2').innerHTML = room_set2;
    }
    if (room_set_ovr2 != 327.67){
	document.getElementById('room_set_ovr2').innerHTML = room_set_ovr2;
    }
}
function updateStatusSetpoint(data) {
    var jsondata_therm = JSON.parse(data);
    var room_set_ovr_1 = (jsondata_therm.room_set_ovr_1_lsb + jsondata_therm.room_set_ovr_1_msb*256) / 100;
    var room_set_ovr_2 = (jsondata_therm.room_set_ovr_2_lsb + jsondata_therm.room_set_ovr_2_msb*256) / 100; 
    document.getElementById('setpointstatus').innerHTML = "Roomtemperature 1 set to " + room_set_ovr_1 +"&#176;C<br>Roomtemperature 2 set to " + room_set_ovr_2 + "&#176;C<br>(It may take a while for the roomthermostat to respond)";
    document.getElementById('room_set_ovr1').innerHTML = room_set_ovr_1;
    document.getElementById('room_set_ovr2').innerHTML = room_set_ovr_2;
}
function update_setpoint(thermostat){
    var d = document.getElementById("setpoint").value;
    newAJAXCommand('data.json?heater=0&setpoint='+d+'&thermostat='+thermostat ,updateStatusSetpoint , false);
}
setTimeout("newAJAXCommand('data.json?heater=0', updateStatus, true)",500);

Guys, good news! Just created my first working beta version! See: New climate / thermostat implementation tips

@Patrick89, @wdool, @rjghendrikx en @wimmio: I’ve created a repo on Github with the code and installation notes: https://github.com/royduin/home-assistant-incomfort. Please let me know if your using it.

1 Like

Great work I have it working since a few days… looks and works great!

1 Like

@royduin, thanks for the home-assistant-incomfort PY code and component.

Working perfectly in my home automation here !!! Even built my first automatisions
with it (testing should be tonight / tomorrow).

1 Like

Using it also, works fine!!! :smiley:

1 Like

FYI, https://pypi.org/project/incomfort-client/ (replaces https://github.com/zxdavb/intouch-client)

In this topic you can find a custom component for this: New climate / thermostat implementation tips

LOL forget about that, I completely missed these topics are related.

1 Like

Really glad with the update of 0.92 !! Thanks for the great support :smiley:

1 Like

Would anyone be interested in testing this: https://pypi.org/project/incomfort-client/?

It can form the basis for getting official HA support for InComfort / Intouch.

Unfortunately, I have no room thermostats, so could use some testers. Neither can I test authentication for the newer gateways.

It includes a basic CLI that can be used to read parameters:

python intouchclient/__init__.py ${HOSTNAME}

… and set an override temperature:

python intouchclient/__init__.py ${HOSTNAME} --temp 20

Well, no testers yet. Would anyone like to test:

Bring it on :slight_smile:

I think I have all the components, just very new to hass, so need some help in getting this runnign I guess if that’s ok.

I would love, but where to place te files ? Because still will not be a custom component :wink: