I have an account with SDM 630. It works on modbus. It shows all the necessary parameters. How can I use the rule to get data on how much was consumed in a month/day/hour and calculate the amount in money
Save all the necessary parameters to persistence and add them up over time.
If you find the answer is lacking in details, it might be because the original question does not have nearly enough information to even begin to answer. Which verison of OH? How often are the values reported? What is reported (e.g. the amount used since the last report or a growing sum of the amount used)?
I have openhab 3
my things
Bridge modbus:serial:sdm630_basis [port="/dev/ttyUSB1", id=1, baud=9600, stopBits=“1.0”, parity=“none”, dataBits=8, encoding=“rtu”]
{
Bridge poller BasisWerte [start=0, length=36, type="input", refresh=1000000] {
Thing data sdm_L1_volt [readStart="0", readValueType="float32" ]
Thing data sdm_L2_volt [readStart="2", readValueType="float32" ]
Thing data sdm_L3_volt [readStart="4", readValueType="float32" ]
Thing data sdm_L1_amp [readStart="6", readValueType="float32" ]
Thing data sdm_L2_amp [readStart="8", readValueType="float32" ]
Thing data sdm_L3_amp [readStart="10", readValueType="float32" ]
Thing data sdm_L1_power [readStart="12", readValueType="float32" ]
Thing data sdm_L2_power [readStart="14", readValueType="float32" ]
Thing data sdm_L3_power [readStart="16", readValueType="float32" ]
Thing data sdm_L1_va [readStart="18", readValueType="float32" ]
Thing data sdm_L2_va [readStart="20", readValueType="float32" ]
Thing data sdm_L3_va [readStart="22", readValueType="float32" ]
Thing data sdm_L1_var [readStart="24", readValueType="float32" ]
Thing data sdm_L2_var [readStart="26", readValueType="float32" ]
Thing data sdm_L3_var [readStart="28", readValueType="float32" ]
Thing data sdm_L1_powerfactor [readStart="30", readValueType="float32" ]
Thing data sdm_L2_powerfactor [readStart="32", readValueType="float32" ]
Thing data sdm_L3_powerfactor [readStart="34", readValueType="float32" ]
}
}
Bridge modbus:serial:sdm630_frequenz [port="/dev/ttyUSB1", id=1, baud=9600, stopBits=“1.0”, parity=“none”, dataBits=8, encoding=“rtu”]
{
Bridge poller Frequenz [start=70, length=2, type="input", refresh=1000000] {
Thing data sdm_frequency [readStart="70", readValueType="float32" ]
}
}
Bridge modbus:serial:sdm630_SystemPower [port="/dev/ttyUSB1", id=1, baud=9600, stopBits=“1.0”, parity=“none”, dataBits=8, encoding=“rtu”]
{
Bridge poller SystemPower [start=52, length=2, type="input", refresh=1000000] {
Thing data sdm_systemPower [readStart="52", readValueType="float32" ]
}
}
Bridge modbus:serial:sdm630_kWh [port="/dev/ttyUSB1", id=1, baud=9600, stopBits=“1.0”, parity=“none”, dataBits=8, encoding=“rtu”]
{
Bridge poller kWh [start=342, length=22, type="input", refresh=1000000] {
Thing data sdm_kwh_Totalkwh [readStart="342", readValueType="float32" ]
Thing data sdm_kwh_Totalkvarh [readStart="344", readValueType="float32" ]
Thing data sdm_kwh_L1_import_kWh [readStart="346", readValueType="float32" ]
Thing data sdm_kwh_L2_import_kWh [readStart="348", readValueType="float32" ]
Thing data sdm_kwh_L3_import_kWh [readStart="350", readValueType="float32" ]
Thing data sdm_kwh_L1_export_kWh [readStart="352", readValueType="float32" ]
Thing data sdm_kwh_L2_export_kWh [readStart="354", readValueType="float32" ]
Thing data sdm_kwh_L3_export_kWh [readStart="356", readValueType="float32" ]
Thing data sdm_kwh_L1_total_kWh [readStart="358", readValueType="float32" ]
Thing data sdm_kwh_L2_total_kWh [readStart="360", readValueType="float32" ]
Thing data sdm_kwh_L3_total_kWh [readStart="362", readValueType="float32" ]
}
}
me items
Group gModbus “Мониторинг параметров электрической сети” [“NetworkAppliance”]
Number SDM_L1_Spannung “Напряжение L1 [%.2f V]” (gModbus) [“Voltage”] {channel=“modbus:data:sdm630_basis:BasisWerte:sdm_L1_volt:number”}
Number SDM_L2_Spannung “Напряжение L2 [%.2f V]” (gModbus) [“Voltage”] {channel=“modbus:data:sdm630_basis:BasisWerte:sdm_L2_volt:number”}
Number SDM_L3_Spannung “Напряжение L3 [%.2f V]” (gModbus) [“Voltage”] {channel=“modbus:data:sdm630_basis:BasisWerte:sdm_L3_volt:number”}
Number SDM_L1_Strom “Ток L1 [%.2f A]” (gModbus) [“Current”] {channel=“modbus:data:sdm630_basis:BasisWerte:sdm_L1_amp:number”}
Number SDM_L2_Strom “Ток L2 [%.2f A]” (gModbus) [“Current”] {channel=“modbus:data:sdm630_basis:BasisWerte:sdm_L2_amp:number”}
Number SDM_L3_Strom “Ток L3 [%.2f A]” (gModbus) [“Current”] {channel=“modbus:data:sdm630_basis:BasisWerte:sdm_L3_amp:number”}
Number SDM_L1_Leistung “Активная мощность L1 [%.2f W]” (gModbus) [“Power”] {channel=“modbus:data:sdm630_basis:BasisWerte:sdm_L1_power:number”}
Number SDM_L2_Leistung “Активная мощность L2 [%.2f W]” (gModbus) [“Power”] {channel=“modbus:data:sdm630_basis:BasisWerte:sdm_L2_power:number”}
Number SDM_L3_Leistung “Активная мощность L3 [%.2f W]” (gModbus) [“Power”] {channel=“modbus:data:sdm630_basis:BasisWerte:sdm_L3_power:number”}
Number SDM_L1_Scheinleistung “Полная мощность L1 [%.2f VA]” (gModbus) [“Power”] {channel=“modbus:data:sdm630_basis:BasisWerte:sdm_L1_va:number”}
Number SDM_L2_Scheinleistung “Полная мощность L2 [%.2f VA]” (gModbus) [“Power”] {channel=“modbus:data:sdm630_basis:BasisWerte:sdm_L2_va:number”}
Number SDM_L3_Scheinleistung “Полная мощность L3 [%.2f VA]” (gModbus) [“Power”] {channel=“modbus:data:sdm630_basis:BasisWerte:sdm_L3_va:number”}
Number SDM_L1_Blindleistung “Реактивная мощьность L1 [%.2f VAr]” (gModbus) [“Power”] {channel=“modbus:data:sdm630_basis:BasisWerte:sdm_L1_var:number”}
Number SDM_L2_Blindleistung “Реактивная мощьность L2 [%.2f VAr]” (gModbus) [“Power”] {channel=“modbus:data:sdm630_basis:BasisWerte:sdm_L2_var:number”}
Number SDM_L3_Blindleistung “Реактивная мощьность L3 [%.2f VAr]” (gModbus) [“Power”] {channel=“modbus:data:sdm630_basis:BasisWerte:sdm_L3_var:number”}
Number SDM_L1_Leistungsfaktor “Коэффициэнт мощности L1 [%.2f]” (gModbus) [“Power”] {channel=“modbus:data:sdm630_basis:BasisWerte:sdm_L1_powerfactor:number”}
Number SDM_L2_Leistungsfaktor “Коэффициэнт мощности L2 [%.2f]” (gModbus) [“Power”] {channel=“modbus:data:sdm630_basis:BasisWerte:sdm_L2_powerfactor:number”}
Number SDM_L3_Leistungsfaktor “Коэффициэнт мощности L3 [%.2f]” (gModbus) [“Power”] {channel=“modbus:data:sdm630_basis:BasisWerte:sdm_L3_powerfactor:number”}
Number SDM_Frequenz “Частота [%.2f Hz]” (gModbus) [“Frequency”] {channel=“modbus:data:sdm630_frequenz:Frequenz:sdm_frequency:number”}
Number SDM_SystemPower “SystemPower [%.2f W]” (gModbus) [“Power”] {channel=“modbus:data:sdm630_SystemPower:SystemPower:sdm_systemPower:number”}
Number SDM_kwh_Totalkwh “Общее потребление мощности [%.2f kWh]” (gModbus) [“Power”] {channel=“modbus:data:sdm630_kWh:kWh:sdm_kwh_Totalkwh:number”}
Number SDM_kwh_Totalkvarh “Общее потребление реактивной мощности [%.2f kVArh]” (gModbus) [“Power”] {channel=“modbus:data:sdm630_kWh:kWh:sdm_kwh_Totalkvarh:number”}
Number SDM_kwh_L1_total_kWh “Общее потребление L1 [%.2f kWh]” (gModbus) [“Power”] {channel=“modbus:data:sdm630_kWh:kWh:sdm_kwh_L1_total_kWh:number”}
Number SDM_kwh_L2_total_kWh “Общее потребление L2 [%.2f kWh]” (gModbus) [“Power”] {channel=“modbus:data:sdm630_kWh:kWh:sdm_kwh_L2_total_kWh:number”}
Number SDM_kwh_L3_total_kWh “Общее потребление L3 [%.2f kWh]” (gModbus) [“Power”] {channel=“modbus:data:sdm630_kWh:kWh:sdm_kwh_L3_total_kWh:number”}
I need a rule for openhub to keep the energy consumed up to a certain date of the month
Most of that is not relevant to persisating, retrieving or calculating some Item value. That’s the reading you’re interested in after it has been transferred to openHAB.
Which Item are you interested in?
Do you have persistence set up for it? (OH3 has rrd4j persistence installed by default, so you probably have that)
When do you want to perform your calculations?
What do you intend to do with the results?
Previous posts with ideas
This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.