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.
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.
You can use the custom-component e. g. with HomeAssistant. Just add the following lines to your configuration.yaml
.
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
switch:
- id: move_switch
name: ↑↓
platform: gpio
pin:
number: 2
inverted: true
on_turn_on:
then:
- lambda: id(my_desktronic).move_to(80.0);
binary_sensor:
- id: is_moving_bsensor
name: Desk is moving
platform: template
lambda: return id(my_desktronic).current_operation != desktronic::DESKTRONIC_OPERATION_IDLE;
Just add the given (by the custom-component) entities to your HomeAssistant UI:
-
Clone the repository
git clone https://github.com/MhouneyLH/esphome_custom_components.git
-
Install the esphome-SourceCode from the latest release.
-
Copy the directory
esphome
into the directory of the cloned repository.cp -r directory_of_esphome_release/esphome directory_of_cloned_repo
Contributions are always welcome! Please look at following commit-conventions, while contributing: https://www.conventionalcommits.org/en/v1.0.0/#summary 😃
- Fork the project.
- Pick or create an issue you want to work on.
- Create your Feature-Branch. (
git checkout -b feat/best_feature
) - Commit your changes. (
git commit -m 'feat: add some cool feature'
) - Push to the branch. (
git push origin feat/best_feature
) - Open a Pull-Request into the Develop-Branch.