-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
after updating visonicinterface to ESPHome 2023.4 - panel does not connect #77
Comments
I can confirm the same behaviour
|
This line just tells me that it didn't connect: Source: custom_components/visonic/client.py:1185 If you have updated ESPHome to the new version, have you also updated your visonic.yaml file from the wiki. I try to keep the wiki visonic.yaml file up to date with the versions of ESPHome. You may need to also add to your secrets.yaml to set the necessary parameters. If that doesn't help, and I keep saying this in the forum and troubleshooting section of the wiki, please capture and show me the Home Assistant log file. |
I should have added, I have updated to the latest ESPHome and my development connection my PowerMaster 30 works. |
OK, so i have updated to the latest visonic.yaml when it was last changed. I will try to find the time to update again - and produce the logs with as much info as possible. to add info on my setup - it's a powermax 10. |
When you create a log file, remember to set debug for this integration as per here |
I can see a couple of problems in both the "good" and "bad" log files. In both "good" and "bad" log files I find this
Many months ago I discovered a message acknowledge to the panel when in Powerlink state, it seems like this is the cause of your problems so let's go back to the old version. If you are able to edit the pyvisonic.py file can you try this for me please On line 1845, for the text MSG_ALIVE2 delete the "2" so it looks like this
On line 3938, do the same, delete the "2" so it looks like this
Can you please give this a try for me. I'm not sure why the ESPHome update has done this but it looks like it has. |
I'll just add this as well though, in both bad and good log files they both join to and interact with the panel so you should not have seen the Can you please confirm whether the "bad" log file failed to bring up the alarm control and sensors in the HA frontend? |
I can confirm that making those changes worked AFTER a full reboot and not just a restart HA |
I can confirm that during the “bad” log, no matter what combination of resetting I tried, it just never connected to the panel, no standard mode, no powerlink, nothing worked. Than, with just installing the older esphome on the d1mini- it started to work as previously. later today I’ll try the changes you mentioned. |
You changed the py files and it worked? |
Here is my log...
Yes ... it connects and sees the sensors now and I can activate the alarm.. I do see strange errors in my log but everything works |
Ok, got a chance to change the MSG_ALIVE2 as suggested. First of all- it seemed that after my trials yesterday the d1 mini was actually on 2023.4 and working… not sure what changed really (maybe tried a full reboot that fixed It?). this is on the esphome 2023.4: this is after updating to 2023.4.1: both seems similar in my eyes. and now even with the MSG_ALIVE2, it works as it previously did. Basically, everything works as expected on newest esphome, without any changes. but i do want to pursue the issues you found - should I open a different issue? sorry for the mess- I hope somehow we understand with the logs what may have happened. |
hmm.. based on your info.. I went back and edited the .py file and restored the MSG_ALIVE2 and everything still works. The key difference is ESPHOME was updated to a newer version since all of this started. |
Yes, that did happen, but I haven’t updated it until the last trial, so I figure it is irrelevant. that’s freakin weird😅 |
@konradwalsh @EyalRotem
This seems to be an ESPHome error but I don't know what it means. |
i captured the logs up until i noticed that the lovelace card changed to the correct panel status. thanks for all the help, btw.. |
To change the panel number you'd need to delete the integration out of HA, and then add it again, with the panel number set to 0. If that doesn't work then dleete it, remove all traces of visonic from the HA config files and then add it again. However, if you're happy with it set to panel 1 then just leave it as is :) |
OK thanks, I'll tidy it up and release it as it's a simple change that doesn't affect any other functionality For the "f" string formatting, it's part of python, look here |
Oh cool, it looked odd since the last version didn’t had it and the first word after it coincidently started with an ‘f’ as well 😅 it looks similar to what ‘$’ does in c# which I’m more familiar with. |
Hi guys, |
As of now-I’m on 2023.4.3 even, and don’t have the issues. something I and @konradwalsh did that might helped- is a full restart of the home assistant machine/operating system. 0.8.4.2 will only add a way to disable alarm type in the GUI AS presented in a previous reply (or maybe some more other stuff- that’s up to dave🤗) |
If the integration worked with an old version of ESPHome and doesn't wotk with a new version of ESPHome then the first place to look is ESPHome. So it could either be the ESPHome yaml file that I have on the wiki or something within ESPHome itself. As I haven't changed the yaml file (and I assume neither have you) then is must be ESPHome itself. I would assume that new versions of ESPHome should be backwards compatible but sometimes they are not. So the first place to check is ESPHome itself. After you update, as @EyalRotem suggested, try restarting everything! Including the Wemos (or other gadget) on which you have installed ESPHome. After you updated ESPHome to the new version, did you reinstall the yaml config to the Wemos? Although 0.8.4.0 made many changes to the HA Event mechanisms, release 0.8.4.0 up to and including 0.8.4.3 would not have prevented ESPHome from working. |
After the update, I rebooted both HA machine and the ESP8266 that is connected to the panel with no success... |
You might need to change this temporarily: https://github.com/davesmeghead/visonic/wiki#logger-settings |
This week I updated ESPHome on the D1Mini to 2023.4.4 as well as HA to 2023.5.0 and experienced the same loss of connectivity. Based on notes from the issue raised I tried a combination of various restores to earlier versions and I could only get it working again with (HA) 2023.4.5 and (ESpHome) 2023.3.2. I did try just downgrading ESPHome, but that wasn't sufficient and I did try full reboots between restores. So for me at least it seems to be a combination of HA and ESPHome causing the issue. |
since i cannot reproduce the issue as it "fixed itself", you might wanna try updating again and producing logs - this might help dave find the issue. |
ok, one further update. I've restored back to my base environment (HA - 2023.5.2, ESPHome - 2023.4.4 and Visonic - 0.8.3.0). I then upgraded to HA to 2023.5.3 and ESPHome to 2023.5.0. All working. I then installed the ESPHome upgrade to the D1mini and the integration stops working, without upgrading the integration itself so still on 0.8.3.0. So for what its worth it looks like the issue is with ESPHome. Not sure how to solve it, but... I have the log file from the point at which it stopped where can i post it? |
Pastebin should be fine |
sorry going to appear a bit thick here... where do i find pastebin? |
Just paste the log within this site - and copy the url .. |
doesn't work, got a size exceeded message and no URL |
One further small development. I've restored the baseline backup (HA - 2023.5.2, ESPHome - 2023.4.4 and Visonic - 0.8.3.0), however I updated the D1mini before this to 2023.5.0 and I've confirmed that it is still reporting as such. So I wondered if I update HA and ESHome (2023.5.3 and 2023.5.0 respectively) whether it would continue working? and it does. |
I have ESPHome v2023.5.0 and HA 2023.5.3 i.e. the same as @isablend I have tried it with my current Visonic Integration version (which I haven't released to you all yet) and it works The only thing that is different in my ESPHome system is that I'm trying it with encryption, I've attached the visonic.yaml file that I am currently using (as a zip file). The important change I made for encryption is here in the visonic.yaml file
You will need to add this to your secrets.yaml
As it says, create a random key and put it in the secrets.yaml file, without the <>. It's under the "Configuration Variables", "encryption" and "key". Then you'll need the same key in the ESPHome Integration so you will need to delete the integration from HA and create it again but using the key this time. The only reason for me doing this is that it said the ESPHome API Password is deprecated and to start using encryption so I decided to try it in my setup. But deprecated does not mean removed altogether so the existing api password should still work. Anyway, let me know if this helps please |
As an afterthought... |
@davesmeghead I also have the encryption line in my esphome file for the D1min. The only other difference I could see was the header, so you had; esphome: I had; I've updated to reflect your position, re-compiled from clean and re-installed the D1mini, but no impact. I've taken log files pre and post integration update only (after it dosn't work), but they only seem to show that there is no attempt to connect; ie. I'm missing the lines |
Pre- update: https://pastebin.com/VsRU4Xb9 |
Not sure, but I think k the post update doesn’t have the logger set to : Which might make it harder to decipher.z |
once more unto the breach...I've re-done the restore and then the update, underneath is the logger output... |
Hi @isablend
Can you show me the log extract for this time period please. |
@davesmeghead |
So an update from me. Had some free time this morning so decided to go down the upgrade path once again to try and complete reinstall again but this time capture logs. However upon redoing everything it connected without error and I can control the alarm from within HA. Steps I took:
The only difference between this as the last time I ran through was that ESPHome was then over version 2023.5.0. Perhaps they changed something with how the boards communicated and then reverted. I cant see anything in the release notes indicating that. If something didnt change in ESPHome then I really cant explain what was different. I can confirm I followed the exact same steps last week and I got nothing back from the board. Could argue I perhaps fat fingered something... but either way it's now fully working. @isablend perhaps try the latest ESPHome version and try again? |
@HumanSkunk @davesmeghead The logs are here; Interestingly it looks as though the integration is, despite being loaded being ignored (from what I can read). |
One last thing. I had a look at the 'Download Diagnostics' option on the integration and get the following; and that is despite removing the integration and from HACS and re-installing. That doesn't strike me as right? |
When you are removing it from HACS are you sure it has removed everything? I know it should have but sometimes HACS left some files that I also had to manually delete. After you have removed it I would just verify that all the old files have gone from within the custom_components folder that is in the same folder as your configuration.yaml. Also as a complete clean when you reinstalled your ESPHome configuration to the board did you also remove those files that are often left behind? they are in the esphome folder in the same master folder as above. there were also some files within a hidden folder .esphome as well. Granted deleting the above in the ESPHome folder didnt solve the issue for me, but perhaps a combination of all the things above did. Does make it more annoying to work out what the actual problem was in the first place... This may not be in anyway linked to the issue but could be worth a try, especially when its reporting to be at a different version. |
For this...
You used the old integration version, I asked you to do this with the latest release |
When you see this
It's probably my fault, I didn't update the version code in the manifest.json file and it still says 0.8.3.0 |
@davesmeghead vis the version of the integration. The logs I took were after I had upgraded the version to 0.8.4.1 hence my confusion as to why it seemed to be reporting 0.8.3.0. Each time I remove the integration from HACS I check that it has removed the files from custom_components. I've tried both removing manually and from within HACS. Unfortunately I'm away now for a couple of days so won't be able to make more changes, but will apply any new findings when i return. In the mean time I've had to return to the backup working version. |
@davesmeghead I'm back and decided to go back and re-check each activity as its done. From within HACS I applied the update it was advertising. A re-start is then required. However before I did that I decided to check to see what was in the custom_components directory. All the files are date and timestamped as you would expect with todays date and time. However based on your comment about me failing to update the integration before re-starting I thought I'd check the manifest file you mentioned. This does not include the update that your github file is showing. I.e. it still shows 0.8.3.0 which implies that whatever HACS is doing it may not be doing the update I thought it was doing. I'm going to manually download all the files and see what impact this has and will report back with findings. |
Dave said 2 comments ago that the manifest file wasn’t updated at his fault, and if I understand correctly-it affects logging but not how the integration works - as most of us have no issues🤗 the file is only updated on GitHub since the latest iteration isn’t released yet |
That's why I mentioned it. I updated the files using HACS and yet the file stored where the updated HACS file should be had the old information in it, not the new. So not within HA, but the file which should then be used as the basis for HA logging. That tells me that there may be in issue in the delivery of files from Github with HACS not with the integration itself. |
ok, one further update. |
I'm really happy that you've got it working. It shows me that it's not the Integration at fault but has been a problem with either HA itself or with HACS doing the upgrade. Although you should not have needed to restart the alarm panel. |
I'll close this issue but any further problems then create a new issue and refer back to this one if appropriate. |
Hi,
ISSUE: panel not connecting after updating the visonicinterface to version 2023.4
THINGS I TRIED: this happened before, but a reset to HA usually fixed it (or a reset to the D1mini and reloading the integration). unfortunately - this time, nothing helped.
POSSIBLE CAUSE: a breaking change in the ESPHome - regarding UART devices. this is the changelog, and this is the issue that is linked to the breaking change.
FIX FOR NOW: restored an older version of HA with the previous ESPHome version - 2023.3.2. after a reboot, everything is working as it should.
LOGS: sorry, i restored and have nothing. but when i looked (after adding the logger debug stuff in configuration.yaml) there wasn't anything that "screams" an issue, just failure to connect- if needed - i can update again to replicate the issue, but i rather not, if possible haha.
what i can remember is this is the last line that was the same - and after it, other lines that to not match the working log:
[custom_components.visonic.pyvisonic] Setting TCP socket Options
Let me know if I can help.
The text was updated successfully, but these errors were encountered: