iMicknl / LoctekMotion_IoT

Learn how to connect your Flexispot (LoctekMotion) desk to the internet. This repository contains a collection of scripts to get your started, combined with research and instructions.
MIT License
584 stars 59 forks source link

Strange managing #52

Open n3roGit opened 1 year ago

n3roGit commented 1 year ago

In the meantime I have successfully connected my E7 via MQTT. Unfortunately I have sometimes very strange entries in the log and as a result I can no longer control the table. it looks to me as if he sends a signal unnecessarily often and then hangs in a loop.

`INFO Reading configuration /config/Flexispot_E7_MQTT_control.yaml... INFO Starting log output from flexispot7.iot.local using esphome API INFO Successfully connected to flexispot7.iot.local [14:16:41][I][app:102]: ESPHome version 2023.2.4 compiled on Mar 10 2023, 19:04:18

[14:16:41][C][wifi:362]: Local MAC: XXX [14:16:41][C][wifi:363]: SSID: 'XXX'[redacted] [14:16:41][C][wifi:364]: IP Address: 192.168.2.210 [14:16:41][C][wifi:365]: BSSID: XXX[redacted]

[14:16:41][C][wifi:369]: Signal strength: -67 dB ▂▄▆█ [14:16:41][C][wifi:373]: Channel: 13 [14:16:41][C][wifi:374]: Subnet: 255.255.255.0 [14:16:41][C][wifi:375]: Gateway: XXX [14:16:41][C][wifi:376]: DNS1: XXX [14:16:41][C][wifi:377]: DNS2: XXX

[14:16:41][C][logger:294]: Level: DEBUG [14:16:41][C][logger:295]: Log Baud Rate: 0 [14:16:41][C][logger:296]: Hardware UART: UART0 [14:16:41][C][uart.arduino_esp8266:102]: UART Bus: [14:16:41][C][uart.arduino_esp8266:103]: TX Pin: GPIO14 [14:16:41][C][uart.arduino_esp8266:104]: RX Pin: GPIO12 [14:16:41][C][uart.arduino_esp8266:106]: RX Buffer Size: 256 [14:16:41][C][uart.arduino_esp8266:108]: Baud Rate: 9600 baud [14:16:41][C][uart.arduino_esp8266:109]: Data Bits: 8 [14:16:41][C][uart.arduino_esp8266:110]: Parity: NONE [14:16:41][C][uart.arduino_esp8266:111]: Stop bits: 1 [14:16:41][C][uart.arduino_esp8266:115]: Using software serial [14:16:41][C][uptime.sensor:031]: Uptime Sensor 'Uptime' [14:16:41][C][uptime.sensor:031]: Device Class: 'duration' [14:16:41][C][uptime.sensor:031]: State Class: '' [14:16:41][C][uptime.sensor:031]: Unit of Measurement: 's' [14:16:41][C][uptime.sensor:031]: Accuracy Decimals: 0

[14:16:41][C][switch.gpio:076]: GPIO Switch 'Virtual Screen' [14:16:41][C][switch.gpio:098]: Restore Mode: always ON [14:16:41][C][switch.gpio:031]: Pin: GPIO4 [14:16:41][C][template.cover:071]: Template Cover 'Desk' [14:16:41][C][template.cover:071]: Assumed State: YES [14:16:41][C][uart.switch:076]: UART Switch 'Preset 1'

[14:16:41][C][uart.switch:098]: Restore Mode: restore defaults to OFF [14:16:41][C][uart.switch:076]: UART Switch 'Preset 2'

[14:16:41][C][uart.switch:098]: Restore Mode: restore defaults to OFF [14:16:41][C][uart.switch:076]: UART Switch 'Sit'

[14:16:41][C][uart.switch:098]: Restore Mode: restore defaults to OFF [14:16:41][C][uart.switch:076]: UART Switch 'Stand'

[14:16:41][C][uart.switch:098]: Restore Mode: restore defaults to OFF [14:16:41][C][uart.switch:076]: UART Switch 'Up'

[14:16:41][C][uart.switch:098]: Restore Mode: restore defaults to OFF [14:16:41][C][uart.switch:076]: UART Switch 'Down'

[14:16:41][C][uart.switch:098]: Restore Mode: restore defaults to OFF [14:16:41][C][uart.switch:076]: UART Switch 'M'

[14:16:41][C][uart.switch:098]: Restore Mode: restore defaults to OFF [14:16:41][C][uart.switch:076]: UART Switch '(wake up)'

[14:16:41][C][uart.switch:098]: Restore Mode: restore defaults to OFF [14:16:41][C][captive_portal:088]: Captive Portal:

[14:16:41][C][mdns:109]: Hostname: flexispot7 [14:16:41][C][ota:093]: Over-The-Air Updates: [14:16:41][C][ota:094]: Address: flexispot7.iot.local:8266

[14:16:41][C][mqtt:066]: Server Address: XXX:1884 (XXX202) [14:16:41][C][mqtt:068]: Username: 'iot'[redacted] [14:16:41][C][mqtt:069]: Client ID: 'flexispot7-e8db84da8615'[redacted] [14:16:41][C][mqtt:074]: Topic Prefix: 'Flexispot' [14:16:41][C][mqtt:076]: Log Topic: 'Flexispot/debug'

[14:16:41][C][api:138]: API Server: [14:16:41][C][api:139]: Address: flexispot7.iot.local:6053 [14:16:41][C][api:143]: Using noise encryption: NO [14:16:41][C][wifi_signal.sensor:009]: WiFi Signal 'WiFi Signal' [14:16:41][C][wifi_signal.sensor:009]: Device Class: 'signal_strength' [14:16:41][C][wifi_signal.sensor:009]: State Class: 'measurement' [14:16:41][C][wifi_signal.sensor:009]: Unit of Measurement: 'dBm' [14:16:41][C][wifi_signal.sensor:009]: Accuracy Decimals: 0 [14:16:41][C][mqtt:609]: MQTT Message Trigger:

[14:16:41][C][mqtt:611]: QoS: 0 [14:16:41][C][mqtt.sensor:027]: MQTT Sensor 'WiFi Signal': [14:16:41][C][mqtt.sensor:031]: State Topic: 'Flexispot/sensor/wifi_signal/state' [14:16:41][C][mqtt.sensor:027]: MQTT Sensor 'Uptime': [14:16:41][C][mqtt.sensor:031]: State Topic: 'Flexispot/sensor/uptime/state' [14:16:41][C][mqtt.sensor:027]: MQTT Sensor 'Desk Height': [14:16:42][C][mqtt.sensor:031]: State Topic: 'Flexispot/sensor/desk_height/state' [14:16:42][C][mqtt.switch:041]: MQTT Switch 'Preset 1': [14:16:42][C][mqtt.switch:042]: State Topic: 'Flexispot/switch/preset_1/state' [14:16:42][C][mqtt.switch:042]: Command Topic: 'Flexispot/switch/preset_1/command' [14:16:42][C][mqtt.switch:041]: MQTT Switch 'Preset 2': [14:16:42][C][mqtt.switch:042]: State Topic: 'Flexispot/switch/preset_2/state' [14:16:42][C][mqtt.switch:042]: Command Topic: 'Flexispot/switch/preset_2/command' [14:16:42][C][mqtt.switch:041]: MQTT Switch 'Sit': [14:16:42][C][mqtt.switch:042]: State Topic: 'Flexispot/switch/sit/state' [14:16:42][C][mqtt.switch:042]: Command Topic: 'Flexispot/switch/sit/command' [14:16:42][C][mqtt.switch:041]: MQTT Switch 'Stand': [14:16:42][C][mqtt.switch:042]: State Topic: 'Flexispot/switch/stand/state' [14:16:42][C][mqtt.switch:042]: Command Topic: 'Flexispot/switch/stand/command' [14:16:42][C][mqtt.switch:041]: MQTT Switch 'M': [14:16:42][C][mqtt.switch:042]: State Topic: 'Flexispot/switch/m/state' [14:16:42][C][mqtt.switch:042]: Command Topic: 'Flexispot/switch/m/command' [14:16:42][C][mqtt.switch:041]: MQTT Switch '(wake up)': [14:16:42][C][mqtt.switch:042]: State Topic: 'Flexispot/switch/wake_up/state' [14:16:42][C][mqtt.switch:042]: Command Topic: 'Flexispot/switch/wake_up/command' [14:16:42][C][mqtt.cover:052]: MQTT cover 'Desk': [14:16:42][C][mqtt.cover:055]: State Topic: 'Flexispot/cover/desk/state' [14:16:42][C][mqtt.cover:055]: Command Topic: 'Flexispot/cover/desk/command' [14:16:42][C][mqtt:609]: MQTT Message Trigger:

[14:16:42][C][mqtt:611]: QoS: 0 [14:16:42][C][mqtt:609]: MQTT Message Trigger:

[14:16:42][C][mqtt:611]: QoS: 0 [14:16:42][C][mqtt:609]: MQTT Message Trigger:

[14:16:42][C][mqtt:611]: QoS: 0 [14:16:42][C][mqtt:609]: MQTT Message Trigger:

[14:16:42][C][mqtt:611]: QoS: 0 [14:16:42][C][mqtt:609]: MQTT Message Trigger:

[14:16:42][C][mqtt:611]: QoS: 0 [14:16:42][C][mqtt:609]: MQTT Message Trigger:

[14:16:42][C][mqtt:611]: QoS: 0 [14:16:42][C][mqtt:609]: MQTT Message Trigger:

[14:16:42][C][mqtt:611]: QoS: 0 [14:16:43][D][switch:013]: 'Sit' Turning ON. [14:16:43][D][switch:056]: 'Sit': Sending state ON [14:16:43][D][uart.switch:020]: 'Sit': Sending data... [14:16:43][D][switch:056]: 'Sit': Sending state OFF [14:16:43][D][switch:013]: '(wake up)' Turning ON. [14:16:43][D][switch:056]: '(wake up)': Sending state ON [14:16:43][D][uart.switch:020]: '(wake up)': Sending data... [14:16:43][D][switch:056]: '(wake up)': Sending state OFF [14:16:54][D][sensor:126]: 'WiFi Signal': Sending state -66.00000 dBm with 0 decimals of accuracy [14:16:54][D][switch:013]: '(wake up)' Turning ON. [14:16:55][D][switch:056]: '(wake up)': Sending state ON [14:16:55][D][uart.switch:020]: '(wake up)': Sending data... [14:16:55][D][switch:056]: '(wake up)': Sending state OFF [14:16:57][D][switch:013]: 'Stand' Turning ON. [14:16:58][D][switch:056]: 'Stand': Sending state ON [14:16:58][D][uart.switch:020]: 'Stand': Sending data... [14:16:58][D][switch:056]: 'Stand': Sending state OFF [14:16:58][D][switch:013]: '(wake up)' Turning ON. [14:16:58][D][switch:056]: '(wake up)': Sending state ON [14:16:58][D][uart.switch:020]: '(wake up)': Sending data... [14:16:58][D][switch:056]: '(wake up)': Sending state OFF [14:17:02][D][switch:013]: '(wake up)' Turning ON. [14:17:02][D][switch:056]: '(wake up)': Sending state ON [14:17:02][D][uart.switch:020]: '(wake up)': Sending data... [14:17:02][D][switch:056]: '(wake up)': Sending state OFF [14:17:05][D][switch:013]: 'Sit' Turning ON. [14:17:05][D][switch:056]: 'Sit': Sending state ON [14:17:05][D][uart.switch:020]: 'Sit': Sending data... [14:17:05][D][switch:056]: 'Sit': Sending state OFF [14:17:05][D][switch:013]: '(wake up)' Turning ON. [14:17:05][D][switch:056]: '(wake up)': Sending state ON [14:17:05][D][uart.switch:020]: '(wake up)': Sending data... [14:17:05][D][switch:056]: '(wake up)': Sending state OFF [14:17:15][D][sensor:126]: 'Desk Height': Sending state 119.00000 cm with 1 decimals of accuracy [14:17:16][D][sensor:126]: 'Desk Height': Sending state 118.00000 cm with 1 decimals of accuracy [14:17:16][D][sensor:126]: 'Desk Height': Sending state 117.00000 cm with 1 decimals of accuracy [14:17:16][D][sensor:126]: 'Desk Height': Sending state 116.00000 cm with 1 decimals of accuracy [14:17:16][D][sensor:126]: 'Desk Height': Sending state 115.00000 cm with 1 decimals of accuracy [14:17:17][D][sensor:126]: 'Desk Height': Sending state 114.00000 cm with 1 decimals of accuracy [14:17:17][D][sensor:126]: 'Desk Height': Sending state 113.00000 cm with 1 decimals of accuracy [14:17:17][D][sensor:126]: 'Desk Height': Sending state 112.00000 cm with 1 decimals of accuracy [14:17:17][D][sensor:126]: 'Desk Height': Sending state 111.00000 cm with 1 decimals of accuracy [14:17:18][D][switch:013]: 'Sit' Turning ON. [14:17:18][D][switch:056]: 'Sit': Sending state ON [14:17:18][D][uart.switch:020]: 'Sit': Sending data... [14:17:18][D][switch:056]: 'Sit': Sending state OFF [14:17:18][D][switch:013]: 'Preset 1' Turning ON. [14:17:18][D][switch:056]: 'Preset 1': Sending state ON [14:17:18][D][uart.switch:020]: 'Preset 1': Sending data... [14:17:18][D][switch:056]: 'Preset 1': Sending state OFF [14:17:18][D][switch:013]: 'Preset 2' Turning ON. [14:17:18][D][switch:056]: 'Preset 2': Sending state ON [14:17:18][D][uart.switch:020]: 'Preset 2': Sending data... [14:17:18][D][switch:056]: 'Preset 2': Sending state OFF [14:17:18][D][switch:013]: 'Sit' Turning ON. [14:17:18][D][switch:056]: 'Sit': Sending state ON [14:17:18][D][uart.switch:020]: 'Sit': Sending data... [14:17:18][D][switch:056]: 'Sit': Sending state OFF [14:17:18][D][switch:013]: 'Stand' Turning ON. [14:17:18][D][switch:056]: 'Stand': Sending state ON [14:17:18][D][uart.switch:020]: 'Stand': Sending data... [14:17:18][D][switch:056]: 'Stand': Sending state OFF [14:17:18][D][switch:013]: '(wake up)' Turning ON. [14:17:18][D][switch:056]: '(wake up)': Sending state ON [14:17:18][D][uart.switch:020]: '(wake up)': Sending data... [14:17:18][D][switch:056]: '(wake up)': Sending state OFF [14:17:18][D][cover:076]: 'Desk' - Setting [14:17:18][D][cover:086]: Command: OPEN [14:17:18][D][main:471]: Executing up command [14:17:18][D][switch:013]: 'Up' Turning ON. [14:17:18][D][switch:056]: 'Up': Sending state ON [14:17:18][D][uart.switch:020]: 'Up': Sending data... [14:17:18][D][switch:056]: 'Up': Sending state OFF [14:17:18][D][cover:170]: 'Desk' - Publishing: [14:17:18][D][cover:176]: State: OPEN [14:17:18][D][cover:186]: Current Operation: IDLE [14:17:18][W][mqtt.switch:032]: 'M': Received unknown status payload: [14:17:18][D][sensor:126]: 'Desk Height': Sending state 110.00000 cm with 1 decimals of accuracy [14:17:18][D][switch:013]: 'Preset 1' Turning ON. [14:17:18][D][switch:056]: 'Preset 1': Sending state ON [14:17:18][D][uart.switch:020]: 'Preset 1': Sending data... [14:17:18][D][switch:056]: 'Preset 1': Sending state OFF [14:17:18][D][switch:013]: 'Stand' Turning ON. [14:17:18][D][switch:056]: 'Stand': Sending state ON [14:17:18][D][uart.switch:020]: 'Stand': Sending data... [14:17:18][D][switch:056]: 'Stand': Sending state OFF [14:17:18][D][switch:013]: 'Preset 2' Turning ON. [14:17:18][D][switch:056]: 'Preset 2': Sending state ON [14:17:18][D][uart.switch:020]: 'Preset 2': Sending data... [14:17:18][D][switch:056]: 'Preset 2': Sending state OFF [14:17:18][D][switch:013]: 'M' Turning ON. [14:17:18][D][switch:056]: 'M': Sending state ON [14:17:18][D][uart.switch:020]: 'M': Sending data... [14:17:18][D][switch:056]: 'M': Sending state OFF ..... .... ... `

n3roGit commented 1 year ago

And I had to notice that the table develops a life of its own after a while when I have this content in the log. It then drives uncontrolled something up and down.

image

n3roGit commented 1 year ago

Currently i seem to have found a workaround for this. i have disabled switching up/down for now. now it seems to work. https://pastebin.com/raw/NuK16MNF

IamMattM commented 1 year ago

uncontrolled something up and down.

I have found the same bug when trying to integrate my EQ5 : up arrow followed by down arrow (or vice-vera) before feet reach min or max , will send the controller into a lockup -

https://github.com/iMicknl/LoctekMotion_IoT/issues/34#issuecomment-1564736539