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

Error "Impulse generator error..." #17

Open Tom-Bruzze opened 1 month ago

Tom-Bruzze commented 1 month ago

Dear grzegorz914, Since 2-3 months I receive periodically this error message. I can use the devices but the error messages “flood” the log. When I restart the “Under-Bridge” it runs for 1-2 hours and then it starts again. I am using the adapter version 0.11.1 (latest). Tasmota: Device type: SP111 v1.1 Firmware: 14.2.0

Host is a Pi4/8GB (Lan connected)

it makes no difference whether I enter the IP address or device ID Any suggestions?

Thx best regards Tom

[30.9.2024, 15:51:06] [homebridge-tasmota-control] Device: x.x.x.x yyy-yyy, Impulse generator error: Error: Check state error: maxContentLength size of -1 exceeded [30.9.2024, 16:07:53] [homebridge-tasmota-control] Device: x.x.x.x yyy-yyy, Impulse generator error: Error: Check state error: maxContentLength size of -1 exceeded [30.9.2024, 16:08:49] [homebridge-tasmota-control] Device: x.x.x.x yyy-yyy, Impulse generator error: Error: Check state error: maxContentLength size of -1 exceeded [30.9.2024, 16:27:54] [homebridge-tasmota-control] Device: x.x.x.x yyy-yyy, Impulse generator error: Error: Check state error: maxContentLength size of -1 exceeded [30.9.2024, 16:52:56] [homebridge-tasmota-control] Device: x.x.x.x yyy-yyy, Impulse generator error: Error: Check state error: maxContentLength size of -1 exceeded [30.9.2024, 17:01:02] [homebridge-tasmota-control] Device: x.x.x.x yyy-yyy, Impulse generator error: Error: Check state error: maxContentLength size of -1 exceeded [30.9.2024, 17:01:58] [homebridge-tasmota-control] Device: x.x.x.x yyy-yyy, Impulse generator error: Error: Check state error: maxContentLength size of -1 exceeded

grzegorz914 commented 1 month ago

Please post the debug

Tom-Bruzze commented 1 month ago

thx for quick answer

here an extract when I debug one of my tasmota-plugs, I cannot find any "reason" for the error message. It seems that an error occurs retrieving the sensor status. Best regards Tom

} [1.10.2024, 06:50:04] [homebridge-tasmota-control] Device: 10.0.10.8 xxx, debug: Power status: { "POWER": "ON", "Time": "2024-10-01T06:49:54", "Uptime": "5T21:26:49", "UptimeSec": 509209, "Heap": 19, "SleepMode": "Dynamic", "Sleep": 50, "LoadAvg": 19, "MqttCount": 402, "Wifi": { "AP": 1, "SSId": "A_IoT", "BSSId": "9E:2A:6F:2A:8C:7F", "Channel": 11, "Mode": "11n", "RSSI": 74, "Signal": -63, "LinkCount": 8, "Downtime": "0T00:00:57" } } [1.10.2024, 06:50:17] [homebridge-tasmota-control] Device: 10.0.10.8 xxx, Impulse generator error: Error: Check state error: maxContentLength size of -1 exceeded [1.10.2024, 06:50:23] [homebridge-tasmota-control] Device: 10.0.10.8 xxx, Impulse generator error: Error: Check state error: maxContentLength size of -1 exceeded


1 Minute later, same plug I receive status + sensor status no error

[1.10.2024, 06:50:53] [homebridge-tasmota-control] Device: 10.0.10.8 XXX, debug: Requesting status. [1.10.2024, 06:50:53] [homebridge-tasmota-control] Device: 10.0.10.8 XXX, debug: Power status: { "POWER": "ON", "Time": "2024-10-01T06:50:53", "Uptime": "5T21:27:48", "UptimeSec": 509268, "Heap": 19, "SleepMode": "Dynamic", "Sleep": 50, "LoadAvg": 19, "MqttCount": 402, "Wifi": { "AP": 1, "SSId": "A_IoT", "BSSId": "9E:2A:6F:2A:8C:7F", "Channel": 11, "Mode": "11n", "RSSI": 74, "Signal": -63, "LinkCount": 8, "Downtime": "0T00:00:57" } } [1.10.2024, 06:50:54] [homebridge-tasmota-control] Device: 10.0.10.8 XXX, debug: Sensors status: { "Status": { "Module": 0, "DeviceName": "XXX", "FriendlyName": [ "XXX" ], "Topic": "XXX", "ButtonTopic": "0", "Power": "1", "PowerLock": "0", "PowerOnState": 3, "LedState": 1, "LedMask": "FFFF", "SaveData": 1, "SaveState": 1, "SwitchTopic": "0", "SwitchMode": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], "ButtonRetain": 0, "SwitchRetain": 0, "SensorRetain": 0, "PowerRetain": 0, "InfoRetain": 0, "StateRetain": 0, "StatusRetain": 0 }, "StatusPRM": { "Baudrate": 115200, "SerialConfig": "8N1", "GroupTopic": "tasmotas", "OtaUrl": "http://ota.tasmota.com/tasmota/release/tasmota-DE.bin", "RestartReason": "Software/System restart", "Uptime": "5T21:27:48", "StartupUTC": "2024-09-25T07:23:05", "Sleep": 50, "CfgHolder": 4617, "BootCount": 29, "BCResetTime": "2020-03-23T20:54:28", "SaveCount": 193, "SaveAddress": "F5000" }, "StatusFWR": { "Version": "14.2.0(release-tasmota)", "BuildDateTime": "2024.08.14 12:41:05", "Boot": 31, "Core": "2_7_7", "SDK": "2.2.2-dev(38a443e)", "CpuFrequency": 80, "Hardware": "ESP8285N08", "CR": "390/699" }, "StatusLOG": { "SerialLog": 2, "WebLog": 2, "MqttLog": 0, "SysLog": 0, "LogHost": "", "LogPort": 514, "SSId": [ "Apple_IoT", "" ], "TelePeriod": 300, "Resolution": "558180C0", "SetOption": [ "00028009", "2805C80001000600003C5A0A002800000000", "00000280", "00006000", "00004000", "00000000" ] }, "StatusMEM": { "ProgramSize": 649, "Free": 352, "Heap": 22, "ProgramFlashSize": 1024, "FlashSize": 1024, "FlashChipId": "144051", "FlashFrequency": 40, "FlashMode": "DOUT", "Features": [ "0407", "8F9AC787", "04368001", "000000CF", "010013C0", "C000F981", "00004004", "00001000", "54000020", "00000080", "00000000" ], "Drivers": "1,2,3,!4,!5,!6,7,!8,9,10,12,!16,!18,!19,!20,!21,!22,!24,26,!27,29,!30,!35,!37,!45,62,!68", "Sensors": "1,2,3,4,5,6", "I2CDriver": "7" }, "StatusNET": { "Hostname": "XXX", "IPAddress": "10.0.10.8", "Gateway": "10.0.10.1", "Subnetmask": "255.255.255.0", "DNSServer1": "10.0.10.1", "DNSServer2": "0.0.0.0", "Mac": "XXX", "Webserver": 2, "HTTP_API": 1, "WifiConfig": 2, "WifiPower": 17 }, "StatusMQT": { "MqttHost": "10.0.1.250", "MqttPort": 1888, "MqttClientMask": "XXX", "MqttClient": "XXX", "MqttUser": "TR", "MqttCount": 402, "MAX_PACKET_SIZE": 1200, "KEEPALIVE": 30, "SOCKET_TIMEOUT": 4 }, "StatusTIM": { "UTC": "2024-10-01T04:50:53Z", "Local": "2024-10-01T06:50:53", "StartDST": "2024-03-31T02:00:00", "EndDST": "2024-10-27T03:00:00", "Timezone": 99, "Sunrise": "07:50", "Sunset": "19:28" }, "StatusPTH": { "PowerDelta": 0, "PowerLow": 0, "PowerHigh": 0, "VoltageLow": 0, "VoltageHigh": 0, "CurrentLow": 0, "CurrentHigh": 0, "MaxPower": 0, "MaxPowerHold": 10, "MaxPowerWindow": 30, "MaxEnergy": 0, "MaxEnergyStart": 0 }, "StatusSNS": { "Time": "2024-10-01T06:50:53", "ENERGY": { "TotalStartTime": "2022-10-09T11:28:14", "Total": 0.657, "Yesterday": 0.113, "Today": 0.007, "Power": 7, "ApparentPower": 28, "ReactivePower": 27, "Factor": 0.25, "Voltage": 237, "Current": 0.117 } }, "StatusSTS": { "Time": "2024-10-01T06:50:53", "Uptime": "5T21:27:48", "UptimeSec": 509268, "Heap": 22, "SleepMode": "Dynamic", "Sleep": 50, "LoadAvg": 31, "MqttCount": 402, "POWER": "ON", "Wifi": { "AP": 1, "SSId": "A_IoT", "BSSId": "9E:2A:6F:2A:8C:7F", "Channel": 11, "Mode": "11n", "RSSI": 74, "Signal": -63, "LinkCount": 8, "Downtime": "0T00:00:57" } }

grzegorz914 commented 1 month ago

try v0.12.0 and let me know, also v0.12.1-beta ready to test for this issue

Tom-Bruzze commented 1 month ago

Thx for support - here the results...

Version: 0.12.1-beta.1 - Loads - I check now the behavior....

Version 0.12.1-beta.2 + 3 and 0.13 restarts over and over again... there is a comment "Cannot read properties of undefined (reading 'heatDryFanMode'), check again in 15s." may this is caused by the new Mitsubishi AC section?

Log:

0.12.1-beta.3 [4.10.2024, 20:28:35] [homebridge-tasmota-control] Restarting child bridge... [4.10.2024, 20:28:35] Got SIGTERM, shutting down child bridge process... [4.10.2024, 20:28:40] [homebridge-tasmota-control] Child bridge process ended [4.10.2024, 20:28:40] [homebridge-tasmota-control] Process Ended. Code: 143, Signal: null [4.10.2024, 20:28:44] [Homebridge UI] Starting terminal session [4.10.2024, 20:28:47] [homebridge-tasmota-control] Restarting Process... [4.10.2024, 20:28:48] [homebridge-tasmota-control] Launched child bridge with PID 820877 [4.10.2024, 20:28:48] Registering platform 'homebridge-tasmota-control.tasmotaControl' [4.10.2024, 20:28:48] [homebridge-tasmota-control] Loaded homebridge-tasmota-control v0.12.1-beta.3 child bridge successfully [4.10.2024, 20:28:48] Loaded 0 cached accessories from cachedAccessories.0E3B11A92E48. [4.10.2024, 20:28:48] [homebridge-tasmota-control] Device: 10.0.10.29 XXX, did finish launch error: TypeError: Cannot read properties of undefined (reading 'heatDryFanMode'), check again in 15s. [4.10.2024, 20:28:48] Homebridge v1.8.4 (HAP v0.12.2) (homebridge-tasmota-control) is running on port 34165. [4.10.2024, 20:28:48]

NOTICE TO USERS AND PLUGIN DEVELOPERS

Homebridge 2.0 is on the way and brings some breaking changes to existing plugins. Please visit the following link to learn more about the changes and how to prepare: https://github.com/homebridge/homebridge/wiki/Updating-To-Homebridge-v2.0

/var/lib/homebridge/node_modules/homebridge-tasmota-control/index.js:96 await this.tasmotaDevice.start(); ^ TypeError: Cannot read properties of undefined (reading 'start') at HomebridgeAPI. (/var/lib/homebridge/node_modules/homebridge-tasmota-control/index.js:96:36) [4.10.2024, 20:29:03] [homebridge-tasmota-control] Child bridge process ended [4.10.2024, 20:29:03] [homebridge-tasmota-control] Process Ended. Code: 1, Signal: null [4.10.2024, 20:29:10] [homebridge-tasmota-control] Restarting Process... [4.10.2024, 20:29:11] [homebridge-tasmota-control] Launched child bridge with PID 820993 [4.10.2024, 20:29:12] Registering platform 'homebridge-tasmota-control.tasmotaControl' [4.10.2024, 20:29:12] [homebridge-tasmota-control] Loaded homebridge-tasmota-control v0.12.1-beta.3 child bridge successfully [4.10.2024, 20:29:12] Loaded 0 cached accessories from cachedAccessories.0E3B11A92E48. [4.10.2024, 20:29:12] [homebridge-tasmota-control] Device: 10.0.10.29 XXX, did finish launch error: TypeError: Cannot read properties of undefined (reading 'heatDryFanMode'), check again in 15s. [4.10.2024, 20:29:12] Homebridge v1.8.4 (HAP v0.12.2) (homebridge-tasmota-control) is running on port 34827. [4.10.2024, 20:29:12]

Tom-Bruzze commented 1 month ago

When I manually disable the settings in the Mitsubishi AC Section of the "first" tasmota Plug in the list (IP 10.0.10.29) - see picture - the plugin loads. Hmmm - best regards I check now V.0.13

image
grzegorz914 commented 1 month ago

Still the issue exist?

Tom-Bruzze commented 1 month ago

Hi grzegorz914, thx for trying to fix it but I still have the error state "impulse generator error..." see screenshot of the log below. As far as I know it has no impact on using the devices. image I have also not noticed any increased system load - in average 18% processor utilization with various iobroker instances, sql database, homematic pivccu + Homebridge on a Pi4/8GB

When I restart the plugin (under bridge) I receive the following infos = everything is green. After 3-4 hours it start with the errors.

image

I don't know if I'm the only one with this error, if so it's obviously a problem with my setup. I could not find out what the error “impulse generator....” means. If there is currently no solution from your point of view, then I guess I have to “live” with it. Best regards -T

grzegorz914 commented 1 month ago

The error is from check device state, looks like your device doesn’t respond to the request during state check or is disconnected from network at this time.

grzegorz914 commented 1 month ago

You can also try to increase the refresh time, may be the device freezes at this time.

grzegorz914 commented 1 month ago

If the error occurred you don’t need to restart the plugin, after the device start to respond to the request the error will gone.

kskenyon commented 2 weeks ago

Impulse generator error: Error: Check state error: maxContentLength size of -1 exceeded

I have this error, too, and the above info isn't helpful in resolving it.

Update. I didn't see "first" here. That worked.

"When I manually disable the settings in the Mitsubishi AC Section of the "first" tasmota Plug in the list (IP 10.0.10.29) - see picture - the plugin loads."

Oops, too soon. The error came back after another restart.