zabbix_export:
  version: '6.0'
  date: '2022-12-11T18:27:56Z'
  groups:
    -
      uuid: 7df96b18c230490a9a0a9e2307226338
      name: Templates
  templates:
    -
      uuid: 1b793b7d49e645bb9b6718011cd13498
      template: 'Solis Inverter Dongle'
      name: 'Solis Inverter Dongle'
      description: |
        For use with Ginlong Solis "Wifi Stick Datalogger version 3.5".
        Requires a cron job to fetch http://inverter/inverter.cgi every 5 minutes and written to a file reachable by the agent.
	See https://ale.cx/ALEX/2022/12/getting-data-from-a-ginlong-solis-inverter-into-zabbix/
      groups:
        -
          name: Templates
      items:
        -
          uuid: 428ced4a5468443684083026b6643cc3
          name: 'Solis blob'
          type: ZABBIX_ACTIVE
          key: 'log[/tmp/inverter.log,,,,skip]'
          delay: 300s
          history: 1d
          trends: '0'
          value_type: TEXT
          preprocessing:
            -
              type: REGEX
              parameters:
                - ;(.+)
                - \0
            -
              type: LTRIM
              parameters:
                - ;
            -
              type: CSV_TO_JSON
              parameters:
                - ;
                - ''
                - '0'
            -
              type: LTRIM
              parameters:
                - '['
            -
              type: RTRIM
              parameters:
                - ']'
          tags:
            -
              tag: Inverter
        -
          uuid: df3bd7cabb844c82b8a8468de61e376e
          name: 'Yield today'
          type: DEPENDENT
          key: solis.dyield
          delay: '0'
          history: 7d
          value_type: FLOAT
          units: kWh
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - '$.[''5'']'
            -
              type: IN_RANGE
              parameters:
                - '0.1'
                - '100'
          master_item:
            key: 'log[/tmp/inverter.log,,,,skip]'
          tags:
            -
              tag: Inverter
        -
          uuid: 7d4bbafde4b041548abd873c4d6836d6
          name: 'Inverter temperature'
          type: DEPENDENT
          key: solis.temp
          delay: '0'
          history: 7d
          value_type: FLOAT
          units: C
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - '$.[''3'']'
            -
              type: IN_RANGE
              parameters:
                - '1'
                - '100'
          master_item:
            key: 'log[/tmp/inverter.log,,,,skip]'
          tags:
            -
              tag: Inverter
        -
          uuid: afcb335648dc49eda44399d5ae578ffb
          name: 'Solis power'
          type: DEPENDENT
          key: solis.watts
          delay: '0'
          history: 7d
          units: W
          preprocessing:
            -
              type: JSONPATH
              parameters:
                - '$.[''4'']'
            -
              type: IN_RANGE
              parameters:
                - '1'
                - '8000'
          master_item:
            key: 'log[/tmp/inverter.log,,,,skip]'
          tags:
            -
              tag: Inverter
