GithubHelp home page GithubHelp logo

reloxx13 / sonoff-tasmota-modified Goto Github PK

View Code? Open in Web Editor NEW

This project forked from arendst/tasmota

26.0 26.0 5.0 65.6 MB

Provide ESP8266 based itead Sonoff with Web, MQTT and OTA firmware using Arduino IDE

License: GNU General Public License v3.0

PHP 0.01% Python 0.49% C 43.30% Makefile 0.07% C++ 25.39% Processing 0.14% Batchfile 0.01% Shell 0.03% Objective-C 0.35% HTML 29.93% JavaScript 0.20% CSS 0.09% Elixir 0.01% XSLT 0.01% sed 0.01%
alexa echo esp8266 mod modified smarthome sonoff tasmota

sonoff-tasmota-modified's People

Contributors

andrethomas avatar andrethomas2 avatar arendst avatar arijav avatar ascillato avatar ascillato2 avatar blakadder avatar chaosmaster avatar curzon01 avatar device111 avatar eeak avatar effelle avatar emontnemery avatar gemu2015 avatar gsimon75 avatar gtortone avatar hallard avatar jason2866 avatar kueblc avatar laurentdong avatar localhost61 avatar meingraham avatar mike2nl avatar pcdiem avatar reloxx13 avatar s-hadinger avatar staars avatar stefanbode avatar teixeluis avatar tiagofreire-pt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sonoff-tasmota-modified's Issues

Sonoff-SC missing friendly name on Information page

Used tools:

  • Notepad++ v7.5.7

Used Hardware:

  • SONOFF-SC

Have you look for this feature in other issues and in the wiki?
-> Yes.

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is.
-> When you have the SOnOff-SV in use, a envoirement sensor, you will miss
the friendly name on the information web page which can be a little
irritating because when you have set the hostname different you miss it.

Describe the solution you'd like
A clear and concise description of what you want to happen.
-> I have changed a very little part in the xdrv_02_webserver.ino file
to add this information and it works perfect.

Original Code:
if (SONOFF_IFAN02 == Settings.module) { maxfn = 1; }

Changed Code:
if ((SONOFF_IFAN02 == Settings.module) || (SONOFF_SC == Settings.module)) { maxfn = 1; }

Additional context
Add any other context or screenshots about the feature request here.
... i'm willing to help with much more ...

#define MOD_VERSION_STRING "mod-1.35.3"

Have you look for this feature in other issues and in the wiki?
-> yes

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is.
-> About your comment in sonoff.ino
#define MOD_VERSION_STRING "mod-1.35.3" // Would be great to have a macro that fills this from VERSION ...

Describe the solution you'd like
A clear and concise description of what you want to happen.
-> in the xdrv_02_webserver,ino search for:
--> String func = FPSTR(HTTP_SCRIPT_INFO_BEGIN);
..
..
--> func += F(D_PROGRAM_VERSION "}2"); func += my_version;

Then add a new line:
--> func += F("}1" D_PROGRAM_VERSION "}2"); func += MOD_VERSION_STRING;

It can be done also as if:
#ifdef MOD_VERSION_STRING
func += F("}1" D_PROGRAM_VERSION "}2"); func += MOD_VERSION_STRING;
#endif

D_PROGRAM_VERSION_MOD has to be added to all the language files.
This fix is for the web page only.

When it is needed in status 0 in json format then we have to add some parts in the json creation.
For that i must search a little bit more in all the snprintf calls for json. That's then the define for
#define D_JSON_VERSION "Version" in the file i18n.h

Here a screenshot and yes i forgot the next line command and it's the idea behind it:

information mod version

And here the corrected one and the name can be like 'Modded Version' or something else:
information mod version corrected

Ideas

Hi @reloxx13

The issues tab in your Tasmota_Modified is off.

I just want to give you other ideas for your modified Tasmota version that arendst did not add to the main version:

1) Automatic set of MQTT_MAX_PACKET_SIZE (on compiling time) so there is no need of modifying another library.
EDIT: Dont work

From line 42 in original Sonoff.ino v5.12.0b:

// Max message size calculated by PubSubClient is (MQTT_MAX_PACKET_SIZE < 5 + 2 + strlen(topic) + plength)
#if (MQTT_MAX_PACKET_SIZE -TOPSZ -7) < MIN_MESSZ  // If the max message size is too small, throw an error at compile time. See PubSubClient.cpp line 359
  #error "MQTT_MAX_PACKET_SIZE is too small in libraries/PubSubClient/src/PubSubClient.h, increase it to at least 1000"
#endif

change that with:

// Max message size calculated by PubSubClient is (MQTT_MAX_PACKET_SIZE < 5 + 2 + strlen(topic) + plength)
#if (MQTT_MAX_PACKET_SIZE -TOPSZ -7) < MIN_MESSZ  // If the max message size is too small, throw a warning at compile time. See PubSubClient.cpp line 359
  #warning "MQTT_MAX_PACKET_SIZE is too small in libraries/PubSubClient/src/PubSubClient.h, increasing it to 1000"
  #undef MQTT_MAX_PACKET_SIZE
  #define MQTT_MAX_PACKET_SIZE 1000
#endif

2) Automatic order of words for Device Title (on compiling time) depending on the language chosen.

From line 101 in original webserver.ino v5.12.0b:

#ifdef LANGUAGE_MODULE_NAME
  "<div style='text-align:center;'><h3>" D_MODULE " {ha</h3><h2>{h}</h2></div>";
#else
  "<div style='text-align:center;'><h3>{ha " D_MODULE "</h3><h2>{h}</h2></div>";
#endif

change that with:

#if MY_LANGUAGE == es-AR || MY_LANGUAGE == fr-FR || MY_LANGUAGE == it-IT
  "<div style='text-align:center;'><h3>" D_MODULE " {ha</h3><h2>{h}</h2></div>";
#else
  "<div style='text-align:center;'><h3>{ha " D_MODULE "</h3><h2>{h}</h2></div>";
#endif

3) Solve Security issue: MQTT Server Password is being sent to the config web page and can be seen using chrome ShowPassword Extension.

From line 874 in original webserver.ino v5.12.0b:

page.replace(F("{m5"), (Settings.mqtt_pwd[0] == '\0')?"0":Settings.mqtt_pwd);

change that with:

page.replace(F("{m5"), "**********");

AND

From line 1062 in original webserver.ino v5.12.0b:

strlcpy(Settings.mqtt_pwd, (!strlen(tmp)) ? MQTT_PASS : (!strcmp(tmp,"0")) ? "" : tmp, sizeof(Settings.mqtt_pwd));

change that with:

strlcpy(Settings.mqtt_pwd, (!strlen(tmp)) ? "" : (strchr(tmp,'*')) ? Settings.mqtt_pwd : tmp, sizeof(Settings.mqtt_pwd));

4) Add available options for Log Level on comments.

From line 63 in original user_config.h v5.12.0b add comments:

#define SYS_LOG_LEVEL          LOG_LEVEL_NONE    // [SysLog]  LOG_LEVEL_NONE, LOG_LEVEL_ERROR, LOG_LEVEL_INFO, LOG_LEVEL_DEBUG, LOG_LEVEL_DEBUG_MORE
#define SERIAL_LOG_LEVEL       LOG_LEVEL_NONE    // [SerialLog]  LOG_LEVEL_NONE, LOG_LEVEL_ERROR, LOG_LEVEL_INFO, LOG_LEVEL_DEBUG, LOG_LEVEL_DEBUG_MORE
#define WEB_LOG_LEVEL          LOG_LEVEL_INFO    // [WebLog]  LOG_LEVEL_NONE, LOG_LEVEL_ERROR, LOG_LEVEL_INFO, LOG_LEVEL_DEBUG, LOG_LEVEL_DEBUG_MORE

Other ideas I'm working on:

1-If STA_SSID1 and STA_SSID2 are empty, and there is no SSID configuration saved on EEPROM (or coming from a config reset) the WIFI_CONFIG_TOOL change to be WIFI_MANAGER.
So, after a successful wifi setup, WIFI_CONFIG_TOOL change to the one set on user_config.h

The idea behind this is: When you flash a new Sonoff, it will ask for wifi credentials. After it connects, it can change automatically to WIFI_RETRY or WIFI_WAIT for reconnecting when losing connection.

I know that WIFI_MANAGER can be set on user_config.h, and then, with SonWEB, change it to WIFI_RETRY. But the idea is to be automatic.

Beside, if then you change your wifi credentials, you can push 4 times the button1 (at any time) and activate the WIFI_MANAGER

2-Trying to solve the Bug that when the MQTT server is down, Tasmota dont respond to button pressings.
PubSubClient Library is the one with the Lag. The author said that when MQTT is down the lag is on the wificlient library. So, the people from the esp library recommend use martin-ger/esp_mqtt that don't make that lag because it uses callbacks.
So, i'm testing if changing the library can be a solution.
EDIT: NOW SOLVED Tasmota Issue #1992

3-Adding KNX protocol support.
EDIT: NOW WORKING on Sonoff-Tasmota_KNX, when it reaches a working level I can add the driver to this one if you like.

by @ascillato

Pzem004t- V3 not working with this version

I have nodemcu, with flashed 6.5.0.9(sonoff), GPI01=pzem00xx TX(62) GPI03=PZEM004 rx (63), still unable to get voltage, current and power.

This BUG issue template is meant to REPORT Tasmota software BUGS ONLY>

BUG DESCRIPTION

A clear and concise description of what the bug is.

REQUESTED INFORMATION

Make sure these boxes are checked before submitting your issue. Thank you

FAILURE TO COMPLETE THE REQUESTED INFORMATION WILL RESULT IN YOUR ISSUE BEING CLOSED

STATUS 0 OUTPUT HERE:


  • Provide the output of console when you experience your issue if apply :
    (Please use weblog 4 for more debug information)
CONSOLE OUTPUT HERE:


TO REPRODUCE

Steps to reproduce the behavior:

EXPECTED BEHAVIOUR

A clear and concise description of what you expected to happen.

SCREENSHOTS

If applicable, add screenshots to help explain your problem.

ADDITIONAL CONTEXT

Add any other context about the problem here.

(Please, remember to close the issue when the problem has been addressed)

platformio_tasmota_env.ini contains wrong value for tasmota-lite

PROBLEM DESCRIPTION

platformio_tasmota_env.ini contains wrong value for tasmota-lite actually is:

[env:tasmota-lite]
build_flags = ${common.build_flags} -DFIRMWARE_LITE

it should be:

[env:tasmota-lite]
build_flags = ${env.build_flags} -DFIRMWARE_LITE

otherwise compiled version has wrong values in free memory and no further update will work except hardware flash

REQUESTED INFORMATION

Make sure your have performed every step and checked the applicable boxes before submitting your issue. Thank you!

  • Read the Contributing Guide and Policy and the Code of Conduct
  • Searched the problem in issues
  • Searched the problem in the docs
  • Searched the problem in the forum
  • Searched the problem in the chat
  • Device used (e.g., Sonoff Basic): _____
  • Tasmota binary firmware version number used: _____
    • Pre-compiled
    • Self-compiled
      • IDE / Compiler used: _____
  • Flashing tools used: _____
  • Provide the output of command: Backlog Template; Module; GPIO 255:
  Configuration output here:


  • If using rules, provide the output of this command: Backlog Rule1; Rule2; Rule3:
  Rules output here:


  • Provide the output of this command: Status 0:
  STATUS 0 output here:


  • Provide the output of the Console log output when you experience your issue; if applicable:
    (Please use weblog 4 for more debug information)
  Console output here:


TO REPRODUCE

Steps to reproduce the behavior:

EXPECTED BEHAVIOUR

A clear and concise description of what you expected to happen.

SCREENSHOTS

If applicable, add screenshots to help explain your problem.

ADDITIONAL CONTEXT

Add any other context about the problem here.

(Please, remember to close the issue when the problem has been addressed)

Space before text for Temp & Humi by sonoff-sc

A clear and concise description of what the bug is.

When you take a look at the table for the sensor values and text
for a SOnOff-SC envoirment module you can see a space before the
text for Temperature and Humidity. The rest of the text is ok without
a space character before the text.

Also, make sure these boxes are checked [x] before submitting your issue - Thank you!

  • [x ] Searched the problem in issues and in the wiki
    --> Yes and nothing found ;-)

  • [x ] Hardware used :
    --> SONOFF-SC with an external AM2302 T&H sensor
    Fugure 1:
    sensor external

  • [x ] Provide the output of command status 0 :
    --> NOT needed in this case

To Reproduce
Steps to reproduce the behavior:
->Open the web page for the sonoff-sc module
->Wait 3 or 4 seconds to get the first values
->Cut the network connection
->Goto Inspect the web page (CTRL+SHIFT+I)
->Open the table defines near


->Open the defines
->Take a look at Temperature and Humidity
->You can see a space char before these both text's

Expected behavior
A clear and concise description of what you expected to happen.
No speace char before these both text's

Screenshots
If applicable, add screenshots to help explain your problem.
Figure 2:
sonoff-sc table space in temp and humidity 2nd

It's not really a bug in the meaning but we can save 2 bytes ;-) for the
webserver. And in a place where every byte counts here are two more.

(Please, remember to close the issue when the problem has been addressed)

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.