Merge pull request #2859 from proddy/dev
fix modbus md, so its compatible with docusaurus markup
@@ -3989,7 +3989,7 @@ device name,device type,product id,shortname,fullname,type [options...] \| (min/
|
||||
"UI800, BC400",thermostat,4,hc1.switchprogmode,switch program mode,enum [level\|absolute], ,true,select.thermostat_hc1_switch_program_mode,select.thermostat_hc1_switchprogmode,6,1,1,52,1
|
||||
"UI800, BC400",thermostat,4,hc1.redthreshold,reduction threshold,int8 (>=12<=22),C,true,number.thermostat_hc1_reduction_threshold,number.thermostat_hc1_redthreshold,6,1,1/2,53,1
|
||||
"UI800, BC400",thermostat,4,hc1.solarinfl,solar influence,uint8 (>=-5<=4294967295),C,true,number.thermostat_hc1_solar_influence,number.thermostat_hc1_solarinfl,6,1,1,54,1
|
||||
"UI800, BC400",thermostat,4,hc1.currsolarinfl,curent solar influence,uint8 (>=0<=25),C,false,sensor.thermostat_hc1_curent_solar_influence,sensor.thermostat_hc1_currsolarinfl,6,1,1/10,55,1
|
||||
"UI800, BC400",thermostat,4,hc1.currsolarinfl,current solar influence,uint8 (>=0<=25),C,false,sensor.thermostat_hc1_current_solar_influence,sensor.thermostat_hc1_currsolarinfl,6,1,1/10,55,1
|
||||
"UI800, BC400",thermostat,4,hc1.heatingpid,heating PID,enum [fast\|medium\|slow], ,true,select.thermostat_hc1_heating_PID,select.thermostat_hc1_heatingpid,6,1,1,56,1
|
||||
"UI800, BC400",thermostat,4,hc1.pumpopt,pump optimization,boolean, ,true,switch.thermostat_hc1_pump_optimization,switch.thermostat_hc1_pumpopt,6,1,1,57,1
|
||||
"UI800, BC400",thermostat,4,hc1.inttimefloor,integral time floor,uint8 (>=160<=320),minutes,true,number.thermostat_hc1_integral_time_floor,number.thermostat_hc1_inttimefloor,6,1,10,58,1
|
||||
@@ -4376,7 +4376,7 @@ device name,device type,product id,shortname,fullname,type [options...] \| (min/
|
||||
"RC200, CW100, CR120, CR50",thermostat,157,hc1.switchprogmode,switch program mode,enum [level\|absolute], ,true,select.thermostat_hc1_switch_program_mode,select.thermostat_hc1_switchprogmode,6,1,1,52,1
|
||||
"RC200, CW100, CR120, CR50",thermostat,157,hc1.redthreshold,reduction threshold,int8 (>=12<=22),C,true,number.thermostat_hc1_reduction_threshold,number.thermostat_hc1_redthreshold,6,1,1/2,53,1
|
||||
"RC200, CW100, CR120, CR50",thermostat,157,hc1.solarinfl,solar influence,uint8 (>=-5<=4294967295),C,true,number.thermostat_hc1_solar_influence,number.thermostat_hc1_solarinfl,6,1,1,54,1
|
||||
"RC200, CW100, CR120, CR50",thermostat,157,hc1.currsolarinfl,curent solar influence,uint8 (>=0<=25),C,false,sensor.thermostat_hc1_curent_solar_influence,sensor.thermostat_hc1_currsolarinfl,6,1,1/10,55,1
|
||||
"RC200, CW100, CR120, CR50",thermostat,157,hc1.currsolarinfl,current solar influence,uint8 (>=0<=25),C,false,sensor.thermostat_hc1_current_solar_influence,sensor.thermostat_hc1_currsolarinfl,6,1,1/10,55,1
|
||||
"RC200, CW100, CR120, CR50",thermostat,157,hc1.heatingpid,heating PID,enum [fast\|medium\|slow], ,true,select.thermostat_hc1_heating_PID,select.thermostat_hc1_heatingpid,6,1,1,56,1
|
||||
"RC200, CW100, CR120, CR50",thermostat,157,hc1.pumpopt,pump optimization,boolean, ,true,switch.thermostat_hc1_pump_optimization,switch.thermostat_hc1_pumpopt,6,1,1,57,1
|
||||
"RC200, CW100, CR120, CR50",thermostat,157,hc1.inttimefloor,integral time floor,uint8 (>=160<=320),minutes,true,number.thermostat_hc1_integral_time_floor,number.thermostat_hc1_inttimefloor,6,1,10,58,1
|
||||
@@ -4471,7 +4471,7 @@ device name,device type,product id,shortname,fullname,type [options...] \| (min/
|
||||
"RC3*0, Moduline 3000/1010H, CW400, Sense II, HPC410",thermostat,158,hc1.switchprogmode,switch program mode,enum [level\|absolute], ,true,select.thermostat_hc1_switch_program_mode,select.thermostat_hc1_switchprogmode,6,1,1,52,1
|
||||
"RC3*0, Moduline 3000/1010H, CW400, Sense II, HPC410",thermostat,158,hc1.redthreshold,reduction threshold,int8 (>=12<=22),C,true,number.thermostat_hc1_reduction_threshold,number.thermostat_hc1_redthreshold,6,1,1/2,53,1
|
||||
"RC3*0, Moduline 3000/1010H, CW400, Sense II, HPC410",thermostat,158,hc1.solarinfl,solar influence,uint8 (>=-5<=4294967295),C,true,number.thermostat_hc1_solar_influence,number.thermostat_hc1_solarinfl,6,1,1,54,1
|
||||
"RC3*0, Moduline 3000/1010H, CW400, Sense II, HPC410",thermostat,158,hc1.currsolarinfl,curent solar influence,uint8 (>=0<=25),C,false,sensor.thermostat_hc1_curent_solar_influence,sensor.thermostat_hc1_currsolarinfl,6,1,1/10,55,1
|
||||
"RC3*0, Moduline 3000/1010H, CW400, Sense II, HPC410",thermostat,158,hc1.currsolarinfl,current solar influence,uint8 (>=0<=25),C,false,sensor.thermostat_hc1_current_solar_influence,sensor.thermostat_hc1_currsolarinfl,6,1,1/10,55,1
|
||||
"RC3*0, Moduline 3000/1010H, CW400, Sense II, HPC410",thermostat,158,hc1.heatingpid,heating PID,enum [fast\|medium\|slow], ,true,select.thermostat_hc1_heating_PID,select.thermostat_hc1_heatingpid,6,1,1,56,1
|
||||
"RC3*0, Moduline 3000/1010H, CW400, Sense II, HPC410",thermostat,158,hc1.pumpopt,pump optimization,boolean, ,true,switch.thermostat_hc1_pump_optimization,switch.thermostat_hc1_pumpopt,6,1,1,57,1
|
||||
"RC3*0, Moduline 3000/1010H, CW400, Sense II, HPC410",thermostat,158,hc1.inttimefloor,integral time floor,uint8 (>=160<=320),minutes,true,number.thermostat_hc1_integral_time_floor,number.thermostat_hc1_inttimefloor,6,1,10,58,1
|
||||
@@ -4575,7 +4575,7 @@ device name,device type,product id,shortname,fullname,type [options...] \| (min/
|
||||
"Rego 2000/3000",thermostat,172,hc1.switchprogmode,switch program mode,enum [level\|absolute], ,true,select.thermostat_hc1_switch_program_mode,select.thermostat_hc1_switchprogmode,6,1,1,52,1
|
||||
"Rego 2000/3000",thermostat,172,hc1.redthreshold,reduction threshold,int8 (>=12<=22),C,true,number.thermostat_hc1_reduction_threshold,number.thermostat_hc1_redthreshold,6,1,1/2,53,1
|
||||
"Rego 2000/3000",thermostat,172,hc1.solarinfl,solar influence,uint8 (>=-5<=4294967295),C,true,number.thermostat_hc1_solar_influence,number.thermostat_hc1_solarinfl,6,1,1,54,1
|
||||
"Rego 2000/3000",thermostat,172,hc1.currsolarinfl,curent solar influence,uint8 (>=0<=25),C,false,sensor.thermostat_hc1_curent_solar_influence,sensor.thermostat_hc1_currsolarinfl,6,1,1/10,55,1
|
||||
"Rego 2000/3000",thermostat,172,hc1.currsolarinfl,current solar influence,uint8 (>=0<=25),C,false,sensor.thermostat_hc1_current_solar_influence,sensor.thermostat_hc1_currsolarinfl,6,1,1/10,55,1
|
||||
"Rego 2000/3000",thermostat,172,hc1.heatingpid,heating PID,enum [fast\|medium\|slow], ,true,select.thermostat_hc1_heating_PID,select.thermostat_hc1_heatingpid,6,1,1,56,1
|
||||
"Rego 2000/3000",thermostat,172,hc1.pumpopt,pump optimization,boolean, ,true,switch.thermostat_hc1_pump_optimization,switch.thermostat_hc1_pumpopt,6,1,1,57,1
|
||||
"Rego 2000/3000",thermostat,172,hc1.inttimefloor,integral time floor,uint8 (>=160<=320),minutes,true,number.thermostat_hc1_integral_time_floor,number.thermostat_hc1_inttimefloor,6,1,10,58,1
|
||||
@@ -4697,7 +4697,7 @@ device name,device type,product id,shortname,fullname,type [options...] \| (min/
|
||||
"Rego 3000, UI800, Logamatic BC400",thermostat,253,hc1.switchprogmode,switch program mode,enum [level\|absolute], ,true,select.thermostat_hc1_switch_program_mode,select.thermostat_hc1_switchprogmode,6,1,1,52,1
|
||||
"Rego 3000, UI800, Logamatic BC400",thermostat,253,hc1.redthreshold,reduction threshold,int8 (>=12<=22),C,true,number.thermostat_hc1_reduction_threshold,number.thermostat_hc1_redthreshold,6,1,1/2,53,1
|
||||
"Rego 3000, UI800, Logamatic BC400",thermostat,253,hc1.solarinfl,solar influence,uint8 (>=-5<=4294967295),C,true,number.thermostat_hc1_solar_influence,number.thermostat_hc1_solarinfl,6,1,1,54,1
|
||||
"Rego 3000, UI800, Logamatic BC400",thermostat,253,hc1.currsolarinfl,curent solar influence,uint8 (>=0<=25),C,false,sensor.thermostat_hc1_curent_solar_influence,sensor.thermostat_hc1_currsolarinfl,6,1,1/10,55,1
|
||||
"Rego 3000, UI800, Logamatic BC400",thermostat,253,hc1.currsolarinfl,current solar influence,uint8 (>=0<=25),C,false,sensor.thermostat_hc1_current_solar_influence,sensor.thermostat_hc1_currsolarinfl,6,1,1/10,55,1
|
||||
"Rego 3000, UI800, Logamatic BC400",thermostat,253,hc1.heatingpid,heating PID,enum [fast\|medium\|slow], ,true,select.thermostat_hc1_heating_PID,select.thermostat_hc1_heatingpid,6,1,1,56,1
|
||||
"Rego 3000, UI800, Logamatic BC400",thermostat,253,hc1.pumpopt,pump optimization,boolean, ,true,switch.thermostat_hc1_pump_optimization,switch.thermostat_hc1_pumpopt,6,1,1,57,1
|
||||
"Rego 3000, UI800, Logamatic BC400",thermostat,253,hc1.inttimefloor,integral time floor,uint8 (>=160<=320),minutes,true,number.thermostat_hc1_integral_time_floor,number.thermostat_hc1_inttimefloor,6,1,10,58,1
|
||||
@@ -5871,7 +5871,7 @@ device name,device type,product id,shortname,fullname,type [options...] \| (min/
|
||||
"SM100, MS100",water,163,dhw.disinfectiontemp,disinfection temperature,uint8 (>=0<=254),C,true,number.water_dhw_disinfection_temperature,number.water_dhw_disinfectiontemp,19,9,1,8,1
|
||||
"SM100, MS100",water,163,dhw.circ,circulation active,boolean, ,true,switch.water_dhw_circulation_active,switch.water_dhw_circ,19,9,1,9,1
|
||||
"SM100, MS100",water,163,dhw.circmode,circulation pump mode,enum [off\|1x3min\|2x3min\|3x3min\|4x3min\|5x3min\|6x3min\|continuous], ,true,select.water_dhw_circulation_pump_mode,select.water_dhw_circmode,19,9,1,10,1
|
||||
"SM100, MS100",water,163,dhw.circtc,circulation time controled,boolean, ,true,switch.water_dhw_circulation_time_controled,switch.water_dhw_circtc,19,9,1,22,1
|
||||
"SM100, MS100",water,163,dhw.circtc,circulation time controlled,boolean, ,true,switch.water_dhw_circulation_time_controlled,switch.water_dhw_circtc,19,9,1,22,1
|
||||
"SM100, MS100",water,163,dhw.keepwarm,keep warm,boolean, ,true,switch.water_dhw_keep_warm,switch.water_dhw_keepwarm,19,9,1,23,1
|
||||
"SM100, MS100",water,163,dhw.status2,status 2,enum [\|\|\|no heat\|\|\|heat request\|\|disinfecting\|hold], ,false,sensor.water_dhw_status_2,sensor.water_dhw_status2,19,9,1,24,1
|
||||
"SM100, MS100",water,163,dhw.pumpmod,pump modulation,uint8 (>=0<=100),%,false,sensor.water_dhw_pump_modulation,sensor.water_dhw_pumpmod,19,9,1,25,1
|
||||
@@ -5893,7 +5893,7 @@ device name,device type,product id,shortname,fullname,type [options...] \| (min/
|
||||
"SM200, MS200",water,164,dhw.disinfectiontemp,disinfection temperature,uint8 (>=0<=254),C,true,number.water_dhw_disinfection_temperature,number.water_dhw_disinfectiontemp,19,9,1,8,1
|
||||
"SM200, MS200",water,164,dhw.circ,circulation active,boolean, ,true,switch.water_dhw_circulation_active,switch.water_dhw_circ,19,9,1,9,1
|
||||
"SM200, MS200",water,164,dhw.circmode,circulation pump mode,enum [off\|1x3min\|2x3min\|3x3min\|4x3min\|5x3min\|6x3min\|continuous], ,true,select.water_dhw_circulation_pump_mode,select.water_dhw_circmode,19,9,1,10,1
|
||||
"SM200, MS200",water,164,dhw.circtc,circulation time controled,boolean, ,true,switch.water_dhw_circulation_time_controled,switch.water_dhw_circtc,19,9,1,22,1
|
||||
"SM200, MS200",water,164,dhw.circtc,circulation time controlled,boolean, ,true,switch.water_dhw_circulation_time_controlled,switch.water_dhw_circtc,19,9,1,22,1
|
||||
"SM200, MS200",water,164,dhw.keepwarm,keep warm,boolean, ,true,switch.water_dhw_keep_warm,switch.water_dhw_keepwarm,19,9,1,23,1
|
||||
"SM200, MS200",water,164,dhw.status2,status 2,enum [\|\|\|no heat\|\|\|heat request\|\|disinfecting\|hold], ,false,sensor.water_dhw_status_2,sensor.water_dhw_status2,19,9,1,24,1
|
||||
"SM200, MS200",water,164,dhw.pumpmod,pump modulation,uint8 (>=0<=100),%,false,sensor.water_dhw_pump_modulation,sensor.water_dhw_pumpmod,19,9,1,25,1
|
||||
|
||||
|
Can't render this file because it is too large.
|
BIN
media/PV_HA_dash.png
Normal file
|
After Width: | Height: | Size: 80 KiB |
BIN
media/codespace_start.jpg
Normal file
|
After Width: | Height: | Size: 206 KiB |
|
Before Width: | Height: | Size: 87 KiB After Width: | Height: | Size: 118 KiB |
|
Before Width: | Height: | Size: 61 KiB After Width: | Height: | Size: 118 KiB |
BIN
media/ems_dashboard.png
Normal file
|
After Width: | Height: | Size: 92 KiB |
BIN
media/grafana-dashboard.png
Normal file
|
After Width: | Height: | Size: 178 KiB |
BIN
media/ha_device.png
Normal file
|
After Width: | Height: | Size: 56 KiB |
|
Before Width: | Height: | Size: 152 KiB After Width: | Height: | Size: 194 KiB |
BIN
media/ha_notify.jpg
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
media/ha_shower.jpg
Normal file
|
After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 121 KiB After Width: | Height: | Size: 134 KiB |
BIN
media/oh_dashboard.png
Normal file
|
After Width: | Height: | Size: 82 KiB |
BIN
media/oh_ex_thermostat.png
Normal file
|
After Width: | Height: | Size: 39 KiB |
BIN
media/oh_inbox.png
Normal file
|
After Width: | Height: | Size: 8.2 KiB |
BIN
media/oh_sitemap.png
Normal file
|
After Width: | Height: | Size: 59 KiB |
BIN
media/scheduler_a.jpg
Normal file
|
After Width: | Height: | Size: 34 KiB |
BIN
media/scheduler_b.jpg
Normal file
|
After Width: | Height: | Size: 84 KiB |
BIN
media/telnet_menu.jpg
Normal file
|
After Width: | Height: | Size: 136 KiB |
BIN
media/version301.png
Normal file
|
After Width: | Height: | Size: 39 KiB |
BIN
media/version340.png
Normal file
|
After Width: | Height: | Size: 107 KiB |
BIN
media/version350.png
Normal file
|
After Width: | Height: | Size: 205 KiB |
BIN
media/version360.png
Normal file
|
After Width: | Height: | Size: 154 KiB |
BIN
media/web_conditions_1.png
Normal file
|
After Width: | Height: | Size: 34 KiB |
BIN
media/web_conditions_2.png
Normal file
|
After Width: | Height: | Size: 35 KiB |
BIN
media/web_customentities.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 130 KiB After Width: | Height: | Size: 139 KiB |
|
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 75 KiB |
|
Before Width: | Height: | Size: 94 KiB After Width: | Height: | Size: 100 KiB |
|
Before Width: | Height: | Size: 124 KiB After Width: | Height: | Size: 111 KiB |
|
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 83 KiB |
BIN
media/web_scheduler.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
media/web_scheduler_custom.png
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
media/web_scheduler_flowtemp.png
Normal file
|
After Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 28 KiB |
BIN
media/web_sensors.png
Normal file
|
After Width: | Height: | Size: 70 KiB |
|
Before Width: | Height: | Size: 71 KiB After Width: | Height: | Size: 76 KiB |
|
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 57 KiB |
BIN
media/web_users.png
Normal file
|
After Width: | Height: | Size: 84 KiB |
@@ -287,6 +287,7 @@ build_flags =
|
||||
-DEMSESP_DEFAULT_LOCALE=\"en\" -DEMSESP_DEFAULT_TX_MODE=8 -DEMSESP_DEFAULT_VERSION=\"3.8.0-dev.0\" -DEMSESP_DEFAULT_BOARD_PROFILE=\"S32\"
|
||||
|
||||
; Modbus
|
||||
; Creates the file modbus_entity_parameters.hpp
|
||||
; Creating the modbus registers is a multi-step process. Before it was in a shell script called generate_csv_and_headers.sh
|
||||
; but now moved to pio so everything is in python and cross-platform. The logic is as follows:
|
||||
; 1. create a dummy modbus_entity_parameters.hpp file so the first pass compiles
|
||||
@@ -295,15 +296,9 @@ build_flags =
|
||||
; 4. use the dump_entities.csv file with update_modbus_registers.py script to generate the modbus_entity_parameters.hpp file
|
||||
; 5. clean up everything and start again with the EMSESP_STANDALONE flag set
|
||||
; 6. run the entity_dump test command again to create the real dump_entities.csv file
|
||||
; 7. create the Modbus-Entity-Registers.md file
|
||||
; 8. create the dump_telegrams.csv file
|
||||
;
|
||||
; To run this in pio use the steps
|
||||
; To use, run:
|
||||
; pio run -e build_modbus -t clean -t build
|
||||
; pio run -e build_standalone -t clean -t build
|
||||
|
||||
# builds the modbus_entity_parameters.hpp header file
|
||||
# pio run -e build_modbus -t clean -t build
|
||||
[env:build_modbus]
|
||||
extends = env:native
|
||||
targets = build
|
||||
@@ -315,8 +310,11 @@ custom_test_command = entity_dump
|
||||
custom_output_file = dump_entities.csv
|
||||
custom_post_script = scripts/build_modbus_entity_parameters_post.py
|
||||
|
||||
; builds the real dump_entities.csv and dump_telegrams.csv files, and also the Modbus-Entity-Registers.md file
|
||||
; to be run after build_modbus with: pio run -e build_standalone -t clean -t build
|
||||
; builds the real dump_entities.csv and dump_telegrams.csv files
|
||||
; and also the Modbus-Entity-Registers.md file which is used in the emsesp.org documentation
|
||||
;
|
||||
; To use, run after build_modbus environment, with:
|
||||
; pio run -e build_standalone -t clean -t build
|
||||
[env:build_standalone]
|
||||
extends = env:native
|
||||
targets = build
|
||||
@@ -326,4 +324,3 @@ build_flags = -DEMSESP_STANDALONE
|
||||
custom_test_command = entity_dump
|
||||
custom_output_file = dump_entities.csv
|
||||
custom_post_script = scripts/build_standalone_post.py
|
||||
|
||||
|
||||
@@ -187,7 +187,6 @@ Connack
|
||||
CONNACK
|
||||
connectcb
|
||||
connectcount
|
||||
controled
|
||||
controlmode
|
||||
coolingcircuit
|
||||
coolingon
|
||||
|
||||
@@ -4,6 +4,9 @@ import sys
|
||||
import shutil
|
||||
from pathlib import Path
|
||||
|
||||
# This script is used to update the modbus_entity_parameters.hpp file with the data from the dump_entities.csv file.
|
||||
# It is used in the build_modbus target.
|
||||
|
||||
def get_python_executable():
|
||||
"""Get the appropriate Python executable for the current platform."""
|
||||
# Try different Python executable names
|
||||
|
||||
@@ -2,6 +2,9 @@ from pathlib import Path
|
||||
import os
|
||||
Import("env")
|
||||
|
||||
# This script is used to create a dummy modbus_entity_parameters.hpp so the first pass compiles.
|
||||
# It is used in the build_modbus target.
|
||||
|
||||
def create_dummy_modbus_header():
|
||||
"""Create a dummy modbus_entity_parameters.hpp so the first pass compiles."""
|
||||
header_content = '''#include "modbus.h"
|
||||
|
||||
@@ -4,6 +4,12 @@ import subprocess
|
||||
import sys
|
||||
Import("env")
|
||||
|
||||
# This script is used to build the program and run the test command.
|
||||
# It is used in the build_modbus and build_standalone targets.
|
||||
# Reads configuration from platformio.ini (output file path and test command)
|
||||
# Runs the executable with streaming input, sending it the test command and capturing output to a file
|
||||
# Optionally runs a post-processing script if defined in the configuration
|
||||
|
||||
# Import the streaming function from the separate module
|
||||
from run_executable import run_with_streaming_input
|
||||
|
||||
|
||||
@@ -9,7 +9,8 @@ from pathlib import Path
|
||||
# - Modbus-Entity-Registers.md
|
||||
# - dump_telegrams.csv
|
||||
|
||||
# Import the streaming function from the separate module
|
||||
# Modbus-Entity-Registers.md is used in the emsesp.org documentation. You can also create it manually with the generate-modbus-register-doc.py script.
|
||||
# cat ./docs/dump_entities.csv | python3 ./scripts/generate-modbus-register-doc.py # Import the streaming function from the separate module
|
||||
from run_executable import run_with_streaming_input
|
||||
|
||||
|
||||
|
||||
@@ -80,12 +80,40 @@ def group_entities_by_device_type(entities):
|
||||
def print_device_entities(device_name, device_entities):
|
||||
"""Print device entities table using f-strings for better performance."""
|
||||
print(f"### {device_name}")
|
||||
print()
|
||||
print("| shortname | fullname | type | uom | writeable | tag type | register offset | register count | scale factor |")
|
||||
print("|-|-|-|-|-|-|-|-|-|")
|
||||
|
||||
for entity in device_entities:
|
||||
tag_type = get_tag_type(entity["modbus block"])
|
||||
print(f"| {entity['shortname']} | {entity['fullname']} | {entity['type [options...] \\| (min/max)']} | "
|
||||
type_long = entity['type [options...] \\| (min/max)']
|
||||
|
||||
# Split off type and the rest efficiently
|
||||
split_type = type_long.split(" ", 1)
|
||||
type_base = split_type[0]
|
||||
type_suffix = split_type[1] if len(split_type) > 1 else ""
|
||||
|
||||
# Optimize type_rest extraction and int range detection
|
||||
type_rest_str = type_suffix
|
||||
if "int" in type_base and "(" in type_suffix:
|
||||
try:
|
||||
# Extract inner part of parentheses
|
||||
range_inner = type_suffix[type_suffix.index("(")+1:type_suffix.index(")")]
|
||||
min_value = max_value = None
|
||||
if ">=" in range_inner and "<=" in range_inner:
|
||||
# >=0<=100 style
|
||||
min_value, max_value = range_inner.replace(">=", "").split("<=")
|
||||
elif "/" in range_inner:
|
||||
min_value, max_value = range_inner.split("/")
|
||||
if min_value is not None and max_value is not None:
|
||||
type_rest_str = f"(>={min_value.strip()}<={max_value.strip()})"
|
||||
else:
|
||||
type_rest_str = ""
|
||||
except Exception:
|
||||
# fallback to original
|
||||
pass
|
||||
|
||||
print(f"| {entity['shortname']} | {entity['fullname']} | {type_base} {type_rest_str} | "
|
||||
f"{entity['uom']} | {entity['writeable']} | {tag_type} | {entity['modbus offset']} | "
|
||||
f"{entity['modbus count']} | {entity['modbus scale factor']} |")
|
||||
print()
|
||||
@@ -93,7 +121,8 @@ def print_device_entities(device_name, device_entities):
|
||||
|
||||
def print_device_type_devices(device_type, devices):
|
||||
"""Print all devices of a specific type."""
|
||||
print(f"## Devices of type *{device_type}*")
|
||||
print(f"## Devices of type \\_{device_type}")
|
||||
print()
|
||||
|
||||
# Group devices by name
|
||||
device_groups = defaultdict(list)
|
||||
@@ -106,18 +135,11 @@ def print_device_type_devices(device_type, devices):
|
||||
|
||||
def print_header():
|
||||
"""Print the markdown document header."""
|
||||
print("<!-- Use full browser width for this page, the tables are wide -->")
|
||||
print("<style>")
|
||||
print(".md-grid {")
|
||||
print(" max-width: 100%; /* or 100%, if you want to stretch to full-width */")
|
||||
print("}")
|
||||
print("</style>")
|
||||
print("# Modbus Entity/Register Mapping")
|
||||
print()
|
||||
print("# Entity/Register Mapping")
|
||||
print()
|
||||
print("!!! note")
|
||||
print()
|
||||
print(" This file has been auto-generated. Do not modify.")
|
||||
print(":::warning")
|
||||
print("This file has been auto-generated. Do not modify.")
|
||||
print(":::")
|
||||
print()
|
||||
|
||||
|
||||
|
||||
@@ -821,7 +821,7 @@ MAKE_TRANSLATION(vacations8, "vacations8", "vacation dates 8", "Urlaubstage 8",
|
||||
MAKE_TRANSLATION(absent, "absent", "absent", "Abwesend", "", "Frånvarande", "", "", "", "", "", "chýbajúci", "chybějící")
|
||||
MAKE_TRANSLATION(redthreshold, "redthreshold", "reduction threshold", "Absenkschwelle", "", "Tröskel för sänkning", "", "", "", "", "", "zníženie tresholdu", "práh snížení")
|
||||
MAKE_TRANSLATION(solarinfl, "solarinfl", "solar influence", "Solareinfluß", "", "", "", "", "", "", "", "slnečný vplyv", "sluneční vliv")
|
||||
MAKE_TRANSLATION(currsolarinfl, "currsolarinfl", "curent solar influence", "akt. Solareinfluß", "", "", "", "", "", "", "", "aktuálny slnečný vplyv", "aktuální sluneční vliv")
|
||||
MAKE_TRANSLATION(currsolarinfl, "currsolarinfl", "current solar influence", "akt. Solareinfluß", "", "", "", "", "", "", "", "aktuálny slnečný vplyv", "aktuální sluneční vliv")
|
||||
|
||||
MAKE_TRANSLATION(hpmode, "hpmode", "HP Mode", "WP-Modus", "Modus warmtepomp", "Värmepumpsläge", "tryb pracy pompy ciepła", "", "", "yüksek güç modu", "Modalità Termopompa", "Režim TČ", "režim tepelného čerpadla")
|
||||
MAKE_TRANSLATION(dewoffset, "dewoffset", "dew point offset", "Taupunktdifferenz", "Offset dauwpunt", "Daggpunktsförskjutning", "przesunięcie punktu rosy", "", "", "çiğ noktası göreli", "differenza del punto di rugiada", "posun rosného bodu", "offset rosného bodu")
|
||||
@@ -906,7 +906,7 @@ MAKE_TRANSLATION(wwTemp5, "temp5", "temperature 5", "Temperatur 5", "Temperatuur
|
||||
MAKE_TRANSLATION(wwTemp6, "temp6", "temperature 6", "Temperatur 6", "Temperatuur 6", "Temperatur 6", "temperatura 6", "temperatur 6", "température 6", "sıcaklık 6", "Temperatura 6", "teplota 6", "teplota 6")
|
||||
// MAKE_TRANSLATION(wwTemp7, "temp7", "temperature 7", "Temperatur 7", "Temperatuur 7", "Temperatur 7", "temperatura 7", "Temperatur 7", "température 7", "sıcaklık 7", "Temperatura 7", "teplota 7", "teplota 7")
|
||||
MAKE_TRANSLATION(wwPump, "pump", "pump", "Pumpe", "Pomp", "Pump", "pompa", "pumpe", "pompe", "pompa", "Pompa", "čerpadlo", "čerpadlo")
|
||||
MAKE_TRANSLATION(wwCircTc, "circtc", "circulation time controled", "zeitgesteuerte Zirkulation", "", "Tidsstyrd cirkulation", "", "", "", "", "", "riadená doba cirkulácie", "řízený čas cirkulace")
|
||||
MAKE_TRANSLATION(wwCircTc, "circtc", "circulation time controlled", "zeitgesteuerte Zirkulation", "", "Tidsstyrd cirkulation", "", "", "", "", "", "riadená doba cirkulácie", "řízený čas cirkulace")
|
||||
MAKE_TRANSLATION(errorDisp, "errordisp", "error display", "Fehleranzeige", "", "Feldisplay", "wyświetlanie błędów", "", "", "", "", "zobrazenie chyby", "zobrazení chyb")
|
||||
MAKE_TRANSLATION(deltaTRet, "deltatret", "temp. diff. return valve", "Temperaturdifferenz Rücklaufventil", "", "Temperaturskillnad returventil", "różnica temp. zaworu powrotnego", "", "", "", "", "rozdiel teplôt spätného ventilu", "rozdíl teploty zpátečního ventilu")
|
||||
|
||||
|
||||
@@ -141,7 +141,7 @@ void Water::process_SM100wwParam2(std::shared_ptr<const Telegram> telegram) {
|
||||
void Water::process_SM100wwCirc(std::shared_ptr<const Telegram> telegram) {
|
||||
has_update(telegram, wwCirc_, 0);
|
||||
has_update(telegram, wwCircMode_, 3);
|
||||
has_update(telegram, wwCircTc_, 4); // time controled on/off
|
||||
has_update(telegram, wwCircTc_, 4); // time controlled on/off
|
||||
}
|
||||
|
||||
// SM100wwKeepWarm - 0x7AE, keepWarm
|
||||
@@ -351,7 +351,7 @@ bool Water::set_wwCircMode(const char * value, const int8_t id) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// set time controled mode on/off
|
||||
// set time controlled mode on/off
|
||||
bool Water::set_wwCircTc(const char * value, const int8_t id) {
|
||||
bool b;
|
||||
if (!Helpers::value2bool(value, b)) {
|
||||
|
||||