-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Testers wanted] New ESPHome configuration and documentation improvements #67
Comments
Hey @iMicknl, thanks for providing this updated version of the code. The improvements look really good. First observations:
General comment: It seems like more and more devices will be potentially supported by your project, and each will have their own caveats. My HCB223A-1 seems to be a good example. Should we capture those differences in a table of sorts? |
Thanks a lot for your extensive feedback, @ThomDietrich!
The wake command does not work here as well. What do you mean with PIN20 doesn't work? PIN20 is set to
This floods the log indeed, and I need to have a better look here. It needs to be at least 0.5s, in order for the number template to be updated with the height of the desk height sensor.
Good one! Perhaps we could make the cover.stop button behave like this. I am not sure how often you want to cancel a preset command?
In theory the
Do you have any suggestions for a better name / structure? The issue here is that one is a sensor and the other one is a number entity (that is still a bit buggy). |
Oh! I didn't know that. Compare here: https://github.com/iMicknl/LoctekMotion_IoT#execute-a-command
I get that. My first thought was a delta/throttle filter but glad I tested it: Filters are only supported by sensors. One option i can think of is to disable direct updates and do the following: id: "desk_height"
on_value:
then:
- component.update: set_desk_height I've tested the solution and it works as expected.
Probably very seldom but to me it feels like this action is missing from the options offered in HA. I would expect the Stop button to stop all movements, be it preset or cover actions. Yes the cover has this function but I generally like to offer slightly redundant but purposeful options. Makes integration in e.g. automations or a Lovelace dashboard a lot easier.
I thought so as well but doesn't seem like it 🧐 Apparently this can be achieved via
Good challenge. Nope can't think of one. Let's leave as is. Not really a bug but this triggers my internal perfectionist. Any idea how to sync those two? Simple
|
BTW, ESP8266 GPIO pins are also tolerant to 5V inputs. e.g. https://www.tablix.org/~avian/blog/archives/2022/05/a_footnote_about_esp8266_5v_tolerance/ |
Interesting. So in your case you don't have PIN20 connected to your ESP + no PIN20 in your config? Thanks for your other improvements, I will give it a try and update the startpost when I am done.
Thanks, @jamesmyatt! Not sure why I had so many stability issues when using the ESP8266 with the same config. Perhaps the combination of 5V + no hardware UART causes these stability issues. Multiple users reported similar behavior with ESP8266, but I wasn't able to pin point the issue. |
Historically motivated I have it connected and configured as internal switch as per your default config. However I can confirm that the switch does not have any effect, i.e. neither Imho, let's state that PIN20 shall be connected and configure it as |
Minor additional comment: In your code some Slightly tangent but maybe relevant for docs? As I am using an ESP32-C3 my setup uses GPIO21 as TX, GPIO20 as RX. Some dev boards also don't offer all pins. I suggest to add a remark that users should check the pinout of their specific board. Suggest renames:
|
Thanks @ThomDietrich, I will make the changes. And actually hope to soon have a beta branch where everyone can easily contribute. |
Thanks @iMicknl for the rework! With the new code, ESP Home runs very stable on an ESP32 chip! So far I haven't noticed any more crashes. Good work! I still observed three features that don't quite match the expected behaviour.
|
Thanks for the feedback, @j3mu5! Great to hear that this runs stable on your ESP32.
|
Dear @iMicknl , it is an honour for me to contribute by testing and giving feedback! :)
|
My Flexispot E7 also don't update height when clicking presets |
@brumouta do you use the pin-out and config from above? |
Im using an esp8266 (lolin nodemcu), with the pins from the main branch but this new yaml.
…On Sun Oct 15, 2023, 04:31 PM GMT, Mick Vleeshouwer ***@***.***> wrote:
@brumouta <https://github.com/brumouta> do you use the pin-out and config from above?
—
Reply to this email directly, view it on GitHub <#67 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAJNJG6BX7QWZGHP5YXGLCTX7QFVTAVCNFSM6AAAAAA5OQUES2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONRTGQ2DANZSGY>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
@brumouta if you would be able to use the pin-out from this branch (if it isn't the same), would be great. It should work for your device as well. |
I meant the pin-out on the side of your desk mainly, doesn't matter much how you link it to your ESP. The original approach has multiple options for pin outs on the desk side. |
Hey @iMicknl thanks for the updated version of the code, it made it so much easier for me to implement the project at my desk. As I'm a total newbie with ESPs and HA I could assist in improving the documentation if needed, just let me know if I can help with that, by the way the reference to the ESPWebtools made the implementation a lot easier for me. The issue with the desk height not being updated when using the presets as @j3mu5 mentioned I can confirm, this also occurs on my E8 (HS13B-1) with ESP32 Dev. |
@iMicknl what's stopping the merge of v2 branch into main? Seems like it already is a big improvement, even if further improvements can come through individual discussions as we had them here |
@ThomDietrich time to finish the instructions and polish everything! 😁. & I would like to add passthrough configurations as well. |
@brumouta, it is the same as https://github.com/iMicknl/LoctekMotion_IoT?tab=readme-ov-file#hs01b-1 from the main branch. The main branch has different pinouts, and it seems this specific pin-out works on all devices. |
This version of esphome config works much better than the ones fro repo. I modified to add keypad passthrough and it seems to work really well. I used .h file and sensor snippets from repo - probably not the best way of implementing it, but works nonetheless. My desk was bought from elzap.eu with HS13B-1 controller. https://gist.github.com/l7ssha/c6d989396a560f895ee3c770815a650a |
Wait, this is one is the same as the other one based on RJ45 colours, but the pins order are inverted, now I'm more confused |
Look for this part of the code: switch:
- platform: gpio
name: Serial Control Pull-Up # "PIN20" of desk controller
pin:
number: GPIO9 # might be different for your setup
mode: OUTPUT
restore_mode: ALWAYS_ON
entity_category: config
internal: true Change the last line to |
I don't have Home Assistant, but I added an MQTT command to toggle the PIN20 switch. |
Thanks for this project. I really appreciate the work that has been done. Just as a note. I had to download the height sensor C implementation and use it with 'includes:' as the 'external_components:' entry does not work for me. (compile error) I have the same issues with the reporting of the desk height. (Two RJ45 ports that seem to report different things.) best regards |
Seems to work fine! My control box is a "CB38M3B(IB)-1". I found out my ethernet wiring is the other way around, but this might be my own fault. I only have RX/TX connected now and all looks good. If I use the original controller it also updates the esp status. Is it possible to adjust the alarm (timer)? Also I would like to change the behavior of the up and down buttons to "momentary", the same as the desk itself. Would this be possible? |
I tried this on my standing desk with the HS13A-1 controller and a second RJ45 port and it worked instantly - what took the longest was getting the ESP32 into flash mode. |
Is this the same as the version in the v2.1 branch, which looks like it's the latest? main...v2.1 |
Using my own esphome configuration, i got my Flexispot E7 stuck in |
Thanks for the repository @iMicknl, and the helpful comments from everyone to read through! I have a Flexispot E7 with the control box
Click here to expand for an image of the wiring![esp32-rj45-breadboard](https://github.com/iMicknl/LoctekMotion_IoT/assets/84284486/3e3b4ca8-0795-4e5a-bd28-1d5f2acbc363)Does work as expected:
Doesn't work as expected:
|
i solved the compile error by using an older esphome version (2023.6.5 worked for me, didnt test any newer) |
I have a Flexispot E7 Pro and built it using a NodeMCUv2 Board (ESP8266). NodeMCUv2 Mapping:
Additional Notes:
Testing:
Note:
|
With ESPHome 2024.4.0, I get the following compile error:
The desk height sensor and external_components are as in the v2.1 branch. The only significant difference is that I'm using the ESP8266 platform rather than the ESP32. I don't know if this matters. This matches the ESPHome docs (https://esphome.io/components/sensor/custom.html#step-2-registering-the-custom-sensor). Although this approach for custom integrations is marked as deprecated. In fact, I wonder if it's a problem of mixing the "custom component" and "external component" functionality. |
OK. It seems to work well when |
Yeah, think so, too. Now, on ESPHome 2024.4.1, it will not even compile with a local |
PR #83 is to revert to using the "custom component" local include logic rather than the external component. This works but is not encouraged. However, PR #84 instead implements the sensor as a proper external component and can be tested by using the yaml config from the PR with the following modification:
|
Thanks, @jamesmyatt. I will dive into this. Just returned from a long holiday, so will try to review in the coming week. 😊 |
Hello! I followed the pinout from Qu4ndo #67 (comment) The control box has two RJ45 connectors, I used one for the panel and one for the ESP instead of using a passtrough.
Obviously place the "desk_height_sensor.h" file in the same directory as the yaml. (Up/Down/Stop) - Works *note1: *note2: *extra: |
@iMickn, "load from custom component" can be ticked now too. Also, the 5V tolerance is also OK for ESP8266: I have the RJ45 cable wired directly to the corresponding pins on my ESP8266 D1 mini. |
@exico91 , this issue concerns the v2 version of the component. Can you try using the config from the v2.1 branch of the repo? You won't need a local copy of I'm also interested in the performance of the ESP32-C3, especially with the bluetooth proxy. |
Ok, I missed that. I tried the 2.1 branch and edited the source from 2.2 to 2.1 in the yaml. Component uart.switch took a long time for an operation (151 ms). 20:48:09 [W] [component:238] Components should block for at most 30 ms.` |
Unfortunately with HW Uart crashes too. I guess that the single core is not enough. Its better if I disable the bluetooth proxy but hangs with long travels. For example, since is faster in descent than climbing it will crash when I use the preset Stand but not if from Stand I use the preset Sit. |
@jamesmyatt fixed! Now the v2 branch has all the latest updates and your contributions. |
I have the same result with my wemos d1 mini. |
@N3m3515 are you using the pin-out and latest YAML from the start post? |
Would mind sharing your code? Thanks 🙏
|
I am working on improving this repository. The main goal is to make it easier to get started, by providing only two configurations and a more updated README + configuration. In order to achieve this, all feedback and contributions are welcome.
Main goal:
desk_height_sensor.h
(load from custom component)Long term:
Changes
Pin-out
In the past we have discussed multiple pin-outs, but it seems that multiple pin-outs can be supported by the same desk.
You can change the ESP32 pin-out mapping, but don't forget to change the pin number in the YAML.
My setup, no soldering required.
Configuration
office-desk-esp32.yaml
The following secrets should be part of your ESPHome config:
encryption_key
,wifi_ssid
andwifi_password
.Feedback
Any feedback and contributions are welcome! For example the work above adopted for pass through configurations.
The text was updated successfully, but these errors were encountered: