Tuesday, December 24, 2019

PSF-B04 over the air flash to sonoff plus configuration

PSF-B04 appears to be the ESP8285



My photo showing 5v, ground, rx, tx, and GPIO 16 soldered to
Before soldering like I did, this post has more help with finding solder points that are easier, away from the chip- also advice to remove an unknown chip if you run into issues of the device rebooting when hitting all the relays at once.







Two relay board:
Backup original firmware:
https://notenoughtech.com/featured/is-it-worth-hacking-sonoff-basic/

Get into boot-loader:

button furthest from relays- changes latching setting of relays

middle button triggers relay closest to buttons

button closets to relay triggers relay closer to PSF module

random holding of buttons to get red LED fast blinking = wifi mode, the magic combo seems to be holding the button closest to relay down for about 7 seconds, then the next button over for about 7 seconds.

Serial method not working, either my TTL serial adapter is bad, or my soldering was bad.


Wifi method:
https://www.youtube.com/watch?v=ONFhXM5R-t4

Neither CMD or VisualStudio CMD line worked

Used Anaconda Prompt (Python)

Also command "pip3 install --user -r requirements.txt" is outdated, must use,
"py -m pip install --user -r requirements.txt"

(see this thread: https://www.reddit.com/r/learnpython/comments/a2xusa/pip3_is_not_recognized_as_an_internal_or_external/)


Then run python.exe sonota.py

SSID = ITEAD-1000705895
password = 12345678 (sonoff default).

Was getting AttributeError: 'NoneType' object has no attribute 'set_nodelay'

commented out section found here
https://github.com/mirko/SonOTA/issues/169

still seemed stuck- once got to a repeated cmd prompt output of "when download finishes, you have a few minutes to connect to final... wifi ... blah blah I rebooted the relay board and BOOM, the python script kicked in and the board flashed.  I don't think the commented out python line mentioned in the git thread fixed the issue, just lowered the 'log noise' in the prompt.

This was my 5th or so attempt, having the board in latch settings (relay stays open or closed, no delay action) might have helped per this other thread and method (but doubt this).
https://www.hagensieker.com/wordpress/2019/01/26/sonoff-rf-with-tasmota-firmware-in-homeassistant/

The device then presenting a wifi hotspot as sonoff-<four random numbers>

I did not connect to this, it went away eventually- I then found it's IP address via router

Typed in IP into we-browser and surprised to find a sonoff basic module webGUI

Fail - or so you would think - the Sonoff Basic Module is the first displayed, not the four channel - change via configuration in webGUI (makes me wonder about the actual four channel board that this brand sells- one could control two garage doors AND other features like lights).

Refer back to the blog that does the serial port wired hack on guidence
https://www.hagensieker.com/wordpress/2019/02/21/hacking-unknown-2-channel-relay-with-tasmota/



Amazon review mentions using one of the GPIOs for a reed switch to make the garage door status of being open or closed also a feature of this device (in combination of using samsung smart things, this might not be a feature easily setup in hass.io).
Per review, "Used it with my garage door opener project. Flashed it with Tasmota and found GPIO14 on the ESP chip which I use for connecting a reed switch (door sensor) too. "

No comments:

Post a Comment