LoopOnCode / UnitySensor

18 stars 4 forks source link

Cannot connect to WiFi #30

Open resisx opened 1 week ago

resisx commented 1 week ago

My unity sensor will not connect to WiFi (either my router or a test hotspot from my phone). I can connect to it via USB (ESPHome Web), or Improv via BLE.

Improv detects the device, but try to change WiFi - nada. It just asks which network to connect to and password again and again.

ESPHome Web logs record the sensor detecting my network, but if I try to change WiFi settings while connected to usb it just fails to connect:

[19:47:38][D][bh1750.sensor:159]: 'Illuminance': Got illuminance=354.3lx [19:47:38][D][sensor:094]: 'Illuminance': Sending state 354.28146 lx with 1 decimals of accuracy [19:47:38][D][binary_sensor:036]: 'Has Moving Human Target': Sending state ON [19:47:38][D][binary_sensor:036]: 'Has Still Human Target': Sending state ON [19:47:38][D][sensor:094]: 'Moving Human Distance': Sending state 30.00000 cm with 0 decimals of accuracy [19:47:38][D][sensor:094]: 'Moving Human Energy': Sending state 100.00000 % with 0 decimals of accuracy [19:47:38][D][sensor:094]: 'Still Human Distance': Sending state 30.00000 cm with 0 decimals of accuracy [19:47:38][D][sensor:094]: 'Still Human Energy': Sending state 57.00000 % with 0 decimals of accuracy [19:47:38][D][sensor:094]: 'Human Detection Distance': Sending state 0.00000 cm with 0 decimals of accuracy [19:47:38][D][light:036]: 'Light' Setting: [19:47:38][D][light:085]: Transition length: 1.0s

[19:47:38][D][light:036]: 'Light' Setting: [19:47:38][D][light:047]: State: OFF [19:47:38][D][light:085]: Transition length: 1.0s [19:47:38][W][component:237]: Component esphome.coroutine took a long time for an operation (51 ms). [19:47:38][W][component:238]: Components should block for at most 30 ms. [19:47:38][D][sensor:094]: 'Moving Human Distance': Sending state 0.00000 cm with 0 decimals of accuracy [19:47:38][D][sensor:094]: 'Moving Human Energy': Sending state 0.00000 % with 0 decimals of accuracy [19:47:38][D][sensor:094]: 'Still Human Distance': Sending state 0.00000 cm with 0 decimals of accuracy [19:47:38][D][sensor:094]: 'Still Human Energy': Sending state 0.00000 % with 0 decimals of accuracy [19:47:38][D][sensor:094]: 'Human Detection Distance': Sending state 0.00000 cm[D][number:012]: 'Human Distance Range': Sending state 6.000000 [19:47:38][D][number:012]: 'Moving Human Sensitivity Threshold': Sending state 20.000000 [19:47:38][D][number:012]: 'Still Human Sensitivity Threshold': Sending state 30.000000 [19:47:38][D][number:012]: 'Human Clear Delay': Sending state 5.000000 [19:47:38][W][component:237]: Component esphome.coroutine took a long time for an operation (149 ms). [19:47:38][W][component:238]: Components should block for at most 30 ms. [19:47:38][D][binary_sensor:036]: 'Has Moving Human Target': Sending state OFF [19:47:38][D][sensor:094]: 'Moving Human Distance': Sending state 62.00000 cm with 0 decimals of accuracy [19:47:38][D][sensor:094]: 'Still Human Distance': Sending state 62.00000 cm with 0 decimals of accuracy [19:47:38][D][sensor:094]: 'Still Human Energy': Sending state 76.00000 % with 0 decimals of accuracy [19:47:38][D][wifi:497]: Found networks: [19:47:38][D][wifi:546]: - [redacted] [redacted]▂▄▆█ [19:47:38][D][wifi:546]: - [redacted] [redacted]▂▄▆█ [19:47:38][D][wifi:546]: - [redacted] [redacted]▂▄▆█ [19:47:38][D][wifi:546]: - [redacted] [redacted]▂▄0;36m[D][wifi:546]: - [redacted] [redacted][D][wifi:546]: - [redacted] [redacted] [19:47:38][D][wifi:546]: - [redacted] [redacted]▂▄▆█ [19:47:38][D][wifi:546]: - [redacted] [redacted]�[W][wifi:551]: No matching network found!

resisx commented 1 week ago

SOLVED - added line in wifi to .yaml when unity connected to USB: output_power: 8.5

ie:

wifi: output_power: 8.5 ssid: !secret wifi_ssid password: !secret wifi_password