TheChatty / SmartESPatMax

How to query multiple smart meters with minimum equipment.
MIT License
4 stars 1 forks source link

ModBr nicht einstellbar #2

Closed NFTVirus closed 1 year ago

NFTVirus commented 1 year ago

Hallo,

ich habe nach der Anleitung mit gitpod ein bulid erstellt. Meine user_config_override sieht wie folgt aus:

`/* user_config_override.h - user configuration overrides my_user_config.h for Tasmota

Copyright (C) 2021 Theo Arends

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/. */

ifndef _USER_CONFIG_OVERRIDEH

define _USER_CONFIG_OVERRIDEH

/*****\

/* Examples :

// -- Master parameter control --------------------

undef CFG_HOLDER

define CFG_HOLDER 4617 // [Reset 1] Change this value to load SECTION1 configuration parameters to flash

// -- Setup your own Wifi settings ---------------

undef STA_SSID1

define STA_SSID1 "YourSSID" // [Ssid1] Wifi SSID

undef STA_PASS1

define STA_PASS1 "YourWifiPassword" // [Password1] Wifi password

// -- Setup your own MQTT settings ---------------

undef MQTT_HOST

define MQTT_HOST "your-mqtt-server.com" // [MqttHost]

undef MQTT_PORT

define MQTT_PORT 1883 // [MqttPort] MQTT port (10123 on CloudMQTT)

undef MQTT_USER

define MQTT_USER "YourMqttUser" // [MqttUser] Optional user

undef MQTT_PASS

define MQTT_PASS "YourMqttPass" // [MqttPassword] Optional password

// You might even pass some parameters from the command line ---------------------------- // Ie: export PLATFORMIO_BUILD_FLAGS='-DUSE_CONFIG_OVERRIDE -DMY_IP="192.168.1.99" -DMY_GW="192.168.1.1" -DMY_DNS="192.168.1.1"'

ifdef MY_IP

undef WIFI_IP_ADDRESS

define WIFI_IP_ADDRESS MY_IP // Set to 0.0.0.0 for using DHCP or enter a static IP address

endif

ifdef MY_GW

undef WIFI_GATEWAY

define WIFI_GATEWAY MY_GW // if not using DHCP set Gateway IP address

endif

ifdef MY_DNS

undef WIFI_DNS

define WIFI_DNS MY_DNS // If not using DHCP set DNS IP address (might be equal to WIFI_GATEWAY)

endif

ifdef MY_DNS2

undef WIFI_DNS2

define WIFI_DNS2 MY_DNS2 // If not using DHCP set DNS IP address (might be equal to WIFI_GATEWAY)

endif

// !!! Remember that your changes GOES AT THE BOTTOM OF THIS FILE right before the last #endif !!! */

ifndef USE_SCRIPT

define USE_SCRIPT

endif

ifndef USE_SML_M

define USE_SML_M

endif

ifdef USE_RULES

undef USE_RULES

endif

ifdef USE_MODBUS_BRIDGE

undef USE_MODBUS_BRIDGE

endif

ifdef USE_MODBUS_BRIDGE_TCP

undef USE_MODBUS_BRIDGE_TCP

endif

endif // _USER_CONFIG_OVERRIDEH

`

Leider kann ich zum einstellen der Modbus Bride die Pins nicht auf ModBr stellen da die Option nicht da ist. Und in der Konsole bekomme ich Folgendes:

17:41:06.982 CMD: ModbusTCPStart 5021 17:41:06.987 RSL: RESULT = {"Command":"Unknown"}

Mache ich etwas falsch beim Kompilieren bzw in der user_config_override?

Gruß

Christian

TheChatty commented 1 year ago

Dein geschildertes Problem hat mit meinem Repo ja nicht direkt etwas zu tun, aber als erstes solltest du sicherstellen, dass du wirklich die Datei tasmota/user_config_override.h bearbeitest, dann müssen die letzten sechs Zeilen nur lauten:

#define USE_MODBUS_BRIDGE
#define USE_MODBUS_BRIDGE_TCP
NFTVirus commented 1 year ago

Danke das hat geholfen, war natürlich mein Fehler.