stefanbode / Sonoff-Tasmota

Provide ESP8266 based itead Sonoff with Web, MQTT and OTA firmware using Arduino IDE, enhanced with I2C options
GNU General Public License v3.0
126 stars 40 forks source link

DisplayMode command result 128 (should be 0 to 5) #180

Closed thomas-lentz closed 5 years ago

thomas-lentz commented 5 years ago

BUG DESCRIPTION

When issuing the DisplayMode command it results in 128 (should be 0 to 5)

REQUESTED INFORMATION

TO REPRODUCE

Just enter DisplayMode at console

EXPECTED BEHAVIOUR

After initial flashing or entering reset 1 I expect MQT: stat/rcsg-pool/RESULT = {"DisplayMode":1}

When changing the DisplayMode (0 to 5) I expect the DisplayMode I've chosen.

ADDITIONAL CONTEXT

Activate: #define USE_DISPLAY // Add I2C Display Support (+2k code) in my_user_config.h

before compiling

thomas-lentz commented 5 years ago

Let me add this - this also worked before without any problems...

stefanbode commented 5 years ago

Ok, first I did not make any changes in this module. Anyhow, I tried it and had to change first the Board to Generic and then define SCL and SDA pins. After this, the command displaymode was available and shows 0. I made a reset 1 and defined configuration again. All fine at my side.

thomas-lentz commented 5 years ago

Sorry, I should have given more detail... My display is working fine, of course SDA, SCL and OLED-Reset configured. The only thing which is not working is switching display modes. First thing it doesn't show the default display mode (1), when it is initialized and then you can't switch the displaymode. This is why I think, that something happened to the TASMOTA settings management in this fork. Maybe in the enums. I can check it later myself, but first I have to finish this project. Maybe it is also dependend on the display driver (mine is SD1306)

stefanbode commented 5 years ago

I have one Sd1306 here. Maybe I can give it a try. The eNums of the Display a separate handled in the drv file. So very unlikely. I will attach a display later this evening. Anyhow as I said. I already saw displaymode 0 after reset.

stefanbode commented 5 years ago

It looks like this was a bug of the TASMOTA Version I used for the build. I now upgraded to .10 version. Now on my side displaymode is 1. Anyhow it does not work. Maybe 5V was to much.