Writing Modbus commands to 9600 series VFD

Are there people here who also have a one of those Aliexpress 9600 Series VFD’s?
I’m really stuggling with the manual on how to write Modbus commands to it.
I’d like to achieve the following:

  • Run command
  • Stop command
  • Set speed (Frequency in Hz)
  • Power On/Off (if possible)

Reading registers seems to be working.
The device in question: 9600D-1T-00220M 9600 SERIES 220V0.75-4.0KW GENERAL FUNCTION – NFlixin
Manual: 9600 instructions in English (simplified edition).pdf_免费高速下载|百度网盘-分享无限制

Hi!
Did you make any progress ? I will use the same inverter.
Just in case : the MODBUS Manual.
I would like to achieve the same commands and get the torque or the current.

I kinda gave up on it as I wasnt able to achieve my goal.
What I want is to control it through an ESP32 and a HA input_number so the state is saved upon a lost connection.
I was experimenting with this code, but the number: doesnt respond to the ha_sensor. This appears to be a shortcoming of the number:

number:
  - platform: modbus_controller
    modbus_controller_id: vfd
    id: speed_jog_
    name: "Speed jog"
    address: 0x1000
    register_type: holding
    value_type: U_WORD
    write_lambda: |-
      float speed_jog_ = x ;
      ESP_LOGD("main","Modbus Number incoming value =%f",x);
      payload.push_back(0x0106);  
      payload.push_back(0x1000); 
      payload.push_back(speed_jog_ * 200);
      return (speed_jog_) ;

sensor:
- platform: homeassistant
  id: ha_sensor
  entity_id: sensor.set_frequency
  on_value:
    then:
      - lambda: |-
          id(speed_jog_).publish_state((x / 100.0) * 35 + 15);

Also I found the manual extremely confusing, no idea how to write to a register. The person who wrote this manual used something like google translate, or so it seems,

So now I use a simple 0-10v driver, use the X1 and DCOM for start/stop and a relay to switch it on/of.
I prefer Modbus, but didnt get it working

I see your code, but the address does not seem to be in accordance with http://www.cnweiken.cn/upload/files/20230918/6383065618202112502908477.docx .
Address 0x1000 points to “Communication setup value”.
I used esphome and Modbus already with a boiler without any problem and without most of the time using lambda.
But that’s true that the manual is confusing sometimes.

Yes, the register isnt the correct one, but logs showed that the values werent being sent to the vfd. It probably is possible using an hardwired RS485 interface, but as I need it to be wireless I went for the analog option. Hopefully I will get it to work some day because Modbus gives you much more control over the device. I also have some airco’s that can be Modbus controlled, so I’ll benefit a lot figuring this out.

As soon as I receive it and program it, I will let you know ! Thank you !

great thanks!

This was not so obvious… But it’s done. You can go to this discussion . It is in french, but with google, you should not have any problem !
Good luck !

Sweet!
I’ll have a look and see if I can make it work for my use case. I’ll drop the code here when ready so others can use it as well.

Hi, did you make progress with the Modbus commands?
I have purchased the same VFD, and once I have it in my hands I can jump to this thread and start debugging problems if needed

Hello everyone. I also have two such inverters, which I installed in the ventilation system. I already have a home control system via Modbus (without ESP home). Therefore, I am trying to add inverters to my already working Modbus network. But I encountered a problem: The address system on the inverters has a strange format and I do not understand how to use it in configuration.yaml
I am trying to convert the addresses (2000H - 8192), but I can not do anything. Can someone show an example of commands for configuration.yaml (and without using ESP home)?

modbus: 
  - name: modbus_0
    type: serial
    method: rtu
    port: /dev/ttyUSB1
    baudrate: 9600
    stopbits: 2 
    bytesize: 8
    parity: N
    timeout: 2

    switches:
      - name: "air_cool_pump"
        slave: 98
        address: 5
        unique_id: air_cool_pump
        write_type: coil
      - name: "sauna_hiter"
        slave: 74
        address: 2
        unique_id: sauna_hiter
        write_type: coil
 #     - name: "hit_p_circ_pump"
  #      slave: 74
   #     address: 4
    #    unique_id: hit_p_circ_pump
     #   write_type: coil  
      - name: "sun_mode_boost"
        slave: 74
        address: 1
        unique_id: sun_mode_boost
        write_type: coil              
      - name: "main_water_valve_open"
        slave: 98
        address: 3
        unique_id: main_water_valve_open
        write_type: coil 
      - name: "main_water_valve_close"
        slave: 98
        address: 4
        unique_id: main_water_valve_close
        write_type: coil  
      - name: "air cooli_hit_valve_cool"
        slave: 98
        address: 1
        unique_id: air cooli_hit_valve_cool
        write_type: coil
      - name: "air cooli_hit_valve_hitt"
        slave: 98
        address: 2
        unique_id: air cooli_hit_valve_hitt
        write_type: coil    
      - name: "sauna_contactor"
        slave: 98
        address: 0
        unique_id: sauna_contactor
        write_type: coil
        scan_interval: 5
      - name: "garage_gate"
        slave: 74
        address: 0
        unique_id: garage_gate
        write_type: coil                                 

    sensors:
      - name: vent_temp_1
        unique_id: vent_temp_1
       # unit_of_measurement: °C
        slave: 107
        address: 246 
       # scale: 00.13
        offset: 0
        precision: 1
        scan_interval: 10
          
      - name: vent_temp_2
        unique_id: vent_temp_2
      #  unit_of_measurement: °C
        slave: 107
        address: 247 
      #  scale: 00.13
        offset: 0
        precision: 1
        scan_interval: 9
      
      - name: test_1
        unique_id:  test_1
        slave: 111
        address:  0x1000
        
        
        
    binary_sensors:
      - name: DI_1
        unique_id: DI_1
        slave: 74
        address: 0
        input_type: discrete_input  
      - name: DI_2
        unique_id: DI_2
        slave: 74
        address: 1
        input_type: discrete_input 
      - name: DI_3
        unique_id: DI_3
        slave: 74
        address: 2
        input_type: discrete_input  
      - name: DI_4
        unique_id: DI_4
        slave: 74
        address: 3
        input_type: discrete_input     
      - name: DI_5
        unique_id: DI_5
        slave: 74
        address: 4
        input_type: discrete_input
      - name: DI_6
        unique_id: DI_6
        slave: 74
        address: 5
        input_type: discrete_input 
      - name: DI_7
        unique_id: DI_7
        slave: 74
        address: 6
        input_type: discrete_input
      - name: DI_8
        unique_id: DI_8
        slave: 98
        address: 0
        input_type: discrete_input   
      - name: DI_9
        unique_id: DI_9
        slave: 98
        address: 1
        input_type: discrete_input
      - name: DI_10
        unique_id: DI_10     
        slave: 98
        address: 2
        input_type: discrete_input 
      - name: DI_11
        unique_id: DI_13
        slave: 98
        address: 3
        input_type: discrete_input 
      - name: pump_septik
        slave: 98
        address: 4
        unique_id: pump_septik
        input_type: discrete_input
      - name: garage_door_contact
        slave: 98
        address: 5
        unique_id: garage_door_contact
        input_type: discrete_input  
      - name: DI_14
        unique_id: DI_14
        slave: 98
        address: 6
        input_type: discrete_input          
#        scan_interval: 1         

Modbus

Is there really no one who understands Modbus coding? Please! Help me connect these inverters to my system! I am ready to pay for help, because I see that my knowledge is not enough to solve this problem. Please!

The issue is closed. I managed to set everything up and now the inverter can be controlled via Modbus.

modbus: 
  - name: modbus_0
    type: serial
    method: rtu
    port: /dev/ttyUSB1
    baudrate: 9600
    stopbits: 2 
    bytesize: 8
    parity: N
    timeout: 2

    
    switches:
                
      - name: "inverter_1_forward"
        slave: 111
        address: 8192  # 2000H 
        write_type: holding
        command_on: 1  # Forvard
        command_off: 5  # Stop

      #  (Reverse)
      - name: "inverter_1_reverse"
        slave: 111
        address: 8192  # 2000H 
        write_type: holding
        command_on: 2  # Revers
        command_off: 5  # Stop

      # Fault reset
      - name: "inverter_1_reset_fault"
        slave: 111
        address: 8192  # 2000H 
        write_type: holding
        command_on: 7  # Fault reset
        command_off: 0  # Non action

      - name: "inverter_1_status"
        unique_id: inverter_1_status
        slave: 111
        address: 12288  # 3000H 
        input_type: holding
        data_type: uint16  # 
        scan_interval: 10

      - name: "inverter_1_speed"
        unique_id: inverter_1_speed
        slave: 111
        address: 4097  # 1001H 
        input_type: holding
        data_type: uint16
        scan_interval: 5


  - platform: template
    switches:
      inverter_1_forward_control:
        friendly_name: "Inverter 1 Forward Control"
        unique_id: inverter_1_forward_control
        turn_on:
          service: switch.turn_on
          target:
            entity_id: switch.inverter_1_forward
        turn_off:
          service: switch.turn_off
          target:
            entity_id: switch.inverter_1_forward
        icon_template: mdi:arrow-right

      inverter_1_reverse_control:
        friendly_name: "Inverter 1 Reverse Control"
        unique_id: inverter_1_reverse_control
        turn_on:
          service: switch.turn_on
          target:
            entity_id: switch.inverter_1_reverse
        turn_off:
          service: switch.turn_off
          target:
            entity_id: switch.inverter_1_reverse
        icon_template: mdi:arrow-left

      inverter_1_reset_fault_control:
        friendly_name: "Inverter 1 Reset Fault"
        unique_id: inverter_1_reset_fault_control
        turn_on:
          service: switch.turn_on
          target:
            entity_id: switch.inverter_1_reset_fault
        turn_off:
          service: switch.turn_off
          target:
            entity_id: switch.inverter_1_reset_fault
        icon_template: mdi:alert-circle-check        
        

template:
  - binary_sensor:
      - name: "Inverter 1 Forward"
        state: "{{ states('sensor.inverter_1_status') | int == 1 }}"

      - name: "Inverter 1 Reverse"
        state: "{{ states('sensor.inverter_1_status') | int == 2 }}"

      - name: "Inverter 1 Stop"
        state: "{{ states('sensor.inverter_1_status') | int == 3 }}"

  - sensor:
      - name: "Inverter 1 Speed Display"
        state: "{{ states('sensor.inverter_1_speed') | int }}"
        unit_of_measurement: "Hz"
        icon: mdi:speedometer
        
input_number:
  inverter_1_frequency_control:
    name: "Inverter 1 Frequency Control"
    min: 0
    max: 55  # Max Hz
    step: 0.1
    unit_of_measurement: "Hz"
    icon: mdi:speedometer

And also automation for speed control (in the Chinese manual this function is called “Communication setup value(-10000 to 10000)(Decimal)”)).

- id: set_inverter_frequency
  alias: Set Inverter Frequency
  description: Speed via Modbus
  trigger:
  - platform: state
    entity_id: input_number.inverter_1_frequency_control
  condition: []
  action:
  - service: modbus.write_register
    data:
      hub: modbus_0
      unit: 111
      address: 4096
      value: '{{ (states(''input_number.inverter_1_frequency_control'') | float *
        100) | int }}'
  mode: single