Giter Club home page Giter Club logo

esphome_modbus's Introduction

ESPHome Discord Chat GitHub release

ESPHome Logo

Documentation: https://esphome.io/

For issues, please go to the issue tracker.

For feature requests, please see feature requests.

This branch contains modified versions of modbus and modbus_controller which includes an option to disable sending:

modbus_controller:
  - id: myid
    address: 0x0001
    modbus_id: modbus1
    update_interval: 10s
    setup_priority: -10
    command_throttle: 0ms
    disable_send: True

The components can be used by using the external_components feature in your yaml:

external_components:
  - source:
      type: git
      url: https://github.com/pcr20/esphome
      ref: dev
    components: [ modbus, modbus_controller ]
    refresh: 2minutes

The data is retrieved by creating a sensor - use a lambda to access the data:

sensor:
  - platform: modbus_controller
    modbus_controller_id: orno_we_504
    name: alldata
    id: alldata_id
    # 0x1 : modbus device address
    # 0x3 : modbus function code (read holding)
    # 0x00 : high byte of modbus register address
    # 0x00: low byte of modbus register address
    # 0x00: high byte of total number of registers requested
    # 0x11: low byte of total number of registers requested
    custom_command: [ 0x1, 0x3, 0x00, 0x00,0x00, 0x11]
    lambda: |-
      ESP_LOGD("Modbus Sensor Lambda","s: %d %02d %02d %02d %02d",data.size(),data[0],data[1],data[2],data[3],data[4]);
      return 0;

esphome_modbus's People

Contributors

jesserockz avatar ottowinter avatar dependabot[bot] avatar oxan avatar glmnet avatar bdraco avatar ssieb avatar kbx81 avatar martgras avatar mmakaay avatar heman avatar dudanov avatar balloob avatar agners avatar clydebarrow avatar robomagus avatar ayufan avatar paulmonigatti avatar fabian-schmidt avatar carlosgs avatar nielsnl68 avatar frenck avatar senexcrenshaw avatar anonym-tsk avatar puuu avatar pcr20 avatar buxtronix avatar kahrendt avatar guillempages avatar nuttytree avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.