ratgdo / mqtt-ratgdo

ratgdo via mqtt
GNU General Public License v2.0
76 stars 16 forks source link

Security 1.0 - Random corruption? #57

Open jeeftor opened 5 months ago

jeeftor commented 5 months ago

This is the 3rd time a specific situation has happened with my device and I'm not sure I'll be able to provide useful debugging info.

Just hard booted and nothing so I'll probably have to reflash it I'm thinking...

Connected via flash tool and here are my logs:

### MQTT DISCONNECTED ###
Connecting to
MQTT Broker...
MQTT Last Will Params: 
willTopic: ratgdo/status/availability
willPayload: offline
qos: 1
retain: 0
clean session: 1
MQTT attempts=
10
### MQTT DISCONNECTED ###
Connecting to
MQTT Broker...
MQTT Last Will Params: 
willTopic: ratgdo/status/availability
willPayload: offline
qos: 1
retain: 0
clean session: 1
MQTT attempts=
11
### MQTT DISCONNECTED ###
Connecting to
MQTT Broker...
MQTT Last Will Params: 
willTopic: ratgdo/status/availability
willPayload: offline
qos: 1
retain: 0
clean session: 1
MQTT attempts=
12
### MQTT DISCONNECTED ###
Connecting to
MQTT Broker...
MQTT Last Will Params: 
willTopic: ratgdo/status/availability
willPayload: offline
qos: 1
retain: 0
clean session: 1
MQTT attempts=
13
### MQTT DISCONNECTED ###
Connecting to
MQTT Broker...
MQTT Last Will Params: 
willTopic: ratgdo/status/availability
willPayload: offline
qos: 1
retain: 0
clean session: 1
MQTT attempts=
14
### MQTT DISCONNECTED ###
Connecting to
MQTT Broker...
MQTT Last Will Params: 
willTopic: ratgdo/status/availability
willPayload: offline
qos: 1
retain: 0
clean session: 1
MQTT attempts=
15
### MQTT DISCONNECTED ###
Connecting to
MQTT Broker...
MQTT Last Will Params: 
willTopic: ratgdo/status/availability
willPayload: offline
qos: 1
retain: 0
clean session: 1
MQTT attempts=
16
### MQTT DISCONNECTED ###
Connecting to
MQTT Broker...
MQTT Last Will Params: 
willTopic: ratgdo/status/availability
willPayload: offline
qos: 1
retain: 0
clean session: 1
MQTT attempts=
17
### MQTT DISCONNECTED ###
Connecting to
MQTT Broker...
MQTT Last Will Params: 
willTopic: ratgdo/status/availability
willPayload: offline
qos: 1
retain: 0
clean session: 1
MQTT attempts=
18
### MQTT DISCONNECTED ###
Connecting to
MQTT Broker...
MQTT Last Will Params: 
willTopic: ratgdo/status/availability
willPayload: offline
qos: 1
retain: 0
clean session: 1
MQTT attempts=
19
### MQTT DISCONNECTED ###
Connecting to
MQTT Broker...
MQTT Last Will Params: 
willTopic: ratgdo/status/availability
willPayload: offline
qos: 1
retain: 0
clean session: 1
MQTT attempts=
20
### MQTT DISCONNECTED ###
MQTT Last Will Params: 
willTopic: ratgdo/status/availability
willPayload: offline
qos: 1
retain: 0
clean session: 1
MQTT attempts=
21
### MQTT DISCONNECTED ###
MQTT Last Will Params: 
willTopic: ratgdo/status/availability
willPayload: offline
qos: 1
retain: 0
clean session: 1
MQTT attempts=
22
;ld��|�l�|�$�c|����{�c�c��'o�l'o���cp��d{${$p�o��l��#'�|���#��o'�d��$ �g'�d'{���g{s�`p�n�;��ܜ��cg�|�c��'o��$`�gn�$'{���'{$`r��';$`������$`��o�l
Mounting LittleFS...
[setup.json]
JSON parsed
Storage OK, restoring WiFi and MQTT config.
Connecting to: 
THENETWORK...
Using static IP address
Set WiFi output power to: 20.50
...
WIFI CONNECTED
IP Address: 192.168.1.71
nb of attempts: 3
IMPROVhttp://192.168.1.71�

WiFi connected
Local IP: 192.168.1.71
SoftAP IP: (IP unset)
Server started
Webserver ready. Open http://ratgdo.local/ in your browser
Launching webserver for improv
Starting ArduinoOTA service
doorCommandTopic: ratgdo/command/door
lightCommandTopic: ratgdo/command/light
lockCommandTopic: ratgdo/command/lock
Using security+ 1.0
Setup Complete
 _____ _____ _____ _____ ____  _____ 
| __  |  _  |_   _|   __|    \|     |
|    -|     | | | |  |  |  |  |  |  |
|__|__|__|__| |_| |_____|____/|_____|
version 2.51
IMPROVhttp://192.168.1.71�
### MQTT DISCONNECTED ###
Connecting to
MQTT Broker...
MQTT Last Will Params: 
willTopic: ratgdo/status/availability
willPayload: offline
qos: 1
retain: 0
clean session: 1
MQTT attempts=
0
### MQTT DISCONNECTED ###
Connecting to
MQTT Broker...
MQTT Last Will Params: 
willTopic: ratgdo/status/availability
willPayload: offline
qos: 1
retain: 0
clean session: 1
MQTT attempts=
1
### MQTT DISCONNECTED ###
Connecting to
MQTT Broker...
MQTT Last Will Params: 
willTopic: ratgdo/status/availability
willPayload: offline
qos: 1
retain: 0
clean session: 1
MQTT attempts=
2
### MQTT DISCONNECTED ###
Connecting to
MQTT Broker...
MQTT Last Will Params: 
willTopic: ratgdo/status/availability
willPayload: offline
qos: 1
retain: 0
clean session: 1
MQTT attempts=
3
### MQTT DISCONNECTED ###
Connecting to
MQTT Broker...
MQTT Last Will Params: 
willTopic: ratgdo/status/availability
willPayload: offline
qos: 1
retain: 0
clean session: 1
MQTT attempts=
4
### MQTT DISCONNECTED ###
Connecting to
MQTT Broker...
MQTT Last Will Params: 
willTopic: ratgdo/status/availability
willPayload: offline
qos: 1
retain: 0
clean session: 1
MQTT attempts=
5
### MQTT DISCONNECTED ###
Connecting to
MQTT Broker...
MQTT Last Will Params: 
willTopic: ratgdo/status/availability
willPayload: offline
qos: 1
retain: 0
clean session: 1
MQTT attempts=
6
### MQTT DISCONNECTED ###
Connecting to
MQTT Broker...
MQTT Last Will Params: 
willTopic: ratgdo/status/availability
willPayload: offline
qos: 1
retain: 0
clean session: 1
MQTT attempts=
7
### MQTT DISCONNECTED ###
Connecting to
MQTT Broker...
MQTT Last Will Params: 
willTopic: ratgdo/status/availability
willPayload: offline
qos: 1
retain: 0
clean session: 1
MQTT attempts=
8
### MQTT DISCONNECTED ###
Connecting to
MQTT Broker...
MQTT Last Will Params: 
willTopic: ratgdo/status/availability
willPayload: offline
qos: 1
retain: 0
clean session: 1
MQTT attempts=
9
### MQTT DISCONNECTED ###
Connecting to
MQTT Broker...
MQTT Last Will Params: 
willTopic: ratgdo/status/availability
willPayload: offline
qos: 1
retain: 0
clean session: 1
MQTT attempts=
10
### MQTT DISCONNECTED ###
Connecting to
MQTT Broker...
MQTT Last Will Params: 
willTopic: ratgdo/status/availability
willPayload: offline
qos: 1
retain: 0
clean session: 1
MQTT attempts=
11
### MQTT DISCONNECTED ###
Connecting to
MQTT Broker...
MQTT Last Will Params: 
willTopic: ratgdo/status/availability
willPayload: offline
qos: 1
retain: 0
clean session: 1
MQTT attempts=
12
### MQTT DISCONNECTED ###
Connecting to
MQTT Broker...
MQTT Last Will Params: 
willTopic: ratgdo/status/availability
willPayload: offline
qos: 1
retain: 0
clean session: 1
MQTT attempts=
13
### MQTT DISCONNECTED ###
Connecting to
MQTT Broker...
MQTT Last Will Params: 
willTopic: ratgdo/status/availability
willPayload: offline
qos: 1
retain: 0
clean session: 1
MQTT attempts=
14
### MQTT DISCONNECTED ###
Connecting to
MQTT Broker...
MQTT Last Will Params: 
willTopic: ratgdo/status/availability
willPayload: offline
qos: 1
retain: 0
clean session: 1
MQTT attempts=
15
### MQTT DISCONNECTED ###
Connecting to
MQTT Broker...
MQTT Last Will Params: 
willTopic: ratgdo/status/availability
willPayload: offline
qos: 1
retain: 0
clean session: 1
MQTT attempts=
16
### MQTT DISCONNECTED ###
Connecting to
MQTT Broker...
MQTT Last Will Params: 
willTopic: ratgdo/status/availability
willPayload: offline
qos: 1
retain: 0
clean session: 1
MQTT attempts=
17
### MQTT DISCONNECTED ###
Connecting to
MQTT Broker...
MQTT Last Will Params: 
willTopic: ratgdo/status/availability
willPayload: offline
qos: 1
retain: 0
clean session: 1
MQTT attempts=
18
### MQTT DISCONNECTED ###
Connecting to
MQTT Broker...
MQTT Last Will Params: 
willTopic: ratgdo/status/availability
willPayload: offline
qos: 1
retain: 0
clean session: 1
MQTT attempts=
19
### MQTT DISCONNECTED ###
Connecting to
MQTT Broker...
MQTT Last Will Params: 
willTopic: ratgdo/status/availability
willPayload: offline
qos: 1
retain: 0
clean session: 1
MQTT attempts=
20
### MQTT DISCONNECTED ###
MQTT Last Will Params: 
willTopic: ratgdo/status/availability
willPayload: offline
qos: 1
retain: 0
clean session: 1
MQTT attempts=
21
### MQTT DISCONNECTED ###
MQTT Last Will Params: 
willTopic: ratgdo/status/availability
willPayload: offline
qos: 1
retain: 0
clean session: 1
MQTT attempts=
22
### MQTT DISCONNECTED ###
MQTT Last Will Params: 
willTopic: ratgdo/status/availability
willPayload: offline
qos: 1
retain: 0
clean session: 1
MQTT attempts=
23

I'm seeing similar things in MQTT:

2024-01-06 10:51:29: Client ratgdo disconnected, not authorised.
2024-01-06 10:51:30: New connection from 192.168.1.71:59909 on port 1883.
2024-01-06 10:51:30: Client ratgdo disconnected, not authorised.
2024-01-06 10:51:30: New connection from 192.168.1.71:58824 on port 1883.
2024-01-06 10:51:30: Client ratgdo disconnected, not authorised.
2024-01-06 10:51:31: New connection from 192.168.1.71:58485 on port 1883.
2024-01-06 10:51:31: Client ratgdo disconnected, not authorised.
2024-01-06 10:51:31: New connection from 192.168.1.71:58659 on port 1883.
2024-01-06 10:51:31: Client ratgdo disconnected, not authorised.
2024-01-06 10:51:32: New connection from 192.168.1.71:49194 on port 1883.
2024-01-06 10:51:32: Client ratgdo disconnected, not authorised.
2024-01-06 10:51:32: New connection from 192.168.1.71:53461 on port 1883.
2024-01-06 10:51:32: Client ratgdo disconnected, not authorised.
2024-01-06 10:51:33: New connection from 192.168.1.71:59065 on port 1883.
2024-01-06 10:51:33: Client ratgdo disconnected, not authorised.
2024-01-06 10:51:34: New connection from 192.168.1.71:53540 on port 1883.
2024-01-06 10:51:34: Client ratgdo disconnected, not authorised.

Let it be known - nothing has changed in the MQTT Configuration... so I'm not sure whats happening.

The only thought I can come up with is it got into some sort of loop thats retrying so fast the webpage wont load.

After a re-flash -> same username and same password everything is peachy again...

I wonder if we get into an authentication issue over and over again whether adding some sort of back-off ... (drop to once every 5 seconds) might help things out... I've seen other IOT devices end up in a similar type of deadlock on occasion

(Also happily awaiting the ESPHome version for security 1.0:) )