rvdvoorde / domoticz-homewizard

Plugin for Domoticz
http://www.domoticz.com/
GNU General Public License v3.0
12 stars 10 forks source link

Issues witch Domoticz 2021.1.x and newer on Windows 10 and HomeWizard plug-in 2.0.31 #38

Closed TineUser closed 2 years ago

TineUser commented 3 years ago

Hi all,

I want to update Domoticz from 2020.2.11995 to 2021.1.x on Windows 10 but then Domoticz is crashing shortly after the start of the application. See also my post in the Domoticz forum:

https://www.domoticz.com/forum/viewtopic.php?f=6&t=36532

I tried the update to version 2021.1.13332 today once again but the application still crashes. The answer to the last post was to install the new version with the external log folder. But there's no log file with possible causes of the crash. I only have a windows event log entry:

`Protokollname: Application Quelle: Application Error Datum: 20.06.2021 13:59:11 Ereignis-ID: 1000 Aufgabenkategorie:(100) Ebene: Fehler Schlüsselwörter:Klassisch Benutzer: Nicht zutreffend Computer: Win10Office Beschreibung: Name der fehlerhaften Anwendung: domoticz.exe, Version: 2021.1.0.13332, Zeitstempel: 0x60cdd38e Name des fehlerhaften Moduls: unknown, Version: 0.0.0.0, Zeitstempel: 0x00000000 Ausnahmecode: 0xc0000005 Fehleroffset: 0x00000013 ID des fehlerhaften Prozesses: 0x818 Startzeit der fehlerhaften Anwendung: 0x01d765cbab09ebb3 Pfad der fehlerhaften Anwendung: D:\Domoticz\domoticz.exe Pfad des fehlerhaften Moduls: unknown Berichtskennung: fc84ebb0-de89-4798-9acd-269df008d1f6 Vollständiger Name des fehlerhaften Pakets: Anwendungs-ID, die relativ zum fehlerhaften Paket ist: Ereignis-XML:

1000 0 2 100 0 0x80000000000000 37998 Application Win10Office domoticz.exe 2021.1.0.13332 60cdd38e unknown 0.0.0.0 00000000 c0000005 00000013 818 01d765cbab09ebb3 D:\Domoticz\domoticz.exe unknown fc84ebb0-de89-4798-9acd-269df008d1f6 ` When starting Domoticz with the parameter "-log "D:\Domoticz\log\domoticz.log" -loglevel normal" I only get these lines to the log file: `2021-06-20 14:21:55.057 Sunrise: 05:28:00 SunSet: 21:32:00 2021-06-20 14:21:55.057 Day length: 16:04:00 Sun at south: 13:30:00 2021-06-20 14:21:55.059 Civil twilight start: 04:47:00 Civil twilight end: 22:13:00 2021-06-20 14:21:55.059 Nautical twilight start: 03:49:00 Nautical twilight end: 23:11:00 2021-06-20 14:21:55.059 Astronomical twilight start: 02:06:00 Astronomical twilight end: 00:53:00 2021-06-20 14:21:55.094 Active notification Subsystems: email (1/13) 2021-06-20 14:21:55.110 Starting shared server on: :::6144 2021-06-20 14:21:57.228 HomeWizard hardware started.` With log level "verbose" I see these lines in the log file: `2021-06-20 14:31:56.762 Status: Domoticz V2021.1 (build 13332) (c)2012-2021 GizMoCuz 2021-06-20 14:31:56.766 Status: Build Hash: bb62ac2f8, Date: 2021-06-19 13:05:22 2021-06-20 14:31:56.766 Status: Startup Path: D:\Domoticz\ 2021-06-20 14:31:56.790 Sunrise: 05:28:00 SunSet: 21:32:00 2021-06-20 14:31:56.790 Day length: 16:04:00 Sun at south: 13:30:00 2021-06-20 14:31:56.790 Civil twilight start: 04:47:00 Civil twilight end: 22:13:00 2021-06-20 14:31:56.790 Nautical twilight start: 03:49:00 Nautical twilight end: 23:11:00 2021-06-20 14:31:56.791 Astronomical twilight start: 02:06:00 Astronomical twilight end: 00:53:00 2021-06-20 14:31:56.823 Status: PluginSystem: Started, Python version '3.9.5'. 2021-06-20 14:31:56.826 Active notification Subsystems: email (1/13) 2021-06-20 14:31:56.829 Status: WebServer(HTTP) started on address: :: with port 8080 2021-06-20 14:31:56.844 Status: WebServer(SSL) started on address: :: with port 443 2021-06-20 14:31:56.846 Starting shared server on: :::6144 2021-06-20 14:31:56.846 Status: TCPServer: shared server started... 2021-06-20 14:31:56.847 Status: RxQueue: queue worker started... 2021-06-20 14:31:58.954 HomeWizard hardware started. 2021-06-20 14:31:58.954 Status: HomeWizard: (HomeWizard) Entering work loop. 2021-06-20 14:31:58.954 Status: HomeWizard: (HomeWizard) Started. 2021-06-20 14:31:58.955 Status: NotificationSystem: thread started... 2021-06-20 14:31:58.955 Status: EventSystem: reset all events... 2021-06-20 14:31:58.955 Status: EventSystem: reset all device statuses... 2021-06-20 14:31:58.993 Status: Python EventSystem: Initializing event module. 2021-06-20 14:31:58.994 Status: EventSystem: Started 2021-06-20 14:31:58.994 Status: EventSystem: Queue thread started... 2021-06-20 14:31:59.140 Status: HomeWizard: (HomeWizard) Initialized version 2.0.31, author 'Wobbles' 2021-06-20 14:32:01.260 Status: PluginSystem: 1 plugins started.` With Domoticz 2020.2.11995 everything is working fine. The log file with level "verbose" looks like this: `2021-06-20 14:39:21.494 Status: Domoticz V2020.2 (c)2012-2020 GizMoCuz 2021-06-20 14:39:21.496 Status: Build Hash: b63341bc0, Date: 2020-04-26 13:47:55 2021-06-20 14:39:21.497 Status: Startup Path: D:\Domoticz\ 2021-06-20 14:39:21.554 Sunrise: 05:28:00 SunSet: 21:32:00 2021-06-20 14:39:21.564 Day length: 16:04:00 Sun at south: 13:30:00 2021-06-20 14:39:21.566 Civil twilight start: 04:47:00 Civil twilight end: 22:13:00 2021-06-20 14:39:21.567 Nautical twilight start: 03:49:00 Nautical twilight end: 23:11:00 2021-06-20 14:39:21.569 Astronomical twilight start: 02:06:00 Astronomical twilight end: 00:53:00 2021-06-20 14:39:21.611 Status: PluginSystem: Started, Python version '3.8.10'. 2021-06-20 14:39:21.622 Active notification Subsystems: email (1/13) 2021-06-20 14:39:21.632 Status: WebServer(HTTP) started on address: :: with port 8080 2021-06-20 14:39:21.665 Status: WebServer(SSL) started on address: :: with port 443 2021-06-20 14:39:21.674 Starting shared server on: :::6144 2021-06-20 14:39:21.678 Status: TCPServer: shared server started... 2021-06-20 14:39:21.678 Status: RxQueue: queue worker started... 2021-06-20 14:39:23.898 Status: (HomeWizard) Started. 2021-06-20 14:39:23.918 Status: EventSystem: reset all events... 2021-06-20 14:39:23.933 Status: NotificationSystem: thread started... 2021-06-20 14:39:23.953 Status: EventSystem: reset all device statuses... 2021-06-20 14:39:24.079 Status: Python EventSystem: Initalizing event module. 2021-06-20 14:39:24.109 Status: EventSystem: Started 2021-06-20 14:39:24.109 Status: EventSystem: Queue thread started... 2021-06-20 14:39:24.419 Status: PluginSystem: Entering work loop. 2021-06-20 14:39:24.607 Status: (HomeWizard) Initialized version 2.0.31, author 'Wobbles' 2021-06-20 14:39:24.609 Status: (HomeWizard) Entering work loop. 2021-06-20 14:39:24.617 (HomeWizard) Update interval set to 15 2021-06-20 14:39:24.620 (HomeWizard) Full update after 10 polls 2021-06-20 14:39:25.860 (HomeWizard) Update 0:'247;WSW;0.83;0.0;30.2;30.2' (HomeWizard - Wind) 2021-06-20 14:39:26.242 (HomeWizard) Update 0:'29.1;51;1' (HomeWizard - Aussen) 2021-06-20 14:39:46.795 Status: Closing application!... 2021-06-20 14:39:46.813 Status: Stopping worker... 2021-06-20 14:39:46.813 Status: RxQueue: queue worker stopped... 2021-06-20 14:39:47.317 Status: WebServer(HTTP) stopped 2021-06-20 14:39:47.825 Status: WebServer(SSL) stopped 2021-06-20 14:39:47.826 Status: TCPServer: shared server stopped 2021-06-20 14:39:47.826 Status: Stopping all hardware... 2021-06-20 14:39:47.826 Status: (HomeWizard) Stop directive received. 2021-06-20 14:39:47.826 Status: (HomeWizard) Exiting work loop. 2021-06-20 14:39:47.889 (HomeWizard) onStop called 2021-06-20 14:39:47.937 Status: (HomeWizard) Stopping threads. 2021-06-20 14:39:47.937 Status: (HomeWizard) Stopped. 2021-06-20 14:39:47.937 Status: Scheduler stopped... 2021-06-20 14:39:47.938 Status: EventSystem: Stopped... 2021-06-20 14:39:47.938 Status: EventSystem: Queue thread stopped... 2021-06-20 14:39:47.940 Status: EventSystem - Python stopped... 2021-06-20 14:39:47.940 Status: NotificationSystem: thread stopped... 2021-06-20 14:39:47.941 Status: PluginSystem: Exiting work loop. 2021-06-20 14:39:47.943 Status: PluginSystem: Stopped. 2021-06-20 14:39:47.943 Status: Mainworker Stopped...` I'm using the HomeWizard plugin, version 2.0.31 (newest release). Windows is running with release 21H1 and as you can see in the verbose logs I installed Python 3.8.10 and 3.9.5. Any ideas? Thank you and kind regards.
TineUser commented 3 years ago

Hi all,

can anyone help, please?

Thank You.

rvdvoorde commented 3 years ago

When you disable all python plugins, does Domoticz still crash?

TineUser commented 3 years ago

How can I disable these plugins and how can I find python based plugins?

TineUser commented 3 years ago

How can I disable these plugins and how can I find python based plugins?

TineUser commented 3 years ago

What about this issue?

TineUser commented 2 years ago

Today I tried to update Domoticz to 2022.1.14126. The update worked fine but Domoticz is stopping after a short time. I then deleted the plugin folder of the HomeWizard plugin. After starting Domoticz once again, it is running without issues but also without the connection to the HomeWizard.

So I gone back to Domoticz 2020.2 which is the last version where the HomeWizard plugin 2.0.31 is working. It looks like there are modifications needed to get the plugin running with newer versions of Domoticz.

rvdvoorde commented 2 years ago

Hello TineUser,

Since I don't use Windows for my Domoticz setup I have installed it today for the first time. I installed Python 32bit version 3.10.4 with Domoticz version 2022.1 (build 14294).

I have added my plugin, configured it and all is working. For me this means there is nothing wrong with the plugin but with your setup. Maybe you have to update your python?

2022-03-26 16:15:54.567 Status: Domoticz V2022.1 (build 14294) (c)2012-2022 GizMoCuz 2022-03-26 16:15:54.606 Status: PluginSystem: Started, Python version '3.10.4', 1 plugin definitions loaded.

2022-03-26 16:15:56.724 Status: Homewizard: Initialized version 2.0.31, author 'Wobbles' 2022-03-26 16:15:56.725 Homewizard: Update interval set to 15 2022-03-26 16:15:56.725 Homewizard: Full update after 10 polls 2022-03-26 16:15:57.088 Status: PluginSystem: 1 plugins started.

TineUser commented 2 years ago

Hello rvdvoorde,

thank you for your quick reply and test. Yesterday I also installed Python 3.10.4 but didn't do more tests. I also had Python 3.9.5 installed and updated it to 3.9.12 yesterday because 2021 there was a prerequisite for having Python 3.9.x installed.

Domoticz 2022.1 did stop again shortly after the start. So I uninstalled Python 3.9.12. Now Domoticz is running but with Python 3.8.10 which I still have installed for going back to Domoticz 2020.2 in case of a failure.

Version: 2022.1 Build Hash: d83f32a94 Compile Date: 2022-01-31 07:22:38 dzVents Version: 3.1.8 Python Version: 3.8.10 (tags/v3.8.10:3d8993a, May 3 2021, 11:34:34) [MSC v.1928 32 bit (Intel)]

How can I force Domoticz to use Python 3.10.4 instead of 3.8.10? Should I uninstall Python 3.8.10 or is there another option to do this?

TineUser commented 2 years ago

OK, I'm now a step further.

After uninstalling Python 3.8.10 Domoticz says that no Python version is used. I un- and reinstalled Python 3.10.4 a lot of times but without any success. My last idea was to update Domoticz to the Beta build 2022.1.14294 and then Python 3.10.4 was found by Domoticz and the HomeWizard plugin is running, too :-).

Version: 2022.1 (build 14294) Build Hash: faa28908b Compile Date: 2022-03-24 08:21:49 dzVents Version: 3.1.8 Python Version: 3.10.4 (tags/v3.10.4:9d38120, Mar 23 2022, 22:57:10) [MSC v.1929 32 bit (Intel)]

So I think this is a very important infomation when using Python based plugins:

  1. Stop Domoticz
  2. Make a backup of the Domoticz installation
  3. Uninstall all older Python versions
  4. Install Python 3.10.4 with the settings found here: https://www.domoticz.com/wiki/Using_Python_plugins#Installing_Python_for_Windows
  5. Update Domoticz
  6. Start Domoticz