Support our Sponsors, they keep FADU free: AG Photographic The Imaging Warehouse Process Supplies RH Designs Second-hand Darkroom Supplies |
> FADU F-stop Enlarger Timer App for Android |
*** Click here for the FADU 2015/2014 Yearbooks *** |
|
Article Tools | Search this Article | Display Modes |
|
||
FADU F-STOP ENLARGER TIMER The project files for the FADU F-stop Enlarger Timer have now been moved to GitHub as that is a more appropriate place to maintain the project - but read on for an overview and release... |
||
|
#50
By
Bob
on
26th January 2021, 10:41 AM
|
Hi Ariel.
As it stands, it needs the firmware flashed onto the Sonoff device - the timer app talks to the web server built into the new firmware. However, if you can get your phone to talk to the R3 API (which I was unable to do) then you could, in theory, amend the App code in App Inventor quite easily to switch the Sonoff that way. The app code is on github - you just need to import it into AppInventor. I have not really done anything with the app for over a year (but I still use it every time I go in the darkroom) but I did hope the new R3 would work but was unable to get it to even connect to the timer app. That is quite likely my error - it may be possible, but I could not get it to work. |
#51
By
tillari
on
31st January 2021, 04:40 PM
|
Sonoff R3 OTA firmware flash
Hi Bob,
I finally could reprogram the sonoff R3 without soldering! It was not as easy as I thought, but it is possible. In fact, it’s not so difficult when you know how. But the problem was to find the right procedure, explained for dummies as I am. I’ll describe step by step, to help somebody else who want to do it. 1) I followed the steps you described in the Appendix 3 “Prepare the Arduino IDE” (there are some changes in the menu options, may be for the software version, but it was easy to find them) 2) In the Sketch menu, I selected Export compiled binaries (I don’t know if this is the exact option as I have the interface in Spanish), in order to save the .bin file. 3) As I read, you must have sonoff firmware 3.3.0 or above to flash it via OTA. Then, I followed the steps described in the sonoff manual to connect it to the Ewelink app to update to the correct firmware. My sonoff came with firmware version 3.0.0 and It was updated to 3.6.0. 4) And here the problems started, because the are a lot of tutorials to flash the firmware easily via OTA with version 3.3.0, as sonoff provides a tool to do it. But with version 3.5.0 they changed the protocol, and that tool is not longer useful. I’ll describe the steps I did well with version 3.6.0 (not the bad ones). 5) To enter in the DIY mode with version 3.6.0 you don’t need the jumper sonoff provides. You can do it by software. But previously, you have to delete the device from the Ewelink app. 6) I entered in DIY mode following the instructions given by the official documentation you can find here: https://github.com/itead/Sonoff_Devices_DIY_Tools: “1. Entering the Compatible Pairing Mode (AP) by long press the paring button for 5 seconds after power on 2. Connecting the Access Point named ITEAD-XXXXXXXX with default password 12345678 via mobile phone or PC 3. Browser visits http://10.10.7.1/ 4. Filling in the existing WiFi network SSID and password 5. Entering DIY mode successfully with specific WiFi network connected.” I could do It only once. I made a mistake with the SSID, and the only way to solved it was setting a new wifi with my phone as hotspot with this SSID. 7) When the sonoff is connected to your network, it led repeats a sequence of two short blinks. 8) From a PC connected to the same network I followed the steps described in this tutorial: https://www.youtube.com/watch?app=desktop&v=cJLJ9ddv65A It’s in Spanish but was the only tutorial I found I could understand, because most of them are for IoT programmers. They were the following: 9) I found the sonoff’s IP address. You can do it with the Fing app. In my case it wasn’t necessary because my phone was the access point, and I could check the IP address in the hotspot configuration options. In the next steps, you have to use this IP and the 8081 port. 10) I installed the RESTer Chrome extension, because you need a way to send commands to the device. 11) I set this: Method: POST URL: http://SONOFF.IP:8081 Name: Content-Type Value: application/json 12) I sent this command: Method: POST URL: http://SONOFF.IP:8081/zeroconf/info Name: Content-Type Value: application/json Body: { "deviceid": "SONOFF ID", "data": {} } I realize now that you have to put the SONOFF ID in the body! But I put the SONOFF IP and it worked ok… This command returns the device status. You will note that the "otaUnlock" value is “false” 13) I sent this command to change “otaUnlock” value to “true”: Method: POST URL: http:// SONOFF.IP:8081/zeroconf/ota_unlock Name: Content-Type Value: application/json Body: { "deviceid": " SONOFF ID ", "data": {} } 14) I sent this command again: Method: POST URL: http://SONOFF.IP:8081/zeroconf/info Name: Content-Type Value: application/json Body: { "deviceid": "SONOFF ID", "data": {} } This time the "otaUnlock" value was “true” 15) To flash the firmware, I had to startup a web server. I downloaded nginx software (http://nginx.org/en/download.html) and extracted the files in the root folder. Then I put the .bin file generated from your code in the HTML subfolder. 16) I run the nginx software as administrator, and I checked I could download the file with a browser using this URL: http://MY.IP/Filename.bin (MY.IP was my current IP address and Filename was the name of the compiled firmware file) 17) I obtained the SHA256 File Checksum for the firmware using this page: https://emn178.github.io/online-tool..._checksum.html 18) Finally, I flashed the firmware with this command: Method: POST URL: http:// SONOFF.IP:8081/zeroconf/ota_flash Name: Content-Type Value: application/json Body: { "deviceid": "", "data": { "downloadUrl": "http://MY.IP/Filename.bin", "sha256sum": "SHA256 Cheksum obtained previously" } } The first time I sent this command, sonoff’s led changed to a sequence of three short blinks, FADUTimer network didn’t appear, and de device didn’t respond to other commands. I unplugged the sonoff, waited for a minute, and plugged it again. The led returned to a two short blinks sequence and the sonoff was in the network again. I repeated the ota_flash command. This time the led went off, and FADUTime network appeared in the available networks list! The timer app is now working!!! Thanks a lot!!!!!!! By the way, do you plan to compile the app for iOS? I have an Ipad Mini that I could use instead of my phone… Thanks a lot again!!! The app is awesome, and it replaces my old bulky analogue timer. Ariel |
#52
By
Bob
on
2nd February 2021, 12:42 AM
|
Thanks a lot for the detail Ariel. I will give that a try when I get the chance - I would really like to be able to OTA the firmware as that would save a lot of issues. It may even enable me to use the API mode and dispense with the new firmware completely. I will post here if I have any luck.
Unfortunately, iOS is not an option - the development environment is App Inventor which does not have the ability to compile to iOS. Cheers, Bob. |
#53
By
tillari
on
2nd February 2021, 05:48 PM
|
Hi Bob,
If you allow me, I will write an article in my blog (https://www.lasnuevemusas.com/author/ariel/), for those Spanish speakers who want to use your app. Thanks again, Ariel |
#54
By
Bob
on
2nd February 2021, 07:07 PM
|
|
Quote:
Cheers. |
|
#55
By
tillari
on
9th February 2021, 03:52 PM
|
Finally I published an article with the instructions to configure the Sonoff via OTA:
https://www.lasnuevemusas.com/timer-...elefono-movil/ Thanks! |
#57
By
Bob
on
17th February 2021, 01:32 PM
|
I could not get my Basic R3 to connect for some reason and have ordered two new ones in case there is something wrong with it and will try again when they arrive.
I did however manage to get the timer to talk to a Mini R3 using the DIY mode API without having to reprogram the device. The snag is that using the DIY mode means the on and off signals go via the local WiFi router which adds random delays of typically between 5 and 100 milliseconds. This is probably OK for longer times over one or two seconds (100ms is just under 1/8th of a stop for a 1 second exposure) but may be too much for shorter times. But it does mean no programming required - just put the Sonoff Mini or Basic into DIY mode (and find it's IP address). I have uploaded the APK for version 1.4.1 with this feature (and a couple of other additions) to the wip repo on github with some notes in the readme.md file (https://github.com/filmanddarkroom/FADU_Timer/tree/wip). Version 1.4.1 can be downloaded and installed from the code directory of the WIP branch. When I get a Basic R3 that I can reprogram via OTA I will release a new version of the app to the Play store once I get it all working and update the manual. |
#58
By
tillari
on
18th February 2021, 11:39 AM
|
|
Quote:
|
|
#59
By
Bob
on
18th February 2021, 12:50 PM
|
Yes, though the OTA method will only require an update to the manual - the existing Sonoff lamp selection setting will work the same if OTA programmed or FTDI hardware programming. The DIY mode required a new Lamp hardware selection option to be added as the connection and switching code is different.
In version 1.4.1 I also added individual volume controls for the beeps and buzzes and it can also now switch the phone's flash LED - that may be useful for paper flashing... |
Support our Sponsors, they keep FADU free: AG Photographic The Imaging Warehouse Process Supplies RH Designs Second-hand Darkroom Supplies |
Article Tools | Search this Article |
Display Modes | |
|
|
Similar Threads | ||||
Article | Article Starter | Category | Comments | Last Post |
Wanted: Enlarger Timer | ianbarber | Sale or Wanted | 5 | 22nd August 2018 03:20 PM |
Hauck MSA 100 or Mk II enlarger timer | fotofundi | Darkroom | 0 | 26th February 2017 02:02 PM |
Enlarger timer | RussKelly | Darkroom | 0 | 14th September 2014 11:10 AM |
FS: Baeuerle enlarger timer | paulc | Sale or Wanted | 2 | 7th May 2012 06:56 PM |
Enlarger timer issues | PaulG | Darkroom | 20 | 27th November 2009 12:29 PM |