modbuslog.ini 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. [main]
  2. publish_on_mqtt = True
  3. store_in_influxdb = True
  4. [rs485]
  5. serialdevice = /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_AK05DZIG-if00-port0
  6. serialtimeout = 0.3
  7. read_retries = 4
  8. # stops script execution, so use with caution!
  9. raise_error_on_reading_failure = False
  10. # Sleep for some time between readings of one meter avoid errors
  11. # i got best results (nearly no retries) with sleep_between_instruments = 0.03 and sleep_between_readings = 0
  12. # when reading 3 SDM120 meters set (9600 baud, parity EVEN)
  13. # i.e. reading current, power, appearent power and power factor from 1 meter needs about 300ms
  14. # providing an update rate of more than 1/s for 3 meters
  15. sleep_between_readings = 0
  16. sleep_between_instruments = 0.03
  17. report_instrument_read_retries = False
  18. # publish ongoing instrument read errors on MQTT topic - MQTT must be enabled and error topic set in mqtt section
  19. # time in s after that repeated instrument reading errors are published via MQTT
  20. # interval in s to publish repeated instrument reading errors via MQTT
  21. readingerror_publish_after = 60
  22. readingerror_publish_interval = 300
  23. [mqtt]
  24. enable = true
  25. server = mqtt.lan
  26. port = 1883
  27. user =
  28. password =
  29. # topic prefix
  30. topic_prefix = PowerMeters/Top5
  31. # topic for error messages
  32. topic_error = PowerMeters/Top5/Modbus/ERROR
  33. [filelog]
  34. # needed for calculating today/yesterday totals, so only disable if that is not needed
  35. enable = True
  36. storage_path = /home/pi/modbuslog
  37. [meters]
  38. # s, base interval for reading instruments
  39. # set to 0 to acquire data as fast as possible
  40. interval_momentary = 0
  41. # s, interval for reporting momentary readings, 0 to report immediately
  42. # (overruled by powerdelta settings)
  43. interval_report_momentary = 60
  44. # s, interval for reporting kWh-readings
  45. # this runs within the base meter reading method, but is performed less often than "interval_momentary"
  46. # by measuring elapsed time since last reading, so actual interval can vary, especially when
  47. # high "interval_momentary" is set to a higher value. To avoid that set
  48. # "interval_momentary" (= command parameter --interval) to desired value
  49. # and configure "meters_use_only_one_interval" to True if momentary data should not be read more often
  50. interval_energy = 60
  51. # use only interval 1 (which is interval_momentary)
  52. use_only_one_interval = False
  53. # report momentary readings immediately on sudden power changes
  54. # this uses the readings in category "power" in readings_names.yml
  55. # value is in % (decimal notation)
  56. report_on_powerdelta_enable = true
  57. report_on_powerdelta_low = 0.95
  58. report_on_powerdelta_high = 1.05
  59. # different powerdelta configuration for low load conditions
  60. report_on_lowpower_powerdelta_low = 0.70
  61. report_on_lowpower_powerdelta_high = 1.30
  62. # define max Watts for low power tresholds
  63. report_on_lowpower_treshold = 10
  64. # add reading time to MQTT messages and InfluxDB
  65. # this is the measured time in seconds that was needed to get all the data from the instrument
  66. send_readtime = False
  67. [readings]
  68. # default decimal places for data conversion
  69. # used for readings that don´t have this setting configured separately in meters_types.yml
  70. default_decimals = 3
  71. [influxdb]
  72. write_energy_today_total = True
  73. write_energy_yesterday_total = True
  74. separate_momentary_database = True
  75. host = localhost
  76. port = 8086
  77. user =
  78. password =
  79. database = energymeters
  80. [influxdb_momentary]
  81. host = localhost
  82. port = 8086
  83. user =
  84. password =
  85. database = energy_momentary