Draggon / hassio-hdd-tools

27 stars 12 forks source link

compile error #41

Open w00dwind opened 2 years ago

w00dwind commented 2 years ago

I have the several problems: 1) In log of addon i see hdd temperature, but "sensor.hdd_temp" doesn't exist in hassio 2) compile error in logs: jq: error: syntax error, unexpected '{', expecting $end (Unix shell quoting issues?) at <top-level>, line 2: {} jq: 1 compile error

3 ) 400 and 502 error codes in logs. What does it mean ?

[Fri Nov 12 16:42:01 MSK 2021][INFO] Sensor update response code: 400 [Fri Nov 12 16:38:01 MSK 2021][INFO] Sensor update response code: 502

McGiverGim commented 2 years ago

Try to disable protection mode in the addon.

w00dwind commented 2 years ago

Protection mode is disabled, but i still have errors. [Sat Nov 13 12:37:02 MSK 2021][INFO] Sensor value: 48° [Sat Nov 13 12:37:02 MSK 2021][INFO] Sensor update response code: 400

core-2021.11.3 supervisor-2021.10.8

Vittaly76 commented 2 years ago

I have the same problem

McGiverGim commented 2 years ago

Can you enable debug mode and paste the output? I suspect that maybe something in the configuration is not right, maybe it is not getting the attributes correctly.

Vittaly76 commented 2 years ago
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[Thu Nov 18 17:28:34 MSK 2021][INFO] HDD Tools start
[Thu Nov 18 17:28:34 MSK 2021][INFO] Configuration - performance check enabled: false
[Thu Nov 18 17:28:34 MSK 2021][INFO] Configuration - disk path: /dev/sda
[Thu Nov 18 17:28:34 MSK 2021][INFO] Configuration - check period: 60
[Thu Nov 18 17:28:34 MSK 2021][INFO] Configuration - database update: true
[Thu Nov 18 17:28:34 MSK 2021][INFO] Configuration - database update period: 168
[Thu Nov 18 17:28:34 MSK 2021][INFO] Configuration - output file: temp.log
[Thu Nov 18 17:28:34 MSK 2021][INFO] Configuration - attributes property: SSD_Life_Left
[Thu Nov 18 17:28:34 MSK 2021][INFO] Init run
jq: error: syntax error, unexpected '{', expecting $end (Unix shell quoting issues?) at <top-level>, line 2:
{}
jq: 1 compile error
[Thu Nov 18 17:28:35 MSK 2021][INFO] Sensor value: 33°
[Thu Nov 18 17:28:35 MSK 2021][DEBUG] Sensor data which would be pushed to home-assistant and exposed as "sensor.hdd_temp": 
[Thu Nov 18 17:28:35 MSK 2021][DEBUG] debug is enabled, sensor data is not published to home-assistant!
[Thu Nov 18 17:28:35 MSK 2021][INFO] Cron tab SMART update
[Thu Nov 18 17:28:35 MSK 2021][INFO] Cron tab database update ENABLED
[Thu Nov 18 17:28:35 MSK 2021][INFO] Updating drives database...
[Thu Nov 18 17:28:38 MSK 2021][INFO] /usr/share/smartmontools/drivedb.h updated from branches/RELEASE_7_2_DRIVEDB
[Thu Nov 18 17:28:38 MSK 2021][INFO] Apply cron tab
[Thu Nov 18 17:28:38 MSK 2021][INFO] Device /dev/sda found - starting CRON
w00dwind commented 2 years ago
[Thu Nov 18 17:41:00 MSK 2021][INFO] HDD Tools start
[Thu Nov 18 17:41:00 MSK 2021][INFO] Configuration - performance check enabled: false
[Thu Nov 18 17:41:00 MSK 2021][INFO] Configuration - disk path: /dev/sda
[Thu Nov 18 17:41:00 MSK 2021][INFO] Configuration - check period: 1
[Thu Nov 18 17:41:00 MSK 2021][INFO] Configuration - database update: true
[Thu Nov 18 17:41:00 MSK 2021][INFO] Configuration - database update period: 168
[Thu Nov 18 17:41:00 MSK 2021][INFO] Configuration - output file: temp.log
[Thu Nov 18 17:41:00 MSK 2021][INFO] Configuration - attributes property: nvme_smart_health_information_log
[Thu Nov 18 17:41:01 MSK 2021][INFO] Init run
jq: error: syntax error, unexpected '{', expecting $end (Unix shell quoting issues?) at <top-level>, line 2:
{}
jq: 1 compile error
[Thu Nov 18 17:41:02 MSK 2021][INFO] Sensor value: 48°
[Thu Nov 18 17:41:02 MSK 2021][DEBUG] Sensor data which would be pushed to home-assistant and exposed as "sensor.hdd_temp": 
[Thu Nov 18 17:41:02 MSK 2021][DEBUG] debug is enabled, sensor data is not published to home-assistant!
[Thu Nov 18 17:41:02 MSK 2021][INFO] Cron tab SMART update
[Thu Nov 18 17:41:02 MSK 2021][INFO] Cron tab database update ENABLED
[Thu Nov 18 17:41:02 MSK 2021][INFO] Updating drives database...
[Thu Nov 18 17:41:05 MSK 2021][INFO] /usr/share/smartmontools/drivedb.h updated from branches/RELEASE_7_2_DRIVEDB
[Thu Nov 18 17:41:05 MSK 2021][INFO] Apply cron tab
[Thu Nov 18 17:41:05 MSK 2021][INFO] Device /dev/sda found - starting CRON
jq: error: syntax error, unexpected '{', expecting $end (Unix shell quoting issues?) at <top-level>, line 2:
{}
jq: 1 compile error
[Thu Nov 18 17:42:02 MSK 2021][INFO] Sensor value: 48°
[Thu Nov 18 17:42:02 MSK 2021][DEBUG] Sensor data which would be pushed to home-assistant and exposed as "sensor.hdd_temp": 
[Thu Nov 18 17:42:02 MSK 2021][DEBUG] debug is enabled, sensor data is not published to home-assistant!
McGiverGim commented 2 years ago

The addon generates in debug mode a file in the home Assistant shared folder (I think remember). Paste it here along with your configuration.

nepozs commented 2 years ago

@McGiverGim Maybe more configuration examples could help some users, below my examples for configurations with sata ssd, where must be used configuration like: attributes_property: ata_smart_attributes.table attributes_format: list

HDD_tools_sata_1_Screenshot 2021-11-18 at 16-29-24 Supervisor - Home Assistant 2nd example HDD_tools_sata_2_Screenshot 2021-11-18 at 16-29-24 Supervisor - Home Assistant 3rd example HDD_tools_sata_3_Screenshot 2021-11-18 at 16-29-24 Supervisor - Home Assistant

for nvme must be used attributes_property: nvme_smart_health_information_log attributes_format: object HDD_tools_nvme_at_usb_1_Screenshot 2021-11-18 at 16-29-24 Supervisor - Home Assistant

Vittaly76 commented 2 years ago

Yes, with this example i'm successfully start add-on. Thank you!