Closed kion666 closed 2 years ago
Hi @kion666 . I have lookes at Sofar, and it is indeed very similar. The parameters and IDs for parameters are however quite different. The good news is that the parameters are quite well known and this integration can cater for that. I am planning to create a parameters.yaml file for sofar, but since I can't test you can maybe test and fine tune. Once it works you can just update (or send to me to update) the repo.
Will let you know once the initial file is there and you can try.
I have created a yaml file from the data I have. It was not possible to test at all so please expect problems :) See attached zipfile.
To test.
I include the file I used as source to get the parameter definition SOFARMap.txt and the yaml file generated from it that you can use as starting point.
Thank you very much Stephan. I will try to test it tomorrow morning (now my child's are going sleep) and of course I will let you know. I really appreciate your help. PS. I just replace the the file. So I will sleep with crossed fingers :) Have a good night
Hi @StephanJoubert. I just checked HA and I can see that some of the data are not correct like daily and total production. I checked the paramaters.yaml and SofarMAE.txt and it looks like the registers are the same. Some of entities are not neccesary in my inverter, but I cane remove them myself :) But I don't now what to do with wrong daily, total production and time. Other parameters are shown correctly like power/voltage.
Thanks in advance.
name: "Total Production" class: "energy" uom: "kWh" scale: 1 rule: 3 registers: [0x0016,0x0015] icon: 'mdi:solar-power'
Thank You very much @grzegorz189
Do You have any clue about Daily Production?
requests:
parameters:
group: solar items:
name: "PV1 Power" class: "power" uom: "W" scale: 10 rule: 1 registers: [0x000A] icon: 'mdi:solar-power'
name: "PV2 Power" class: "power" uom: "W" scale: 10 rule: 1 registers: [0x000B] icon: 'mdi:solar-power'
name: "PV1 Voltage" class: "voltage" uom: "V" scale: 0.1 rule: 1 registers: [0x0006] icon: 'mdi:solar-power'
name: "PV2 Voltage"
class: "voltage"
uom: "V"
scale: 0.1
rule: 1
registers: [0x0008]
icon: 'mdi:solar-power'
name: "PV1 Current" class: "current" uom: "A" scale: 0.01 rule: 1 registers: [0x0007] icon: 'mdi:solar-power'
name: "PV2 Current" class: "current" uom: "A" scale: 0.01 rule: 1 registers: [0x0009] icon: 'mdi:solar-power'
name: "Daily Production" class: "energy" uom: "kWh" scale: 0.01 rule: 1 registers: [0x0019] icon: 'mdi:solar-power'
name: "Total Production" class: "energy" uom: "kWh" scale: 1 rule: 3 registers: [0x0016,0x0015] icon: 'mdi:solar-power'
name: "Total generation time" class: "" uom: "h" scale: 1 rule: 3 registers: [0x0018,0x0017] icon: 'mdi:clock-outline'
name: "Today generation time" class: "" uom: "min" scale: 1 rule: 1 registers: [0x001A] icon: 'mdi:clock-outline'
group: Output items:
name: "Output active power" class: "power" uom: "W" scale: 10 rule: 1 registers: [0x000C] icon: 'mdi:home-lightning-bolt'
name: "Output reactive power" class: "" uom: "kVar" scale: 0.01 rule: 1 registers: [0x000D] icon: 'mdi:home-lightning-bolt'
name: "Grid frequency" class: "frequency" uom: "Hz" scale: 0.01 rule: 1 registers: [0x000E] icon: 'mdi:home-lightning-bolt'
name: "L1 Voltage" class: "voltage" uom: "V" scale: 0.1 rule: 1 registers: [0x000F] icon: 'mdi:home-lightning-bolt'
name: "L1 Current" class: "current" uom: "A" scale: 0.01 rule: 1 registers: [0x0010] icon: 'mdi:home-lightning-bolt'
name: "L2 Voltage" class: "voltage" uom: "V" scale: 0.1 rule: 1 registers: [0x0011] icon: 'mdi:home-lightning-bolt'
name: "L2 Current" class: "current" uom: "A" scale: 0.01 rule: 1 registers: [0x0012] icon: 'mdi:home-lightning-bolt'
name: "L3 Voltage" class: "voltage" uom: "V" scale: 0.1 rule: 1 registers: [0x0013] icon: 'mdi:home-lightning-bolt'
name: "L3 Current" class: "current" uom: "A" scale: 0.01 rule: 1 registers: [0x0014] icon: 'mdi:home-lightning-bolt'
group: Inverter items:
name: "Inverter status" class: "" uom: "" scale: 1 rule: 1 registers: [0x0000] lookup:
name: "Inverter module temperature" class: "temperature" uom: "°C" scale: 1 rule: 1 registers: [0x001B] icon: 'mdi:thermometer'
name: "Inverter inner temperature" class: "temperature" uom: "°C" scale: 1 rule: 1 registers: [0x001C] icon: 'mdi:thermometer'
name: "Inverter bus voltage" class: "voltage" uom: "V" scale: 0.1 rule: 1 registers: [0x001D] icon: 'mdi:home-lightning-bolt'
name: "PV1 voltage sample by slave CPU" class: "voltage" uom: "V" scale: 0.1 rule: 1 registers: [0x001E] icon: 'mdi:home-lightning-bolt'
name: "PV1 current sample by slave CPU" class: "current" uom: "A" scale: 0.1 rule: 1 registers: [0x001F] icon: 'mdi:home-lightning-bolt'
name: "Countdown time" class: "" uom: "s" scale: 1 rule: 1 registers: [0x0020] icon: ''
name: "Inverter alert message" class: "" uom: "" scale: 1 rule: 1 registers: [0x0021] icon: ''
name: "Input mode" class: "" uom: "" scale: 1 rule: 1 registers: [0x0022] icon: ''
name: "Communication Board inner message" class: "" uom: "" scale: 1 rule: 1 registers: [0x0023] icon: ''
name: "Insulation of PV1+ to ground" class: "" uom: "" scale: 1 rule: 1 registers: [0x0024] icon: ''
name: "Insulation of PV2+ to ground" class: "" uom: "" scale: 1 rule: 1 registers: [0x0025] icon: ''
name: "Insulation of PV- to ground" class: "" uom: "" scale: 1 rule: 1 registers: [0x0026] icon: ''
name: "Country" class: "" uom: "" scale: 1 rule: 1 registers: [0x0027] lookup:
group: Alert items:
name: "Fault 1" class: "" uom: "" scale: 1 rule: 1 registers: [0x0001] lookup:
name: "Fault 2" class: "" uom: "" scale: 1 rule: 1 registers: [0x0002] lookup:
name: "Fault 3" class: "" uom: "" scale: 1 rule: 1 registers: [0x0003] lookup:
name: "Fault 4" class: "" uom: "" scale: 1 rule: 1 registers: [0x0004] lookup:
name: "Fault 5" class: "" uom: "" scale: 1 rule: 1 registers: [0x0005] lookup:
Thanks a lot @grzegorz189 Works like a charm 👍
What entity did You connect with Energy module? And also can You provide this file in some more useful format?
Hi @kion666 , @grzegorz189 , Just to let you know that I have added the ability to specify the lookup file in the configuration, and also included a sofar_lsw3.yaml file based on the file above. If you pull the latest from the repo you should be able to check.
I have not published a release that will be picked up by HACS since I was afraid it will overwrite the settings you already have.
Also, have a look at the "state_class" added to parameters.yaml and please update "sofar_lsw3" likewise. It is especially useful for the energy dashboard. If you are happy with the file,just create a pull request with the updated file and I will merge it into the main branch.
Very good idea, "state_class" - ok, I still have a problem with showing the status of history, you can take a look at it Thanks
I have one more problem after restarting home assistant and when the inverter is turned off, most often at night, all entities are unknown
Hi @StephanJoubert and @grzegorz189 I will try to check the new config for sofar tomorrow and I will let you know. Thanks for update state class. Now I have to manually add this to daily and totally production. It will be easier to configure. Best regards
@grzegorz189 Yea the entities will do that if home assistant is restarted while the inverter was offline. However, if the entities has values and the inverter goes offline, the values will be maintained.
If you want to use these in automations and it presents a problem, you should be able to look at the status_connection or status_lastUpdate to determine if the values can be used.
Hi once again @StephanJoubert I confirm that after added sofar yaml to configuration.yaml some of the entities ar unavailable. However the most important for me as daily production, Power, Voltage are working ok.
Thank You very much for your help.
Also @StephanJoubert I can see that energy module is not working correctly. So I need to revert back
sensor.sofar_daily_production:
state_class: total_increasing
Thank You once again.
I have a 3Phase invertor (Sofar HYD 10KTL-3PH-A). I have tested the code and integration in HA. I see that the connection to my invertor works, but the values are unknown or Unavailable. Would it be possible to create a parameters file for my invertor. I'm happy to do myself but my modbus knowledge is non-existing.
@binoke Did You add the sofar_lsw3.yaml to Your config and do You have this file in config\custom_components\solarman? I also have the KTL Sofar and most important entities are working correctly for me.
@kion666 What I did was as listed in the original discription:
so when I look at the sensor. I see it's connected and updating
but all other sensor values are Unknown or Unavailable.
I just set the lookup file as:
And downloaded all repo to solarman:
Hi does this help? SOFARSOLAR ModBus-RTU Communication Protocol (1).pdf p
Hi @kion666 , that is correct. You can now edit the sofar_lsw3 file to get it working as expected.
Thanks once again @StephanJoubert I close the issue and going to buy you coffee :)
Hi @StephanJoubert and thanks for this nice integration. I have an SofarSolar and it looks very similar as DEYE. It is now connected to solarman. But I have some problems with integration in HA. All the data are unknown
Can You support me in that case? Thanks in advance