-
Hello there ! I try to Tasmotize Ubibot WS1 but failed, I am noob on Tasmota and I would probably need some help... Here is the device : One good thing is that it does not require to be opened to be flashed, it is delivered with an USB cable (USB<=>microUSB) wich is inside the box a serial connection, so saving & flashing it just require to connect it to a computer with the given USB cable or any other microUSB cable. By analysing the network I was able to see it was an ESPxxx (it was on the header of request it made to server)
What I did : I tried to configure Tasmota template but never succeed. Here are my problems : Any help would be welcome ! Last thing, I was able to restore the original firmware with esptoolv4.4 on command line only, the ESP Flasher did not work and it throw an error, anyway I can reflash it with Tasmota do to new tests if needed without any risk as I know now I can re-flash with original firmware and it works again. EDIT: For better understanding here is what the WS1 sensors are (6 sensors) : |
Beta Was this translation helpful? Give feedback.
Replies: 16 comments 38 replies
-
While you may see something when configuring gpio 32,33,36,37 as analog, that does not mean that you get any useful function if they are not actually connected to analog sources. Internal temperature/humidity would often be either an I2C device, or some one-wire device like DHT22, both cases needing pin configs to match. It could save a lot of guesswork with a good peek inside the box..... |
Beta Was this translation helpful? Give feedback.
-
Thanks, to be honest, at first I was really thinking that Tasmota was a making everything a lot easier, sometime I think it may be easier to rebuild all the circuit & program an ESP than configuring Tasmota for such device. You are right for the light sensor, it is where the enclosing case is open and where the light is captured. The 18&19 pin light up two LED (green/red) at the bottom right of the circuit. I will continue, but I have a lot to learn on Tasmota, but I like to learn. there are tons of things I still dont understand. |
Beta Was this translation helpful? Give feedback.
-
ps: I tried to heat, light, etc... and do everything to see change on analog inputs returning a value I found but they never changed. |
Beta Was this translation helpful? Give feedback.
-
Would be really nice to have a little program to flash ESP that will do a first analysis/diagnostic, testing different pins input/output etc... |
Beta Was this translation helpful? Give feedback.
-
Well, I will stop here for this one, it was fun, but it took unfortunately too much time, also I have a couple easier solution :
thanks @sfromis for all your good advices I still not understand why they made such complicated, the box look like over-engineered for what it is doing. I suppose that is because it is supposed to work without internet and store the datas internally (for long period)until it get internet connection back, this may explain why they need their own clock. Also it can be powered by two AA batteries ans last for monthes. Anyway I flashed it back to original firmware and it still work, seems I did not broke anything :) |
Beta Was this translation helpful? Give feedback.
-
Just in case of here is my draft I2C scnaner : To start :
NB: it could be easily extended to test all 127 adresses, it does not take that long, I may try to continu to work on this project if there is any interest on doing so...
|
Beta Was this translation helpful? Give feedback.
-
Is someone find this thread here some info, @sfromis I copied your version and embed new info to it. And some references : ESP32-D0WDQ6-V3 : Wifi + arduino SHT30 : Temp/Huminidy sensor
BDR : Probably power transistor/relay CH340C : USB to UART/Serial PCF8563 : Real time clock 6R8 : Coil A202L : maybe sensor or power/voltage regulator but strange case... ? More info :
|
Beta Was this translation helpful? Give feedback.
-
Wait wait I got a strange idea... They say that their temperature sensor range from -20 to +60 °C but the SHT30 range from -40 to 125 °C Ubibto say : https://www.ubibot.com/fr/ubibot-ws1/ SHT30 say : https://sensirion.com/products/catalog/SHT30-DIS-F/ I wonder if divided by 2 the temperatures does not become good one |
Beta Was this translation helpful? Give feedback.
-
arf.. I cant stop... I manage to talk to the realtime clock using the I2C pins I found with the scanner, it requiered me to update the library for this device PCF8563
I just needed to change the constructor that was using default pins : Initial :
Modified :
And that's work like a charm !
|
Beta Was this translation helpful? Give feedback.
-
It doesn't make any sense, but I want to finish to hack this stuff..., any idea or help would be welcome. Ho and sorry, I forgot to thank you @barbudor for your first analizies/image for the IC. Anyway, I'have got an idea that I need to confirm, there is a relay, (probably the BDR stuff), I know it is a relay because I can heard it when playing with pin 22 down & up (click), after thinking about it, I now make the assumption that it is to shut of power of a part of the IC to maintain power batterie life. This thing is made to get measurment every 10 to 30 miniutes, and it is supposed to work with two AA batterie for more than 4 monthes. For the EEPROM, it does store all measurments offline, so there is no lost even when it is not connected to internet, I dont see any other reason for those memory chips One "big" problem I got is with the One Wire external prob DS18B20, it is connected to the same USB than the power or the PC, I can figure out what it become inside the borad, It is pretty sure that it goes throught the inside UART converter but then ? |
Beta Was this translation helpful? Give feedback.
-
Some news of today 👍 Here is the I2C analyse (from 0 to 127) : SDA is on GPIO27 0x0 seems to be reserved for broadcasting 0x53 => dont know what it is I need to read thoses flash memories too. I wonder what 1KB EEPROM and 20KB Flash can be used for and also why there is those flash memory, supposely to store measure when offline ? they say they can store 300 000 measures offline (https://www.ubibot.com/fr/product/ubibot-ws1/) ? sound strange with 20KB (time, temp, humidity, voltage, light, ext temp) that's make a lot |
Beta Was this translation helpful? Give feedback.
-
Well probably last news for today : I found the press button GPIO !! it is GPIO4 : 4095 when pressed 0 otherwise I do a file logger on the ESP32 of all ADC GPIO input and plug/unplug the device from the computer, and I found the following results: I found three other functional GPIO, one seems to be the voltage sensor : When plugged : When unplugged (powered by two batteries AAA) : If I suppose average value of GPIO36 plugged is 5V, I found that unplugged the voltage is 2,58v, it is really near of last measurment by the original firmware 2,58v vs 2,77v There is something weird with the GPIO0, very low when starting plugged, then higher when unplugged and then even higher when re-plugged |
Beta Was this translation helpful? Give feedback.
-
Haha! I was able to decode interresting data from the EPROM, I found my WIFI SSID and password, so technicaly if you stole an ubibot to someone you will be able to hack is WIFI ^^ |
Beta Was this translation helpful? Give feedback.
-
Just a note about the voltage sensor, when plugged to USB the original firmawre give :
I can assume they correct the value for this one and my 2,58v was right if i make the same adjustment they do I got 2,81v nearly perfect ! |
Beta Was this translation helpful? Give feedback.
-
Well, I managed to dump the 16MB flash, it seems to be on the VSPI bus, my surprise is that it was empty... but this is not that surprising as when using serial tools of original firmware it report nothing too. If any interrested here is the tools and parameters I used for dumping Flash on VSPI bus : Also after electronics, I started some software retro-enginering :), I may learn some new things I still miss on this device : 1 - get some information about the 4MB flash :
EDIT: also do on the 16MB :
2 - dump 4MB flash, witch appear to be on standard SPI bus : 3 - have some read about partitioning : 4 - do first analysis using simple Hex/ASCII viewer (Notepad++) : 5 - cut the file, to keep only what is after 0x1000 adresse, and so the file start with 0xE9 magic number 6 - get some information on this partition using the new cutted file : (simply used notepad++ to cut firsts 0x1000 bytes)
Obviously, We get the same values for memory size, frequency and entry point that we read with notepad++ 7 - Found another more powerfull tools to get more information on the whole 4MB dump
We get confirmation of the firmware partition ! Note that all partition before 0x1000 are obviously empty empty Note that I needed to patch the original tools I found for the rest of this works, new tools available here : https://github.com/DzzD/esp32_image_parser 8 - once again do a simple analysis using Notepad++ in hex mode https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/system/ota.html 9 - generate ELF file for disasamble & study source code program
Looked at IDA Pro, free version cant do anything with this processor and license that may works is more then 10K€ :), a bit much... I founded an interresting NSA opensourced project that should work but it require an extension for XTensa processor : Now, let's study what this code to under the hood, I should learn some new things that may help. :) |
Beta Was this translation helpful? Give feedback.
-
cool I just discover Cutter that seems to work with an handy GUI |
Beta Was this translation helpful? Give feedback.
Is someone find this thread here some info, @sfromis I copied your version and embed new info to it.
And some references :
ESP32-D0WDQ6-V3 : Wifi + arduino
SHT30 : Temp/Huminidy sensor
BDR : Probably power transistor/relay
CH340C : USB to UART/Serial
PCF8563 : Real time clock
6R8 : Coil