This translates to (61) 32-bit registers or (30) 64-bit registers. The maximum Modbus frame size is 255 bytes. = Data bytes to follow (not including CRC) = Contents of register 500 and 501 respectivelyĠx42f62a06 decoded as big-endian (ABCD) float is roughly 123.08, so L1 voltage is 123.08VrmsĮxample Modbus RTU request and response for L1 RMS voltage: = Number of words to return (2 words for float value) = Function code (0x04 is read input registers) Local timestamp (for use when reading from addresses Modbus Server, is displayed below:Įxample Modbus TCP request and response for L1 RMS voltage: The map is available for viewing in the web browser or for download as a comma-separated value (CSV) file which can then be imported into any spreadsheet program. The exact Modbus map depends on the eGauge device configuration and is available on the Modbus settings screen. In the eGauge interface, navigate to Settings -> Modbus Server. Virtual registers are in the order they appear on the settings page, meaning addresses can change if virtual registers are added or deleted. The addresses used prior to v4.0 are still usable to provide backwards-compatibility, but are marked as deprecated and are not recommended to use as installation settings reconfiguration may change them. Firmware v4.0 adds additional ranges that are tied to the register ID. NOTICE: Prior to firmware v4.0, the Modbus map addresses are liable to change if the register name or contents is modified. If the Modbus Server option is not available, upgrade your firmware in Tools -> Firmware Upgrade. The Modbus server can be enabled in Settings -> Modbus Server. eGauge models with USB ports also have capability for Modbus RTU (serial via RS485) output capability, with use of the eGauge USB485 converter. To use Modbus covers in your installation, add the following to your configuration.All eGauge models with firmware v3.2 or higher have Modbus TCP output capability. If you specify an optional status_register attribute, cover states will be read from status_register instead of the register used for sending commands. These optional state values are also used for specifying values written into the register. To adjust which value represents what state, you can fine-tune the optional state attributes, likestate_open`. If your cover uses ìnput_type: holding (default) to send commands, it can also read the intermediary states. These will be matched with the value read from the status_register. Additionally, you can specify values for state_open, state_opening, state_closed, and state_closing attributes. It will enable you to write your command (e.g., to open a cover) into a coil, and read current cover status back through the register. To allow detecting intermediary states, there is an optional status_register attribute. Coil stores only two states - “0” means cover closed, and “1” implies cover open. You can control your covers either using coils or holding registers.Ĭover that uses input_type: coil is not able to determine intermediary states such as opening and closing. The modbus cover platform allows you to control covers (such as blinds, a roller shutter, or a garage door).Īt the moment, platform cover support the opening and closing of a cover. value should be in the same type as data_type Requires value to be passed in, which is the desired target temperature. If two sensors have the same unique ID, Home Assistant will raise an exception. To write a float32 datatype register use network format like 10.0 = 0x41200000 (network order float hexadecimal).Īn ID that uniquely identifies this sensor. Restart communication (Stop first if running) These services will not do any reconfiguring, but simply stop/start the modbus communication layer. The Modbus integration also provides communication stop/restart services. Array will call modbus function code 0x0F Single boolean will call modbus function code 0x05. (write_coil) A single boolean or an array of booleans. E.g., to set 0x0004 you might need to set, this depend on the byte order of your CPU Array will call modbus function code 0x10. Single value will call modbus function code 0x06. (write_register) A single value or an array of 16-bit values. Slave address (0-255), alternative to unit Slave address (0-255), alternative to slave Hub name (defaults to ‘modbus_hub’ when omitted) The Modbus integration provides two generic write services in addition to the platform-specific services. Remark: name:is required for multiple connections, because it needs to be unique. # Example configuration.yaml entry for multiple TCP connections modbus : - type : tcp host : IP_ADDRESS_1 port : 2020 name : " hub1" - type : udp host : IP_ADDRESS_2 port : 501 name : hub2
0 Comments
Leave a Reply. |