running Albohes Outdoor Switch: Cannot save to file

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
obod0002c
Normal user
Posts: 119
Joined: 10 Aug 2019, 20:31

running Albohes Outdoor Switch: Cannot save to file

#1 Post by obod0002c » 23 Sep 2019, 21:36

hi, Can one please help which firmware should be used to flash this device?
I tested all three firmwares *8285* as well as a 1M for 8266 of the Release mega-20190903.
Flashing always was successful as was connecting to setup page (192.168.4.1).
I could setup router details and connect to it.

When changing setup however a write error occurs (Tools->Advanced->NTP-> e.g.):
SaveToFile: config.dat ERROR, Cannot save to file
Sometimes with a line number, sometimes without.
Changing and saving the Rules doesn't end in an error.

It's an ESP8285.

When unplugging and restarting, the connection to my WiFi is lost and I have to restart using setup IP (192.168.4.1).

As ESP_Easy_mega-20190903_minimal_core_242_ESP8285_1M_OTA.bin is less than 600kB I'm not sure if it's really related to lack of memory.
No OTA flash but cabled to an FTDI programmer for flashing using ESP Easy Flasher under Windows 10.
  1. I flashed the blank_1MB and retried using ESP_Easy_mega-20190903_hard_core_252_other_POW_ESP8285_1M.
    Already at setup @192.168.4.1: Warning: Connected via AP + SaveToFile: config.dat ERROR, Cannot save to file
  2. I flashed the blank_1MB and retried using ESP_Easy_mega-20190903_hard_other_POW_ESP8285_1M.
    Already at setup @192.168.4.1: Warning: Connected via AP + FS: Error while reading/writing config.dat in 774
  3. I flashed the blank_1MB and retried using ESP_Easy_mega-20190903_minimal_core_242_ESP8285_1M_OTA.
    same as before.
Device: https://www.albohes.com/collections/all ... ocket-20cm
Chip:
Albohes8285.jpg
Albohes8285.jpg (37.55 KiB) Viewed 26425 times

Code: Select all

Storage
Flash Chip ID:	Vendor: 0x51 Device: 0x4014
Flash Chip Real Size:	1024 kB
Flash IDE Size:	1024 kB
Flash IDE Speed:	40 MHz
Flash IDE Mode:	DOUT
Flash Writes:	3 daily / 3 boot
Sketch Size:	704 kB (168 kB free)
SPIFFS Size:	110 kB (28 kB free)
Page size:	256
Block size:	4096
Number of blocks:	27
Maximum open files:	5
Maximum path length:	32
Thx for any help

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: running Albohes Outdoor Switch: Cannot save to file

#2 Post by grovkillen » 24 Sep 2019, 08:42

Could you try all older version? Like some month older..
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

obod0002c
Normal user
Posts: 119
Joined: 10 Aug 2019, 20:31

Re: running Albohes Outdoor Switch: Cannot save to file

#3 Post by obod0002c » 24 Sep 2019, 10:58

I can try some of the older ones, sure.

Could you please give me a hint on which firmware versions in one release I should focus? There are three (?) containing a '8285' in their names and I've got no idea what the differences could be.
Should I flash the blank firmware before every try?

If there's a message regarding 'config.dat' displayed during setup of WiFi (192.168.4.1) it already failed?

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: running Albohes Outdoor Switch: Cannot save to file

#4 Post by TD-er » 24 Sep 2019, 12:42

Can you test a build from start of december 2018, one with "puya" in the build name?

I was thinking, maybe we have a "new" Puya like flash here.
In this PR I added support for the Puya flash chip in the Arduino core lib: https://github.com/esp8266/Arduino/pull/5504
But it does now check specifically for the Puya brand on the chip and older patches did not as far as I remember.

obod0002c
Normal user
Posts: 119
Joined: 10 Aug 2019, 20:31

Re: running Albohes Outdoor Switch: Cannot save to file

#5 Post by obod0002c » 24 Sep 2019, 17:30

TD-er wrote: 24 Sep 2019, 12:42 Can you test a build from start of december 2018, one with "puya" in the build name?
btw: is there a way of searching in github for stuff like that - automatically?

ESP_Easy_mega-20181107_dev_ESP8266PUYA_1024.bin flashed (the latest I found with 'PUYA' in the bin name).

1st change: Wifi setup @192.168.4.1 is displayed immediately and correctly showing all the WiFi's available without the necessity to refresh that page (the ones flashed yesterday needed a refresh in the setup page).

Unfortunately that's about it: choosing WiFi and entering its credentials ends up in the same error as before

Code: Select all

FS : Error while reading/writing config.dat in 597
When switching the device on again the setup WiFi is visible again.

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: running Albohes Outdoor Switch: Cannot save to file

#6 Post by TD-er » 25 Sep 2019, 00:04

Hmm OK, too bad.

Do you have any other 1M flash unit you can test on?
I do suspect bad behaving flash.
Could be it is working like the manufacturer intended.
Since flashing does seem to work, but writing to SPIFFS does not, I do suspect this flash to do thing different compared to what any other flash chip does.

obod0002c
Normal user
Posts: 119
Joined: 10 Aug 2019, 20:31

Re: running Albohes Outdoor Switch: Cannot save to file

#7 Post by obod0002c » 25 Sep 2019, 07:56

I have some black ESP-01's - but flashed with kind of self-developed firmware, not EspEasy

The Albohes from here runs correctly with 'other' IOT software and keeps settings also after re-powering, so hardware seems to be okay.

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: running Albohes Outdoor Switch: Cannot save to file

#8 Post by TD-er » 25 Sep 2019, 09:21

obod0002c wrote: 25 Sep 2019, 07:56 I have some black ESP-01's - but flashed with kind of self-developed firmware, not EspEasy

The Albohes from here runs correctly with 'other' IOT software and keeps settings also after re-powering, so hardware seems to be okay.
Do they also use SPIFFS to store settings?
For example Tasmota does not use SPIFFS as far as I know.

obod0002c
Normal user
Posts: 119
Joined: 10 Aug 2019, 20:31

Re: running Albohes Outdoor Switch: Cannot save to file

#9 Post by obod0002c » 25 Sep 2019, 11:01

not sure if I can code it by myself: I have an ESP-32 using SPIFFS for storing and codings for some ESP-01's - but both projects are completely separated at the moment.

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: running Albohes Outdoor Switch: Cannot save to file

#10 Post by TD-er » 25 Sep 2019, 13:28

That's not what I meant.
What I meant is; Are the other modules you have , those running other firmware, using SPIFFS to store files on their own flash?

obod0002c
Normal user
Posts: 119
Joined: 10 Aug 2019, 20:31

Re: running Albohes Outdoor Switch: Cannot save to file

#11 Post by obod0002c » 25 Sep 2019, 13:39

doubt it meanwhile: Tasmota as well as ESPurna don't seem to

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: running Albohes Outdoor Switch: Cannot save to file

#12 Post by TD-er » 25 Sep 2019, 14:57

Then I think we may have a new chip here which is behaving like "Puya" flash.
I will try to build a test version also forcing "Puya" like behavior for vendor ID 0x51.

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: running Albohes Outdoor Switch: Cannot save to file

#13 Post by TD-er » 25 Sep 2019, 15:53

obod0002c wrote: 25 Sep 2019, 13:39 doubt it meanwhile: Tasmota as well as ESPurna don't seem to
Can you test with this "normal" build? https://www.dropbox.com/s/jhcjs2m7gw6hu ... a.bin?dl=0

And I would also like to see a close-up photo of the flash chip.

obod0002c
Normal user
Posts: 119
Joined: 10 Aug 2019, 20:31

Re: running Albohes Outdoor Switch: Cannot save to file

#14 Post by obod0002c » 25 Sep 2019, 18:14

TD-er wrote: 25 Sep 2019, 15:53 Can you test with this "normal" build? https://www.dropbox.com/s/jhcjs2m7gw6hu ... a.bin?dl=0
Unfortunately: SaveToFile: config.dat ERROR, Cannot save to file


Flash chip: which one could it be? there's one with 8 legs, one with 7, one that looks like the clock and the AMS1117 of course ...
All so tiny, maybe even with no print on it? U4:
ab2.jpg
ab2.jpg (401.11 KiB) Viewed 26306 times
Could 'Force-DOUT' be worth a try?
Attachments
ab3.jpg
ab3.jpg (3.48 MiB) Viewed 26304 times

obod0002c
Normal user
Posts: 119
Joined: 10 Aug 2019, 20:31

Re: running Albohes Outdoor Switch: Cannot save to file

#15 Post by obod0002c » 25 Sep 2019, 18:25

some three years ago:
https://www.heise.de/make/meldung/Espre ... 62160.html
short version: ESP8285 integrated the 8MBit flash chip?

obod0002c
Normal user
Posts: 119
Joined: 10 Aug 2019, 20:31

Re: running Albohes Outdoor Switch: Cannot save to file

#16 Post by obod0002c » 25 Sep 2019, 21:28

I apologize for the German pages but I'm sure the important points are understandable:
https://www.heise.de/make/meldung/Schne ... 06572.html

Code: Select all

Anders als bei den ESP8266-Modulen ist dieser nicht per QIO angebunden, sondern langsamer via DOUT.

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: running Albohes Outdoor Switch: Cannot save to file

#17 Post by grovkillen » 25 Sep 2019, 21:42

Have you tried the DOUT flash mode?
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

obod0002c
Normal user
Posts: 119
Joined: 10 Aug 2019, 20:31

Re: running Albohes Outdoor Switch: Cannot save to file

#18 Post by obod0002c » 25 Sep 2019, 22:42

Looks like it's not even booting correctly when forcing DOUT but I need to doublecheck wiring is still okay.

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: running Albohes Outdoor Switch: Cannot save to file

#19 Post by grovkillen » 26 Sep 2019, 06:22

That picture looks like an memory unit but 8285 got internal memory... This fact might shed light on the problem.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: running Albohes Outdoor Switch: Cannot save to file

#20 Post by TD-er » 26 Sep 2019, 10:32

Ah, yes I totally mis read the text on the picture of the first post.
ESP8285 has indeed its flash internal.

Sorry for all the confusion that may have caused.
What build do you use? There are ESP8285 builds, which should be used on those.

obod0002c
Normal user
Posts: 119
Joined: 10 Aug 2019, 20:31

Re: running Albohes Outdoor Switch: Cannot save to file

#21 Post by obod0002c » 26 Sep 2019, 13:13

I tested all three firmwares *8285* as well as a 1M for 8266 of the Release mega-20190903.
None was able to save and recap configuration

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: running Albohes Outdoor Switch: Cannot save to file

#22 Post by TD-er » 26 Sep 2019, 13:49

Do you know what is connected to what GPIO pin?

obod0002c
Normal user
Posts: 119
Joined: 10 Aug 2019, 20:31

Re: running Albohes Outdoor Switch: Cannot save to file

#23 Post by obod0002c » 26 Sep 2019, 14:20

no, not really.
When storing config isn't possible will setting up device while connected to the power will work? Then I could check with URL-commands and 'taskvalueset'.

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: running Albohes Outdoor Switch: Cannot save to file

#24 Post by TD-er » 27 Sep 2019, 11:08

You could try, using the setup options of ESPEasy flasher.
There have been reports in the past of Some Sonoff devices not able to connect to WiFi while powered true mains.
It would make the device rather useless if this is the case, but at least it will help in the diagnose.

obod0002c
Normal user
Posts: 119
Joined: 10 Aug 2019, 20:31

Re: running Albohes Outdoor Switch: Cannot save to file

#25 Post by obod0002c » 18 Nov 2019, 09:26

sorry, wasn't able to follow here for quite some time.
TD-er wrote: 27 Sep 2019, 11:08 You could try, using the setup options of ESPEasy flasher.
Think I had checked that, unfortunately not with success.

If there anything else I could do to make it work?

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: running Albohes Outdoor Switch: Cannot save to file

#26 Post by TD-er » 18 Nov 2019, 10:24

I really have no clue what could be wrong here.
Usually the ESP8285 isn't mentioned in a lot of issues.

obod0002c
Normal user
Posts: 119
Joined: 10 Aug 2019, 20:31

Re: running Albohes Outdoor Switch: Cannot save to file

#27 Post by obod0002c » 13 Feb 2022, 16:46

before disposing it off finally, I tried flashing ESP_Easy_mega_20211105_normal_ESP8285_1M
and guess what .. it's working. ;) glad I tried.

System Libraries:⋄ ESP82xx Core 2843a5ac, NONOS SDK 2.2.2-dev(38a443e), LWIP: 2.1.2 PUYA support

left outlet -> GPIO 12,1 (including blue LED)
right outlet -> GPIO 5,1 (including blue LED)

Did not succeed in making the sensor controls work.

User avatar
Ath
Normal user
Posts: 3417
Joined: 10 Jun 2018, 12:06
Location: NL

Re: running Albohes Outdoor Switch: Cannot save to file

#28 Post by Ath » 13 Feb 2022, 17:02

Is that this device? There you can also see the GPIO configuration, that should work just fine with ESPEasy. You will need some rules to operate the relays by using the buttons though.

- Configure a Switch device task for Button1 on GPIO-0, set the de-bounce delay to 150 msec
- Configure a Switch device task for Button2 on GPIO-9, set the de-bounce delay to 150 msec
- Configure a Switch device task for Relay1 on GPIO-12
- Configure a Switch device task for Relay2 on GPIO-5

Code: Select all

on Button1#State=0 do
  GPIO,12,![Relay1#State]
endon
on Button2#State=0 do
  GPIO,5,![Relay2#State]
endon
Edit: Rules can be enabled on the Tools/Advanced page.
/Ton (PayPal.me)

obod0002c
Normal user
Posts: 119
Joined: 10 Aug 2019, 20:31

Re: running Albohes Outdoor Switch: Cannot save to file

#29 Post by obod0002c » 14 Feb 2022, 19:48

Thanks for the example.
However, the not-function seems to not work (maybe intrinsic 'cause of its name :D )
A less sophisticated coding does:

Code: Select all

on Button1#State=0 do
  if [Relay1#State]=0
    GPIO,12,1
    Relay1#State=1
  else
    GPIO,12,0
    Relay1#State=0
endon

User avatar
Ath
Normal user
Posts: 3417
Joined: 10 Jun 2018, 12:06
Location: NL

Re: running Albohes Outdoor Switch: Cannot save to file

#30 Post by Ath » 14 Feb 2022, 20:01

obod0002c wrote: 14 Feb 2022, 19:48 Thanks for the example.
However, the not-function seems to not work (maybe intrinsic 'cause of its name :D )
A less sophisticated coding does:

Code: Select all

on Button1#State=0 do
  if [Relay1#State]=0
    GPIO,12,1
    Relay1#State=1
  else
    GPIO,12,0
    Relay1#State=0
endon
The Relay1/Relay2 switche device tasks are only there to reflect the current state of the relay, there is absolutely no need to (try to) set them too, but you didn't use the correct command for that, now it will only log an error.

If the not function won't work on the gpio command, then we'll use a let command, that'll work:

Code: Select all

on Button1#State=0 do
  let,1,![Relay1#State]
  GPIO,12,%v1%
endon
on Button2#State=0 do
  let,1,![Relay2#State]
  GPIO,5,%v1%
endon
/Ton (PayPal.me)

obod0002c
Normal user
Posts: 119
Joined: 10 Aug 2019, 20:31

Re: running Albohes Outdoor Switch: Cannot save to file

#31 Post by obod0002c » 14 Feb 2022, 20:20

Ath wrote: 14 Feb 2022, 20:01 then we'll use a let command, that'll work
Indeed

Post Reply

Who is online

Users browsing this forum: No registered users and 19 guests