Skip to content
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

"unknown message 1B [...]" when trying to set height (JCB36N2CA-230) #6

Open
willdurand opened this issue Jan 9, 2025 · 0 comments

Comments

@willdurand
Copy link

Hi. I have a Jarvis desk with a JCB36N2CA-230 controller. This esphome component works for the most part with a D1 Mini and a RJ11 cable, but I am not able to use the goto_height() function. I tried the recommended config with the height number entity and another button with a lambda as suggesting in the full config.

For instance, with the following config (full config is available near the end of the issue):

[...]

button:
  - platform: template
    name: "Go to 100cm"
    on_press:
      lambda: "id(my_desk).goto_height(100);"

I get the following logs:

[16:56:23][D][button:010]: 'Go to 100cm' Pressed.
[16:56:23][V][jiecang_desk_controller:126]: unknown message 1B 02 03 E8 08 00 00 00 00 00

I am not sure what that means in practice, though. I see that the command 0x1B is the one used to send the "set height" instruction to the controller, but not sure what the 0x1B response is.

The preset commands work, and the stop command works as well. The esphome module is also able to read the min/current/max heights, and the values of each preset. The height is correctly read, and when I use the desk panel, everything looks good and in sync.

It's just the "go to height" command that does not work. ssieb/esphome_components#40 mentions some variants for decoding the height value, but that isn't the problem here.

Also, FWIW, I am using Home Assistant to control the desk via the esphome module. Thanks!

my full/latest esphome config
esphome:
  min_version: 2024.11.0
  name_add_mac_suffix: false
  name: desk-controller
  friendly_name: Desk Controller
  on_boot:
    # don't touch if you don't know what you're doing!
    priority: 0 # when mostly everything else is done
    then:
      - lambda: "id(my_desk).request_physical_limits();"
      - delay: 0.1s # give controller a chance to handle the response before sending the next command
      - lambda: "id(my_desk).request_limits();"
      - delay: 0.1s
      - lambda: "id(my_desk).request_settings();"

esp8266:
  board: d1_mini

external_components:
  - source:
      type: git
      url: https://github.com/Rocka84/esphome_components/
    components: [ jiecang_desk_controller ]

logger:
  # Get more logs to find out what's going on with `goto_height`
  level: VERBOSE

uart:
  id: uart_bus
  # Don't use UART0 because the internal usb-to-serial chip messes up everything
  tx_pin: D1
  rx_pin: D2
  baud_rate: 9600

# see full example for more options: https://github.com/Rocka84/esphome_components/blob/master/components/jiecang_desk_controller/example_full.yaml
jiecang_desk_controller:
  id: my_desk
  buttons:
    stop:
      name: "Stop"
    step_up:
      name: "Step up"
    step_down:
      name: "Step down"
    position1:
      name: "Position 1"
    position2:
      name: "Position 2"
    position3:
      name: "Position 3"
    position4:
      name: "Position 4"
  sensors:
    height:
      name: "Height"
    height_min:
      name: "Height Min"
    height_max:
      name: "Height Max"
    height_pct:
      name: "Height Percent"
    position1:
      name: "Position 1"
    position2:
      name: "Position 2"
    position3:
      name: "Position 3"
    position4:
      name: "Position 4"

# This is for testing purposes
button:
  - platform: template
    name: "Go to 100cm"
    on_press:
      lambda: "id(my_desk).goto_height(100);"

# Enable Home Assistant API
api:

# Allow Over-The-Air updates
ota:
- platform: esphome

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant