kinou74 / Domoticz-Palazzetti

Domoticz Python Plugin for Palazzetti Connection Box
GNU General Public License v3.0
8 stars 3 forks source link

No control and Database corrupt #9

Open djpostka opened 3 years ago

djpostka commented 3 years ago

Hello,

Following the installation of the plugins, my domoticz becomes unstable and ends up corrupting my database.

I don't use the official box but the project https://github.com/Domochip/WirelessPalaControl

The commands seem the same in LUA.

Domoticz Version: 2021.1 Build Hash: 8547c5b7e

2021-10-07 22:09:04.925 Palazzetti: (Palazzetti) Debug logging mask set to: PYTHON PLUGIN QUEUE IMAGE DEVICE CONNECTION MESSAGE ALL 2021-10-07 22:09:04.925 Palazzetti: (Palazzetti) Will use the new LUA API backend 2021-10-07 22:09:04.925 Palazzetti: (Palazzetti) Pushing 'ProtocolDirective' on to queue 2021-10-07 22:09:04.925 Palazzetti: (Palazzetti) Pushing 'ConnectDirective' on to queue 2021-10-07 22:09:04.925 Palazzetti: (Palazzetti) Pushing 'PollIntervalDirective' on to queue 2021-10-07 22:09:04.925 (Palazzetti) Processing 'ProtocolDirective' message 2021-10-07 22:09:04.925 Tuya: (Tuya) onHeartbeat called time=1633637344.9257383 2021-10-07 22:09:04.926 Palazzetti: (Palazzetti) Protocol set to: 'HTTP'. 2021-10-07 22:09:04.926 (Palazzetti) Processing 'ConnectDirective' message 2021-10-07 22:09:04.926 Palazzetti: (Palazzetti) Transport set to: 'TCP/IP', 192.168.1.150:80. 2021-10-07 22:09:04.927 Palazzetti: (Palazzetti) Connect directive received, action initiated successfully. 2021-10-07 22:09:04.927 (Palazzetti) Processing 'PollIntervalDirective' message 2021-10-07 22:09:04.927 Palazzetti: (Palazzetti) Heartbeat interval set to: 10. 2021-10-07 22:09:04.932 Palazzetti: (Palazzetti) Pushing 'onConnectCallback' on to queue 2021-10-07 22:09:04.977 (Palazzetti) Processing 'onConnectCallback' message 2021-10-07 22:09:06.394 Palazzetti: (Palazzetti) Calling message handler 'onConnect'. 2021-10-07 22:09:06.395 Palazzetti: (Palazzetti) Connected successfully to 192.168.1.150:80 2021-10-07 22:09:06.395 Palazzetti: (Palazzetti) onConnect: cmd: GET+ALLS 2021-10-07 22:09:06.395 Palazzetti: (Palazzetti) onHeartbeat called, Connection is alive. 2021-10-07 22:09:06.395 Palazzetti: (Palazzetti) Pushing 'WriteDirective' on to queue 2021-10-07 22:09:06.395 (Palazzetti) Processing 'WriteDirective' message 2021-10-07 22:09:06.395 Palazzetti: (Palazzetti) Sending 230 bytes of data 2021-10-07 22:09:06.395 Palazzetti: (Palazzetti) 47 45 54 20 2f 63 67 69 2d 62 69 6e 2f 73 65 6e 64 6d 73 67 GET./cgi-bin/sendmsg 2021-10-07 22:09:06.395 Palazzetti: (Palazzetti) 2e 6c 75 61 3f 63 6d 64 3d 47 45 54 2b 41 4c 4c 53 20 48 54 .lua?cmd=GET+ALLS.HT 2021-10-07 22:09:06.395 Palazzetti: (Palazzetti) 54 50 2f 31 2e 31 0d 0a 43 6f 6e 74 65 6e 74 2d 54 79 70 65 TP/1.1..Content-Type 2021-10-07 22:09:06.396 Palazzetti: (Palazzetti) 3a 20 74 65 78 74 2f 78 6d 6c 3b 20 63 68 61 72 73 65 74 3d :.text/xml;.charset= 2021-10-07 22:09:06.396 Palazzetti: (Palazzetti) 75 74 66 2d 38 0d 0a 43 6f 6e 6e 65 63 74 69 6f 6e 3a 20 6b utf-8..Connection:.k 2021-10-07 22:09:06.396 Palazzetti: (Palazzetti) 65 65 70 2d 61 6c 69 76 65 0d 0a 41 63 63 65 70 74 3a 20 43 eep-alive..Accept:.C 2021-10-07 22:09:06.396 Palazzetti: (Palazzetti) 6f 6e 74 65 6e 74 2d 54 79 70 65 3a 20 74 65 78 74 2f 68 74 ontent-Type:.text/ht 2021-10-07 22:09:06.396 Palazzetti: (Palazzetti) 6d 6c 3b 20 63 68 61 72 73 65 74 3d 55 54 46 2d 38 0d 0a 48 ml;.charset=UTF-8..H 2021-10-07 22:09:06.396 Palazzetti: (Palazzetti) 6f 73 74 3a 20 31 39 32 2e 31 36 38 2e 31 2e 31 35 30 3a 38 ost:.192.168.1.150:8 2021-10-07 22:09:06.396 Palazzetti: (Palazzetti) 30 0d 0a 55 73 65 72 2d 41 67 65 6e 74 3a 20 44 6f 6d 6f 74 0..User-Agent:.Domot 2021-10-07 22:09:06.396 Palazzetti: (Palazzetti) 69 63 7a 2f 31 2e 30 0d 0a 43 6f 6e 74 65 6e 74 2d 4c 65 6e icz/1.0..Content-Len 2021-10-07 22:09:06.396 Palazzetti: (Palazzetti) 67 74 68 3a 20 30 0d 0a 0d 0a .. .. .. .. .. .. .. .. .. .. gth:.0.... 2021-10-07 22:09:06.396 Palazzetti: (Palazzetti) Pushing 'onHeartbeatCallback' on to queue 2021-10-07 22:09:06.447 (Palazzetti) Processing 'onHeartbeatCallback' message 2021-10-07 22:09:06.462 Palazzetti: (Palazzetti) Calling message handler 'onHeartbeat'. 2021-10-07 22:09:06.598 Palazzetti: (Palazzetti) Pushing 'ReadEvent' on to queue 2021-10-07 22:09:06.613 (Palazzetti) Processing 'ReadEvent' message 2021-10-07 22:09:06.613 Palazzetti: (Palazzetti) Received 158 bytes of data 2021-10-07 22:09:06.613 Palazzetti: (Palazzetti) 48 54 54 50 2f 31 2e 31 20 32 30 30 20 4f 4b 0d 0a 43 6f 6e HTTP/1.1.200.OK..Con 2021-10-07 22:09:06.613 Palazzetti: (Palazzetti) 74 65 6e 74 2d 4c 65 6e 67 74 68 3a 20 35 34 0d 0a 43 6f 6e tent-Length:.54..Con 2021-10-07 22:09:06.613 Palazzetti: (Palazzetti) 74 65 6e 74 2d 54 79 70 65 3a 20 74 65 78 74 2f 6a 73 6f 6e tent-Type:.text/json 2021-10-07 22:09:06.613 Palazzetti: (Palazzetti) 0d 0a 43 6f 6e 6e 65 63 74 69 6f 6e 3a 20 63 6c 6f 73 65 0d ..Connection:.close. 2021-10-07 22:09:06.614 Palazzetti: (Palazzetti) 0a 41 63 63 65 70 74 2d 52 61 6e 67 65 73 3a 20 6e 6f 6e 65 .Accept-Ranges:.none 2021-10-07 22:09:06.614 Palazzetti: (Palazzetti) 0d 0a 0d 0a 7b 22 44 41 54 41 22 3a 7b 22 53 54 41 54 55 53 ....{"DATA":{"STATUS 2021-10-07 22:09:06.614 Palazzetti: (Palazzetti) 22 3a 32 34 31 2c 22 54 31 22 3a 31 39 2e 34 2c 22 53 45 54 ":241,"T1":19.4,"SET 2021-10-07 22:09:06.614 Palazzetti: (Palazzetti) 50 22 3a 32 30 2c 22 50 51 54 22 3a 31 35 30 35 7d 7d .. .. P":20,"PQT":1505}} 2021-10-07 22:09:06.614 Palazzetti: (Palazzetti) Pushing 'onMessageCallback' on to queue 2021-10-07 22:09:06.614 (Palazzetti) Processing 'onMessageCallback' message 2021-10-07 22:09:06.614 Palazzetti: (Palazzetti) Calling message handler 'onMessage'. 2021-10-07 22:09:06.615 Error: Palazzetti: (Palazzetti) 'onMessage' failed 'KeyError'. 2021-10-07 22:09:06.615 Error: Palazzetti: (Palazzetti) ----> Line 574 in '/home/pi/domoticz/plugins/Domoticz-Palazzetti-master/plugin.py', function onMessage 2021-10-07 22:09:06.615 Error: Palazzetti: (Palazzetti) ----> Line 243 in '/home/pi/domoticz/plugins/Domoticz-Palazzetti-master/plugin.py', function onMessage 2021-10-07 22:09:06.615 Palazzetti: (Palazzetti) Local context: 2021-10-07 22:09:06.615 Palazzetti: (Palazzetti) ----> 'Devices' '{1: <Domoticz.Device object at 0x6601f620>, 2: <Domoticz.Device object at 0x6601f680>, 3: <Domoticz.Device object at 0x6601f6e0>, 4: <Domoticz.Device object at 0x6601f740>, 5: <Domoticz.Device object at 0x6601f7a0>, 6: <Domoticz.Device object at 0x6601f800>, 7: <Domoticz.Device object at 0x6601f860>, 8: <Domoticz.Device object at 0x6601f8c0>, 9: <Domoticz.Device object at 0x6601f920>, 10: <Domoticz.Device object at 0x6601f980>, 11: <Domoticz.Device object at 0x6601f9e0>, 13: <Domoticz.Device object at 0x6601fa40>}' 2021-10-07 22:09:06.615 Palazzetti: (Palazzetti) ----> 'Domoticz' '<module 'Domoticz' (built-in)>' 2021-10-07 22:09:06.615 Palazzetti: (Palazzetti) ----> 'Images' '{}' 2021-10-07 22:09:06.616 Palazzetti: (Palazzetti) ----> 'Parameters' '{'HardwareID': 14, 'HomeFolder': '/home/pi/domoticz/plugins/Domoticz-Palazzetti-master/', 'StartupFolder': '/home/pi/domoticz/', 'UserDataFolder': '/home/pi/domoticz/', 'WebRoot': '', 'Database': '/home/pi/domoticz/domoticz.db', 'Language': 'fr', 'Version': '0.9.1', 'Author': 'kinou74', 'Name': 'Palazzetti', 'Address': '192.168.1.150', 'Port': '80', 'SerialPort': '', 'Username': '', 'Password': '', 'Key': 'palazzetti-cbox', 'Mode1': '', 'Mode2': '', 'Mode3': '', 'Mode4': 'True', 'Mode5': '', 'Mode6': 'Debug', 'DomoticzVersion': '2021.1', 'DomoticzHash': '8547c5b7e', 'DomoticzBuildTime': '2021-04-17 17:29:11'}' 2021-10-07 22:09:06.616 Palazzetti: (Palazzetti) ----> 'Settings' '{'DB_Version': '148', 'Title': 'Home', 'LightHistoryDays': '30', 'MeterDividerEnergy': '1000', 'MeterDividerGas': '100', 'MeterDividerWater': '100', 'RandomTimerFrame': '15', 'ElectricVoltage': '230', 'CM113DisplayType': '0', '5MinuteHistoryDays': '7', 'SensorTimeout': '60', 'SensorTimeoutNotification': '0', 'UseAutoUpdate': '1', 'UseAutoBackup': '1', 'CostEnergy': '1927', 'CostEnergyT2': '1465', 'CostEnergyR1': '800', 'CostEnergyR2': '800', 'CostGas': '6218', 'CostWater': '16473', 'UseEmailInNotifications': '1', 'SendErrorNotifications': '0', 'EmailPort': '25', 'EmailAsAttachment': '0', 'DoorbellCommand': '0', 'SmartMeterType': '0', 'EnableTabLights': '1', 'EnableTabTemp': '1', 'EnableTabWeather': '1', 'EnableTabUtility': '1', 'EnableTabCustom': '1', 'EnableTabScenes': '1', 'EnableTabFloorplans': '0', 'NotificationSensorInterval': '43200', 'NotificationSwitchInterval': '0', 'RemoteSharedPort': '6144', 'Language': 'fr', 'DashboardType': '0', 'MobileType': '0', 'WindUnit': '0', 'TempUnit': '0', 'WeightUnit': '0', 'SecStatus': '0', 'SecOnDelay': '30', 'AuthenticationMethod': '0', 'ReleaseChannel': '0', 'RaspCamParams': '-w 800 -h 600 -t 1', 'UVCParams': '-S80 -B128 -C128 -G80 -x800 -y600 -q100', 'AcceptNewHardware': '1', 'ZWavePollInterval': '60', 'ZWaveEnableDebug': '0', 'ZWaveNetworkKey': '0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10', 'ZWaveEnableNightlyNetworkHeal': '0', 'BatteryLowNotification': '0', 'AllowWidgetOrdering': '1', 'ActiveTimerPlan': '0', 'HideDisabledHardwareSensors': '1', 'EnableEventScriptSystem': '1', 'EventSystemLogFullURL': '1', 'DisableDzVentsSystem': '0', 'DzVentsLogLevel': '3', 'LogEventScriptTrigger': '1', 'WebTheme': 'default', 'FloorplanPopupDelay': '750', 'FloorplanFullscreenMode': '0', 'FloorplanAnimateZoom': '1', 'FloorplanShowSensorValues': '1', 'FloorplanShowSwitchValues': '0', 'FloorplanShowSceneNames': '1', 'FloorplanRoomColour': 'Blue', 'FloorplanActiveOpacity': '25', 'FloorplanInactiveOpacity': '5', 'TempHome': '20', 'TempAway': '15', 'TempComfort': '22.0', 'DegreeDaysBaseTemperature': '18.0', 'HTTPURL': 'aHR0cHM6Ly93d3cuY29udHJvbGljei5jb20vbm90aWZ5LzYwOWFiMzg0YTRlNTk2M2VlZjM5ZmI1NQ==', 'HTTPPostContentType': 'YXBwbGljYXRpb24veC13d3ctZm9ybS11cmxlbmNvZGVk', 'ShowUpdateEffect': '0', 'ShortLogInterval': '5', 'SendErrorsAsNotification': '0', 'IFTTTEnabled': '0', 'EmailEnabled': '1', 'MaxElectricPower': '6000', 'Location': '48.5788514;-3.1853409999999998', 'ClickatellEnabled': '0', 'ClickatellAPI': '0', 'ClickatellFrom': '0', 'ClickatellTo': '0', 'EmailFrom': '0', 'EmailServer': '0', 'EmailTo': '0', 'EmailPassword': '0', 'EmailUsername': '0', 'FCMEnabled': '0', 'HTTPEnabled': '1', 'HTTPField1': '0', 'HTTPField2': '0', 'HTTPField3': '0', 'HTTPField4': '0', 'HTTPPostData': 'bWVzc2FnZT0jTUVTU0FHRQ==', 'HTTPPostHeaders': '0', 'HTTPTo': '0', 'KodiIPAddress': '224.0.0.1', 'KodiEnabled': '0', 'KodiPort': '9777', 'KodiTimeToLive': '5', 'LmsPlayerMac': '0', 'LmsDuration': '5', 'LmsEnabled': '0', 'ProwlAPI': '0', 'ProwlEnabled': '0', 'PushALotAPI': '0', 'PushALotEnabled': '0', 'PushbulletAPI': '0', 'PushbulletEnabled': '0', 'PushoverAPI': '0', 'PushoverUser': '0', 'PushoverEnabled': '0', 'PushsaferAPI': '0', 'PushsaferImage': '0', 'PushsaferEnabled': '0', 'TelegramAPI': '0', 'TelegramChat': '0', 'TelegramEnabled': '0', 'WebLocalNetworks': '192.168.1.;127.0.0.', 'WebRemoteProxyIPs': '0', 'SecPassword': '', 'ProtectionPassword': '', 'OneWireSensorPollPeriod': '0', 'OneWireSwitchPollPeriod': '0', 'IFTTTAPI': '0', 'WebUserName': 'ZGpwb3N0a2E=', 'WebPassword': '}' 2021-10-07 22:09:06.617 Palazzetti: (Palazzetti) ----> '_plugin' '<plugin.BasePlugin object at 0x66008ad0>' 2021-10-07 22:09:06.617 Palazzetti: (Palazzetti) ----> 'ast' '<module 'ast' from '/usr/lib/python3.7/ast.py'>' 2021-10-07 22:09:06.617 Palazzetti: (Palazzetti) ----> 'json' '<module 'json' from '/usr/lib/python3.7/json/init.py'>'