Skip to content

MhouneyLH/esphome_custom_components

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

esphome_desktronic_custom_component

Contributors Forks Stargazers Issues

📑 About the project

This is an esphome-custom-component for the desktronic-desk-controller (type of jsdrive). If you are using another desk-controller I recommend this repository and this HomeAssistant-Forum-Thread. The making of this project (learnings, the hardware-structure, questions, software, etc.) can be viewed on this HomeAssistant-Forum-Thread.

I can recommend the esphome8266 d1-mini. It has enough flash-memory and is easy to use.

(back to top)

📝 Disclaimer

I can not guarantee that it works with other desk-controllers. If you have a desk-controller from desktronic and it does not work, please open an issue. Then I will try to fix it as soon as possible.

(back to top)

💡 Usage (Example)

You can use the custom-component e. g. with HomeAssistant. Just add the following lines to your configuration.yaml.

General

external_components:
  - source:
      type: git
      url: https://github.com/MhouneyLH/esphome_custom_components
      ref: develop
    refresh: 4s
    components: [desktronic]

uart:
  - id: desk_bus
    tx_pin: 5
    rx_pin: 4
    baud_rate: 9600
  - id: remote_bus
    tx_pin: 3
    rx_pin: 1
    baud_rate: 9600

desktronic:
  id: my_desktronic
  desk_uart: desk_bus
  remote_uart: remote_bus
  height:
    name: Desk Height
  move_pin:
    number: 14
  up:
    name: Up Button
  down:
    name: Down Button
  memory1:
    name: Memory1 Button
  memory2:
    name: Memory2 Button
  memory3:
    name: Memory3 Button

Move to a specific height

switch:
  - id: move_switch
    name: ↑↓
    platform: gpio
    pin:
      number: 2
      inverted: true
    on_turn_on:
      then:
        - lambda: id(my_desktronic).move_to(80.0);

Checking if the desk is moving

binary_sensor:
  - id: is_moving_bsensor
    name: Desk is moving
    platform: template
    lambda: return id(my_desktronic).current_operation != desktronic::DESKTRONIC_OPERATION_IDLE;

HomeAssistant UI

Just add the given (by the custom-component) entities to your HomeAssistant UI:

(back to top)

🔢 Getting started for contributing

  1. Clone the repository

    git clone https://github.com/MhouneyLH/esphome_custom_components.git
  2. Install the esphome-SourceCode from the latest release.

  3. Copy the directory esphome into the directory of the cloned repository.

    cp -r directory_of_esphome_release/esphome directory_of_cloned_repo

(back to top)

👨🏻‍💼 Contributing

Contributions are always welcome! Please look at following commit-conventions, while contributing: https://www.conventionalcommits.org/en/v1.0.0/#summary 😃

  1. Fork the project.
  2. Pick or create an issue you want to work on.
  3. Create your Feature-Branch. (git checkout -b feat/best_feature)
  4. Commit your changes. (git commit -m 'feat: add some cool feature')
  5. Push to the branch. (git push origin feat/best_feature)
  6. Open a Pull-Request into the Develop-Branch.

(back to top)

About

A collection of custom components for esphome.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published