vlan_one Posted April 20, 2019 Share Posted April 20, 2019 (edited) 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 ICCconnection ICCaddress 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 April 20, 2019 by vlan_one formatting line spacing Rclegg, pjaxed, francois and 2 others 4 1 Quote Link to comment Share on other sites More sharing options...
Durran Posted June 13, 2019 Share Posted June 13, 2019 Hi VLAN_One, have you tried running Hass.io on the RPI which runs ICC? Quote Link to comment Share on other sites More sharing options...
vlan_one Posted June 19, 2019 Author Share Posted June 19, 2019 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. Quote Link to comment Share on other sites More sharing options...
Jimbo Posted September 28, 2019 Share Posted September 28, 2019 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! Quote Link to comment Share on other sites More sharing options...
Jimbo Posted October 1, 2019 Share Posted October 1, 2019 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 Quote Link to comment Share on other sites More sharing options...
flamegrilled Posted October 1, 2019 Share Posted October 1, 2019 34 minutes ago, Jimbo said: same box as ICC Is it not easier just to pick up the ICC emoncms data link on Home Assistant? Quote Link to comment Share on other sites More sharing options...
ChristoSnake Posted October 1, 2019 Share Posted October 1, 2019 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 Quote Link to comment Share on other sites More sharing options...
Lord Buckethead Posted February 7, 2020 Share Posted February 7, 2020 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 ICCconnection ICCaddress 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. Quote Link to comment Share on other sites More sharing options...
Durran Posted February 7, 2020 Share Posted February 7, 2020 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 Quote Link to comment Share on other sites More sharing options...
Lord Buckethead Posted February 7, 2020 Share Posted February 7, 2020 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) Quote Link to comment Share on other sites More sharing options...
Lord Buckethead Posted February 11, 2020 Share Posted February 11, 2020 I was able to resolve this using another method. Thanks for your help. Quote Link to comment Share on other sites More sharing options...
Pablo170 Posted April 1, 2020 Share Posted April 1, 2020 On 2020/02/11 at 7:15 PM, Lord Buckethead said: I was able to resolve this using another method. Thanks for your help. hello, i want to send the data from the inverter to hasssio, how did you get it? Thanks in advance Quote Link to comment Share on other sites More sharing options...
Lord Buckethead Posted July 18, 2020 Share Posted July 18, 2020 I used the emoncms integration that comes with Hassio. Quote Link to comment Share on other sites More sharing options...
Vijen Posted July 25, 2021 Share Posted July 25, 2021 On 2019/04/21 at 12:13 AM, vlan_one said: 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. c 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. Hi Vlan_one. I am trying to connect Home assistant to ICC and saw this old post of yours. Would it still work with the newer version of HassIO. I have configured the Mosquitto config file as per your notes above but cannot see any of the ICC topics in Home Assistant. Have also tried adding following to configuration.yaml file with no success. sensor: - platform: mqtt name: "Mecer" state_topic: "Inverter/LoadWatts" unit_of_measurement: "W" unique_id: "MecerLoad" value_template: "{{ value_json.Inverter }}" availability: - topic: "Inverter/LoadWatts" payload_available: "online" payload_not_available: "offline" #json_attributes_topic: "home/sensor1/attributes" ANy help will be greatly appreciated. I basically would like to read values from ICC like solar power available and current load to switch certain loads on/off. Regards Vijen Quote Link to comment Share on other sites More sharing options...
Lord Buckethead Posted July 26, 2021 Share Posted July 26, 2021 19 hours ago, Vijen said: Hi Vlan_one. I am trying to connect Home assistant to ICC and saw this old post of yours. Would it still work with the newer version of HassIO. I have configured the Mosquitto config file as per your notes above but cannot see any of the ICC topics in Home Assistant. Have also tried adding following to configuration.yaml file with no success. sensor: - platform: mqtt name: "Mecer" state_topic: "Inverter/LoadWatts" unit_of_measurement: "W" unique_id: "MecerLoad" value_template: "{{ value_json.Inverter }}" availability: - topic: "Inverter/LoadWatts" payload_available: "online" payload_not_available: "offline" #json_attributes_topic: "home/sensor1/attributes" ANy help will be greatly appreciated. I basically would like to read values from ICC like solar power available and current load to switch certain loads on/off. Regards Vijen Hi Vijen, I tested the method by Vijen, and it works well. Before I couldn't get it to work and resorted to using the emoncms intergration for home Assistant. I believe the issue is with the way you are adding the sensors. This works: sensor: - platform: mqtt name: "Mecer" state_topic: "Inverter/LoadWatts" unit_of_measurement: "W" This does not work: sensor: - platform: mqtt name: "Mecer" state_topic: "Inverter/LoadWatts" unit_of_measurement: "W" unique_id: "MecerLoad" value_template: "{{ value_json.Inverter }}" availability: - topic: "Inverter/LoadWatts" payload_available: "online" payload_not_available: "offline" #json_attributes_topic: "home/sensor1/attributes" Quote Link to comment Share on other sites More sharing options...
Vijen Posted July 26, 2021 Share Posted July 26, 2021 Thanks, will try it as soon as I get home. Did you add anything else to configuration.yaml file for MQQT to work or is it just the standard setup on the Mqqt integration package with address, username, password and port? Quote Link to comment Share on other sites More sharing options...
Vijen Posted July 26, 2021 Share Posted July 26, 2021 Sorry, does the emoncms integration work direct with Emoncms on ICC? If so can you show me what the config.yaml file looks like for emoncms please. Quote Link to comment Share on other sites More sharing options...
Vijen Posted July 26, 2021 Share Posted July 26, 2021 Thanks Lord Buckethead, Simplifying the config file as per your recommendation worked. I am not sure if I am doing it correctly however as when I add a 2nd sensor for the inverter the 1st one stops working. My config file extract is below: sensor: - platform: mqtt name: "MecerLoad" state_topic: "Inverter/LoadWatts" unit_of_measurement: "W" name: "SOC" state_topic: "Inverter/BatterySOC" unit_of_measurement: "%" How do you add a list of sensors eg Loadwatts, PV Power, SOC to the config file so that you can access more information? Regards Vijen Quote Link to comment Share on other sites More sharing options...
Lord Buckethead Posted July 26, 2021 Share Posted July 26, 2021 54 minutes ago, Vijen said: Thanks Lord Buckethead, Simplifying the config file as per your recommendation worked. I am not sure if I am doing it correctly however as when I add a 2nd sensor for the inverter the 1st one stops working. My config file extract is below: sensor: - platform: mqtt name: "MecerLoad" state_topic: "Inverter/LoadWatts" unit_of_measurement: "W" name: "SOC" state_topic: "Inverter/BatterySOC" unit_of_measurement: "%" How do you add a list of sensors eg Loadwatts, PV Power, SOC to the config file so that you can access more information? Regards Vijen Glad to know it worked for you. You have to create a new sensor for each topic. See an example config below: - platform: mqtt name: "pylontech SOC" state_topic: "Inverter/BatterySOC" unit_of_measurement: "%" - platform: mqtt name: "Solar Month Total Cost" state_topic: "Inverter/Month_TotalCost" unit_of_measurement: "ZAR" - platform: mqtt name: "Solar Month Cost Savings" state_topic: "Inverter/Month_Cost_Saving" unit_of_measurement: "ZAR" - platform: mqtt name: "Inverter Mode" state_topic: "Inverter/InverterMode" Let me know how it goes. Quote Link to comment Share on other sites More sharing options...
Vijen Posted July 27, 2021 Share Posted July 27, 2021 Great stuff - thanks. Did not realize I always had to show platform. This is so cool - going to automate some switching of Sonoff devices using SOC and Load Quote Link to comment Share on other sites More sharing options...
Vijen Posted July 27, 2021 Share Posted July 27, 2021 Hi Lord Buckethead, the above works great, thx. I just find the configuration file is super sensitive because now I cannot read the sonoff devices anymore. I must have typed a space somewhere that is stuffing up the config file. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.