epever.tracert.to.domoticz.sh
Tested on : EpEver Tracer 3210AN 30A MPPT Solar Controller
Date : 12-10-2020
Version : 00,00.00,000.2
Requirements : apt install bc sed
Created by ILoveIOT 2020
Updated by ILoveIOT & Micha123 2022
- Added battery temp
- Added SOC value
- Correcting the actual voltage on the battery side
- Changed some small things in this script
- Added Real Battery Curent (Charging and Discharging) it wile be calculated from PVPOWER - LOADPOWER
- Fixed Batterycharging Power, now its calculating PVARRAYPOWER - LOADPOWER (bevore it shows the same as PVARRAYPOWER)
- Add a check if Values in $OUTPUTFILE are present, if there are no values then ihe script wil stop and dont send ZERO value to domoticz
This script will execute the /root/scripts/epevertracer/epever.tracer.php file put the output to a file,
get the value's from the output file, show them on console if needed, and send them to Domoticz, this is super simple, easy to change.
Many thanks to Toggio https://github.com/toggio/PhpEpsolarTracer
For console use : /root/scripts/epevertracer/epever.tracert.to.domoticz.sh
For crontab use : /root/scripts/epevertracer/epever.tracert.to.domoticz.sh >> /dev/null 2>&1
For all the info : php /root/scripts/epevertracer/example_cli.php
1. Change the serial port /root/scripts/epevertracer/epever.tracer.php line 26 ('/dev/ttyUSB1')
2. Change the Domoticz IP & Port (see below)
3. Add/Change the acording Domoticz IDX's (see below)
4. Optional : Change the working directory, where you wanna place the files
5. Optional : If you need more info from the controller compare epever.tracer.php vs example_cli.php
6. Optional : Maybe make 2 cronjobs, with no sunhours just poll once a hour, with sun every min.
Just make a normal network cable for this controller, I believe blue and green between a ch940 rs485 to usb converter or buy the 10$ org cable, org cable had problems on linux, buy cheap ones, ch940, and maybe with ground, me in testing mode.
EpEver Solar Controller into Domoticz
Moderator: leecollings
- ILoveIOT
- Posts: 59
- Joined: Sunday 25 March 2018 17:47
- Target OS: Linux
- Domoticz version: 2020.2
- Location: NL
- Contact:
EpEver Solar Controller into Domoticz
Last edited by ILoveIOT on Monday 21 March 2022 7:17, edited 4 times in total.
1x OPI PC 5.8.16 Debian 10, MiniDNLA,SMD230,EpEver,MPD,800GB,Wiegand,7 temps,DHT,32/64 I/O,2022.1
2x OPI PC 4.19.25 Debian 9, MPD,7 temps,16/32 I/O,BMP,4.10717
1x IntelNUC 5.10 Debian 10, 2TB,DalyBMS,2023.1
3x ESPEasy NodeMCU V3, 16/16 I/O
2x OPI PC 4.19.25 Debian 9, MPD,7 temps,16/32 I/O,BMP,4.10717
1x IntelNUC 5.10 Debian 10, 2TB,DalyBMS,2023.1
3x ESPEasy NodeMCU V3, 16/16 I/O
- ILoveIOT
- Posts: 59
- Joined: Sunday 25 March 2018 17:47
- Target OS: Linux
- Domoticz version: 2020.2
- Location: NL
- Contact:
Re: EpEver Solar Controller into Domoticz
1x OPI PC 5.8.16 Debian 10, MiniDNLA,SMD230,EpEver,MPD,800GB,Wiegand,7 temps,DHT,32/64 I/O,2022.1
2x OPI PC 4.19.25 Debian 9, MPD,7 temps,16/32 I/O,BMP,4.10717
1x IntelNUC 5.10 Debian 10, 2TB,DalyBMS,2023.1
3x ESPEasy NodeMCU V3, 16/16 I/O
2x OPI PC 4.19.25 Debian 9, MPD,7 temps,16/32 I/O,BMP,4.10717
1x IntelNUC 5.10 Debian 10, 2TB,DalyBMS,2023.1
3x ESPEasy NodeMCU V3, 16/16 I/O
-
- Posts: 26
- Joined: Thursday 13 October 2016 11:43
- Target OS: Linux
- Domoticz version:
- Contact:
Re: EpEver Solar Controller into Domoticz
Hi,
that looks promising. I have an EpEver Solar Controller and i am trying to get data from it. But i am not sure about the connection.
What is ch940? I don't find anything in google.
Should these work?
https://www.aliexpress.com/item/4001293 ... web201603_
https://www.aliexpress.com/item/3297827 ... web201603_
Thanks
ED
that looks promising. I have an EpEver Solar Controller and i am trying to get data from it. But i am not sure about the connection.
What is ch940? I don't find anything in google.
Should these work?
https://www.aliexpress.com/item/4001293 ... web201603_
https://www.aliexpress.com/item/3297827 ... web201603_
Thanks
ED
- ILoveIOT
- Posts: 59
- Joined: Sunday 25 March 2018 17:47
- Target OS: Linux
- Domoticz version: 2020.2
- Location: NL
- Contact:
Re: EpEver Solar Controller into Domoticz
Hi,
Last one yes, its not a network connection but RS485, this type is included with GND.
https://www.aliexpress.com/item/3305445 ... 4c4d90oYnc
Last one yes, its not a network connection but RS485, this type is included with GND.
https://www.aliexpress.com/item/3305445 ... 4c4d90oYnc
1x OPI PC 5.8.16 Debian 10, MiniDNLA,SMD230,EpEver,MPD,800GB,Wiegand,7 temps,DHT,32/64 I/O,2022.1
2x OPI PC 4.19.25 Debian 9, MPD,7 temps,16/32 I/O,BMP,4.10717
1x IntelNUC 5.10 Debian 10, 2TB,DalyBMS,2023.1
3x ESPEasy NodeMCU V3, 16/16 I/O
2x OPI PC 4.19.25 Debian 9, MPD,7 temps,16/32 I/O,BMP,4.10717
1x IntelNUC 5.10 Debian 10, 2TB,DalyBMS,2023.1
3x ESPEasy NodeMCU V3, 16/16 I/O
-
- Posts: 62
- Joined: Monday 28 August 2017 16:44
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: EpEver Solar Controller into Domoticz
nice, its working
i have modified the script a little bit.
i have added the Battery SOC (state of charge) and also the battery Temp (i have an external sensor for the battery connected to the epever solar charger
i has also sometimes an problem that the comunication to inverter goes wrong, and the script send then only ZERO values to domoticz (now its fixed)
also add the modified file for every one
- Disabled Year Generated (the same reading as month) it can be enabled by removing the #
- Disabled Year Consumed(the same reading as month) it can be enabled by removing the #
- Added Battery Temp (i have an external BATT sensor connected to the tracer)
- Added battery SOC (State of Charge in %)
- Added Real Battery Curent (Charging and Discharging) it wile be calculated from PVPOWER - LOADPOWER
- Fixed Batterycharging Power, now its calculating PVARRAYPOWER - LOADPOWER (bevore it shows the same as PVARRAYPOWER)
- Add a check if Values in $OUTPUTFILE are present, if there are no values then ihe script wil stop and dont send ZERO value to domoticz
if you wil use my modificated script then you need to install bc, bc is needed for the calculations in the script
sudo apt install bc
HAVE FUN
i have modified the script a little bit.
i have added the Battery SOC (state of charge) and also the battery Temp (i have an external sensor for the battery connected to the epever solar charger
i has also sometimes an problem that the comunication to inverter goes wrong, and the script send then only ZERO values to domoticz (now its fixed)
also add the modified file for every one
- Disabled Year Generated (the same reading as month) it can be enabled by removing the #
- Disabled Year Consumed(the same reading as month) it can be enabled by removing the #
- Added Battery Temp (i have an external BATT sensor connected to the tracer)
- Added battery SOC (State of Charge in %)
- Added Real Battery Curent (Charging and Discharging) it wile be calculated from PVPOWER - LOADPOWER
- Fixed Batterycharging Power, now its calculating PVARRAYPOWER - LOADPOWER (bevore it shows the same as PVARRAYPOWER)
- Add a check if Values in $OUTPUTFILE are present, if there are no values then ihe script wil stop and dont send ZERO value to domoticz
if you wil use my modificated script then you need to install bc, bc is needed for the calculations in the script
sudo apt install bc
HAVE FUN
- Attachments
-
- Screenshot_20220320_165335.jpg (202.26 KiB) Viewed 2531 times
-
- epever.tracert.to.domoticz.zip
- (2.35 KiB) Downloaded 84 times
- ILoveIOT
- Posts: 59
- Joined: Sunday 25 March 2018 17:47
- Target OS: Linux
- Domoticz version: 2020.2
- Location: NL
- Contact:
Re: EpEver Solar Controller into Domoticz
Hi Micha,
I merged you're script with mine, thank you for the update, I updated the original post
- Disabled Year/Month Generated, yes but it will change after a year/month
- SOC I get it from the BMS, I saw its not the same, (50.5 vs 61%) BMS is more accurate, maybe I can calibrate it, but it would be double
- I got the battery temp as well, but never updated the script on domoticz forum
- Added Real Battery Curent (Charging and Discharging), thank you, always did it with my head, later I had the BMS value's
- Fixed Batterycharging Power, now its calculating PVARRAYPOWER, thank you, I believe with the windows software you get that value
- Add a check if Values in $OUTPUTFILE are present, never had a false reading, but now we are for sure
Thank you, original file was downloaded 86 times.
I merged you're script with mine, thank you for the update, I updated the original post
- Disabled Year/Month Generated, yes but it will change after a year/month
- SOC I get it from the BMS, I saw its not the same, (50.5 vs 61%) BMS is more accurate, maybe I can calibrate it, but it would be double
- I got the battery temp as well, but never updated the script on domoticz forum
- Added Real Battery Curent (Charging and Discharging), thank you, always did it with my head, later I had the BMS value's
- Fixed Batterycharging Power, now its calculating PVARRAYPOWER, thank you, I believe with the windows software you get that value
- Add a check if Values in $OUTPUTFILE are present, never had a false reading, but now we are for sure
Thank you, original file was downloaded 86 times.
1x OPI PC 5.8.16 Debian 10, MiniDNLA,SMD230,EpEver,MPD,800GB,Wiegand,7 temps,DHT,32/64 I/O,2022.1
2x OPI PC 4.19.25 Debian 9, MPD,7 temps,16/32 I/O,BMP,4.10717
1x IntelNUC 5.10 Debian 10, 2TB,DalyBMS,2023.1
3x ESPEasy NodeMCU V3, 16/16 I/O
2x OPI PC 4.19.25 Debian 9, MPD,7 temps,16/32 I/O,BMP,4.10717
1x IntelNUC 5.10 Debian 10, 2TB,DalyBMS,2023.1
3x ESPEasy NodeMCU V3, 16/16 I/O
-
- Posts: 62
- Joined: Monday 28 August 2017 16:44
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: EpEver Solar Controller into Domoticz
Second update
Fix watt reading battery, now it is calculated from baatery Ampere and battery voltage (now it shows same as the windows software
Removed consumed kwh today
Removed generated today
Now all today values (batt charging Watt, PV watt, load watt) are merged to the right watt sensors (not needed "computed" anymore. Be patient the first reading possibly high (it read the total value there ) domoticz wil be zero it at midnight and and then the today readings are correct in the Sensors
Fix watt reading battery, now it is calculated from baatery Ampere and battery voltage (now it shows same as the windows software
Removed consumed kwh today
Removed generated today
Now all today values (batt charging Watt, PV watt, load watt) are merged to the right watt sensors (not needed "computed" anymore. Be patient the first reading possibly high (it read the total value there ) domoticz wil be zero it at midnight and and then the today readings are correct in the Sensors
- Attachments
-
- epever.tracer.to.domoticz.zip
- (2.28 KiB) Downloaded 144 times
-
- Posts: 1
- Joined: Wednesday 24 January 2024 14:11
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: EpEver Solar Controller into Domoticz
Hello
I'm trying to test the epever tracer 2210AN MPPT controller on PC Raspberry Pi and Domoticz. I can't get the readings. Could you please ask how and where to paste these scripts. Thank you very much in advance.
I'm trying to test the epever tracer 2210AN MPPT controller on PC Raspberry Pi and Domoticz. I can't get the readings. Could you please ask how and where to paste these scripts. Thank you very much in advance.
Who is online
Users browsing this forum: No registered users and 1 guest