Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added some register #38

Closed
wants to merge 7 commits into from
Closed
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 62 additions & 1 deletion src/lib/states.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,21 @@ export class InverterStates {
state: {id: 'dailyEnergyYield', name: 'Daily energy yield', type: 'number', unit: 'kWh', role: 'value.energy'},
register: {reg: 32114, type: ModbusDatatype.uint32, length: 2, gain: 100}
},
{
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reg 32114 is already there... see line 127

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See it. Wonder why

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Der 32114 scheint bei mir, habe einen Akku, den Wert wieder zu spiegeln was ich heute benutzt habe und nicht der gesamte ertrag

interval: UpdateIntervalID.LOW,
state: {id: 'generatedenergytoday', name: 'Daily generated Energy', type: 'number', unit: 'kWh', role: 'value.energy.produced'},
register: {reg: 32114, type: ModbusDatatype.uint32, length: 2, gain: 100},
},
{
interval: UpdateIntervalID.LOW,
state: {id: 'generatedenergymonth', name: 'Monthly generated Energy', type: 'number', unit: 'kWh', role: 'value.energy.produced'},
register: {reg: 32116, type: ModbusDatatype.uint32, length: 2, gain: 100},
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, i did not have these registers in my ModbusInterfaceDefinition document.
@Basti-RX Where do you got it from?
Can you send me the link to the doc?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it help you? Which Version you got?

},
{
interval: UpdateIntervalID.LOW,
state: {id: 'generatedenergyyear', name: 'Yearly generated Energy', type: 'number', unit: 'kWh', role: 'value.energy.produced'},
register: {reg: 32118, type: ModbusDatatype.uint32, length: 2, gain: 100},
},
{
interval: UpdateIntervalID.LOW,
state: {id: 'PV1Voltage', name: 'PV1 voltage', type: 'number', unit: 'V', role: 'value.voltage'},
Expand All @@ -146,7 +161,53 @@ export class InverterStates {
state: {id: 'PV2Current', name: 'PV2 current', type: 'number', unit: 'A', role: 'value.current'},
register: {reg: 32019, type: ModbusDatatype.int16, length: 1, gain: 100}
},

// ####################################################################################################################################
// MPPT
{
interval: UpdateIntervalID.LOW,
state: {id: 'mppt1power', name: 'MPPT 1 Power', type: 'number', unit: 'kWh', role: 'value.power.active', desc: 'Total input power of MPPT1'},
Copy link
Owner

@daolis daolis Feb 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Power should be kW ... or
kWh should be energy 😉
(see site roles list)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is changed. Dont know what value will be shown, so further changes will be possible

register: {reg: 32324, type: ModbusDatatype.int32, length: 2}
},
{
interval: UpdateIntervalID.LOW,
state: {id: 'mppt2power', name: 'MPPT 2 Power', type: 'number', unit: 'kWh', role: 'value.power.active', desc: 'Total input power of MPPT2'},
register: {reg: 32326, type: ModbusDatatype.int32, length: 2}
},
{
interval: UpdateIntervalID.LOW,
state: {id: 'mppt3power', name: 'MPPT 3 Power', type: 'number', unit: 'kWh', role: 'value.power.active', desc: 'Total input power of MPPT3'},
register: {reg: 32328, type: ModbusDatatype.int32, length: 2}
},
{
interval: UpdateIntervalID.LOW,
state: {id: 'mppt4power', name: 'MPPT 4 Power', type: 'number', unit: 'kWh', role: 'value.power.active', desc: 'Total input power of MPPT4'},
register: {reg: 32330, type: ModbusDatatype.int32, length: 2}
},
{
interval: UpdateIntervalID.LOW,
state: {id: 'mppt5power', name: 'MPPT 5 Power', type: 'number', unit: 'kWh', role: 'value.power.active', desc: 'Total input power of MPPT5'},
register: {reg: 32332, type: ModbusDatatype.int32, length: 2}
},
{
interval: UpdateIntervalID.LOW,
state: {id: 'mppt6power', name: 'MPPT 6 Power', type: 'number', unit: 'kWh', role: 'value.power.active', desc: 'Total input power of MPPT6'},
register: {reg: 32334, type: ModbusDatatype.int32, length: 2}
},
{
interval: UpdateIntervalID.LOW,
state: {id: 'mppt7power', name: 'MPPT 7 Power', type: 'number', unit: 'kWh', role: 'value.power.active', desc: 'Total input power of MPPT7'},
register: {reg: 32336, type: ModbusDatatype.int32, length: 2}
},
{
interval: UpdateIntervalID.LOW,
state: {id: 'mppt8power', name: 'MPPT 8 Power', type: 'number', unit: 'kWh', role: 'value.power.active', desc: 'Total input power of MPPT8'},
register: {reg: 32338, type: ModbusDatatype.int32, length: 2}
},
{
interval: UpdateIntervalID.LOW,
state: {id: 'mppt9power', name: 'MPPT 9 Power', type: 'number', unit: 'kWh', role: 'value.power.active', desc: 'Total input power of MPPT9'},
register: {reg: 32340, type: ModbusDatatype.int32, length: 2}
},
// ####################################################################################################################################
// storage
{
Expand Down