Thursday, 3 April 2025

Whatsapp transfer

 tldr; I messed up the transfer of messages to my new phone. However, it worked out fine.

The mistake I made; that the backup on google was up to date. It was a day old. What I'd forgotten that I'd done a lot of messaging that day. So I'd moved the SIM to the new phone, started whatsapp and accepted a restore from google. This was a few hours out of date.

Googling suggested lots of ways to now move the data including 'tough, too late'

Logically, all the messages were still on the old phone. Leaving the sim in the new phone, I removed whatsapp (didnt keep old data), then re-installed, but didn't open it. All this lost was a local database. There is still a backup on google. On the old phone I opened whatsapp and set it up with the old phone number. Then I followed the instructions here https://faq.whatsapp.com/209942271778103/?cms_platform=android which basically tell you to goto settings/chats/transfer chats ie follow the instructions for a normal transfer (which you should have done originally, muppet) You are guided from there, but in short, once the old phone is setup, open WA in new phone and accept the transfer from the old phone, scan a QR code shown on the new phone.



What didnt work. On the old phone, registered to my number (no sim) do a back up. It was over 24 hours since the last one, and it said it was working, but the backup date never changed. When restoring to the new phone, I was missing messages.


Friday, 28 February 2025

Crimping large lugs

 I ordered a cheapo lug crimper to do a 50mm2 lug. The seller turned out to be a scammer. Got my money back, but I still needed to crimp the lugs. I looked at the tool and decided that my vice would give enough force. I ordered the jaws for 3€ and made a small jig


The small bit of 0.5mm sheet steel shrinks the die a bit, as it's a 50mm lug and 1 awg cable (43mm2)

Tuesday, 25 February 2025

Generic Tuya thermometer module

direct match https://www.elektroda.com/rtvforum/topic4098816.html

Desoldered the battery to get at the programming pads.

Flashed with open beken.

No voltage regulator. Chip BK7231N is rated 2.3 to 3.6V max





{

  "vendor": "Tuya",

  "bDetailed": "0",

  "name": "Full Device Name Here",

  "model": "enter short model name here",

  "chip": "BK7231N",

  "board": "TODO",

  "flags": "1024",

  "keywords": [

    "TODO",

    "TODO",

    "TODO"

  ],

  "pins": {

    "6": "CHT83XX_SCK;1;0",

    "9": "CHT83XX_SDA;1;2",

    "16": "dInput_n;0",

    "17": "BAT_Relay;5",

    "20": "dInput;43",

    "23": "BAT_ADC;40",

    "26": "WifiLED_n;37"

  },

  "command": "// start some drivers\r\nstartDriver CHT83XX\r\nstartDriver battery\r\n\r\n// hold button 20 to get into safe mode\r\naddEventHandler OnHold 20 SafeMode\r\n\r\n// battery\r\nBattery_Setup 2350 3000\r\nBattery_Measure\r\n\r\n//cal temp sensor, temp then humi\r\nCHT_calibrate -5 19\r\n\r\n// 20s timeout to deep sleep for 600s if following events never complete\r\naddRepeatingEventID 20 -1 1337 DeepSleep 600\r\n// wait until wifi is connected\r\n//waitFor WiFiState 4\r\n// wait for MQTT to connect\r\nwaitFor MQTTState 1\r\n\r\ncancelRepeatingEvent 1337\r\n\r\n// wait 5 seconds\r\ndelay_s 2\r\n\r\npublishChannels\r\ndelay_s 5\r\n\r\n// Deep sleep (shut down everything) and reboot automatically\r\n//DeepSleep 30s\r\n//temp diff, ignore humi, sample time, fault q\r\nCHT_Alert 0.5 0 60 2\r\n//20 min sleep. should wake up if large change as above\r\nPinDeepSleep 1200",

  "image": "https://obrazki.elektroda.pl/YOUR_IMAGE.jpg",

  "wiki": "https://www.elektroda.com/rtvforum/topic_YOUR_TOPIC.html"

}

 

Monday, 24 February 2025

LSC wifi socket

Well, this would have been an easy convert from Tuya to esphome, but just as I was taking the programmed wb2s off the test rig I think it got fried. I had previously put the device in the scrap bin and replaced it with a ESP-05. However, this wouldn't play - I've had problems with all of these devices in that batch.

Aliexpress had a compatible looking ESP-02s for 1.65€ so that got my vote. Usual gp0 to 0v, reset, program with esphome.

button 14

relay 12

led 4

The pcb is marked with these numbers, even though a wb2s was fitted (wb2s IO was P26/P24/P7 respectively)

Friday, 3 January 2025

CPI update

 It's funny how decisions you make linger, when you should have bitten the bullet and just changed it.

For years I've lived with a PCB I made with a scrap of copper clad, some really old ferric chloride, some clanky software that limited the size, a inkjet and some veggy oil. It housed a 8 way 1W mux master and the corresponding 8 way IO 1W device. It worked just fine until a few years ago when 1 channel in the 8 way IO reset itself randomly. Then the mux played up. I changed that but the replacement never worked. I'd also had to patch opto couplers around spare IO on the ESP32. It was starting to look a mess



On top of that I had various UPS and regulator designs that had used a toroid which also gave a Vref to AD power meter, then a modified 12V psu to waste minimal energy whilst keeping a lion battery charged weekly.

Finally I'd had enough and bought a MCP23017. That matured for a couple of years then it got to the top of the development pile. That was straight forward. But the UPS function lacked a lot. The battery was now too old, and I could only monitor the battery current through 1W. Enter the INA3221. I'd used one for a quick and dirty UPS for the RPI and I'd found that a single 3.7V lion cell could happily sit on a cheap usb charger, and be boosted back to 5V with really very good efficiency.

Now I have a PCB that I made as a UPS and 4 way IO, but could be cut to provide the remaining 4 IO.




That's better. I also tidied up the wiring, but not that much. Krone blocks are so useful.