grzegorz914 / homebridge-tasmota-control

Homebridge plugin for Tasmota flashed devices using RESTFull API, publish as independent external platform accessory.
MIT License
9 stars 3 forks source link

Pisze, że nie może odczytać statusu, lecz wysyła zapytanie poprawnie i tasmota odpowiada #1

Closed TomBBPL closed 2 years ago

TomBBPL commented 2 years ago

Hej, świetny skrypt, chciałem go użyć ale mam mały problem config jest taki: "devices": [ { "name": "Gniazdo", "host": "192.168.2.161", "auth": false, "user": "admin", "passwd": "password", "refreshInterval": 5, "channelsCount": 3, "enableDebugMode": false, "disableLogInfo": false } tasmota odpowiada za każdym razem co 5 sekund statusem: 22:10:28 RSL: STATUS = {"Status":{"Module":18,"FriendlyName":["NodeMCU-BR","Sonoff2","Sonoff3","Sonoff4"],"Topic":"sonoff","ButtonTopic":"0","Power":0,"PowerOnState":0,"LedState":1,"SaveData":1,"SaveState":1,"SwitchTopic":"0","SwitchMode":[0,0,0,0,0,0,0,0],"ButtonRetain":0,"SwitchRetain":0,"SensorRetain":0,"PowerRetain":0}}

ale w homebridge sypie błędem:

[01/01/2022, 21:05:39] [tasmotaControl] Device: 192.168.2.161 Gniazdo, Device Info eror: TypeError: Cannot read properties of undefined (reading 'Hardware') at tasmotaDevice.getDeviceInfo (/usr/local/lib/node_modules/homebridge-tasmota-control/index.js:126:49) at processTicksAndRejections (node:internal/process/task_queues:96:5), state: Offline, trying to reconnect

mam wersję tasmoty 6.5.0 na esp8266 z 4-ma przekaźnikami (własny projekt)

tablatronix commented 2 years ago

Same

[1/1/2022, 4:42:43 PM] [tasmotaControl] Device: 192.168.20.12 orb, Device Info eror: TypeError: Cannot read properties of undefined (reading 'Hardware')
    at tasmotaDevice.getDeviceInfo (/homebridge/node_modules/homebridge-tasmota-control/index.js:126:49)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5), state: Offline, trying to reconnect
grzegorz914 commented 2 years ago

Tested with tasmota 10.1. What a module type You use?

TomBBPL commented 2 years ago

NodeMCU 8266 tasmota 6.5.0 (może temu, że to stara wersja tasmoty)

grzegorz914 commented 2 years ago

Try update to the latest Tasmota and let me know.

grzegorz914 commented 2 years ago

No response, I close this.

tablatronix commented 2 years ago

I haven't had a chance to update either to test, Not sure what tasmota version has to do with it, this should be handled properly

grzegorz914 commented 2 years ago

If You can enable debug mode in plugin settings Advanced Section and get the log then I can look in to this. I think old Tasmota do not report all properties, but without analyze can not be fixed.

tablatronix commented 2 years ago

gotcha so its just empty repsonse or a timeout? I will test here in a bit

grzegorz914 commented 2 years ago

It can not be possible get empty response, please enable debug and get the complete log.

tablatronix commented 2 years ago

Program Version | 8.5.1(lite) 2020-10-02T10:10:35 2_7_4_1/2.2.2-dev(38a443e)

2/24/2022, 3:02:03 PM] [tasmotaControl] Device: 192.168.20.11 Orb, debug response: { Status: [Object] }
[2/24/2022, 3:02:03 PM] [tasmotaControl] Device: 192.168.20.11 Orb, Device Info eror: TypeError: Cannot read properties of undefined (reading 'Hardware')
    at tasmotaDevice.getDeviceInfo (/homebridge/node_modules/homebridge-tasmota-control/index.js:126:49)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5), state: Offline, trying to reconnect

where do I find the debug log?

I just did an ota, I guess I have to update manually as thats still old..

grzegorz914 commented 2 years ago

Please update to 0.3.49-beta.0 and get the log again

tablatronix commented 2 years ago

I am patching to 9->10 and thats working, brb

grzegorz914 commented 2 years ago

Probably old versions do not contain all properties

tablatronix commented 2 years ago

So far so good. yeah I guess that endpoint didnt exist or was not json or whatever, other than that it was working ok with 8.5.1, so maybe worth fixing or removing the hardware check, if you know the url or api I can test it and see whats up as I have plenty of older outlets running

grzegorz914 commented 2 years ago

Enable debug mode in plugin settings Advanced Section and get the log