Closed ciscozine closed 5 years ago
Have you tried the new release ? There where many bug fixes done. Are you also getting "paradox disconnected" on the status topic ?
Yes, I have tried the last release without resolve the problem
Thanks
Is there any chance the raspberry is going to sleep? Are you also getting "paradox disconnected" on the status topic ?
No It doesn't go to sleep. Do you know where can I find MQTT broker log on hassio?
thanks
No sorry. Use mqtt.fx and leave it connected to status topic
Ok. I'll update you. Other commands useful for debug this type of problem? For the last, do you use some particular version of home assistant with your project?
thanks again
No I dont use home assistant. I use openhab and homekit
If you want you can try this https://github.com/maragelis/ParadoxRs232toMqtt/tree/Dev/ParadoxAlarmSystem/ParadoxAlarmSystemOTA
It has some mqtt connection updates, and get back to me Thanks
What are the differences between the 2ino files? thanks
the one is a ino arduino file the other is a precompiled bin file for flashing
Sorry, I didn't see the extension file :D Last question: what happens if WEMOS lost connection for about 1minute to the access point? Does it try to reconnect to the AP?
Thanks I'll update you after testing the new ino file
Yes it will reconnect
Hi, I'll load the new sketch. I'll update you tomorrow. A question. I have trace =1 but using console (9600 or 115200) I do not see nothing. Why?
thanks
Again, the same problem. The interface to the paradox seems be down.
I have sniffed the IP flow.
The wemos is live (icmp ok), the mqtt flow still persist. I notice only a SSDP port unreachable ssdp:
each five minute the wemos send to the broker a ssdp message, but at 3:06am the wemos send 2 ssdp message and 1 of that it's a port unreachable (problem on hassio server?) But I don't know if it is the problem.
2 questions:
Thanks again
My friend there is nothing to trace in this situation, trace is for tracing problems with panel commands.
1) Are you using a stable pubsub library? Dont use beta software. 2) Is Trace off <-- very important Trace must be off for seamless operation. Send Trace=0 3) Try flashing a relaese file .bin https://github.com/maragelis/ParadoxRs232toMqtt/releases/tag/v2.1.1. I have many wemos connected to panels without this problem.
I'll test and I'll update you! Thansk. My personal suggestion for .bin file. Why don't you give use the possibility to enable authentication and SSL encryption? It would be perfect :)
Thanks
I will look into it
I update you. also with the .bin the problem still persist. What I notice is that after the problem the log of my mqtt broker on hassio (raspberry) is: 1549393009: Client 80:7D:3A:3E:B5:FF has exceeded timeout, disconnecting. 1549393009: Socket error on client 80:7D:3A:3E:B5:FF, disconnecting. but I can ping the wemos d1..
Moreover if I unplug the power and plug the power, the wemos d1 led blinks only 1 time and the ping stop to work. If I detach the serial port to the alarm system and unplug/plug the power, the wemos d1 led blink correctly (3 or 4 times); then if I attach the serial port the broker receive the message correctly.
Thanks
One time I receive also a "{"status":"Problem connecting to panel"}". I change the cable without any changes. This is why I ask you if it is better use some resistor .
Moreover I confirm that the Alarme system serial works fine because I called the alarm man specialist.
thanks
So this happens only when armed ? please help so I can help.
No I noticed that only when disarmed. I cannot test if armed because there is a PIR sensor that I cannot disable
So you are disarmed and the wemos disconnects from mqtt ?
I'm sorry. I understand now. Generally when I try do disarm the system (it is armed), the wemos stops to work.
Are you maybe having low wifi signal
If the wifi signal cut out for too long the times out and cannot reconnect. Please check if you are getting disconnect status message.
After how long does it disconnect ?
{"status":"Paradox Disconnected"} this is the last will message if wifi is disconnected, can you check if you are getting this message.
Well, I have an access point at 20cm .. It isn't a wireless problem; in fact i can ping the wemos without any problem. No I don't see "{"status":"Paradox Disconnected"}" .
that tells me that the serial has stopped responding on the wemos.
can i get what panel you have and firmware if possible
Paradox Magellan 5000. I don't know the firmware. Can I find it with your system?
IF that is the one with the 433mhz transmitter make sure your cables and wemos are well grounded and shielded. I will look into it as I only have the SP series api ans get back to you. @rjduraocosta are you using the same panel ?
Could you if you have the means to read the voltage over your tx and rx lines. if they are above 3.3v I suggest a level converter between wemos and panel .
Are you powering the wemos from the panel ?
I used power from the panel and from a external power supply. Each one have the problem. tomorrow I check the cable and the welding.
thanks again
Hello again,
In my case I saw it happening armed and disarmed. My panel is also an MG5000. In my case I am also missing some zone OFF events. My "cable" is straight wires coming from the panel to the Wemos board and I am powering the Wemos board from the panel through a buck converter. Tomorrow I will measure the voltage on the rx tx lines and get back to you.
Thank you for all the help.
Hello @maragelis and @ciscozine ,,
I measured the voltage on my Wemos Pin's and they are the following:
Some ideas: Move the RX/TX to the original ones? Level Shifter? Resistors? RF Interference?
@ciscozine any news about your setup?
Thanks for the help.
I am betting on interference. I will try tackle it in code but it could yield unwanted results. How about using a longer cable and moving the wemos further away.
Hi @maragelis , good news.
I have tested all components with the tester and it seems ok, but I have identified the cause of my problem (I hope). A solder.
Thanks for all.
For the last but not the least, my suggestion is to make a bin file with the possibility to enable authentication and encryption (ssl).
Hello again,
I could try and move the Wemos further away for testing, but I cloud only do this at the weekend. It is all in a box that I have to move further and also do another longer cable.
Thanks for the suggestion.
Hello @maragelis good evening,
I have been testing the system and I found one thing, that it is the following:
If you have some other idea other than mving the wemos away until this weekend, or something I could test I appreciate it.
I do not have a level converter I just have resistors right now. I am not sure if using resistors at the Wemos RX line is fast enough for the serial communication with this configuration:
Thanks again for your work.
ok so I am starting to understand what is going on. Can you please tell me the last message you receive before it goes down. Is it a mqtt disconnect ?
The only way we will see whats going on is for you to use a ftdi adapter connect to d4 / RX and get Trace messages
I have never seen an mqtt disconnect message before the system goes down. In all the tests the last message in the mqtt broker was a zone event, sometimes ON event sometimes OFF event.
Tomorrow I will use an ftdi adapter and connect it to D4 to see the messages. Before that I have to enable TRACE=1through mqtt, right? Another thing, can I use the Arduino IDE Serial monitor for that or do you recommend another program?
Thanks for the support.
Trace=1 yes, not TRACE=1 yes you can use Arduino IDE just choose right port
If you have patience we will fix it I just need your help.
Perfect! You can count on me.
Tomorrow I will share the Trace output's with you.
Thanks again for all for the support.
Hello @maragelis,
I have the data for you. I restarted the system this morning just to start from scratch and then enabled the Trace and monitored the MQTT messages. For about 2 hours it was all stable with the reporting the zone events to the MQTT broker. After that period I stopped receiving the zone events and hads to send a "wake up" to the system by a command through MQTT, just like I described yesterday. Attached you will find the Trace file. If you open it with and editor that you can see line numbers look at line 1138 that is when I "woke" the system up.
Thanks again for all your effort and help. MG5000_Trace_20190207.txt
Ok thanks @rjduraocosta , I saw the problem. The serial buffer is getting corrupt. I do have code which tries to fix this, but looks like its getting stuck somewhere. I will try send you an update to see if this solves the problem. It should be ready by tonight be patient as I have day job too.
@maragelis, thank you for your work. Please take your time and when you are ready I will test it for you, no problem. I also have a day job and I know how thinks are no problem at all. I just had todays day off, remaining vacation day from last year, that is why I could test this today.
Thanks again and please take your time.
I have a new cleaned up version 2.2 for testing and I think I have squashed this bug. I also had this long time ago. It happens when to-many events overflow the serial buffer. In the login i clear the buffer thats why it starts working again. Looks like its taking to long to process the incoming messages.
Can you please try this version
https://github.com/maragelis/ParadoxRs232toMqtt/tree/Dev/ParadoxAlarmSystem/ParadoxAlarmSystemOTA
Hi, I have a Magellan 5000 and I use a WemosD1 mini to connect to the alarm system.
At night I arm the alarm, but in the morning "ParadoxRs232toMqtt" seems to be down. I can ping the wemos but I cannot receive MQTT Message.
What can I do? How can I do to debug it?
I use hassio on a rasperry and "Mosquitto broker" as a MQTT Server.
thanks Fabio