Smanar / Domoticz-deCONZ

deCONZ plugin for Domoticz (Zigbee application)
GNU General Public License v3.0
36 stars 27 forks source link

Issues after install #165

Closed After-burner closed 2 months ago

After-burner commented 3 months ago

Hello. I use your Domoticz-deCONZ plugin already for a couple of years on my Domoticz RPi combination (3B). As this first Domoticz system got issues with SD memory which caused it the crash frequently, I started to build a new Domoticz system on a new RPi (4). Installation of the plugin went well, but not all connected Domoticz devices are running well too. Temp/hum sensors are OK. Motion sensors are OK. Door/window sensors are not OK. Lights can not be controlled. On/off plugs are not OK. Not OK means that their status is not updated and they can not be controlled from the Gui. The date/time status in de Custom/Deconz tab however are OK. The deCONZ/REST-API software is running on a sepatate RPI and operates well with the old Domoticz system, so I suppose that my issues have to do with the plugin. Domoticz Settings are copied via Backup/Restore on the new Domoticz system, including the REST-API key.

This is what I copied from the Domoticz log after a Restart: 2024-03-23 11:06:56.858 Status: ZB spullen: Stop directive received. 2024-03-23 11:06:56.859 Status: ZB spullen: onDisconnect called for deCONZ_WebSocket 2024-03-23 11:06:56.951 Status: ZB spullen: Exiting work loop. 2024-03-23 11:06:56.958 Status: ZB spullen: Stopping threads. 2024-03-23 11:06:56.958 Status: ZB spullen: Stopped. 2024-03-23 11:06:56.959 Status: ZB spullen: Entering work loop. 2024-03-23 11:06:56.959 Status: ZB spullen: Started. 2024-03-23 11:06:57.359 Status: ZB spullen: Initialized version 1.0.30, author 'Smanar' 2024-03-23 11:06:57.372 Status: ZB spullen: Plugin custom pages in date 2024-03-23 11:07:06.120 Status: ZB spullen: Firmware version: 0x264d0900 2024-03-23 11:07:06.120 Status: ZB spullen: Websocketnotifyall: True 2024-03-23 11:07:06.120 Status: ZB spullen: You have 122 API keys memorised, some of them are probably useless, can use the API_KEY.py tool or the Front end to clean them 2024-03-23 11:07:06.309 Status: ZB spullen: Launching WebSocket on port 8088

This is a copy of the errors that appear in the log every 10 seconds or so: 2024-03-22 22:29:56.099 Error: ZB spullen: _plugin.onHeartbeat() 2024-03-22 22:29:56.099 Error: ZB spullen: File "/home/pi/domoticz/plugins/Domoticz-deCONZ/plugin.py", line 538, in onHeartbeat 2024-03-22 22:29:56.099 Error: ZB spullen: self.ManageInit() 2024-03-22 22:29:56.099 Error: ZB spullen: File "/home/pi/domoticz/plugins/Domoticz-deCONZ/plugin.py", line 601, in ManageInit 2024-03-22 22:29:56.099 Error: ZB spullen: self.SendCommand("/api/" + Parameters["Mode2"] + "/" + self.INIT_STEP[0] + "/") 2024-03-22 22:29:56.099 Error: ZB spullen: File "/home/pi/domoticz/plugins/Domoticz-deCONZ/plugin.py", line 1130, in SendCommand 2024-03-22 22:29:56.099 Error: ZB spullen: self.UpdateBuffer() 2024-03-22 22:29:56.099 Error: ZB spullen: File "/home/pi/domoticz/plugins/Domoticz-deCONZ/plugin.py", line 1171, in UpdateBuffer 2024-03-22 22:29:56.099 Error: ZB spullen: self.NormalConnexion(_Data) 2024-03-22 22:29:56.099 Error: ZB spullen: File "/home/pi/domoticz/plugins/Domoticz-deCONZ/plugin.py", line 880, in NormalConnexion 2024-03-22 22:29:56.099 Error: ZB spullen: self.InitDomoticzDB(i,_Data[i],self.INIT_STEP[0]) 2024-03-22 22:29:56.099 Error: ZB spullen: File "/home/pi/domoticz/plugins/Domoticz-deCONZ/plugin.py", line 643, in InitDomoticzDB 2024-03-22 22:29:56.099 Error: ZB spullen: kwarg.update(ProcessAllState(StateList,Model,0)) 2024-03-22 22:29:56.099 Error: ZB spullen: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-03-22 22:29:56.100 Error: ZB spullen: File "/home/pi/domoticz/plugins/Domoticz-deCONZ/fonctions.py", line 379, in ProcessAllState 2024-03-22 22:29:56.100 Error: ZB spullen: kwarg.update(ReturnUpdateValue('airqualityppb', data['measured_value'], option)) 2024-03-22 22:29:56.100 Error: ZB spullen: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-03-22 22:29:56.100 Error: ZB spullen: File "/home/pi/domoticz/plugins/Domoticz-deCONZ/fonctions.py", line 702, in ReturnUpdateValue 2024-03-22 22:29:56.100 Error: ZB spullen: kwarg['nValue'] = int(val) 2024-03-22 22:29:56.100 Error: ZB spullen: ^^^^^^^^ 2024-03-22 22:29:56.100 Error: ZB spullen: ValueError: invalid literal for int() with base 10: '14.99'

It also regularly mentioned that 'Deconz not ready'

I'am stuck in analysing this problem and have no idea for a way forward. Remove the plugin folder and reinstall? Other ideas??

Smanar commented 3 months ago

Hello, have just corrected the last issue, can you try with the beta branch ? In the plugin folder

git pull
git checkout beta
git pull

Then restart the plugin, domoticz/hardware/deconz/update.

After-burner commented 3 months ago

Thanks for your, very, quick actions.

I'am not an expert in using the checkout command.

This is the respons I got: @.***:~/domoticz/plugins/Domoticz-deCONZ $ git checkout beta error: Your local changes to the following files would be overwritten by checkout: plugin.py Please commit your changes or stash them before you switch branches. Aborting

How to act on this?

Afterburner


Van: Smanar @.> Verzonden: zondag 24 maart 2024 14:44 Aan: Smanar/Domoticz-deCONZ @.> CC: After-burner @.>; Author @.> Onderwerp: Re: [Smanar/Domoticz-deCONZ] Issues after install (Issue #165)

Hello, have just corrected the last issue, can you try with the beta branch ? In the plugin folder

git pull git checkout beta git pull

Then restart the plugin, domoticz/hardware/deconz/update.

— Reply to this email directly, view it on GitHubhttps://github.com/Smanar/Domoticz-deCONZ/issues/165#issuecomment-2016814831, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AVHD6VC5LX5WSUZUCB2ZJUDYZ3KFHAVCNFSM6AAAAABFFVQZUWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJWHAYTIOBTGE. You are receiving this because you authored the thread.Message ID: @.***>

Smanar commented 3 months ago

Ha ? This happen if you have edited yourself something in the plugin.py file, so you have 2 options:

After-burner commented 3 months ago

Thanks again.

Hurray.....so far.....so good.....you made me very happy..........

I'am not aware changing something in plugin.pi...... That's not the business I'am in. Could it be the Config Plugin button in the Tools option...? I was just curious and looked into it without changing anything. Question (last) . What does Code 0 mean? So option 2 finally was the solution. With my 75 years I'am still learning every day.

Afterburner.


Van: Smanar @.> Verzonden: zondag 24 maart 2024 21:53 Aan: Smanar/Domoticz-deCONZ @.> CC: After-burner @.>; Author @.> Onderwerp: Re: [Smanar/Domoticz-deCONZ] Issues after install (Issue #165)

Ha ? This happen if you have edited yourself something, so you have 2 options:

— Reply to this email directly, view it on GitHubhttps://github.com/Smanar/Domoticz-deCONZ/issues/165#issuecomment-2016939705, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AVHD6VDR6GVIPDIZJ7NNUDLYZ44M3AVCNFSM6AAAAABFFVQZUWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJWHEZTSNZQGU. You are receiving this because you authored the thread.Message ID: @.***>

Smanar commented 3 months ago

No, from my memory there is nothing by defaut in domoticz that can make a change on the file, but you don't need to make a change, just open and save can have this result, github is realy something sensible ^^.

"code 0" is for the Alarm system https://github.com/Smanar/Domoticz-deCONZ/wiki/How-to-add-keypad-to-domoticz

The solution 2 is better, else you will have the same error the next time. But take care you are now on beta branch, you can stay on this one or return on the stable one later (when the corrective will be on this branch too)

After-burner commented 3 months ago

[cid:586f8196-443c-48d1-b7df-1646f6e6a130] Custum/Deconz/Tools

My option 2, was your option 2 above, 'Use the command git reset --hard to reset your changes and after you will be able to use the previous commands' .

Thanks for helping.


Van: Smanar @.> Verzonden: maandag 25 maart 2024 18:13 Aan: Smanar/Domoticz-deCONZ @.> CC: After-burner @.>; Author @.> Onderwerp: Re: [Smanar/Domoticz-deCONZ] Issues after install (Issue #165)

No, from my memory there is nothing by defaut in domoticz that can make a change on the file, but you don't need to make a change, just open and save can have this result, github is realy something sensible ^^.

For "code 0" you mean in the alarm system ?

And what is your "option 2" ?

— Reply to this email directly, view it on GitHubhttps://github.com/Smanar/Domoticz-deCONZ/issues/165#issuecomment-2018501731, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AVHD6VBPE3LEAU2FQ37DXQLY2BLK5AVCNFSM6AAAAABFFVQZUWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJYGUYDCNZTGE. You are receiving this because you authored the thread.Message ID: @.***>