Closed Derick8619 closed 3 weeks ago
Hi @Derick8619, thanks!
scale
property correct? Scale of main Battery
sensor is 1.As those are proly not really crucial sensor what about to make them hidden from overview dashboard by default?
Hi David,
Thanks for getting back to me :)
I'm unsure how to re-edit the file for this 'Pull Request' to rename them Battery 1 etc....
With regards to the scale, I am not sure about that either, I copied and pasted (then edited) the code from this line as I believe this is the overall SOC register:
Below is the sensor that is currently returning the output for the overall battery SOC. sensor.inverter_battery
The scale for Battery SOH is 1 but that is a different thing altogether (STATE OF HEALTH).
I agree they are not crucial for dashboard but I would like the ability to add them to mine as this information is far more valuable than lots of the current sensors that are currently available by default.
Kind regards
Derick
Also, the file already have a Battery
group on line 292, I think these new registers should be moved in that group with other related registers.
Maybe after the name: "Battery"
register?
Below is the sensor that is currently returning the output for the overall battery SOC. sensor.inverter_battery
Ah I was looking into wrong profile, my bad. 😉
I agree they are not crucial for dashboard but I would like the ability to add them to mine as this information is far more valuable than lots of the current sensors that are currently available by default.
That does not conflict with my proposal you will still be able to. 😉
With regards to the scale, I am not sure about that either, I copied and pasted (then edited) the code from this line as I believe this is the overall SOC register:
- name: "Battery" update_interval: 5 class: "battery" state_class: "measurement" uom: "%" scale: 0.1 rule: 1 registers: [3066] icon: "mdi:battery"
That is a different register and (for whatever reasons) has a different scale. The battery SOC for the different packs use a 1 scale, while the main battery SOC has a 0.1 scale
Also, the file already have a
Battery
group on line 292, I think these new registers should be moved in that group with other related registers.Maybe after the
name: "Battery"
register?
sounds like a good idea
Guys I am new to this and in all honesty dont really know what I am doing!
Please can you edit the YAMYL to implement these changes as I will likely do something wrong. :/
Few more notes:
class: battery
can be used only once as this is how HA determines battery for device and I'm really not sure if it strictly follows orderLooks good to me (I think) is it ready to download and test?
Yes.
Few more notes:
class: battery
can be used only once as this is how HA determines battery for device and I'm really not sure if it strictly follows order
Oh really, so its possible no data will be pulled from each individual sensor?
- Fixed that scale but please someone confirm it's correct
I'm unsure how to confirm if the scale is correct, sorry! I am useless.
Can I test the YAMYL file and get back to you?
Oh really, so its possible no data will be pulled from each individual sensor?
No, it's not about that. This is just sensor classification for HA. Nothing to do with data itself.
More about that classification here.
Looks good to me (I think) is it ready to download and test?
Yes.
Where do i download it from? The file in supported devices for KSTAR still shows the original file
You could replace the file directly in you HA using File editor.
I was trying to add FILE EDITOR to my HA yesterday but I was unable to find it when searching in HACS repos or via standard integrations :(
I was trying to add FILE EDITOR to my HA yesterday but I was unable to find it when searching in HACS repos or via standard integrations :(
Cause it's not an integration but addon. Those are added from Settings >> Add-ons.
I was trying to add FILE EDITOR to my HA yesterday but I was unable to find it when searching in HACS repos or via standard integrations :(
Cause it's not an integration but addon. Those are added from Settings >> Add-ons.
got it, downloading now
please can you send me the updated YAMYL file so i can paste it into the editor? I cant see the updated file on here anywhere. Sorry!
so i paste it into here and save?
not sure what all the dropdowns to the left had side do or whether they will affect anything?
Yeah, just replace the content of the file (CTRL+A >> CTRL+V) and hit the save button and then restart HA.
Yeah, just replace the content of the file (CTRL+A >> CTRL+V) and hit the save button and then restart HA.
Ok but all i did was open the editor, I havent selected the original YAMYL, cant see it in the list to the left. confused.com
But on the image you have the file already open??? What???
That was the file you sent me I just pasted it into the blank file editor page. Sorry I have never done this before
Sent from Yahoo Mail for iPhone
On Monday, October 28, 2024, 12:55 pm, David Rapan @.***> wrote:
But on the image you have the file already open??? What???
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
Ah I see... hah...
There is folder icon in the top next to the HA menu. There you can browse the whole folder tree. File of which content you want to replace is located: custom_components/solarman//inverter_definitions/kstar_hybrid.yaml
ok pasted in the new file, restarted HA and now looking at the sensors, i cant see the new battery sensors, looks the same as before
Make sure you did it correctly:
#
#
#
#
info: manufacturer: KSTAR model: Hybrid Inverter
default: update_interval: 60 code: 0x04 digits: 6
parameters:
group: PV update_interval: 5 items:
name: "PV1 Voltage" class: "voltage" state_class: "measurement" uom: "V" scale: 0.1 rule: 1 registers: [3000] icon: "mdi:solar-power"
name: "PV2 Voltage" class: "voltage" state_class: "measurement" uom: "V" scale: 0.1 rule: 1 registers: [3001] icon: "mdi:solar-power"
name: "PV1 Current" class: "current" state_class: "measurement" uom: "A" scale: 0.01 rule: 2 registers: [3012] icon: "mdi:solar-power"
name: "PV2 Current" class: "current" state_class: "measurement" uom: "A" scale: 0.01 rule: 2 registers: [3013] icon: "mdi:solar-power"
name: "PV Power" description: Combined power of all inputs class: "power" state_class: "measurement" uom: "W" rule: 1 digits: 0 registers: [3024, 3025] sensors:
name: "PV1 Power" class: "power" state_class: "measurement" uom: "W" rule: 2 registers: [3024] icon: "mdi:solar-power"
name: "PV2 Power" class: "power" state_class: "measurement" uom: "W" rule: 2 registers: [3025] icon: "mdi:solar-power"
name: "Today Production" friendly_name: Today's Production update_interval: 30 class: "energy" state_class: "total_increasing" uom: "kWh" scale: 0.1 rule: 1 registers: [3036] icon: "mdi:solar-power"
name: "Monthly Production" update_interval: 30 class: "energy" state_class: "total_increasing" uom: "kWh" rule: 3 registers: [3038, 3037] icon: "mdi:solar-power"
name: "Yearly Production" update_interval: 30 class: "energy" state_class: "total_increasing" uom: "kWh" rule: 3 registers: [3040, 3039] icon: "mdi:solar-power"
name: "Total Production" alt: "Cumulative Production" update_interval: 30 class: "energy" state_class: "total_increasing" uom: "kWh" scale: 0.1 rule: 3 registers: [3042, 3041] icon: "mdi:solar-power" validation: min: 0.1
group: Power Grid items:
name: "Grid Power" alt: "Total Grid Power" update_interval: 5 class: "power" state_class: "measurement" uom: "W" rule: 2 registers: [3100] icon: "mdi:transmission-tower"
name: Today Energy Import alt: Daily Energy Purchased friendly_name: Today's Energy Import update_interval: 30 class: "energy" state_class: "total_increasing" uom: "kWh" scale: 0.1 rule: 1 registers: [3109] icon: "mdi:transmission-tower-export"
name: Monthly Energy Import alt: Monthly Energy Purchased update_interval: 30 class: "energy" state_class: "total_increasing" uom: "kWh" rule: 3 registers: [3111, 3110] icon: "mdi:transmission-tower-export"
name: Yearly Energy Import alt: Yearly Energy Purchased update_interval: 30 class: "energy" state_class: "total_increasing" uom: "kWh" rule: 3 registers: [3113, 3112] icon: "mdi:transmission-tower-export"
name: Total Energy Import alt: Cumulative Energy Purchased update_interval: 30 class: "energy" state_class: "total_increasing" uom: "kWh" scale: 0.1 rule: 3 registers: [3115, 3114] icon: "mdi:transmission-tower-export" validation: min: 0.1
name: Today Energy Export alt: Daily Energy Feed-In friendly_name: Today's Energy Export update_interval: 30 class: "energy" state_class: "total_increasing" uom: "kWh" scale: 0.1 rule: 1 registers: [3116] icon: "mdi:transmission-tower-import"
name: Monthly Energy Export alt: Monthly Energy Feed-In update_interval: 30 class: "energy" state_class: "total_increasing" uom: "kWh" rule: 3 registers: [3118, 3117] icon: "mdi:transmission-tower-import"
name: Yearly Energy Export alt: Yearly Energy Feed-In update_interval: 30 class: "energy" state_class: "total_increasing" uom: "kWh" rule: 3 registers: [3120, 3119] icon: "mdi:transmission-tower-import"
name: Total Energy Export alt: Cumulative Grid Feed-In update_interval: 30 class: "energy" state_class: "total_increasing" uom: "kWh" scale: 0.1 rule: 3 registers: [3122, 3121] icon: "mdi:transmission-tower-import" validation: min: 0.1
group: Electricity Consumption items:
name: "Load Power" alt: "Total Consumption Power" update_interval: 30 class: "power" state_class: "measurement" uom: "W" rule: 1 registers: [3144] icon: "mdi:home-lightning-bolt"
name: Today Load Consumption alt: Daily Consumption friendly_name: Today's Load Consumption update_interval: 30 class: "energy" state_class: "total_increasing" uom: "kWh" scale: 0.1 rule: 1 registers: [3147] icon: "mdi:home-lightning-bolt"
name: "Monthly Load Consumption" update_interval: 30 class: "energy" state_class: "total_increasing" uom: "kWh" rule: 3 registers: [3149, 3148] icon: "mdi:home-lightning-bolt"
name: "Yearly Load Consumption" update_interval: 30 class: "energy" state_class: "total_increasing" uom: "kWh" rule: 3 registers: [3151, 3150] icon: "mdi:home-lightning-bolt"
name: "Total Load Consumption" update_interval: 30 class: "energy" state_class: "total_increasing" uom: "kWh" scale: 0.1 rule: 3 registers: [3153, 3152] icon: "mdi:home-lightning-bolt" validation: min: 0.1
group: Battery items:
name: "Battery Type" update_interval: 300 class: "enum" rule: 1 registers: [3062] icon: "mdi:battery" lookup:
name: "Battery Voltage" update_interval: 5 class: "voltage" state_class: "measurement" uom: "V" scale: 0.01 rule: 1 registers: [3063] icon: "mdi:battery-charging"
name: "Battery Current" update_interval: 5 class: "current" state_class: "measurement" uom: "A" scale: 0.1 rule: 2 registers: [3064] icon: "mdi:battery-charging-10"
name: "Battery Power" update_interval: 5 class: "power" state_class: "measurement" uom: "W" rule: 2 registers: [3065] icon: "mdi:battery-charging-high"
name: "Battery" update_interval: 5 class: "battery" state_class: "measurement" uom: "%" scale: 0.1 rule: 1 registers: [3066]
name: "Battery 1" update_interval: 5 state_class: "measurement" uom: "%" rule: 1 registers: [3450] icon: "mdi:battery"
name: "Battery 2" update_interval: 5 state_class: "measurement" uom: "%" rule: 1 registers: [3494] icon: "mdi:battery"
name: "Battery 3" update_interval: 5 state_class: "measurement" uom: "%" rule: 1 registers: [3538] icon: "mdi:battery"
name: "Battery Temperature" update_interval: 30 class: "temperature" state_class: "measurement" uom: "°C" scale: 0.1 rule: 2 registers: [3067] icon: "mdi:battery-heart-outline"
name: "Battery Discharge Capacity Depth" update_interval: 300 state_class: "measurement" uom: "%" rule: 1 registers: [3068] icon: "mdi:battery-20" validation: min: 10 max: 95
name: "Battery Heatsink Temperature" update_interval: 30 class: "temperature" state_class: "measurement" uom: "°C" scale: 0.1 rule: 2 registers: [3056] icon: "mdi:battery-heart-outline"
name: "Battery SOH" state_class: "measurement" uom: "%" scale: 0.1 rule: 1 digits: 2 registers: [3075] icon: "mdi:battery-heart"
name: Total Battery Discharge alt: Battery Total Discharge update_interval: 30 class: "energy" state_class: "total_increasing" uom: "kWh" rule: 3 registers: [3293, 3292] icon: "mdi:battery-minus-variant" validation: min: 0.1
name: "Today Battery Discharge" alt: Battery Daily Discharge friendly_name: Today's Battery Discharge update_interval: 30 class: "energy" state_class: "total_increasing" uom: "kWh" scale: 0.1 rule: 1 registers: [3294] icon: "mdi:battery-minus-variant"
name: "Total Battery Charge" alt: "Battery Total Charge" update_interval: 30 class: "energy" state_class: "total_increasing" uom: "kWh" rule: 3 registers: [3300, 3299] icon: "mdi:battery-minus-variant" validation: min: 0.1
name: "Today Battery Charge" alt: Battery Daily Charge friendly_name: Today's Battery Charge update_interval: 30 class: "energy" state_class: "total_increasing" uom: "kWh" scale: 0.1 rule: 1 registers: [3301] icon: "mdi:battery-plus-variant"
group: Losses update_interval: 30 items:
name: Today Losses alt: Daily Losses friendly_name: Today's Losses description: Includes today's consumption of the inverter device itself as well AC/DC conversion losses update_interval: 30 class: "energy" state_class: "total_increasing" ensure_increasing: uom: "kWh" rule: 1 digits: 1 scale: 0.1 registers: [3109, 3036, 3294, 3116, 3147, 3301] uint: enforce sensors:
name: Total Losses description: Includes total consumption of the inverter device itself as well AC/DC conversion losses update_interval: 30 class: "energy" state_class: "total_increasing" ensure_increasing: uom: "kWh" rule: 3 digits: 1 scale: 0.1 registers: [ 3115, 3114, 3042, 3041, 3293, 3292, 3122, 3121, 3153, 3152, 3300, 3299, ] uint: enforce sensors:
group: Inverter Information items:
name: "Inverter Working Mode" update_interval: 300 class: "enum" rule: 1 registers: [3044] lookup:
name: "Inverter Model" update_interval: 600 class: "enum" rule: 1 registers: [3045] lookup:
name: "System status" update_interval: 30 class: "enum" rule: 1 registers: [3046] lookup:
name: "Inverter Status" update_interval: 30 class: "enum" rule: 1 registers: [3047] lookup:
name: "DCDC Status" update_interval: 30 class: "enum" rule: 1 registers: [3048] lookup:
name: "DSP Alarm Code" update_interval: 30 rule: 6 registers: [3050, 3049] icon: "mdi:wrench"
name: "DSP Error Code" update_interval: 30 rule: 6 registers: [3052, 3051] icon: "mdi:wrench"
name: "Grid Standard" update_interval: 600 class: "enum" rule: 1 registers: [3193] lookup:
name: "Inverter Model Name" update_interval: 600 rule: 5 registers: [3200, 3201, 3202, 3203, 3204, 3205, 3206, 3207] code: 0x03 icon: "mdi:wrench"
name: "Inverter Battery Name" update_interval: 600 rule: 5 registers: [3208, 3209, 3210, 3211, 3212, 3213, 3214, 3215] code: 0x03 icon: "mdi:wrench"
name: "ARM Version Number" update_interval: 600 rule: 1 registers: [3216] code: 0x03 icon: "mdi:wrench"
name: "DSP Version Number" update_interval: 600 rule: 1 registers: [3217] code: 0x03 icon: "mdi:wrench"
name: "Device Serial Number" update_interval: 600 rule: 5 registers: [3228, 3229, 3230, 3231, 3232, 3233, 3234, 3235, 3236, 3237, 3238] icon: "mdi:wrench"
group: Inverter items:
name: "Inverter Bus Voltage" update_interval: 5 class: "voltage" state_class: "measurement" uom: "V" scale: 0.1 rule: 1 registers: [3053] icon: "mdi:home-lightning-bolt"
name: "Inverter DC Bus Voltage" update_interval: 5 class: "voltage" state_class: "measurement" uom: "V" scale: 0.1 rule: 1 registers: [3054] icon: "mdi:home-lightning-bolt"
name: "Inverter Radiator Temperature" update_interval: 30 class: "temperature" state_class: "measurement" uom: "°C" scale: 0.1 rule: 2 registers: [3055] icon: "mdi:thermometer"
name: "Chassis Internal Temperature" update_interval: 30 class: "temperature" state_class: "measurement" uom: "°C" scale: 0.1 rule: 2 registers: [3057] icon: "mdi:battery-heart-outline"
group: R Phase update_interval: 5 items:
name: "R-phase Grid Voltage" class: "voltage" state_class: "measurement" uom: "V" scale: 0.1 rule: 1 registers: [3097] icon: "mdi:home-lightning-bolt"
name: "R-phase Grid Frequency" class: "frequency" state_class: "measurement" uom: "Hz" scale: 0.01 rule: 1 registers: [3098] icon: "mdi:sine-wave"
name: "R-phase Meter Current" class: "current" state_class: "measurement" uom: "A" scale: 0.001 rule: 2 registers: [3099] icon: "mdi:home-lightning-bolt"
name: "R-phase Grid Power" class: "power" state_class: "measurement" uom: "W" rule: 2 registers: [3100] icon: "mdi:home-lightning-bolt"
name: "R-phase Inverter Voltage" class: "voltage" state_class: "measurement" uom: "V" scale: 0.1 rule: 1 registers: [3123] icon: "mdi:home-lightning-bolt"
name: "R-phase Inverter Current" class: "current" state_class: "measurement" uom: "A" scale: 0.01 rule: 2 registers: [3124] icon: "mdi:home-lightning-bolt"
name: "R-phase Inverter Frequency" class: "frequency" state_class: "measurement" uom: "Hz" scale: 0.01 rule: 1 registers: [3125] icon: "mdi:sine-wave"
name: "R-phase Inverter Power" class: "power" state_class: "measurement" uom: "W" rule: 2 registers: [3126] icon: "mdi:home-lightning-bolt"
name: "R-phase Backup Voltage" class: "voltage" state_class: "measurement" uom: "V" scale: 0.1 rule: 1 registers: [3135] icon: "mdi:home-lightning-bolt"
name: "R-phase Backup Current" class: "current" state_class: "measurement" uom: "A" scale: 0.01 rule: 1 registers: [3136] icon: "mdi:home-lightning-bolt"
name: "R-phase Backup Power" class: "power" state_class: "measurement" uom: "W" rule: 1 registers: [3137] icon: "mdi:home-lightning-bolt"
name: "R-phase Load Power" class: "power" state_class: "measurement" uom: "W" rule: 1 registers: [3144] icon: "mdi:home-lightning-bolt"
name: "Power losses" description: Includes consumption of the inverter device itself as well AC/DC conversion losses class: "power" state_class: "measurement" uom: "W" rule: 1 digits: 0 registers: [3024, 3025, 3065, 3126] uint: enforce sensors:
sensors are definitely in the new file, i did CTRL+A then CTRL+V and then saved
got it! they have appeared. i did a full restart initially rather than a full restart
you absolute legend
DATA FROM MODBUS SHEET 3450 PACKSOC PACK1 % U16 0~100 04H 3494 PACKSOC PACK2 % U16 0~100 04H 3638 PACKSOC PACK3 % U16 0~100 04H
To include individual Battery Pack SOCs.
This will allow users to see if the battery packs are balanced, the overall SOC of all batteries is an average percentage of all the cells.
I added these registers to the bottom of the YAML, unsure if the rules etc need adjusting