Hi!
I have two Shelly Plug S, I want to calculate monthly kWh and electric bill, depend of the power usage.
Someone could help me, how can I do that?
Hi!
I have two Shelly Plug S, I want to calculate monthly kWh and electric bill, depend of the power usage.
Someone could help me, how can I do that?
I Found this solution, but not working.
Items:
Switch pcoutlett "Pc outlet" {channel="shelly:shellyplugs:c55b3c:relay#output"}
Number:Power pcoutletpow "Pc [%.1f %unit%]" (powsum) {channel="shelly:shellyplugs:c55b3c:meter#currentWatts"}
Number:Power pcoutpowtotal "Pc [%.1f %unit%]" (powsum2) {channel="shelly:shellyplugs:c55b3c:meter#totalKWH"}
Number cost "Energy cost [%d]"
Rules:
val Energy = 36
rule "Energy cost"
when
Item pcoutletpow changed
then
var Number postUpdate(cost, (pcoutletpow.state as DecimalType * Energy) / 60)
end
Sitemap:
Switch item=pcoutlett label="Pc" icon="poweroutlet"
Text item=pcoutletpow label="Pc" icon="energy"
Text item=pcoutpowtotal label="Pc" icon="energy"
Text item=cost
The working rule:
val Number Energy = 36
rule "Energy cost"
when
Item pcoutletpow changed
then
var Number szumma = (pcoutletpow.state as Number / 1000 * 730.5 * Energy)
cost.postUpdate(szumma)
end