The features of this ModbusRTU-ESP8266-webui firmware are:
Implementing the Modbus RTU protocol on the NodeMCU (ESP8266) to display in webUI and publish to MQTT
A simple schematic is in the Documents folder, there are also some screenshots of the webUI on an iPhone
Registers and formats to be read can be configured in config file Modbusmap.cfg (see file for spec)
setting for the config file name, default to Modbusmap.cfg , additional file Modbusmaptest.cfg is to debug the code and is automatically loaded when bDebugMBlogic = true during compile. Additional files are included, eg. MBmapUMG96.cfg for Janitza UMG96 and MBmapSolaredge.cfg as examples.
Strings upto 64 chars in length, being 32 registers, can be read, see config file for specification.
As Modbus Strings are not clearly defined how to decode, a byteswap option is available (in telnet debug option 8 for now).
Dynamic MQ Autoconfigure for homeassistant based on registers defined in Modbusmap.cfg
When MQ is enabled, then the specified Modbus registers are send to MQTT when enabled in Modbusmap.cfg
Register values can be converted by a set factor in the config file for display in Webui and MQTT (eg. read Wh and display kWh) The value can also be negative.
Warning : Conversion of int values are rounded to int when factor is applied
Enable telnet listening (for debugging and some commands, enter h for help)
Telnet commands are eg: t = toggle relay, l = list Daytime map , d = re-read Daytimemap.cfg, m = Configure MQTT Discovery
Telnet debug commands are 1,2,3 and 8, 9 (see output of h)
a REST API (http:///api/v1/Modbus/Modbusmonitor
settings for Hostname, MQTT and NTP in the webUI
settings for Modbus baudrate, RTU slave address and read interval in the webUI
Time/day based setting to enable external relay (GPIO) to allow for day/night energy monitoring/use
Possibility to switch the relay on/off or timebased switching on/off with MQ message syntax [MQTT Top Topic]/set/[MQTT Uniqueid]/command [value] MQ value can be [relayon|relayoff|timebasedon|timebasedoff]
Initially designed to read Jantitza UMG96RM energy monitor registers and display in webUI