Advertisement
Guest User

FHEM YouLess L120

a guest
Feb 23rd, 2020
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 3.37 KB | None | 0 0
  1. # Stromzaehler YouLess LS110
  2. define Stromzaehler JSONMETER LS110 192.168.178.XXX 300
  3. attr Stromzaehler alias Stromsensor am Hauszähler
  4. attr Stromzaehler doStatistics 1
  5. attr Stromzaehler event-min-interval 60
  6. attr Stromzaehler group Stromzaehler
  7. attr Stromzaehler icon measure_power_meter
  8. attr Stromzaehler room 20_UG_Heizraum
  9. attr Stromzaehler stateFormat {sprintf("Zählerstand: %.2f kWh | Aktuell: %s Watt | heute: %s kWh | Kosten heute: %s € ", (0.001*ReadingsVal($name, "electricityConsumed",0)), ReadingsVal($name, "electricityPower",0), round((ReadingsVal($name, "statElectricityConsumedToday",0)/1000),2), round(((ReadingsVal($name, "statElectricityConsumedToday",0)/1000)*.19),2))}
  10. attr Stromzaehler timeOut 60
  11. attr Stromzaehler userReadings kwhToday {round((ReadingsVal($name, "statElectricityConsumedToday",0)/1000),2)}, euroToday {round(((ReadingsVal($name, "statElectricityConsumedToday",0)/1000)*.19),2)}
  12.  
  13. # Stromzaehler YouLess Log
  14. define FileLog_Stromzaehler FileLog ./log/Stromzaehler-%Y-%m.log Stromzaehler:(electricityConsumed|electricityPower)\x3a.*
  15. attr FileLog_Stromzaehler group Stromzaehler
  16. attr FileLog_Stromzaehler room 20_UG_Heizraum,90_System_Logs
  17.  
  18. # Stromzaehler | userReadings kurz vor Mitternacht ins LogFile schreiben
  19. define Stromzaehler_atlog at *23:50 setreading Stromzaehler_atlog kwhToday [Stromzaehler:kwhToday];;setreading Stromzaehler_atlog euroToday [Stromzaehler:euroToday]
  20. attr Stromzaehler_atlog group Stromzaehler
  21. attr Stromzaehler_atlog room 20_UG_Heizraum
  22.  
  23. # Stromzaehler | LogFile fuer userReadings definieren
  24. define Filelog_Stromzaehler_atlog FileLog ./log/Stromzaehler-kWh-Kosten-%Y-%m.log Stromzaehler_atlog:(kwhToday|euroToday).*
  25. attr Filelog_Stromzaehler_atlog group Stromzaehler
  26. attr Filelog_Stromzaehler_atlog room 20_UG_Heizraum,90_System_Logs
  27.  
  28. # Stromzaehler | LogFile | Plot
  29. define SVG_Filelog_Stromzaehler_atlog SVG Filelog_Stromzaehler_atlog:LS110_Kosten:CURRENT
  30. attr SVG_Filelog_Stromzaehler_atlog fixedrange month
  31. attr SVG_Filelog_Stromzaehler_atlog group Stromzaehler
  32. attr SVG_Filelog_Stromzaehler_atlog label "kWh und Kosten | aktueller Monat"
  33. attr SVG_Filelog_Stromzaehler_atlog room 20_UG_Heizraum,90_System_Plots
  34.  
  35. # Stromzaehler YouLess LS110 PLot / Heute
  36. define SVG_FileLog_Stromzaehler_Heute SVG FileLog_Stromzaehler:LS110:CURRENT
  37. attr SVG_FileLog_Stromzaehler_Heute fixedrange day
  38. attr SVG_FileLog_Stromzaehler_Heute group Stromzaehler
  39. attr SVG_FileLog_Stromzaehler_Heute label "Stromverbrauch Heute"
  40. attr SVG_FileLog_Stromzaehler_Heute room 20_UG_Heizraum,90_System_Plots
  41.  
  42. # Stromzaehler YouLess LS110 PLot / letzte 7 Tage
  43. define SVG_FileLog_Stromzaehler_letzte7Tage SVG FileLog_Stromzaehler:LS110:CURRENT
  44. attr SVG_FileLog_Stromzaehler_letzte7Tage fixedoffset -1
  45. attr SVG_FileLog_Stromzaehler_letzte7Tage fixedrange week
  46. attr SVG_FileLog_Stromzaehler_letzte7Tage group Stromzaehler
  47. attr SVG_FileLog_Stromzaehler_letzte7Tage label "Stromverbrauch letzte 7 Tage"
  48. attr SVG_FileLog_Stromzaehler_letzte7Tage room 20_UG_Heizraum,90_System_Plots
  49.  
  50. # Stromzaehler YouLess LS110 PLot / aktueller Monat
  51. define SVG_FileLog_Stromzaehler_Monat SVG FileLog_Stromzaehler:LS110:CURRENT
  52. attr SVG_FileLog_Stromzaehler_Monat fixedrange month
  53. attr SVG_FileLog_Stromzaehler_Monat group Stromzaehler
  54. attr SVG_FileLog_Stromzaehler_Monat label "Stromverbrauch aktueller Monat"
  55. attr SVG_FileLog_Stromzaehler_Monat room 20_UG_Heizraum,90_System_Plots
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement