-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ULTRADEEPSLEEP - how to set #12
Comments
Just set ‚deepsleep‘ in the console or as a Mqtt command. There is no webinterface, but you can use the CONSOLE in the webinterface to do. The Status Information shows the current setting |
deepsleep in standard tasmota does not exist, could you do a pull request to author for adding it - it is very useful. Additionaly Iam interesting to use pcf8574 and disply results from Analog input or Digital on www and send values through MQTT, could you prepare some wiki with your enhancement of tasmota it is really good job, but without some description nobody will now haw to use it. |
Arendst already declined to add deepsleep, because the sonoff devices are not battery driven. Regarding the pcf8574 I currently only support the relay usage. Running it as input is not working. Will be an enhancement for the future. If you need deepsleep you can take my version here. It is almost same as the original one. Try to keep the versions in sync with 1-2 weeks of delay. |
for analog input you can now use the ads1115. Arendst added my extension two weeks ago to the standard. The PCf can only do digital IO |
Ok, I need to add according to pcf8574 to Sonoff POW 3 additional DIO for checking tank level but it is good to have see status of DIO on tasmota WWW, in your mode is it possible ? |
Digital input signals are only reported through MQTT and/or the STATUS message that you will see through TELEPERIOD. There is no reporting of the SWITCHES in the webinterface. Only if you have a SWITCH1 and a RELAY1 you can see it again through the webinterface. As mentioned currently I do not support input signals on the PCF8574. |
Do you see ? |
Hi,
DeepSleep and UltraDeepSleep support up to unlimited (deepsleep=xxx [sec]), support also 1day or more deepsleep. Just define deepsleep e.g. 1 day = 86400. (wakes up every hour for 0.4 seconds until time reached)
19:57:11 CMD: DeepSleep I set to 60 and nothing is reported and no access to www, do you have any hardware set GPIO16 to RST ? I need to use: http://espressif.com/en/products/hardware/esp-wroom-02/overview
http://tinkerman.cat/hlw8012-ic-new-sonoff-pow/ else if (CMND_CURRENTLOW == command_code) { |
Let’s start from the beginning. Deepsleep 65535 is just an error if you came from normal tasmoto. I ignore this number to avoid unwanted behavior. Just send itvto something useful in seconds and it will work. If you want to sleep for a day use deepsleep just 24x60x60. I need to check if the size of the variable is big enough. Maybe 65000 is Max. All and really all changes are tagged with ‚//STB mod‘ in the code. Therefore really easy to find the addition in the language pack. The MOSFET should work, I have the same configuration. Just be aware to have a resistor between GPIO and the base of the mosfet. Otherwise the port go to low during reboot. I think an error but Arendst did not find it. Anyhow works great if the GPIO is protected with some resistor. For deepsleep support D 0 (gpio 16) must be connected through a wire with RST. The wakeup will be initiated through this GPIO and create a reboot. There are many examples at google how to do it. |
Extra post because very important : |
Let me know how long your battery last, because I assume that the eBay item mill draw much more current than required because of the usb interface. Reallylooking forward to you first measurement of current usage in deepsleep. |
Why ? I will do extra wire soldered :-) I need to know if it will measure properly - max pic I have 20 ~25 A, I do not need to use relays POW is for POW in my plan :-)
I will cut one line and add smal switch for RS/UART chip - the question is haw long it can work on 1885 battery 2400 mAh when measure will be every 15 minutes
Could you past me your solution schema of that I did not catch corectly , schema will give me some example :-) |
Regarding the "how long last a 18650 battery" is more related to how man current is drawn during deepsleep. The ESP8266 is quite optimized for battery, but the voltage regulator and for sure the USB interface in many devices draw 100x more energy because the design was never optimized on deepsleep. My battery driven devices, therefore, use a NATIVE esp8266 with a voltage regulator: HT7333-A. No USB. This go down to ESP = 10µA + HT7333-A = 8µA == > 18µA in total. (I do measure 21µA). Total idle time = 3400mAh / 21µA ~18 years. Typical uptime for my fork is 8 seconds and current is 100mA. Depending on the wakeups der day (for example 24x4 = 100) the average current through operating is: |
Measuring 30A will not work because this is not a software issue, this is a hardware design problem. The shunt-resistor will see double load maybe getting too hot. It has 0.001ohm (create 7.5W !!!! at 250V and 30A). Secondly, the voltage drop you need to calculate current will be double. You cannot just put double input voltage to the HLW8012. Take a look at the datasheet what other resistors need to be changed. |
Ok, I will see haw it will work for POW, what about MOSFET schema, do you have an example ? See on that http://tinkerman.cat/hlw8012-ic-new-sonoff-pow/#lightbox-gallery-LHSe/0/ it shows 30,94 mV as max ~20A and in pic it could be 43,75 ~30A I do not see any diferencies with POW schema only 100nf in POW and 33 nF on that schema - I guess that it not have an inpact of that measure. https://www.itead.cc/wiki/images/5/52/Sonoff_POW_Schematic.pdf PS. Do you have such datasheet for changing other elements ? |
Take this awesome tutorial to connect your MOSFET depending on the requirement in the right way. http://www.electronics-tutorials.ws/transistor/tran_7.html If you have an iPAD I also can suggest to buy iCircuit to test and prove your design before burning the house. Regarding the mV discussion. The HLW8012 can take up to 495mV. Therefore agree that this hopefully will work. Maybe the problem is on the side detecting the frequency correctly with the ESP. |
Ok, But question is: I need start deep sleep and switch off power for sensors through MOSFET during this time - according to the schema where I need to plug Vin in ESP GPIO to get switch off MOSFET Vout, and next when deep sleep will finish and will restart ESP haw to switch on MOSFET for sensors power and again and again ? https://pl.pinterest.com/pin/464785624029177998/ Haw it was prepared by you on your module ? Do not wory about fire - node will be outside house :-) The HLW standard measure will be max 10A but when is some water electrical pot and iron and something else with high power consumption on the same phase, it can peak to 20 MAX 25A (I hope not) - not often but can happened for some time When the POWs will come to me I will start tests - right now there is only theoretical discussion, I can also change shunt-resistor for better power i.e. 5W I found some. see that 👍 |
Yes right, but this is an easy build. For example, just connect your MOSFET to GPIO 12. Then define a normal RELAY1 on GPIO12 and switch it ON just once. The default configuration of TASMOTO is to retain the last status on boot. This means, when you go into deepsleep, GPIO12 will go LOW and your MOSFET is OFF. And with the reboot after deepsleep (RST and GPIO16 always connected) the GPIO12 goes high again , because this was the last state, that is also saved to FLASH. It also works, if you completely remove the ESP from power. For sure you will need an N-channel MOSFET |
OK Thanks for advice - nice idea :-) look on that: I se that interputs also are avaliable, what do you think is it possible to wake up as in AVR through external interrupt. In that example author usage the library "power.h" as well - what do you think, I do not know what GPIO on any ESP has external interputs build in, becuse deep sleep based on RTC wake up and gives reset module. In my plan I am looking such this: Module is on deep sleep mode, some external inpulse hapened (counter Gas sensor pulse measure) and wake it up and counting. Gas is not usage and after some time module is going to sleep to next waking up by the external interput. From time to time makes a report per 1h i.e. that module exists ond the world. |
Hi, Success i have 100 uA during sleep with the chip CP2104 ther is 1.2 mA but I found solution. But for the switches there is black magic for me - I do not know haw to set POWER1 POWER2 "switchTopic1" "SwitchTopic2" etc. And additionaly 2 dummy devicec RELAY0 and RELAY1 for operating for 2 topicks. |
Hi @roblad. I found an issue in the deepsleep. it was limited to 65000 seconds due to some limitation in the used types. Is fixed now. everything up to 4 billion should be fine now. |
Hi, What is diferenties betwen ultradeepsleep and deepsleep ? |
I already changed the documentation in readme.md. You just need to use deepsleep in seconds. If it is more than 1h than automatically the deepsleep is chunked in to 1h packages until total deepsleep is reached. the normal deepsleep just supports ~71 minutes in maximum, then there is a type overflow and it starts from 0 again. To stop just disconnect from power, because the remaining time is stored in RTC memory. |
Hi, You forgot about that script in your repository esp8266.flash.16m.ld it have to be created and inside given it: /* Flash Split for 16M chips / MEMORY PROVIDE ( _SPIFFS_start = 0x402FB000 ); INCLUDE "esp8266.flash.common.ld" |
done |
Hi, I set Switch1 and Switch2 and both of them show the same result 22:08:49 CMD: SwitchTopic 0 Switch1 22:09:06 MQT: stat/wemeos/REZULTAT = {"POWER":"ON"} Switch2 22:09:08 MQT: stat/wemeos/REZULTAT = {"POWER":"ON"} |
Hi
I am looking setting for deep sleep of tasmota
Thanks.
The text was updated successfully, but these errors were encountered: