Intelligent Immersion solar power diverter and energy monitor

I’d like to integrate this solar diverter. The device (details at https://www.intelligent-immersion.co.uk/) can be accessed using HTTP and returns an XML document. http://ip.address/ii3.xml returns something like

<response>
<script/>
<immersionpower>0</immersionpower>
<immersionpowerm>0</immersionpowerm>
<avggridexport>-695</avggridexport>
<avggridexportm>-693</avggridexportm>
<timedoverride>2</timedoverride>
<tmro>129</tmro>
<switchstatus>2</switchstatus>
<relaymode>192</relaymode>
<relayoffimport>0</relayoffimport>
<relayonthreshold>2500</relayonthreshold>
<relaytimeforthreshold>1200</relaytimeforthreshold>
<powerminimum>50</powerminimum>
<immersionsize>2700</immersionsize>
<cloud>0</cloud>
<numberoutputs>8</numberoutputs>
<relaystatus>0</relaystatus>
<novram>0</novram>
<wifiswitch>0</wifiswitch>
<wifirelaymode>0</wifirelaymode>
<wifirelayoffimport>255</wifirelayoffimport>
<wifirelayonthreshold>255</wifirelayonthreshold>
<wifirelaytimeforthreshold>255</wifirelaytimeforthreshold>
<wifipowerminimum>255</wifipowerminimum>
<wifiimmersionsize>255</wifiimmersionsize>
<wificloud>255</wificloud>
<wifinumberoutputs>8</wifinumberoutputs>
<wifirelay>0</wifirelay>
<wifinovram>0</wifinovram>
<wifict>255</wifict>
<cloudstatus>3</cloudstatus>
<serverreset>7:20</serverreset>
<ct2>0</ct2>
<ct2m>6</ct2m>
<ct3>0</ct3>
<ct3m>0</ct3m>
<houseload>695</houseload>
<availpower>0</availpower>
<boostminutes>0</boostminutes>
<overriderunning>0</overriderunning>
<outputs>0 0 0 0 0 0 0 0</outputs>
<inputs>none</inputs>
<serverip>0.0.0.0</serverip>
<medtermge>0</medtermge>
<relaytime>20:00</relaytime>
<arraychksum>85</arraychksum>
...
</response>

To make changes pass parameters via GET ie of the form //ii3.local/ii3.xml?xx=a&amp;yy=b&amp;zz=c

parameters currently available
Parameter xx a
override switch sw 0 = local 1 = off 2 = auto 3 = on
relay mode rm 0 = local 224 = none 192 = second load proportional 160 = second load switched 96 = circulation pump
relay rl 0 = off 1 = on
note the relay mode must be set to 224 ie none before the relay will operate.

I am now reading the device successfully using the REST integration. I have not yet looked at issuing commands to it.

Hi HAC S-bank,

I also have one of these units and I am interested in how you did this? I am a bit new to HA and Rest. I think I have something that might work but although it checks out config wise I don’t get any sensors from it.


Here is my REST sensor definition, which I made by editing the XML response from accessing the unit with a browser.
I put it in a separate file and used “include” in the main configuration file.

1 Like

Here is my current rest: definition for the Intelligent Immersion I3 solar diverter

- scan_interval: 10
  resource: http://i2w.local/ii3.xml
  sensor:
    - name: I3
      unique_id: i3w
      json_attributes_path: "$.response"
      value_template: "OK"

    - name: Immersion Power
      unique_id: immersionpower
      json_attributes_path: "$.response"
      json_attributes: "immersionpower"
      value_template: '{{ value_json.response.immersionpower }}'
      device_class: "power"
      unit_of_measurement: "W"

    - name: "Immersion Power (mean)"
      unique_id: immersionpowerm
      json_attributes_path: "$.response"
      value_template: '{{ value_json.response.immersionpowerm }}'
      device_class: "power"
      unit_of_measurement: "W"

    - name: "Avg Grid Export"
      unique_id: avggridexport
      json_attributes_path: "$.response"
      value_template: '{{ value_json.response.avggridexport }}'
      device_class: "power"
      unit_of_measurement: "W"

    - name: "Avg Grid Export (mean)"
      unique_id: avggridexportm
      json_attributes_path: "$.response"
      value_template: '{{ value_json.response.avggridexportm }}'
      device_class: "power"
      unit_of_measurement: "W"

    - name: "CT2"
      unique_id: ct2
      json_attributes_path: "$.response"
      value_template: '{{ value_json.response.ct2 }}'
      device_class: "power"
      unit_of_measurement: "W"

    - name: "CT2 (mean)"
      unique_id: ct2m
      json_attributes_path: "$.response"
      value_template: '{{ value_json.response.ct2m }}'
      device_class: "power"
      unit_of_measurement: "W"

    - name: "CT3"
      unique_id: ct3
      json_attributes_path: "$.response"
      value_template: '{{ value_json.response.ct3 }}'
      device_class: "power"
      unit_of_measurement: "W"

    - name: "CT3 (mean)"
      unique_id: ct3m
      json_attributes_path: "$.response"
      value_template: '{{ value_json.response.ct3m }}'
      device_class: "power"
      unit_of_measurement: "W"

    - name: "House load"
      unique_id: houseload
      json_attributes_path: "$.response"
      value_template: '{{ value_json.response.houseload }}'
      device_class: "power"
      unit_of_measurement: "W"

    - name: "Available power"
      unique_id: availpower
      json_attributes_path: "$.response"
      value_template: '{{ value_json.response.availpower }}'
      device_class: "power"
      unit_of_measurement: "W"

    - name: "boostminutes"
      unique_id: boostminutes
      json_attributes_path: "$.response"
      value_template: '{{ value_json.response.boostminutes }}'
      device_class: "duration"
      unit_of_measurement: "min"

#        - "timedoverride"
#        - "tmro"
#        - "relaymode"
#        - "relaystatus"
#        - "switchstatus"
#        - "cloudstatus"
#        - "serverreset"
#        - "overriderunning"
#        - "medtermge"