Advertisement
Guest User

Untitled

a guest
Aug 18th, 2019
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.51 KB | None | 0 0
  1. #WeMos per MQTT_DEVICE in FHEM eingebunden
  2. defmod UV_WeMos_Stromzaehler MQTT_DEVICE
  3. attr UV_WeMos_Stromzaehler IODev Mosquitto
  4. attr UV_WeMos_Stromzaehler alias WeMos Sicherungskasten / Stromzähler
  5. attr UV_WeMos_Stromzaehler event-on-change-reading .*
  6. attr UV_WeMos_Stromzaehler event-on-update-reading .*
  7. attr UV_WeMos_Stromzaehler group Tasmota
  8. attr UV_WeMos_Stromzaehler room 98_Geräte
  9. attr UV_WeMos_Stromzaehler subscribeReading_state /SmartHome/EG/Sicherungskasten/stat/Sicherungskasten-WeMos-Stromzaeh/POWER
  10.  
  11. #DOIF welches die ON Befehle vom WeMos zählt
  12. defmod di_Stromzahler DOIF ([UV_WeMos_Stromzaehler] eq "ON")\
  13. (set $SELF TotalCount {(ReadingsVal("$SELF","TotalCount",0) + 1)})
  14. attr di_Stromzahler icon helper_doif
  15. attr di_Stromzahler readingList TotalCount
  16. attr di_Stromzahler wait 0:3
  17.  
  18. #FHEM Modul "ElectricityCalculator" welches sich um die Auswertung der gezählten Impulse kümmert:
  19. defmod Stromzaehler ElectricityCalculator di_Stromzahler:TotalCount.*
  20. attr Stromzaehler BasicPricePerAnnum 71.40
  21. attr Stromzaehler Currency €;
  22. attr Stromzaehler ElectricityCounterOffset 55422
  23. attr Stromzaehler ElectricityKwhPerCounts 0.0133333333333333
  24. attr Stromzaehler ElectricityPricePerKWh 0.2825
  25. attr Stromzaehler MonthOfAnnualReading 0
  26. attr Stromzaehler MonthlyPayment 108
  27. attr Stromzaehler ReadingDestination CalculatorDevice
  28. attr Stromzaehler SiPrefixPower kW
  29. attr Stromzaehler room 99_System
  30. attr Stromzaehler stateFormat Aktueller Stand: [$name:di_Stromzahler_TotalCount_CounterCurrent:r0] kW/h
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement