arendst / Tasmota

Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
https://tasmota.github.io/docs
GNU General Public License v3.0
22.19k stars 4.81k forks source link

Anoopsyche JH-G01B1 modify S31 config #5066

Closed Lawrencezarb closed 5 years ago

Lawrencezarb commented 5 years ago

I have the same issue as per #5056. Following the instruction on that thread I tried to modify the S31 config in sonoff_template.h, but it had no effect.

I assume I am doing something wrong with the config.

Can someone point me in the right direction in what I need to change in sonoff_template.h.

The smart plug requires:

REL1 = GPIO14 Button1 = GPIO12 LED_INV - GPIO13

Lawrencezarb commented 5 years ago

Yes, but the Sonoff basic does not include energy monitoring, which the S31 does, and that part works out of the box.

andrethomas commented 5 years ago

Ah ok, then make the same changes on the S31.

  { "Sonoff S31",      // Sonoff S31 (ESP8266 - CSE7766)
     GPIO_KEY1,        // GPIO00 Button
     0,                // GPIO01 Serial RXD 4800 baud 8E1 CSE7766 energy sensor
     0,
     0,                // GPIO03 Serial TXD
     0, 0,
                       // GPIO06 (SD_CLK   Flash)
                       // GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
                       // GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
     0,                // GPIO09 (SD_DATA2 Flash QIO or ESP8285)
     0,                // GPIO10 (SD_DATA3 Flash QIO or ESP8285)
                       // GPIO11 (SD_CMD   Flash)
     GPIO_KEY1,        // GPIO12 Red Led and Relay (0 = Off, 1 = On)
     GPIO_LED1_INV,    // GPIO13 Green Led (0 = On, 1 = Off) - Link and Power status
     GPIO_REL1,        // GPIO14
     0, 0, 0
  },
Lawrencezarb commented 5 years ago

thanks got it working now

andrethomas commented 5 years ago

Awesome, well done.

andrethomas2 commented 5 years ago

Closing this issue as it will not be merged as a new template but a workaround is possible as an interim solution.

Support Information

See Wiki for more information. See Chat for more user experience.

loglux commented 5 years ago

Is it possible to get a firmware release or code that would be working on ANOOPSYCHE JH-G01B1?

andrethomas commented 5 years ago

@arendst is the only one who can answer that question... there is a lot of requests for devices to be added and each one takes a bit of ram and program space so nobody is currently sure what criteria to apply as to whether or not a PR will be accepted for these cases.

So unless otherwise decided by @arendst it would mean self compiling the firmware or making a request on discord chat for someone to compile it for you if you cannot do this yourself.

Once off compiles for these devices should be sufficient since it is unlikely that future features added to the firmware would impact on the functionality of this device.

loglux commented 5 years ago

Many thanks for the config customisation code. I have managed to compile and flash it.

blakadder commented 5 years ago

It is now added as a template

loglux commented 5 years ago

Great news! Thanks

stevel23 commented 5 years ago

Apologies if I have made a mistake here but the template does not seem to work. When I apply it, the relay and led work correctly but the main menu on the device web page does not display any energy monitoring information as it does with the S31 - is this correct and how can I access the energy info. Thanks

blakadder commented 5 years ago

Which binary are you using?

stevel23 commented 5 years ago

6.5.0(release-basic)

meingraham commented 5 years ago

You have flashed sonoff-basic.bin it appears. Flash sonoff.bin

stevel23 commented 5 years ago

HI - Same issue I'm afraid - took latest sonoff.bin from https://github.com/arendst/Sonoff-Tasmota/releases. Information page now shows 6.5.0(release-sonoff). If I select S31 I get poower information but no working relay. If I apply and activate the JH-G01B1 template from https://blakadder.github.io/templates/anoopsyche_JH-G01B1.html I get working relay but no power information.

stevel23 commented 5 years ago

Hi - Did some playing around and I think I have fixed the issue it seems that in the template GPIO1 and GPIO3 are the wrong way round - to be specific if I change GPIO1 to CSE7766 TX (145) and GPIO3 to CSE7766 RX (146) all seems to work OK. Thanks for your help

blakadder commented 5 years ago

I changed the template. Thanks for the research

cflocke commented 5 years ago

Hi - thanks a lot. These settings also worked for me for the JH-G01E Model!