Jump to content
Thank you for the great forum, Safe Driving over the weekend. Sincerely Jason
vlan_one

ICC to Home Assistant integration

Recommended Posts

This is my first post on this forum and I thought it would be good to have a contribution as a first post and hope to help someone in future.

I have a 'big' deployment of Home Assistant running at home with all my lights, geyser and pool pump being controlled via Sonoffs with Tasmota Fw. Some of these devices are controlled via automation scripts to switch on the geyser at certain times or the lights when I get home after dark.

Now... with me getting into solar energy and buying a variant of the Axpert inverter it was a no brainer to look into ICC (although as I am writing this I am still on my 7 day trial). I installed it and had to get used to the interface. A few days in and I am liking it very much. I keep checking the dashboard for stats. Logging into VNC from my PC and phone is becoming tedious and I noticed that sometimes the ICC app hangs for a while. In order to make it easier I have checked with Manie about the MQTT capabilities and I have been able to successfully extract data from ICC.

At first I tried to push all the ICC data to my MQTT broker running on my Home Assistant instance, but for some reason it took a dive. I reverted the MQTT back to the local ICC broker. I then setup a MQTT bridge on my Home Assistant broker to only extract certain topics from ICC and then integrated this into my Energy page for quick viewing of my energy stats.

I had to connect to the ICC broker to scan for all the topics used by ICC. I did this with MQTT FX. I then setup the MQTT bridge as below:

Go to the HASS.io tab in Home Assistant, click on Mosquitto and change the config as below. Change customize > Active to true.

{
  "logins": [
    {
      "username": "xxxxxxxx",
      "password": "xxxxxxxx"
    }
  ],
  "anonymous": true,
  "customize": {
    "active": true,
    "folder": "mosquitto"
  },
  "certfile": "fullchain.pem",
  "keyfile": "privkey.pem"
}

Click save

SSH to HASS.io and log in.

cd ..
cd share
mkdir mosquito
cd mosquito
touch mosquitto.conf
nano mosquito.conf
add the following text:

#connection ICC
connection ICC
address xxx.xxx.xxx.xxx

topic <topic as scanned> in 0

Press Ctrl-X, type Y to save.

I subscribribed to the follwing as an initial test:
topic Inverter/Month_PV_Total in 0
topic Inverter/SolarKwUse in 0
topic Inverter/MaxPvDay in 0

Go to the HASS.io tab in Home Assistant, click on Mosquitto and click restart to restart the broker.

If all goes well, connecting to your Home Assistant broker and scanning for the topics should show the ICC topics your Home Assistant broker subscribed to. Just add these topics as sensors in your configuration.yaml file on Home Assistant adn you should be able to see the info.

Now I can use this data to use my Home Assistant to check the PV input and switch on the geyser or poolpump to burn the excess energy generated.

PS: I am enjoying all the wealth of info on this great site.

Edited by vlan_one
formatting line spacing

Share this post


Link to post
Share on other sites

I have not no. I am not well versed in Linux and therefore prefer to keep these applications separate to allow easier troubleshooting. My devices are also not all in one location so I need to have them separate in any case.

Share this post


Link to post
Share on other sites
On 2019/06/13 at 2:47 PM, Durran said:

Hi VLAN_One, have you tried running Hass.io on the RPI which runs ICC?

Are you concerned about cpu load running both from one Pi? I'm gonna try this today, but I think icc is already quite cpu intensive so... we shall see!

Share this post


Link to post
Share on other sites

Turns out, CPU load is not the issue. Hass.io doesnt enjoy running on same box as ICC using an off the shelf installation (pretty much all Im capable of in Linux unfortunately)

What I noticed:

Having installed Configurator, I get a 403 Forbidden from nginx

Having installed Samba (an alternate way to configure/backup configs), the share doesnt appear on my LAN (10.0.0.0/8). The config I used for Samba was:

{
  "workgroup": "WORKGROUP",
  "username": "xxxxxx",
  "password": "xxxxxx",
  "interface": "wlan0",
  "allow_hosts": [
    "10.0.0.0/8",
    "172.16.0.0/12",
    "192.168.0.0/16"
  ]
}

I'd be really happy if someone who has managed to get these two to work on the same box as ICC could share :)

Share this post


Link to post
Share on other sites
9 hours ago, Jimbo said:

Having installed Samba (an alternate way to configure/backup configs), the share doesnt appear on my LAN (10.0.0.0/8). The config I used for Samba was:

{
  "workgroup": "WORKGROUP",
  "username": "xxxxxx",
  "password": "xxxxxx",
  "interface": "wlan0",
  "allow_hosts": [
    "10.0.0.0/8",
    "172.16.0.0/12",
    "192.168.0.0/16"
  ]
}

I

I managed to get Samba working on my ICC Pi using the instructions here: https://www.raspberrypi.org/documentation/remote-access/samba.md

Did you also include a folder on the Pi to share?  Something similar to this should do the trick:

[share]
    path = /home/pi/shared
    read only = no
    public = yes
    writable = yes

Share this post


Link to post
Share on other sites
On 2019/04/20 at 11:13 PM, vlan_one said:

This is my first post on this forum and I thought it would be good to have a contribution as a first post and hope to help someone in future.

I have a 'big' deployment of Home Assistant running at home with all my lights, geyser and pool pump being controlled via Sonoffs with Tasmota Fw. Some of these devices are controlled via automation scripts to switch on the geyser at certain times or the lights when I get home after dark.

Now... with me getting into solar energy and buying a variant of the Axpert inverter it was a no brainer to look into ICC (although as I am writing this I am still on my 7 day trial). I installed it and had to get used to the interface. A few days in and I am liking it very much. I keep checking the dashboard for stats. Logging into VNC from my PC and phone is becoming tedious and I noticed that sometimes the ICC app hangs for a while. In order to make it easier I have checked with Manie about the MQTT capabilities and I have been able to successfully extract data from ICC.

At first I tried to push all the ICC data to my MQTT broker running on my Home Assistant instance, but for some reason it took a dive. I reverted the MQTT back to the local ICC broker. I then setup a MQTT bridge on my Home Assistant broker to only extract certain topics from ICC and then integrated this into my Energy page for quick viewing of my energy stats.

I had to connect to the ICC broker to scan for all the topics used by ICC. I did this with MQTT FX. I then setup the MQTT bridge as below:

Go to the HASS.io tab in Home Assistant, click on Mosquitto and change the config as below. Change customize > Active to true.

{
  "logins": [
    {
      "username": "xxxxxxxx",
      "password": "xxxxxxxx"
    }
  ],
  "anonymous": true,
  "customize": {
    "active": true,
    "folder": "mosquitto"
  },
  "certfile": "fullchain.pem",
  "keyfile": "privkey.pem"
}

Click save

SSH to HASS.io and log in.

cd ..
cd share
mkdir mosquito
cd mosquito
touch mosquitto.conf
nano mosquito.conf
add the following text:

#connection ICC
connection ICC
address xxx.xxx.xxx.xxx

topic <topic as scanned> in 0

Press Ctrl-X, type Y to save.

I subscribribed to the follwing as an initial test:
topic Inverter/Month_PV_Total in 0
topic Inverter/SolarKwUse in 0
topic Inverter/MaxPvDay in 0

Go to the HASS.io tab in Home Assistant, click on Mosquitto and click restart to restart the broker.

If all goes well, connecting to your Home Assistant broker and scanning for the topics should show the ICC topics your Home Assistant broker subscribed to. Just add these topics as sensors in your configuration.yaml file on Home Assistant adn you should be able to see the info.

Now I can use this data to use my Home Assistant to check the PV input and switch on the geyser or poolpump to burn the excess energy generated.

PS: I am enjoying all the wealth of info on this great site.

Hi there vlan_one, what username and password did you use here? is it the ICC username/password? TIA.

Share this post


Link to post
Share on other sites
8 minutes ago, Lord Buckethead said:

Hi there vlan_one, what username and password did you use here? is it the ICC username/password? TIA.

Yup, I tried this yesterday and works well. its the ICC username and password

Share this post


Link to post
Share on other sites
17 minutes ago, Durran said:

Yup, I tried this yesterday and works well. its the ICC username and password

Thanks for your response. I tried the above, and I don't seem to be connecting to ICC. See my logs below.

 

Log
[12:42:31] INFO: Setup mosquitto configuration
[12:42:31] WARNING: SSL not enabled - No valid certs found!
[12:42:31] INFO: Found local users inside config
[12:42:32] INFO: Initialize Hass.io Add-on services
[12:42:32] INFO: Initialize Home Assistant discovery
[12:42:32] INFO: Start Mosquitto daemon
1581072152: Loading config file /share/mosquitto/mosquitto.conf
1581072152: mosquitto version 1.6.3 starting
1581072152: Config loaded from /etc/mosquitto.conf.
1581072152: Loading plugin: /usr/share/mosquitto/auth-plug.so
1581072152: |-- *** auth-plug: startup
1581072152:  ├── Username/password checking enabled.
1581072152:  ├── TLS-PSK checking enabled.
1581072152:  └── Extended authentication not enabled.
1581072152: Opening ipv4 listen socket on port 1883.
1581072152: Opening ipv6 listen socket on port 1883.
1581072152: Opening websockets listen socket on port 1884.
1581072152: Warning: Mosquitto should not be run as root/administrator.
1581072152: Connecting bridge ICC (192.168.88.43:1883)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


Topics

Contact Us - Power Forum South Africa

×
×
  • Create New...