papo-o / domoticz_scripts

DZvents, LUA, Python and Shell scripts for Domoticz
https://pon.fr
38 stars 36 forks source link

QNAP version #2

Closed redfirebrooks closed 5 years ago

redfirebrooks commented 5 years ago

Hello I tried to modify the script for a QNAP TS-451 NAS but I have some errors. The QNAP NAS return a temp value formated like this 48 C/118 F

so in the logs I have some errors

2019-07-30 21:40:00.311 Status: dzVents: Info: Synology Monitor v1.35 : ------ Start internal script: MyNAS:, trigger: every minute 2019-07-30 21:40:00.423 Status: dzVents: Debug: Synology Monitor v1.35 : NASTemp : "48 C/118 F" 2019-07-30 21:40:00.443 Status: dzVents: Debug: Synology Monitor v1.35 : Processing device-adapter for TS-451 Temp: Temperature device adapter 2019-07-30 21:40:00.443 Status: dzVents: Debug: Synology Monitor v1.35 : Requete SNMP incorrecte 2019-07-30 21:40:00.443 Status: dzVents: Error (2.4.19): Synology Monitor v1.35 : There is no device with that name or id: QNAP TS-451 2019-07-30 21:40:00.443 Status: dzVents: Error (2.4.19): Synology Monitor v1.35 : An error occured when calling event handler MyNAS 2019-07-30 21:40:00.443 Status: dzVents: Error (2.4.19): Synology Monitor v1.35 : .../pi/domoticz/scripts/dzVents/generated_scripts/MyNAS.lua:234: attempt to index a nil value

papo-o commented 5 years ago

hello ligne 234 of your script, you have what? the script don't find a value. the SNMP request don't works There is no device with that name or id: QNAP TS-451

redfirebrooks commented 5 years ago

Thanks for your reply. After a lot tries/errors I managed to make it works. Qnap OIDs are différent and not well documented. The error was indeed the value was not correct and all the counters were not set in Domoticz. So even if the value was grabbed the script couldn’t find the correct device. I am still working on it and once finished I can send you the modified code.

papo-o commented 5 years ago

thank you, it may interest someone