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

Error E03 results in desk height 3cm reported #44

Closed gitolicious closed 1 year ago

gitolicious commented 1 year ago

First of all: general functionality is flawless with my CB38M2L(IB)-1 and HS01B-1 connected to a NodeMCU v3 module. Kudos for the work so far! 🏅

Just a small issues I came across: When going all the way down with my desk, E03 is shown in the display (not sure if that's normal, but that's what it does). The script interprets this as 3cm desk height and reports it to HomeAssistant. Probably it would be a good idea to check for E in the first digit and not update the height if it is recognized.

image

The error can be seen in this video: https://www.youtube.com/watch?v=TS27ZzjOrfk

gitolicious commented 1 year ago

A similar issue occurs when using the "Sit-Stand Reminder". The countdown of the minutes to the next reminder is interpreted as desk height. My first guess was identifying the = (top and bottom of 7-segment on) in the first digit, but as it is flashing, that is not reliable. The display readings can be seen in this video: https://www.youtube.com/watch?v=jMbdhi_SUtE

My approach would be to identify numbers <100 that don't use the decimal point. 99 is the highest reminder time which is shown as =99 or 99 whereas a desk height of 99cm will be shown as 99.0.

gitolicious commented 1 year ago

After giving it some more thoughts, I changed my original solution of detecting symbols in #45 to simply checking if the first digit is showing a valid number. This not true for all error or sit-stand displays, so these values are discarded.