Intégration (& monitoring) Proxmox

Version finale, jusqu’à ce que…
image

Code
#//////////////////////////////////////////////////////////////////////////////#
#///////                                                         //////////////#
#/////// CARD: ProxMox Virtual Environment & Glances monitoring
#///////                                                         //////////////#
#//////////////////////////////////////////////////////////////////////////////#

type: "custom:swiss-army-knife-card"
entities:
  # ======================================================================== NCR
  #00 NCR uptime
  - entity: sensor.pve_host_ncr_last_boot
  #01 NCR CPU load
  - entity: sensor.glances_novasrv_cpu_load ################### unused
    decimals: 2
  #02 NCR CPU used
  - entity: sensor.glances_novasrv_cpu_used_percentage
    decimals: 1
  #03 NCR CPU used max
  - entity: sensor.stat_glances_novasrv_cpu_used_percentage_max
    decimals: 1
  #04 NCR CPU temp
  - entity: sensor.glances_novasrv_cpu_temperature
    decimals: 0
  #05 fake
  - entity: sun.sun
  #06 NCR Chipset temp
  - entity: sensor.glances_novasrv_chipset_temperature
    decimals: 0
  #07 fake
  - entity: sun.sun
  #08 NCR RAM used
  - entity: sensor.glances_novasrv_ram_used_percentage
    decimals: 1
  #09 NCR RAM used max
  - entity: sensor.stat_glances_novasrv_ram_used_percentage_max
    decimals: 1
  #10 fake
  - entity: sun.sun
  #11 NCR sda disk health
  - entity: binary_sensor.pve_host_ncr_disk_sda_health
  #12 NCR sda disk temp
  - entity: sensor.glances_novasrv_disk_1_temperature
    decimals: 0
  #13 NCR sdb disk health
  - entity: binary_sensor.pve_host_ncr_disk_sdb_health
  #14 NCR sdb disk temp
  - entity: sensor.glances_novasrv_disk_2_temperature
    decimals: 0
  
  # ============================================================ PVE FRIGATE LXC
  #15 Frigate status
  - entity: binary_sensor.pve_ct119_frigate_status
  #16 Frigate CPU used
  - entity: sensor.pve_ct119_frigate_cpu_used_percentage
    decimals: 1
  #17 Frigate RAM used
  - entity: sensor.pve_ct119_frigate_memory_used_percentage
    decimals: 1
  #18 fake
  - entity: sun.sun
  #19 faje
  - entity: sun.sun
  # =========================================================== PVE JELLYFIN LXC
  #20 Jellyfin status
  - entity: binary_sensor.pve_ct118_jellyfin_status
  #21 Jellyfin CPU used
  - entity: sensor.pve_ct118_jellyfin_cpu_used_percentage
    decimals: 1
  #22 Jellyfin RAM used
  - entity: sensor.pve_ct118_jellyfin_memory_used_percentage
    decimals: 1
  #23 fake
  - entity: sun.sun
  #24 fake
  - entity: sun.sun

  # ========================================================== PVE TAILSCALE LXC
  #25 Tailscale status
  - entity: binary_sensor.pve_ct117_tailscale_status
  #26 Tailscale CPU used
  - entity: sensor.pve_ct117_tailscale_cpu_used_percentage
    decimals: 1
  #27 Tailscale CPU used
  - entity: sensor.pve_ct117_tailscale_memory_used_percentage
    decimals: 1
  #28
  - entity: sun.sun
  #29 fake
  - entity: sun.sun

  # ======================================================= PVE VM HOMEASSISTANT
  #30 HomeAssistant status
  - entity: binary_sensor.pve_vm113_homeassistant_status
  #31 HomeAssistant CPU used
  - entity: sensor.pve_vm113_homeassistant_cpu_used_percentage
    decimals: 1
  #32 HomeAssistant RAM used
  - entity: sensor.pve_vm113_homeassistant_memory_used_percentage
    decimals: 1
  #33 HomeAssistant health
  - entity: binary_sensor.pve_vm113_homeassistant_health
  #34 fake
  - entity: sun.sun

  # ============================================================= PVE VM LUXRIOT
  #35 Luxriot status
  - entity: binary_sensor.pve_vm111_luxriot_status
  #36 Luxriot CPU used
  - entity: sensor.pve_vm111_luxriot_cpu_used_percentage
    decimals: 1
  #37 Luxriot RAM used
  - entity: sensor.pve_vm111_luxriot_memory_used_percentage
    decimals: 1
  #38 Luxriot health
  - entity: binary_sensor.pve_vm111_luxriot_health
  #39 fake
  - entity: sun.sun

  # ====================================================== PVE VM OPENMEDIAVAULT
  #40 OpenMediaVault status
  - entity: binary_sensor.pve_vm114_openmediavault_status
  #41 OpenMediaVault CPU used
  - entity: sensor.pve_vm114_openmediavault_cpu_used_percentage
    decimals: 1
  #42 OpenMediaVault RAM used
  - entity: sensor.pve_vm114_openmediavault_memory_used_percentage
    decimals: 1
  #43 OpenMediaVault health
  - entity: binary_sensor.pve_vm114_openmediavault_health
  #44 OpenMediaVault USB hdd
  - entity: sensor.omv_disk_usb_temperature

  # ============================================================= fake
  #45 VM/CT status
  - entity: sun.sun ################### unused unused
  #46 VM/CT CPU used
  - entity: sun.sun ################### unused unused
  #47 VM/CT RAM used
  - entity: sun.sun ################### unused unused
  #48 VM/CT health
  - entity: sun.sun ################### unused unused
  #49 VM/CT uptime
  - entity: sun.sun ################### unused unused

  # ============================================================================
  #50
  - entity: sensor.sfr_box_temperature
    decimals: 0

aspectratio: 1.8/1
layout:
  styles:
    card:
    toolsets:
      # filter: url(#nm-1)
  toolsets:
    ### ------------------------------------------------------------------------
    ### ------------------------------------------------------------------------
    ### ---------------------------------------------------------- DEFAULT TOOLS
    - toolset: default tools
      position:
        cx: 50
        cy: 50
      tools:
        ## ____________________________________________ default icon
        - <<: &icon
            type: icon
            # entity_index: 0
            position:
              cx: 50
              cy: 50
              icon_size: 10
            styles:
              icon:
                fill: var(--overlay0)
            user_actions:
              tap_action:
                haptic: none
                actions: none
        ## ____________________________________________ default state
        - <<: &state
            type: state
            # entity_index: 0
            position:
              cx: 50
              cy: 50
            styles:
              state:
                font-size: 7em
                fill: var(--primary-text-color)
              uom:
                opacity: 0.2
            user_actions:
              tap_action:
                haptic: none
                actions: none
        ## ____________________________________________ default text
        - <<: &text
            type: text
            position:
              cx: 50
              cy: 50
            text: 'TEXT'
            styles:
              text:
                text-anchor: middle # middle / start / end
                font-size: 6em
                font-weight: 600
                fill: var(--secondary-text-color)
            user_actions:
              tap_action:
                haptic: none
                actions: none

    # ==================================================================================
    # ==================================================================================
    # ==================================================================================
    # ==================================================================================
    # ======================================================================== NCR n4000

    ### ------------------------------------------------------------------------
    ### ------------------------------------------------------------------------
    ### ----------------------------------------------------------- CORNER ICONS
    - toolset: corner icons
      position:
        cx: 50
        cy: 50
      tools:
        ## ____________________________________________ PVE icon
        - <<: *icon
          icon: si:proxmox
          position:
            cx: 10
            cy: 10
            icon_size: 8
        # ## ____________________________________________ ?????????????????? icon
        # - <<: *icon
        #   icon: si:proxmox
        #   position:
        #     cx: 90
        #     cy: 10
        #     icon_size: 8
        # ## ____________________________________________ ?????????????????? icon
        # - <<: *icon
        #   icon: si:proxmox
        #   position:
        #     cx: 90
        #     cy: 90
        #     icon_size: 8
        ## ____________________________________________ reboot icon
        - <<: *icon
          icon: mdi:restart
          position:
            cx: 10
            cy: 90
            icon_size: 10
          user_actions:
            tap_action:
              haptic: failure # selection success warning failure light medium heavy
              actions:
                - action: call-service
                  service: honeycomb
                  service_data:
                    size: 300
                    spacing: 4
                    animation_speed: 50
                    audio: null
                    autoclose: true
                    show_name: false
                    entity: null
                    active: true
                    buttons:
                      ### button 1 TAILSCALE
                      - icon: mdi:dots-grid
                        color: var(--orange)
                        entity: binary_sensor.pve_ct117_tailscale_status
                        active: '[[[ return entity.state == "off" ]]]'
                        tap_action:
                          action: call-service
                          service: button.press
                          service_data:
                            entity_id: button.pve_ct117_tailscale_reboot
                      ### button 2 HOME ASSISTANT
                      - icon: mdi:home-assistant
                        color: var(--blue)
                        entity: binary_sensor.pve_vm113_homeassistant_status
                        active: '[[[ return entity.state == "off" ]]]'
                        tap_action:
                          action: call-service
                          service: button.press
                          service_data:
                            entity_id: button.pve_vm113_homeassistant_reboot
                      ### button 3 LUXRIOT
                      - icon: mdi:record-rec
                        color: var(--red)
                        entity: binary_sensor.pve_vm111_luxriot_status
                        active: '[[[ return entity.state == "off" ]]]'
                        tap_action:
                          action: call-service
                          service: button.press
                          service_data:
                            entity_id: button.pve_vm111_luxriot_reboot
                      ### button 4 OPENMEDIAVAULT
                      - icon: mdi:nas
                        color: var(--green)
                        entity: binary_sensor.pve_vm114_openmediavault_status
                        active: '[[[ return entity.state == "off" ]]]'
                        tap_action:
                          action: call-service
                          service: button.press
                          service_data:
                            entity_id: button.pve_vm114_openmediavault_reboot
                      ### button 5 JELLYFIN
                      - icon: si:jellyfin
                        color: var(--nova-color)
                        entity: binary_sensor.pve_ct118_jellyfin_status
                        active: '[[[ return entity.state == "off" ]]]'
                        tap_action:
                          action: call-service
                          service: button.press
                          service_data:
                            entity_id: button.pve_ct118_jellyfin_reboot
                      ### button 6 FRIGATE
                      - icon: phu:frigate
                        color: var(--text)
                        entity: binary_sensor.pve_ct119_frigate_status
                        active: '[[[ return entity.state == "off" ]]]'
                        tap_action:
                          action: call-service
                          service: button.press
                          service_data:
                            entity_id: button.pve_ct119_frigate_reboot

    ### ------------------------------------------------------------------------
    ### ------------------------------------------------------------------------
    ### -------------------------------------------------------------- CPU + RAM

    - toolset: cpu ram circular
      position:
        cx: 50
        cy: 50
      tools:
        ## ____________________________________________ circle
        - type: circle
          position:
            cx: 50
            cy: 50
            radius: 46
          styles:
            circle:
              fill: var(--primary-background-color)
          user_actions:
            tap_action:
              haptic: none
              actions: none
        ## ____________________________________________ sparkline
        - type: sparkline
          position:
            cx: 50
            cy: 50
            width: 90
            height: 90
            # margin:
            #   x: 0
            #   y: 0
          entity_index: 2
          period:
            calendar:
              period: day
              offset: 0
              duration:
                hour: 24
              bins:
                per_hour: 2
            group_by: date
          sparkline:
            animate: true
            show:
              chart_type: radial_barcode
              chart_variant: sunburst_outward
              chart_viz: flower
            state_values:
              aggregate_func: max # avg / max
            radial_barcode:
              size: 12
              line_width: 0.1
              column_spacing: 0.3
            colorstops_transition: smooth # smooth / hard
            colorstops:
              colors:
                - value: 00
                  color: var(--rainbow-palette-color-05)
                - value: 41
                  color: var(--rainbow-palette-color-07)
                - value: 61
                  color: var(--rainbow-palette-color-08)
                - value: 81
                  color: var(--rainbow-palette-color-10)
            styles:
              radial_barcode_background:
                fill: var(--sidebar-background-color)
          user_actions:
            tap_action:
              haptic: none
              actions: none

        ## ____________________________________________ segarc
        - type: segarc
          entity_index: 8
          position:
            cx: 50
            cy: 50
            start_angle: 0
            end_angle: 360
            width: 4
            radius: 32 # circle -1
          scale:
            min: 0
            max: 100
            width: 0.6
            offset: 0 # 0 for outer / -2 for inner
          show:
            scale: true
            style: colorstops
          segments:
            colorstops:
              gap: 1
              colors: &blue_palette
                00: var(--blue-palette-color-02)
                61: var(--blue-palette-color-04)
                81: var(--blue-palette-color-08)
                91: var(--red)
          styles:
            background:
              fill: var(--sidebar-background-color)
          animation:
            duration: 5
          user_actions:
            tap_action:
              haptic: none
              actions: none
        ## ____________________________________________ CPU icon
        # - <<: *icon
        #   entity_index: 2
        #   icon: mdi:cpu-64-bit
        #   position:
        #     cx: 50
        #     cy: 29
        #     icon_size: 7
        
        - <<: *text
          position:
            cx: 50
            cy: 29
          text: 'CPU'
          styles:
            text:
              text-anchor: middle # middle / start / end
              font-size: 5em
              font-weight: 600
              fill: var(--secondary-text-color)

        ## ____________________________________________ RAM icon
        # - <<: *icon
        #   entity_index: 8
        #   icon: mdi:memory
        #   position:
        #     cx: 50
        #     cy: 71
        #     icon_size: 7
        
        - <<: *text
          position:
            cx: 50
            cy: 71
          text: 'RAM'
          styles:
            text:
              text-anchor: middle # middle / start / end
              font-size: 5em
              font-weight: 600
              fill: var(--secondary-text-color)

    - toolset: cpu values
      position:
        cx: 44
        cy: 40
      tools:
        ## ____________________________________________ CPU state
        - <<: *state
          entity_index: 2
          <<: &rainbow_percent_colorstop
            show:
              style: colorstops
            colorstops:
              fill: true
              colors:
                00: var(--primary-text-color)
                41: var(--yellow)
                61: var(--orange)
                81: var(--red)
          styles:
            state:
              font-size: 12em
        ## ____________________________________________ CPU max state
        - <<: *state
          entity_index: 3
          <<: &max_state
            position:
              cx: 70
              cy: 54
          show:
            style: colorstops
          colorstops:
            fill: true
            colors:
              00: var(--primary-text-color)
              41: var(--yellow)
              61: var(--orange)
              81: var(--red)
          styles:
            state:
              font-size: 6em
          animations:
            - state: '40'
              operator: '<='
              styles:
                state:
                  opacity: 0.2
                uom:
                  opacity: 0.1
            - state: '40'
              operator: '>'
              styles:
                state:
                  opacity: 0.6
                uom:
                  opacity: 0.3
            - state: '60'
              operator: '>'
              styles:
                state:
                  opacity: 0.8
                uom:
                  opacity: 0.5
            - state: '80'
              operator: '>'
              styles:
                state:
                  opacity: 1
                uom:
                  opacity: 0.7

    - toolset: ram values
      position:
        cx: 44
        cy: 58
      tools:
        ## ____________________________________________ RAM state
        - <<: *state
          entity_index: 8
          <<: &blue_percent_colorstop
            show:
              style: colorstops
            colorstops:
              fill: true
              colors:
                <<: *blue_palette
                # 00: var(--blue-palette-color-02)
                # 41: var(--blue-palette-color-04)
                # 71: var(--blue-palette-color-07)
                # 91: var(--red)
          styles:
            state:
              font-size: 12em
        ## ____________________________________________ RAM max state
        - <<: *state
          entity_index: 9
          <<: *max_state
          show:
            style: colorstops
          colorstops:
            fill: true
            colors:
              00: var(--primary-text-color)
              61: var(--yellow)
              81: var(--orange)
              91: var(--red)
          styles:
            state:
              font-size: 6em
          animations:
            - state: '60'
              operator: '<='
              styles:
                state:
                  opacity: 0.2
                uom:
                  opacity: 0.1
            - state: '60'
              operator: '>'
              styles:
                state:
                  opacity: 0.6
                uom:
                  opacity: 0.3
            - state: '80'
              operator: '>'
              styles:
                state:
                  opacity: 0.8
                uom:
                  opacity: 0.5
            - state: '90'
              operator: '>'
              styles:
                state:
                  opacity: 1
                uom:
                  opacity: 0.7

    ### ------------------------------------------------------------------------
    ### ------------------------------------------------------------------------
    ### ----------------------------------------------------------- TEMPERATURES

    - toolset: temperature text
      position:
        cx: 106
        cy: 9
      tools:
        ## ____________________________________________ temp text
        # - <<: *icon
        #   icon: mdi:thermometer
        #   # entity_index: 4
        #   position:
        #     cx: 64.5
        #     cy: 50
        #     icon_size: 10

        - <<: *text
          position:
            cx: 59
            cy: 50
          text: 'TEMP'

    - toolset: cpu temp
      position:
        cx: 106
        cy: 22
      tools:
        ## ____________________________________________ cpu icon
        - <<: *icon
          icon: mdi:cpu-64-bit
          # entity_index: 2
        ## ____________________________________________ cpu state
        - <<: *state
          entity_index: 4
          position:
            cx: 65
            cy: 50
          <<: &50_temp_colorstop
            show:
              style: colorstops
            colorstops:
              fill: true
              colors:
                0: var(--primary-text-color)
                51: var(--yellow)
                71: var(--orange)
                91: var(--red)

    - toolset: pch (chipset) temp
      position:
        cx: 106
        cy: 36
      tools:
        ## ____________________________________________ pch icon
        - <<: *icon
          icon: mdi:chip
          # entity_index: 6
        ## ____________________________________________ pch state
        - <<: *state
          entity_index: 6
          position:
            cx: 65
            cy: 50
          <<: &60_temp_colorstop
            show:
              style: colorstops
            colorstops:
              fill: true
              colors:
                0: var(--primary-text-color)
                61: var(--yellow)
                81: var(--orange)
                91: var(--red)

    - toolset: ssd a temp
      position:
        cx: 106
        cy: 50
      tools:
        ## ____________________________________________ sda icon
        - <<: *icon
          entity_index: 11
          icon: mdi:harddisk
          <<: &disk_animation
            animations:
              - state: 'off'
                operator: '!='
                styles:
                  icon:
                    fill: var(--warning-color)
              - state: 'off'
                styles:
                  icon:
                    transition: opacity 3s
        ## ____________________________________________ sda badge
        - <<: *icon
          entity_index: 11
          <<: &disk_badge
            icon: mdi:check-circle
            position:
              cx: 54
              cy: 46
              icon_size: 6
            styles:
              icon:
                fill: var(--success-color)
            animations:
              - state: 'off'
                operator: '!='
                styles:
                  icon:
                    opacity: 0
              - state: 'off'
                styles:
                  icon:
                    opacity: 0.7
                    transition: opacity 3s
        ## ____________________________________________ sda state
        - <<: *state
          entity_index: 12
          position:
            cx: 65
            cy: 50
          <<: &40_temp_colorstop
            show:
              style: colorstops
            colorstops:
              fill: true
              colors:
                0: var(--primary-text-color)
                41: var(--yellow)
                51: var(--orange)
                61: var(--red)

    - toolset: ssd b temp
      position:
        cx: 106
        cy: 64
      tools:
        ## ____________________________________________ sdb icon
        - <<: *icon
          entity_index: 13
          icon: mdi:harddisk-plus
          <<: *disk_animation
        ## ____________________________________________ sdb badge
        - <<: *icon
          entity_index: 13
          <<: *disk_badge
        ## ____________________________________________ sdb state
        - <<: *state
          entity_index: 14
          position:
            cx: 65
            cy: 50
          <<: *40_temp_colorstop

    # - toolset: usb hdd temp
    #   position:
    #     cx: 106
    #     cy: 78
    #   tools:
    #     ## ____________________________________________ usb hdd icon
    #     - <<: *icon
    #       icon: mdi:nas
    #     ## ____________________________________________ usb hdd state
    #     - <<: *state
    #       entity_index: 44
    #       position:
    #         cx: 65
    #         cy: 50
    #       <<: *40_temp_colorstop

    - toolset: box temp
      position:
        cx: 106
        cy: 92
      tools:
        ## ____________________________________________ box icon
        - <<: *icon
          entity_index: 50
          icon: mdi:router-wireless
        ## ____________________________________________ box state
        - <<: *state
          entity_index: 50
          position:
            cx: 65
            cy: 50
          <<: *50_temp_colorstop

    # ==================================================================================
    # ==================================================================================
    # ==================================================================================
    # ==================================================================================
    # ================================================== VIRTUAL MACHINES AND CONTAINERS

    - toolset: vm_ct text
      position:
        cx: 136
        cy: 9
      tools:
        ## ____________________________________________ text
        # - <<: *icon
        #   # entity_index: 2
        #   icon: mdi:cpu-64-bit
        #   position:
        #     cx: 64.5
        #     cy: 50
        #     icon_size: 10

        - <<: *text
          position:
            cx: 66
            cy: 50
          text: 'CPU'
        ## ____________________________________________ text
        # - <<: *icon
        #   icon: mdi:memory
        #   # entity_index: 8
        #   position:
        #     cx: 79.5
        #     cy: 50
        #     icon_size: 10


        - <<: *text
          position:
            cx: 83
            cy: 50
          text: 'RAM'
    ### ------------------------------------------------------------------------
    ### ------------------------------------------------------------------------
    ### --------------------------------------------------------- HOME ASSISTANT

    - toolset: vm home assistant
      position:
        cx: 136
        cy: 22
      tools:
        ## ____________________________________________ home assistant icon
        - <<: *icon
          entity_index: 33
          icon: mdi:home-assistant
          position:
            cx: 50
            cy: 50
            icon_size: 8
          <<: &animation
            animations:
              - state: 'off'
                operator: '!='
                styles:
                  icon:
                    fill: var(--error-color)
              - state: 'off'
                styles:
                  icon:
                    transition: fill 3s
        ## ____________________________________________ home assistant badge
        - <<: *icon
          entity_index: 30
          <<: &run-badge
            icon: mdi:play-circle
            position:
              cx: 54
              cy: 46
              icon_size: 6
            styles:
              icon:
                fill: var(--success-color)
            animations:
              - state: 'on'
                operator: '!='
                styles:
                  icon:
                    opacity: 0
              - state: 'on'
                styles:
                  icon:
                    opacity: 0.7
                    transition: opacity 3s
        - <<: *icon
          entity_index: 30
          <<: &stop-badge
            icon: mdi:stop-circle
            position:
              cx: 54
              cy: 46
              icon_size: 6
            styles:
              icon:
                fill: var(--error-color)
            animations:
              - state: 'off'
                operator: '!='
                styles:
                  icon:
                    opacity: 0
              - state: 'off'
                styles:
                  icon:
                    transition: opacity 3s
        ## ____________________________________________ home assistant CPU
        - <<: *state
          entity_index: 31
          position:
            cx: 67
          <<: *rainbow_percent_colorstop
        ## ____________________________________________ home assistant RAM
        - <<: *state
          entity_index: 32
          position:
            cx: 84
          <<: *blue_percent_colorstop

    ### ------------------------------------------------------------------------
    ### ------------------------------------------------------------------------
    ### ---------------------------------------------------------------- LUXRIOT

    - toolset: vm luxriot
      position:
        cx: 136
        cy: 36
      tools:
        ## ____________________________________________ luxriot icon
        - <<: *icon
          entity_index: 38
          icon: mdi:record-rec
          position:
            cx: 50
            cy: 50
            icon_size: 12
          <<: *animation
        ## ____________________________________________ luxriot badge
        - <<: *icon
          entity_index: 35
          <<: *run-badge
        - <<: *icon
          entity_index: 35
          <<: *stop-badge
        ## ____________________________________________ luxriot CPU
        - <<: *state
          entity_index: 36
          position:
            cx: 67
          <<: *rainbow_percent_colorstop
        ## ____________________________________________ luxriot RAM
        - <<: *state
          entity_index: 37
          position:
            cx: 84
          <<: *blue_percent_colorstop

    ### ------------------------------------------------------------------------
    ### ------------------------------------------------------------------------
    ### --------------------------------------------------------- OPENMEDIAVAULT

    - toolset: vm openmediavault
      position:
        cx: 136
        cy: 50
      tools:
        ## ____________________________________________ openmediavault icon
        - <<: *icon
          entity_index: 43
          icon: mdi:nas
          <<: *animation
        ## ____________________________________________ openmediavault badge
        - <<: *icon
          entity_index: 40
          <<: *run-badge
        - <<: *icon
          entity_index: 40
          <<: *stop-badge
        ## ____________________________________________ openmediavault CPU
        - <<: *state
          entity_index: 41
          position:
            cx: 67
          <<: *rainbow_percent_colorstop
        ## ____________________________________________ openmediavault RAM
        - <<: *state
          entity_index: 42
          position:
            cx: 84
          <<: *blue_percent_colorstop

    ### ------------------------------------------------------------------------
    ### ------------------------------------------------------------------------
    ### -------------------------------------------------------------- TAILSCALE

    - toolset: ct tailscale
      position:
        cx: 136
        cy: 64
      tools:
        ## ____________________________________________ tailscale icon
        - <<: *icon
          entity_index: 28
          icon: mdi:dots-square
        ## ____________________________________________ tailscale badge
        - <<: *icon
          entity_index: 25
          <<: *run-badge
        - <<: *icon
          entity_index: 25
          <<: *stop-badge
        ## ____________________________________________ tailscale CPU
        - <<: *state
          entity_index: 26
          position:
            cx: 67
          <<: *rainbow_percent_colorstop
        ## ____________________________________________ tailscale RAM
        - <<: *state
          entity_index: 27
          position:
            cx: 84
          <<: *blue_percent_colorstop

    ### ------------------------------------------------------------------------
    ### ------------------------------------------------------------------------
    ### ---------------------------------------------------------------- FRIGATE

    - toolset: ct frigate
      position:
        cx: 136
        cy: 78
      tools:
        ## ____________________________________________ frigate icon
        - <<: *icon
          entity_index: 18
          icon: phu:frigate
        ## ____________________________________________ frigate badge
        - <<: *icon
          entity_index: 15
          <<: *run-badge
        - <<: *icon
          entity_index: 15
          <<: *stop-badge
        ## ____________________________________________ frigate CPU
        - <<: *state
          entity_index: 16
          position:
            cx: 67
          <<: *rainbow_percent_colorstop
        ## ____________________________________________ frigate RAM
        - <<: *state
          entity_index: 17
          position:
            cx: 84
          <<: *blue_percent_colorstop

    ### ------------------------------------------------------------------------
    ### ------------------------------------------------------------------------
    ### --------------------------------------------------------------- JELLYFIN

    - toolset: ct jellyfin
      position:
        cx: 136
        cy: 92
      tools:
        ## ____________________________________________ jellyfin icon
        - <<: *icon
          entity_index: 23
          icon: si:jellyfin
          position:
            cx: 50
            cy: 50
            icon_size: 8
        ## ____________________________________________ jellyfin badge
        - <<: *icon
          entity_index: 20
          <<: *run-badge
        - <<: *icon
          entity_index: 20
          <<: *stop-badge
        ## ____________________________________________ jellyfin CPU
        - <<: *state
          entity_index: 21
          position:
            cx: 67
          <<: *rainbow_percent_colorstop
        ## ____________________________________________ jellyfin RAM
        - <<: *state
          entity_index: 22
          position:
            cx: 84
          <<: *blue_percent_colorstop
>

1 « J'aime »

Hello :wave:t2:
Wahh la quantité de travail pour faire tout ce code !

Dommage que l’installation du mode ne soit pas aisée …
Tu n’aurais pas un tuto pour ça ?

C’est du sur mesure !

Je n’ai pas de tuto, de mémoire j’ai suivi la documentation officielle …
N’hésite pas à créer un nouveau sujet, ça pourra en aider d’autres.

Si un jour j’ai du temps, je m’en occuperais ^^
Car là je n’en ai pas assez pour tout le travail que ça semble demander :wink:

Merci en tout cas :innocent:

Bonjour,

j’ai quelques soucis avec le cron de @AlexHass

d’abord, je suis sur un proxmox 8.1.4 fraichement installé.

d’abord il a fallu que j’installe le python3-pip, il n’y a que le python3 qui était installé.

le pip install psutil me sort une erreur:

root@proxmox1:~# pip install psutil
error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.

    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.

    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.

    See /usr/share/doc/python3.11/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.

j’ai pu ajouter les psutil avec apt install python3-psutil
mais je ne trouve pas le paho

root@proxmox1:~# python3 scripts/toto.py
Traceback (most recent call last):
  File "/root/scripts/toto.py", line 4, in <module>
    import paho.mqtt.client as mqtt
ModuleNotFoundError: No module named 'paho'
root@proxmox1:~#

pas mieux avec haho.mqtt ou paho.mqtt.client :sob:

Je n’ai pas tout suivi mais effectivement pip ne s’utilisent plus comme ça :slight_smile:
Ces librairies python sont passées dans le répository de apt…
C’est simplement:
apt install python3-psutil
apt install python3-paho-mqtt

J’utilise encore ce script sur 2 proxmox, ça marche nickel.

1 « J'aime »

Ah bien oui, ca marche mieux avec un - au lieu du point …

je continue …

1 « J'aime »

bien, déjà je n’ai plus d’erreurs avec le cron !!! :+1:
mais je ne vois rien nulle part dans HA. :face_with_raised_eyebrow:

Mais, oui les sensors mqtt… je les avais oubliés ceux là…

mais, je vois toujours rien dans les devices.

par contre ca bouge dans la carte proxmox

c’est déja un grand pas en avant.
un petit tuning des entrées et ca ira mieux.

y’a plus qu’à prendre en main le bestiau.

Faut aller dans la config mqtt pou ecouter le topic que tu as utilisé ça donnera les noms utilsés… ensuite faut mapper la variable du message mqtt dans un sensor mqtt de la config.

Pour ma part j’ai installé Glances sur Proxmox c’ext nickel
Sauf petit probleme depuis quelques temps, je ne sais pas pourquoi je n’ai plus le uptime de proxmox…
Pour moi taper en SSH c’est un peu chaud

Alors, après quelques tests,
glances et openhardwaremonitor sont assez semblables, mais le coté serveur web embarqué me semble un peu lourd. les intégrations dans HA sont moyennes ou il y a beaucoup de scripting.

En revanche, le Proxmox VE Custom Integration c’est de la balle… à part chiader la création de l’utilisateur sur le serveur Proxmox, il n’y a rien à faire, tout se fait au niveau de l’intégration HA
je regrette seulement de ne pas avoir les ventilateurs et le débit réseau…

si on aime les fichiers de conf, la meilleure solution est mqtt + python d’@AlexHass. c’est fin, c’est très fin, çà se mange sans faim.

alors pour les ventilateurs j’ai rajouté au script python un sensor|grep fan (enfin tout dépend de votre config), moi j’ai mis çà:

stream = os.popen('sensors | grep fan2 | awk \'{ printf $2 }\'')
fan1_rpm = stream.read()
stream = os.popen('sensors | grep fan3 | awk \'{ printf $2 }\'')
fan2_rpm = stream.read()
stream = os.popen('sensors | grep fan5 | awk \'{ printf $2 }\'')
fan3_rpm = stream.read()

et modifié le json en conséquence:

myjson="{\"boot_used\": " + boot_used + ",\"fan1_rpm\": " + fan1_rpm + ",\"fan2_rpm\": " + fan2_rpm + ",\"fan3_rpm\": " + fan3_rpm + ",\"cpu_temp\": " + cpu_temp + ",\"ram_used\": " + ram_used + ",\"cpu_load\": " + cpu_load  + ",\"myuptime\": \"" + myuptime  + "\"}"

mais, si un kador debian pouvait nous trouver un moyen de récupérer la moyenne réseau (in et out) sur une minute, ou les pics ? ou autre ? pour animer un peu la carte , ce serait top !!!

2 « J'aime »

Tu a combien de ventilateur ?

j’en ai un au niveau de l’alimentation
un à l’arrière et un pour le processeur
ca fait 3, il y a deux autres connecteurs libres sur la carte mère.

root@proxmox1:~# sensors | grep fan
fan1:                     0 RPM  (min =    0 RPM)
fan2:                   170 RPM  (min =    0 RPM)
fan3:                   922 RPM  (min =    0 RPM)
fan4:                     0 RPM  (min =    0 RPM)
fan5:                   976 RPM  (min =    0 RPM)
root@proxmox1:~#
1 « J'aime »