Shelly-homekit: Shelly 1L do not load the firmware

Created on 8 Dec 2020  ·  59Comments  ·  Source: mongoose-os-apps/shelly-homekit

Hi, I've tried several times to update the shelly 1L using your firmware, but the device as always the factory firmware after the reboot .

Used URL http://x.x.x.x/ota?url=http://rojer.me/files/shelly/shelly-homekit-Shelly1L.zip

Output:

{"status":"updating","has_update":false,"new_version":"20201205-115619/v1.9.2_1L@8f181f76","old_version":"20201205-115619/v1.9.2_1L@8f181f76","beta_version":"20201202-135922/v1.9.3-rc3@50c6ab57"}

Thank you for your help.

Best regards.
David

Most helpful comment

ok, i reproduced and fixed the bug.
it looks like in 1.9 stock firmware started using hardware timer in NMI mode while our firmware uses it in non-nmi mode.
because this register doesn't get cleared during soft reset, during upgrade this causes an issue because interrupt is not properly configured and never fires.
long story short, https://github.com/cesanta/mongoose-os/commit/41f01a2c76d626249d42bfdc4ec8f068e7251d00 is the fix, i pushed 2.7.0-beta2, please test - https://github.com/mongoose-os-apps/shelly-homekit/issues/323

All 59 comments

make sure device has valid DNS IP (ie it can reach World Wide Web)

Hi, I have same issue: {"status":"updating","has_update":false,"new_version":"20201205-115619/v1.9.2_1L@8f181f76","old_version":"20201205-115619/v1.9.2_1L@8f181f76","beta_version":"20201202-135922/v1.9.3-rc3@50c6ab57"}. Device has a valid IP an it can reach WWW.

BR,
David

Similar issue,
{"status":"updating","has_update":false,"new_version":"","old_version":"20200320-123430/v1.6.2@514044b4"}
where is my mistake?

Not a DNS or network problem. factory upgrade process work correctly.

still waiting for mine to arrive.

I am having the same situation on my device

hm. it works for my device and i see many users also running the firmware (update checks from Shelly1L devices), so it works for at least some others too.
unfortunately, there is not much in terms of diagnostics that we can do here, unless someone can attache a serial adapter or send me a device that refuses to install the HK firmware.

still waiting for mine to arrive, i'll test once i have it.

https://github.com/mongoose-os-apps/shelly-homekit/wiki/Serial-connection#wiring - see here for serial wiring. you only need GND, 3V3, TX and RX pins.

I have the same issue with my Shelly 1L. Is this addressed in 2.7 beta that we may test?

edit: not successful with link

http://A.B.C.D/ota?url=http://rojer.me/files/shelly/2.7.0-beta1/shelly-homekit-Shelly1L.zip

output:

{"status":"updating","has_update":false,"new_version":"20201205-115619/v1.9.2_1L@8f181f76","old_version":"20201205-115619/v1.9.2_1L@8f181f76","beta_version":"20201202-135922/v1.9.3-rc3@50c6ab57"}

But stays on stock fw.

Same thing. The led is blinking while updating, but after that loads the original interface.
Update: do NOT update the Shelly original firmware to the latest version before you go through the current process. I received today 3 L1s. With the first one I went through the process as described here - first updated to the latest firmware, then uploaded the homekit firmware and it’s not working, I had exactly the same issues as you, it’s not loading the new interface. With the rest 2 devices I directly uploaded the homekit firmware and with both devices there are no problems. I don’t know why, it can be just incident or it can be that Shelly modified something in their latest version. But give it a try. Hope it helps

is anyone who experiences this able to connect serial and send me console output or (even better) flash dump?

see https://github.com/mongoose-os-apps/shelly-homekit/wiki/Serial-connection#wiring and the next section (up to the flash-read command).

My serial is 5v. I ordered a 3,3 one, but waiting for a delivery. When it arrives, I will send you the dump if somebody didn’t meanwhile

still waiting for mine to arrive 😠 , has been stuck in the same place in UK depo since Monday 14th

Sadly I cannot help with serial interface data. But my 1L offer a Beta from the manufacturer which installs. But the install of your firmware also still fails on my devices.

Interestingly I now found out that the Homekit firmware loads successfully on the second 1L out of the very same box. This time I did not update the stock fw before applying the HomeKit fw.

I did some more tests. You can downgrade the 1L to all versions in the Shelly archive. But with no version I could install the HomeKit version. Strange....

have you tried flashing via my script ?

No. Just via Rojers Links. At the moment I just have an iPhone to do that :-)

No. Just via Rojers Links. At the moment I just have an iPhone to do that :-)

ok

@andyblac tried your script before and it did not recognize the shelly 1L in question. I run it again and here is the output (the 1L with fw 2.6.1 is the second one that worked just fine, but the first one is not found).

Frederiks-MacBook-Pro:~ frederikmueller$ /Users/frederikmueller/Downloads/shelly-homekit-master\ 4/tools/flash-shelly.py -a
Scanning for Shelly devices...
4 Devices found.

Host: http://Shelly1-Fred-Hauseingang.local
Device ID: shelly1-F010D0
IP: 10.0.0.101
Model: Shelly1
Current: HomeKit 2.6.1
Latest: HomeKit 2.6.1
Does not need flashing...

Host: http://Shelly1-Ralf-Kronleuchter.local
Device ID: shelly1-05BEF3
IP: 10.0.0.99
Model: Shelly1
Current: HomeKit 2.6.1
Latest: HomeKit 2.6.1
Does not need flashing...

Host: http://shelly1l-84CCA8AD2233.local
Device ID: shelly1l-AD2233
IP: 10.0.0.170
Model: Shelly1L
Current: HomeKit 2.6.1
Latest: HomeKit 2.6.1
Does not need flashing...

Traceback (most recent call last):
  File "/Users/frederikmueller/Downloads/shelly-homekit-master 4/tools/flash-shelly.py", line 661, in <module>
    device_scan(args.hosts, action, args.do_all, args.dry_run, args.silent_run, args.mode, args.exclude, args.version, args.variant, args.hap_setup_code)
  File "/Users/frederikmueller/Downloads/shelly-homekit-master 4/tools/flash-shelly.py", line 586, in device_scan
    if (deviceinfo.fw_version == '0.0.0' or is_newer(deviceinfo.flash_fw_version, deviceinfo.fw_version)):
  File "/Users/frederikmueller/Downloads/shelly-homekit-master 4/tools/flash-shelly.py", line 359, in is_newer
    vi1 = parse_version(v1)
  File "/Users/frederikmueller/Downloads/shelly-homekit-master 4/tools/flash-shelly.py", line 355, in parse_version
    major, minor, patch = [int(e) for e in v]
  File "/Users/frederikmueller/Downloads/shelly-homekit-master 4/tools/flash-shelly.py", line 355, in <listcomp>
    major, minor, patch = [int(e) for e in v]
ValueError: invalid literal for int() with base 10: '2_1L'

@freddair can you run it with flag -v=1 and copy paste output to a file and post please

i suspect is the version number format it does not like v1.9.2_1L

@freddair can you run it with flag -v=1 and copy paste output to a file and post please

sure, here's the output. now it fount the problematic shelly 1L with ip 10.0.0.168 - what does it say?
script1L-v=1.txt

i suspect is the version number format it does not like v1.9.2_1L

I also tried v1.9.2 and 1.9.0 - did not work either.

yeah it was, try this one
flash-shelly.py.zip

no crash this time, but still failed to flash can open a console log to ip of device by doing this
https://github.com/mongoose-os-apps/shelly-homekit/wiki/Development#console-logs

and in seperate shell try script again and send log from console

sorry but I am unable to connect to serial... no suitable connector available

sorry but I am unable to connect to serial... no suitable connector available

use IP method (UDP), if can't np, i'll do once i get mine.

...?

Frederiks-MacBook-Pro:~ frederikmueller$ mos --port ws://10.0.0.168/rpc config-set debug.udp_log_addr=10.0.0.41:8910
Getting configuration...
E1216 22:02:30.263919    7755 reconnect_wrapper.go:119] [reconnectWrapperCodec to ws://10.0.0.168/rpc; connect in 2.00s] connection error: read tcp 10.0.0.41:60022->10.0.0.168:80: read: connection reset by peer
/private/tmp/mos-20200820-97577-jfaujm/mos-1ec85951e77649f1151bc06a12901faa784a991a/common/mgrpc/mgrpc.go:172: 
/private/tmp/mos-20200820-97577-jfaujm/mos-1ec85951e77649f1151bc06a12901faa784a991a/common/mgrpc/mgrpc.go:201: WebSocket connection failed
/private/tmp/mos-20200820-97577-jfaujm/mos-1ec85951e77649f1151bc06a12901faa784a991a/common/mgrpc/mgrpc.go:248: 
E1216 22:02:54.718038    7755 reconnect_wrapper.go:119] [reconnectWrapperCodec to ws://10.0.0.168/rpc; connect in 2.00s] connection error: read tcp 10.0.0.41:60053->10.0.0.168:80: read: connection reset by peer
/private/tmp/mos-20200820-97577-jfaujm/mos-1ec85951e77649f1151bc06a12901faa784a991a/common/mgrpc/mgrpc.go:172: 
/private/tmp/mos-20200820-97577-jfaujm/mos-1ec85951e77649f1151bc06a12901faa784a991a/common/mgrpc/mgrpc.go:201: WebSocket connection failed
/private/tmp/mos-20200820-97577-jfaujm/mos-1ec85951e77649f1151bc06a12901faa784a991a/common/mgrpc/mgrpc.go:248: 
Error: context deadline exceeded
/private/tmp/mos-20200820-97577-jfaujm/mos-1ec85951e77649f1151bc06a12901faa784a991a/common/mgrpc/codec/reconnect_wrapper.go:141: 
/private/tmp/mos-20200820-97577-jfaujm/mos-1ec85951e77649f1151bc06a12901faa784a991a/common/mgrpc/codec/reconnect_wrapper.go:185: 
/private/tmp/mos-20200820-97577-jfaujm/mos-1ec85951e77649f1151bc06a12901faa784a991a/common/mgrpc/mgrpc.go:401: 
/private/tmp/mos-20200820-97577-jfaujm/mos-1ec85951e77649f1151bc06a12901faa784a991a/cli/dev/dev_conn_impl.go:167: 
/private/tmp/mos-20200820-97577-jfaujm/mos-1ec85951e77649f1151bc06a12901faa784a991a/cli/dev/dev_conn_impl.go:190: 
/private/tmp/mos-20200820-97577-jfaujm/mos-1ec85951e77649f1151bc06a12901faa784a991a/cli/dev/dev_conn.go:117: 
/private/tmp/mos-20200820-97577-jfaujm/mos-1ec85951e77649f1151bc06a12901faa784a991a/cli/config/config.go:86: 
/private/tmp/mos-20200820-97577-jfaujm/mos-1ec85951e77649f1151bc06a12901faa784a991a/cli/main.go:198: config-set failed

I also tried your script...but keep getting "Failed to lookup online version information"...
my fault?

@freddair ok guess it does not work with stock fw, I'll try serial once I get my Shelly

how would you connect serial and power at the same time, or would the serial power be sufficient for operation?

yeah you just connect serial power, not AC not the same time.

I also tried your script...but keep getting "Failed to lookup online version information�"...
my fault?

I had the same issue, at first I used the script and got the same ValueError: invalid literal for int() with base 10: '2_1L' warning. After upgrading Python and Pip to 3.9.0 I got the warning above.

I had the same issue, at first I used the script and got the same ValueError: invalid literal for int() with base 10: '2_1L' warning. After upgrading Python and Pip to 3.9.0 I got the warning above.

here is the latest version of script Pull Request waiting. it fixes ValueError: invalid literal for int() with base 10: '2_1L'
flash-shelly.py.zip

I also tried your script...but keep getting "Failed to lookup online version information�"...
my fault?

that is SSL certificate error try running

pip install --upgrade certifi

I also tried your script...but keep getting "Failed to lookup online version information�"...
my fault?

that is SSL certificate error try running

pip install --upgrade certifi

That was my issue, I used the Install Certificates.command script inside the Python 3.9 folder to solve it. Somehow it didn't do that correctly right after the Python upgrade. Would it make sense to have the script print out the urllib errors instead of an error message? Adding this to the code helped me out quite a bit. : )

except urllib.error.URLError as e: logger.warning(e.reason)

etc.

I also had to change the line"
self.host = f'{host}.local' if '.local' not in host and not host[0:3].isdigit() else host
to just
self.host = host
because my network doesn't use the .local ending.

However, the script is now attempting to flash, waits for the device to reboot for quite some time, then fails to flash.

`Failed to flash xwing-ii to 2.6.1

Current: 1.9.2_1L`

However, the script is now attempting to flash, waits for the device to reboot for quite some time, then fails to flash.

`Failed to flash xwing-ii to 2.6.1

Current: 1.9.2_1L`

yeah think it stock fw issue, i need to debug with a device and serial connections, should get my delivery tomorrow hopefully.

I also tried your script...but keep getting "Failed to lookup online version information�"...
my fault?

that is SSL certificate error try running
pip install --upgrade certifi

That was my issue, I used the Install Certificates.command script inside the Python 3.9 folder to solve it. Somehow it didn't do that correctly right after the Python upgrade. Would it make sense to have the script print out the urllib errors instead of an error message? Adding this to the code helped me out quite a bit. : )

except urllib.error.URLError as e: logger.warning(e.reason)

i can add that to verbose logging for when -v=0 is used.

etc.

I also had to change the line"
self.host = f'{host}.local' if '.local' not in host and not host[0:3].isdigit() else host
to just
self.host = host
because my network doesn't use the .local ending.

you on a domain ?, i can add a new cmd flag to specify own domain if it would help ? -d=xxxx

I'm not on a domain, my router in standard config just assigns hostnames without the .local ending. Maybe it would be enough to check, when a hostname without .local is entered, if it resolves, and only if not to add the .local part?

I'm not on a domain, my router in standard config just assigns hostnames without the .local ending. Maybe it would be enough to check, when a hostname without .local is entered, if it resolves, and only if not to add the .local part?

ok, see what i can do

@marcoboerner can you try this
flash-shelly.py.zip

@andyblac Thx. I did the certificate update and used your latest script which now runs.
It finds the 1L-Devices (and others) but flashing still fails:

_[1mHost: http://shelly1l-84CCA8ADDD06.fritz.box
Device ID: shelly1l-84CCA8ADDD06
IP: 192.168.178.155
Model: Shelly1L
Current: Stock 1.9.2_1L
Latest: HomeKit 2.6.1
Do you wish to flash shelly1l-84CCA8ADDD06.fritz.box to firmware version 2.6.1 (y/n) ? y
Now Flashing...
waiting for shelly1l-84CCA8ADDD06.fritz.box to reboot...
still waiting for shelly1l-84CCA8ADDD06.fritz.box to reboot...
Failed to flash shelly1l-84CCA8ADDD06.fritz.box to 2.6.1

Host: http://shelly1l-84CCA8AE3827.fritz.box
Device ID: shelly1l-84CCA8AE3827
IP: 192.168.178.156
Model: Shelly1L
Current: Stock 1.9.2_1L
Latest: HomeKit 2.6.1
Do you wish to flash shelly1l-84CCA8AE3827.fritz.box to firmware version 2.6.1 (y/n) ? y
Now Flashing...
waiting for shelly1l-84CCA8AE3827.fritz.box to reboot...
Could not get info from device: shelly1l-84CCA8AE3827.fritz.box

...
still waiting for shelly1l-84CCA8AE3827.fritz.box to reboot...
Could not get info from device: shelly1l-84CCA8AE3827.fritz.box

Failed to flash shelly1l-84CCA8AE3827.fritz.box to 2.6.1

should have mine today

Your Item was received by xxxxxxxx DO on 18-12-2020 and is now due for delivery today. We normally expect to deliver to your address between 11:53am - 3:53pm.

@marcoboerner can you try this
flash-shelly.py.zip

I'm not sure if it's a MacOS thing or the way my router assigns hostnames. However, my Mac it seams, does assign itself the .local domain ending but is reachable with or without it. The Shelly 1L does not, the Shelly 1L gets its hostname from my router though. So socket.getfqdn() will return a full domain with .local. Even though it is not used in my network.

@marcoboerner can you try this
flash-shelly.py.zip

I'm not sure if it's a MacOS thing or the way my router assigns hostnames. However, my Mac it seams, does assign itself the .local domain ending but is reachable with or without it. The Shelly 1L does not, the Shelly 1L gets its hostname from my router though. So socket.getfqdn() will return a full domain with .local. Even though it is not used in my network.

i'm on Mac, in that case it might be easier to add a flag --no-local-domain to bypass search and adding it
would that work for you ?

@marcoboerner can you do a run with -v=1 and copy and paste info to a file see what scanner is picking up.

ie
./flash-shelly.py -la -v=1

@marcoboerner can you do a run with -v=1 and copy and paste info to a file see what scanner is picking up.

ie
./flash-shelly.py -la -v=1

Okay, I think I know what's happening. The Shelly 1L with stock firmware doesn't allow its hostname to be changed, meaning it will always have the shelly1l-XXXXXXXXXXX.local address. Through my router I can set a different hostname. Those names don't have the .local added. And in my network I can reach Shelly over the original hostname and the one setup in my router.

I assume the best way is to just use the original hostname for the upgrade and then change the hostname within homekit firmware. However other people might run into the same problem if they use a similar setup / router.

Here is the output:

`sudo python3 ./flash-shelly.py -la -v=1                        
Password:
Finding local domain...
app
OS: Darwin
local_domain: local
manual_hosts: []
action: list
mode: homekit
do_all: True
dry_run: False
silent_run: False
hap_setup_code: False
version: False
exclude: None
variant: False
verbose: 1

stock_release_info:{'isok': True, 'data': {'SHPLG-1': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHPLG-1.zip', 'version': '20201124-091454/v1.9.0@57ac4ad8', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHPLG-1.zip', 'beta_ver': '20201202-140129/v1.9.3-rc3@50c6ab57'}, 'SHPLG-S': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHPLG-S.zip', 'version': '20201124-092310/v1.9.0@57ac4ad8', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHPLG-S.zip', 'beta_ver': '20201202-141017/v1.9.3-rc3@50c6ab57'}, 'SHPLG-U1': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHPLG-U1.zip', 'version': '20201124-092346/v1.9.0@57ac4ad8', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHPLG-U1.zip', 'beta_ver': '20201202-141054/v1.9.3-rc3@50c6ab57'}, 'SHPLG2-1': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHPLG2-1.zip', 'version': '20201124-092420/v1.9.0@57ac4ad8', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHPLG2-1.zip', 'beta_ver': '20201202-141133/v1.9.3-rc3@50c6ab57'}, 'SHSW-1': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHSW-1.zip', 'version': '20201124-091217/v1.9.0@57ac4ad8', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHSW-1.zip', 'beta_ver': '20201216-135937/v1.9.3-rc4@146c9bd7'}, 'SHSW-21': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHSW-21.zip', 'version': '20201128-102008/v1.9.2@e83f7025', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHSW-21.zip', 'beta_ver': '20201202-140000/v1.9.3-rc3@50c6ab57'}, 'SHSW-25': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHSW-25.zip', 'version': '20201128-102046/v1.9.2@e83f7025', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHSW-25.zip', 'beta_ver': '20201216-140131/v1.9.3-rc4@146c9bd7'}, 'SHSW-PM': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHSW-PM.zip', 'version': '20201128-103131/v1.9.2@e83f7025', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHSW-PM.zip', 'beta_ver': '20201202-141212/v1.9.3-rc3@50c6ab57'}, 'SHSW-L': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHSW-L.zip', 'version': '20201205-115619/v1.9.2_1L@8f181f76', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHSW-L.zip', 'beta_ver': '20201202-135922/v1.9.3-rc3@50c6ab57'}, 'SHAIR-1': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHAIR-1.zip', 'version': '20201124-092534/v1.9.0@57ac4ad8', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHAIR-1.zip', 'beta_ver': '20201202-141250/v1.9.3-rc3@50c6ab57'}, 'SHSW-44': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHSW-44.zip', 'version': '20201019-110845/v1.6.6_4Pro@bad181e4'}, 'SHUNI-1': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHUNI-1.zip', 'version': '20201124-093042/v1.9.0@57ac4ad8', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHUNI-1.zip', 'beta_ver': '20201202-141748/v1.9.3-rc3@50c6ab57'}, 'SHEM': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHEM.zip', 'version': '20201124-092817/v1.9.0@57ac4ad8', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHEM.zip', 'beta_ver': '20201202-141537/v1.9.3-rc3@50c6ab57'}, 'SHEM-3': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHEM-3.zip', 'version': '20201124-092854/v1.9.0@57ac4ad8', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHEM-3.zip', 'beta_ver': '20201202-142834/v1.9.3-rc3@50c6ab57'}, 'SHSEN-1': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHSEN-1_build.zip', 'version': '20200717-112934/v1.7.7@a02db0b8'}, 'SHGS-1': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHGS-1.zip', 'version': '20201124-093005/v1.9.0@57ac4ad8', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHGS-1.zip', 'beta_ver': '20201202-141710/v1.9.3-rc3@50c6ab57'}, 'SHSM-01': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHSM-01.zip', 'version': '20201124-091539/v1.9.0@57ac4ad8', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHSM-01.zip', 'beta_ver': '20201202-140215/v1.9.3-rc3@50c6ab57'}, 'SHHT-1': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHHT-1.zip', 'version': '20201124-091711/v1.9.0@57ac4ad8', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHHT-1.zip', 'beta_ver': '20201202-140348/v1.9.3-rc3@50c6ab57'}, 'SHWT-1': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHWT-1.zip', 'version': '20201128-102432/v1.9.2@e83f7025', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHWT-1.zip', 'beta_ver': '20201202-140437/v1.9.3-rc3@50c6ab57'}, 'SHDW-1': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHDW-1.zip', 'version': '20201124-091845/v1.9.0@57ac4ad8', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHDW-1.zip', 'beta_ver': '20201202-140524/v1.9.3-rc3@50c6ab57'}, 'SHDW-2': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHDW-2.zip', 'version': '20201126-143533/v1.9.1@6d969d45+', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHDW-2.zip', 'beta_ver': '20201216-140701/v1.9.3-rc4@146c9bd7'}, 'SHSPOT-1': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHSPOT-1.zip', 'version': '20201124-091104/v1.9.0@57ac4ad8', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHSPOT-1.zip', 'beta_ver': '20201202-135728/v1.9.3-rc3@50c6ab57'}, 'SHCL-255': {'url': 'http://api.shelly.cloud/firmware/compatibility/SHCL-255/0.2.0-73a40eef.zip', 'version': '20180116-161402/v0.2.0@73a40eef', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHCL-255.zip', 'beta_ver': '20201202-135308/v1.9.3-rc3@50c6ab57'}, 'SHBLB-1': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHBLB-1.zip', 'version': '20201124-090807/v1.9.0@57ac4ad8', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHBLB-1.zip', 'beta_ver': '20201216-135516/v1.9.3-rc4@146c9bd7'}, 'SHCB-1': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHCB-1.zip', 'version': '20201124-090732/v1.9.0@57ac4ad8', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHCB-1.zip', 'beta_ver': '20201202-135344/v1.9.3-rc3@50c6ab57'}, 'SHRGBW2': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHRGBW2.zip', 'version': '20201124-092125/v1.9.0@57ac4ad8', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHRGBW2.zip', 'beta_ver': '20201202-140822/v1.9.3-rc3@50c6ab57'}, 'SHRGBWW-01': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHRGBWW-01.zip', 'version': '20201124-090953/v1.9.0@57ac4ad8', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHRGBWW-01.zip', 'beta_ver': '20201202-135615/v1.9.3-rc3@50c6ab57'}, 'SH2LED-1': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SH2LED-1.zip', 'version': '20201124-091028/v1.9.0@57ac4ad8', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SH2LED-1.zip', 'beta_ver': '20201202-135651/v1.9.3-rc3@50c6ab57'}, 'SHDM-1': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHDM-1.zip', 'version': '20201124-092620/v1.9.0@57ac4ad8', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHDM-1.zip', 'beta_ver': '20201216-141418/v1.9.3-rc4@146c9bd7'}, 'SHDM-2': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHDM-2.zip', 'version': '20201124-092706/v1.9.0@57ac4ad8', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHDM-2.zip', 'beta_ver': '20201216-141505/v1.9.3-rc4@146c9bd7'}, 'SHDIMW-1': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHDIMW-1.zip', 'version': '20201124-092741/v1.9.0@57ac4ad8', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHDIMW-1.zip', 'beta_ver': '20201202-141459/v1.9.3-rc3@50c6ab57'}, 'SHVIN-1': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHVIN-1.zip', 'version': '20201124-090843/v1.9.0@57ac4ad8', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHVIN-1.zip', 'beta_ver': '20201202-135459/v1.9.3-rc3@50c6ab57'}, 'SHBDUO-1': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHBDUO-1.zip', 'version': '20201124-090917/v1.9.0@57ac4ad8', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHBDUO-1.zip', 'beta_ver': '20201202-135537/v1.9.3-rc3@50c6ab57'}, 'SHBTN-1': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHBTN-1.zip', 'version': '20201124-092005/v1.9.0@57ac4ad8', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHBTN-1.zip', 'beta_ver': '20201202-140658/v1.9.3-rc3@50c6ab57'}, 'SHIX3-1': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHIX3-1.zip', 'version': '20201124-092930/v1.9.0@57ac4ad8', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHIX3-1.zip', 'beta_ver': '20201202-141633/v1.9.3-rc3@50c6ab57'}}}

homekit_release_info:[['2.7.0-.*', {'version': '2.7.0-beta1', 'rel_notes': 'https://github.com/mongoose-os-apps/shelly-homekit/issues/330', 'rel_notesX': '', 'urls': {'Shelly1': 'https://rojer.me/files/shelly/2.7.0-beta1/shelly-homekit-Shelly1.zip', 'Shelly1L': 'https://rojer.me/files/shelly/2.7.0-beta1/shelly-homekit-Shelly1L.zip', 'Shelly1PM': 'https://rojer.me/files/shelly/2.7.0-beta1/shelly-homekit-Shelly1PM.zip', 'Shelly2': 'https://rojer.me/files/shelly/2.7.0-beta1/shelly-homekit-Shelly2.zip', 'Shelly25': 'https://rojer.me/files/shelly/2.7.0-beta1/shelly-homekit-Shelly25.zip', 'ShellyI3': 'https://rojer.me/files/shelly/2.7.0-beta1/shelly-homekit-ShellyI3.zip', 'ShellyPlug': 'https://rojer.me/files/shelly/2.7.0-beta1/shelly-homekit-ShellyPlug.zip', 'ShellyPlugS': 'https://rojer.me/files/shelly/2.7.0-beta1/shelly-homekit-ShellyPlugS.zip'}}], ['.*', {'version': '2.6.1', 'rel_notes': 'https://github.com/mongoose-os-apps/shelly-homekit/releases/tag/2.6.1', 'urls': {'Shelly1': 'https://rojer.me/files/shelly/2.6.1/shelly-homekit-Shelly1.zip', 'Shelly1L': 'https://rojer.me/files/shelly/2.6.1/shelly-homekit-Shelly1L.zip', 'Shelly1PM': 'https://rojer.me/files/shelly/2.6.1/shelly-homekit-Shelly1PM.zip', 'Shelly2': 'https://rojer.me/files/shelly/2.6.1/shelly-homekit-Shelly2.zip', 'Shelly25': 'https://rojer.me/files/shelly/2.6.1/shelly-homekit-Shelly25.zip', 'ShellyI3': 'https://rojer.me/files/shelly/2.6.1/shelly-homekit-ShellyI3.zip', 'Shelly-i3': 'https://rojer.me/files/shelly/2.6.1/shelly-homekit-ShellyI3.zip', 'ShellyPlug': 'https://rojer.me/files/shelly/2.6.1/shelly-homekit-ShellyPlug.zip', 'ShellyPlugS': 'https://rojer.me/files/shelly/2.6.1/shelly-homekit-ShellyPlugS.zip'}}]]

device_scan
Scanning for Shelly devices...
Valid Hostname: shelly1l-XXXXXXXXXXXXXX.local True
Hostname: shelly1l-XXXXXXXXXXXXXX.local is Online
Device URL: http://XXX.XXX.XXX.XXX/settings
1 Devices found.

device_test: [{'host': 'shelly1l-XXXXXXXXXXXXXX.local', 'wifi_ip': 'XXX.XXX.XXX.XXX', 'fw_type': 'stock', 'device_url': 'http://XXX.XXX.XXX.XXX/settings', 'info': {'device': {'type': 'SHSW-L', 'mac': '84CCA8ADE8CB', 'hostname': 'shelly1l-XXXXXXXXXX', 'num_outputs': 1, 'num_meters': 1}, 'wifi_ap': {'enabled': False, 'ssid': 'shelly1l-XXXXXXXXXXX', 'key': ''}, 'wifi_sta': {'enabled': True, 'ssid': 'DRADIS', 'ipv4_method': 'dhcp', 'ip': None, 'gw': None, 'mask': None, 'dns': None}, 'wifi_sta1': {'enabled': False, 'ssid': None, 'ipv4_method': 'dhcp', 'ip': None, 'gw': None, 'mask': None, 'dns': None}, 'mqtt': {'enable': False, 'server': '192.168.33.3:1883', 'user': '', 'id': 'shelly1l-XXXXXXXXXXXX', 'reconnect_timeout_max': 60.0, 'reconnect_timeout_min': 2.0, 'clean_session': True, 'keep_alive': 60, 'max_qos': 0, 'retain': False, 'update_period': 30}, 'coiot': {'update_period': 15}, 'sntp': {'server': 'time.google.com', 'enabled': True}, 'login': {'enabled': False, 'unprotected': False, 'username': 'admin'}, 'pin_code': '', 'name': 'xwing-ii', 'fw': '20201205-115619/v1.9.2_1L@8f181f76', 'factory_reset_from_switch': True, 'discoverable': True, 'build_info': {'build_id': '20201205-115619/v1.9.2_1L@8f181f76', 'build_timestamp': '2020-12-05T11:56:19Z', 'build_version': '1.0'}, 'cloud': {'enabled': False, 'connected': False}, 'timezone': 'Europe/Berlin', 'lat': 9.51183, 'lng': 9.51183, 'tzautodetect': True, 'tz_utc_offset': 3600, 'tz_dst': False, 'tz_dst_auto': True, 'time': '20:52', 'unixtime': 1608324770, 'led_status_disable': True, 'actions': {'active': False, 'names': ['btn1_on_url', 'btn1_off_url', 'btn1_longpush_url', 'btn1_shortpush_url', 'btn2_on_url', 'btn2_off_url', 'btn2_longpush_url', 'btn2_shortpush_url', 'out_on_url', 'out_off_url', 'ext_temp_over_url', 'ext_temp_under_url', 'ext_temp_over_url', 'ext_temp_under_url', 'ext_temp_over_url', 'ext_temp_under_url', 'ext_hum_over_url', 'ext_hum_under_url']}, 'hwinfo': {'hw_revision': 'prod-202010', 'batch_id': 0}, 'mode': 'relay', 'longpush_time': 800, 'power': -1, 'relays': [{'name': None, 'appliance_type': 'General', 'ison': False, 'has_timer': False, 'default_state': '_unknown_', 'btn1_type': 'toggle', 'btn1_reverse': 0, 'btn2_type': 'toggle', 'btn2_reverse': 0, 'swap_inputs': False, 'auto_on': 0.0, 'auto_off': 0.0, 'schedule': False, 'schedule_rules': []}], 'ext_sensors': {}, 'ext_temperature': {}, 'ext_humidity': {}}}]
Mode: Stock To Stock
Mode: Stock To HomeKit

parse_info
device_info: <__main__.StockDevice object at 0x7fd0f3a7ad00>
host: shelly1l-XXXXXXXXXXXX.local
device: shelly1l-XXXXXXXXXXXX
model: Shelly1L
stock_model: SHSW-L
colour_mode: relay
action: list
flash mode: homekit
requires_upgrade: False

Host: http://shelly1l-XXXXXXXXXXXXX.local
Device ID: shelly1l-XXXXXXXXXXXXX
IP: XXX.XXX.XXX.XXX
Model: Shelly1L
Current: Stock 1.9.2_1L
Latest: HomeKit 2.6.1
D_URL: https://rojer.me/files/shelly/2.6.1/shelly-homekit-Shelly1L.zip`

@marcoboerner can you do a run with -v=1 and copy and paste info to a file see what scanner is picking up.
ie
./flash-shelly.py -la -v=1

Okay, I think I know what's happening. The Shelly 1L with stock firmware doesn't allow its hostname to be changed, meaning it will always have the shelly1l-XXXXXXXXXXX.local address. Through my router I can set a different hostname. Those names don't have the .local added. And in my network I can reach Shelly over the original hostname and the one setup in my router.

I assume the best way is to just use the original hostname for the upgrade and then change the hostname within homekit firmware. However other people might run into the same problem if they use a similar setup / router.

Here is the output:

`sudo python3 ./flash-shelly.py -la -v=1                        
Password:
Finding local domain...
app
OS: Darwin
local_domain: local
manual_hosts: []
action: list
mode: homekit
do_all: True
dry_run: False
silent_run: False
hap_setup_code: False
version: False
exclude: None
variant: False
verbose: 1

stock_release_info:{'isok': True, 'data': {'SHPLG-1': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHPLG-1.zip', 'version': '20201124-091454/v1.9.0@57ac4ad8', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHPLG-1.zip', 'beta_ver': '20201202-140129/v1.9.3-rc3@50c6ab57'}, 'SHPLG-S': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHPLG-S.zip', 'version': '20201124-092310/v1.9.0@57ac4ad8', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHPLG-S.zip', 'beta_ver': '20201202-141017/v1.9.3-rc3@50c6ab57'}, 'SHPLG-U1': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHPLG-U1.zip', 'version': '20201124-092346/v1.9.0@57ac4ad8', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHPLG-U1.zip', 'beta_ver': '20201202-141054/v1.9.3-rc3@50c6ab57'}, 'SHPLG2-1': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHPLG2-1.zip', 'version': '20201124-092420/v1.9.0@57ac4ad8', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHPLG2-1.zip', 'beta_ver': '20201202-141133/v1.9.3-rc3@50c6ab57'}, 'SHSW-1': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHSW-1.zip', 'version': '20201124-091217/v1.9.0@57ac4ad8', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHSW-1.zip', 'beta_ver': '20201216-135937/v1.9.3-rc4@146c9bd7'}, 'SHSW-21': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHSW-21.zip', 'version': '20201128-102008/v1.9.2@e83f7025', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHSW-21.zip', 'beta_ver': '20201202-140000/v1.9.3-rc3@50c6ab57'}, 'SHSW-25': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHSW-25.zip', 'version': '20201128-102046/v1.9.2@e83f7025', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHSW-25.zip', 'beta_ver': '20201216-140131/v1.9.3-rc4@146c9bd7'}, 'SHSW-PM': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHSW-PM.zip', 'version': '20201128-103131/v1.9.2@e83f7025', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHSW-PM.zip', 'beta_ver': '20201202-141212/v1.9.3-rc3@50c6ab57'}, 'SHSW-L': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHSW-L.zip', 'version': '20201205-115619/v1.9.2_1L@8f181f76', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHSW-L.zip', 'beta_ver': '20201202-135922/v1.9.3-rc3@50c6ab57'}, 'SHAIR-1': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHAIR-1.zip', 'version': '20201124-092534/v1.9.0@57ac4ad8', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHAIR-1.zip', 'beta_ver': '20201202-141250/v1.9.3-rc3@50c6ab57'}, 'SHSW-44': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHSW-44.zip', 'version': '20201019-110845/v1.6.6_4Pro@bad181e4'}, 'SHUNI-1': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHUNI-1.zip', 'version': '20201124-093042/v1.9.0@57ac4ad8', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHUNI-1.zip', 'beta_ver': '20201202-141748/v1.9.3-rc3@50c6ab57'}, 'SHEM': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHEM.zip', 'version': '20201124-092817/v1.9.0@57ac4ad8', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHEM.zip', 'beta_ver': '20201202-141537/v1.9.3-rc3@50c6ab57'}, 'SHEM-3': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHEM-3.zip', 'version': '20201124-092854/v1.9.0@57ac4ad8', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHEM-3.zip', 'beta_ver': '20201202-142834/v1.9.3-rc3@50c6ab57'}, 'SHSEN-1': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHSEN-1_build.zip', 'version': '20200717-112934/v1.7.7@a02db0b8'}, 'SHGS-1': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHGS-1.zip', 'version': '20201124-093005/v1.9.0@57ac4ad8', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHGS-1.zip', 'beta_ver': '20201202-141710/v1.9.3-rc3@50c6ab57'}, 'SHSM-01': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHSM-01.zip', 'version': '20201124-091539/v1.9.0@57ac4ad8', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHSM-01.zip', 'beta_ver': '20201202-140215/v1.9.3-rc3@50c6ab57'}, 'SHHT-1': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHHT-1.zip', 'version': '20201124-091711/v1.9.0@57ac4ad8', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHHT-1.zip', 'beta_ver': '20201202-140348/v1.9.3-rc3@50c6ab57'}, 'SHWT-1': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHWT-1.zip', 'version': '20201128-102432/v1.9.2@e83f7025', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHWT-1.zip', 'beta_ver': '20201202-140437/v1.9.3-rc3@50c6ab57'}, 'SHDW-1': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHDW-1.zip', 'version': '20201124-091845/v1.9.0@57ac4ad8', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHDW-1.zip', 'beta_ver': '20201202-140524/v1.9.3-rc3@50c6ab57'}, 'SHDW-2': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHDW-2.zip', 'version': '20201126-143533/v1.9.1@6d969d45+', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHDW-2.zip', 'beta_ver': '20201216-140701/v1.9.3-rc4@146c9bd7'}, 'SHSPOT-1': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHSPOT-1.zip', 'version': '20201124-091104/v1.9.0@57ac4ad8', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHSPOT-1.zip', 'beta_ver': '20201202-135728/v1.9.3-rc3@50c6ab57'}, 'SHCL-255': {'url': 'http://api.shelly.cloud/firmware/compatibility/SHCL-255/0.2.0-73a40eef.zip', 'version': '20180116-161402/v0.2.0@73a40eef', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHCL-255.zip', 'beta_ver': '20201202-135308/v1.9.3-rc3@50c6ab57'}, 'SHBLB-1': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHBLB-1.zip', 'version': '20201124-090807/v1.9.0@57ac4ad8', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHBLB-1.zip', 'beta_ver': '20201216-135516/v1.9.3-rc4@146c9bd7'}, 'SHCB-1': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHCB-1.zip', 'version': '20201124-090732/v1.9.0@57ac4ad8', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHCB-1.zip', 'beta_ver': '20201202-135344/v1.9.3-rc3@50c6ab57'}, 'SHRGBW2': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHRGBW2.zip', 'version': '20201124-092125/v1.9.0@57ac4ad8', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHRGBW2.zip', 'beta_ver': '20201202-140822/v1.9.3-rc3@50c6ab57'}, 'SHRGBWW-01': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHRGBWW-01.zip', 'version': '20201124-090953/v1.9.0@57ac4ad8', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHRGBWW-01.zip', 'beta_ver': '20201202-135615/v1.9.3-rc3@50c6ab57'}, 'SH2LED-1': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SH2LED-1.zip', 'version': '20201124-091028/v1.9.0@57ac4ad8', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SH2LED-1.zip', 'beta_ver': '20201202-135651/v1.9.3-rc3@50c6ab57'}, 'SHDM-1': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHDM-1.zip', 'version': '20201124-092620/v1.9.0@57ac4ad8', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHDM-1.zip', 'beta_ver': '20201216-141418/v1.9.3-rc4@146c9bd7'}, 'SHDM-2': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHDM-2.zip', 'version': '20201124-092706/v1.9.0@57ac4ad8', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHDM-2.zip', 'beta_ver': '20201216-141505/v1.9.3-rc4@146c9bd7'}, 'SHDIMW-1': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHDIMW-1.zip', 'version': '20201124-092741/v1.9.0@57ac4ad8', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHDIMW-1.zip', 'beta_ver': '20201202-141459/v1.9.3-rc3@50c6ab57'}, 'SHVIN-1': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHVIN-1.zip', 'version': '20201124-090843/v1.9.0@57ac4ad8', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHVIN-1.zip', 'beta_ver': '20201202-135459/v1.9.3-rc3@50c6ab57'}, 'SHBDUO-1': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHBDUO-1.zip', 'version': '20201124-090917/v1.9.0@57ac4ad8', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHBDUO-1.zip', 'beta_ver': '20201202-135537/v1.9.3-rc3@50c6ab57'}, 'SHBTN-1': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHBTN-1.zip', 'version': '20201124-092005/v1.9.0@57ac4ad8', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHBTN-1.zip', 'beta_ver': '20201202-140658/v1.9.3-rc3@50c6ab57'}, 'SHIX3-1': {'url': 'http://shelly-api-eu.shelly.cloud/firmware/SHIX3-1.zip', 'version': '20201124-092930/v1.9.0@57ac4ad8', 'beta_url': 'http://api.shelly.cloud/firmware/rc/SHIX3-1.zip', 'beta_ver': '20201202-141633/v1.9.3-rc3@50c6ab57'}}}

homekit_release_info:[['2.7.0-.*', {'version': '2.7.0-beta1', 'rel_notes': 'https://github.com/mongoose-os-apps/shelly-homekit/issues/330', 'rel_notesX': '', 'urls': {'Shelly1': 'https://rojer.me/files/shelly/2.7.0-beta1/shelly-homekit-Shelly1.zip', 'Shelly1L': 'https://rojer.me/files/shelly/2.7.0-beta1/shelly-homekit-Shelly1L.zip', 'Shelly1PM': 'https://rojer.me/files/shelly/2.7.0-beta1/shelly-homekit-Shelly1PM.zip', 'Shelly2': 'https://rojer.me/files/shelly/2.7.0-beta1/shelly-homekit-Shelly2.zip', 'Shelly25': 'https://rojer.me/files/shelly/2.7.0-beta1/shelly-homekit-Shelly25.zip', 'ShellyI3': 'https://rojer.me/files/shelly/2.7.0-beta1/shelly-homekit-ShellyI3.zip', 'ShellyPlug': 'https://rojer.me/files/shelly/2.7.0-beta1/shelly-homekit-ShellyPlug.zip', 'ShellyPlugS': 'https://rojer.me/files/shelly/2.7.0-beta1/shelly-homekit-ShellyPlugS.zip'}}], ['.*', {'version': '2.6.1', 'rel_notes': 'https://github.com/mongoose-os-apps/shelly-homekit/releases/tag/2.6.1', 'urls': {'Shelly1': 'https://rojer.me/files/shelly/2.6.1/shelly-homekit-Shelly1.zip', 'Shelly1L': 'https://rojer.me/files/shelly/2.6.1/shelly-homekit-Shelly1L.zip', 'Shelly1PM': 'https://rojer.me/files/shelly/2.6.1/shelly-homekit-Shelly1PM.zip', 'Shelly2': 'https://rojer.me/files/shelly/2.6.1/shelly-homekit-Shelly2.zip', 'Shelly25': 'https://rojer.me/files/shelly/2.6.1/shelly-homekit-Shelly25.zip', 'ShellyI3': 'https://rojer.me/files/shelly/2.6.1/shelly-homekit-ShellyI3.zip', 'Shelly-i3': 'https://rojer.me/files/shelly/2.6.1/shelly-homekit-ShellyI3.zip', 'ShellyPlug': 'https://rojer.me/files/shelly/2.6.1/shelly-homekit-ShellyPlug.zip', 'ShellyPlugS': 'https://rojer.me/files/shelly/2.6.1/shelly-homekit-ShellyPlugS.zip'}}]]

device_scan
Scanning for Shelly devices...
Valid Hostname: shelly1l-XXXXXXXXXXXXXX.local True
Hostname: shelly1l-XXXXXXXXXXXXXX.local is Online
Device URL: http://XXX.XXX.XXX.XXX/settings
1 Devices found.

device_test: [{'host': 'shelly1l-XXXXXXXXXXXXXX.local', 'wifi_ip': 'XXX.XXX.XXX.XXX', 'fw_type': 'stock', 'device_url': 'http://XXX.XXX.XXX.XXX/settings', 'info': {'device': {'type': 'SHSW-L', 'mac': '84CCA8ADE8CB', 'hostname': 'shelly1l-XXXXXXXXXX', 'num_outputs': 1, 'num_meters': 1}, 'wifi_ap': {'enabled': False, 'ssid': 'shelly1l-XXXXXXXXXXX', 'key': ''}, 'wifi_sta': {'enabled': True, 'ssid': 'DRADIS', 'ipv4_method': 'dhcp', 'ip': None, 'gw': None, 'mask': None, 'dns': None}, 'wifi_sta1': {'enabled': False, 'ssid': None, 'ipv4_method': 'dhcp', 'ip': None, 'gw': None, 'mask': None, 'dns': None}, 'mqtt': {'enable': False, 'server': '192.168.33.3:1883', 'user': '', 'id': 'shelly1l-XXXXXXXXXXXX', 'reconnect_timeout_max': 60.0, 'reconnect_timeout_min': 2.0, 'clean_session': True, 'keep_alive': 60, 'max_qos': 0, 'retain': False, 'update_period': 30}, 'coiot': {'update_period': 15}, 'sntp': {'server': 'time.google.com', 'enabled': True}, 'login': {'enabled': False, 'unprotected': False, 'username': 'admin'}, 'pin_code': '', 'name': 'xwing-ii', 'fw': '20201205-115619/v1.9.2_1L@8f181f76', 'factory_reset_from_switch': True, 'discoverable': True, 'build_info': {'build_id': '20201205-115619/v1.9.2_1L@8f181f76', 'build_timestamp': '2020-12-05T11:56:19Z', 'build_version': '1.0'}, 'cloud': {'enabled': False, 'connected': False}, 'timezone': 'Europe/Berlin', 'lat': 9.51183, 'lng': 9.51183, 'tzautodetect': True, 'tz_utc_offset': 3600, 'tz_dst': False, 'tz_dst_auto': True, 'time': '20:52', 'unixtime': 1608324770, 'led_status_disable': True, 'actions': {'active': False, 'names': ['btn1_on_url', 'btn1_off_url', 'btn1_longpush_url', 'btn1_shortpush_url', 'btn2_on_url', 'btn2_off_url', 'btn2_longpush_url', 'btn2_shortpush_url', 'out_on_url', 'out_off_url', 'ext_temp_over_url', 'ext_temp_under_url', 'ext_temp_over_url', 'ext_temp_under_url', 'ext_temp_over_url', 'ext_temp_under_url', 'ext_hum_over_url', 'ext_hum_under_url']}, 'hwinfo': {'hw_revision': 'prod-202010', 'batch_id': 0}, 'mode': 'relay', 'longpush_time': 800, 'power': -1, 'relays': [{'name': None, 'appliance_type': 'General', 'ison': False, 'has_timer': False, 'default_state': '_unknown_', 'btn1_type': 'toggle', 'btn1_reverse': 0, 'btn2_type': 'toggle', 'btn2_reverse': 0, 'swap_inputs': False, 'auto_on': 0.0, 'auto_off': 0.0, 'schedule': False, 'schedule_rules': []}], 'ext_sensors': {}, 'ext_temperature': {}, 'ext_humidity': {}}}]
Mode: Stock To Stock
Mode: Stock To HomeKit

parse_info
device_info: <__main__.StockDevice object at 0x7fd0f3a7ad00>
host: shelly1l-XXXXXXXXXXXX.local
device: shelly1l-XXXXXXXXXXXX
model: Shelly1L
stock_model: SHSW-L
colour_mode: relay
action: list
flash mode: homekit
requires_upgrade: False

Host: http://shelly1l-XXXXXXXXXXXXX.local
Device ID: shelly1l-XXXXXXXXXXXXX
IP: XXX.XXX.XXX.XXX
Model: Shelly1L
Current: Stock 1.9.2_1L
Latest: HomeKit 2.6.1
D_URL: https://rojer.me/files/shelly/2.6.1/shelly-homekit-Shelly1L.zip`

ok, i see, i have my shelly1L, but serial lead does not fit the smaller pin header, i have some new cables coming as soon as they arrive, i will take a core dump, and try to flash it OTA, i do not want to try things untill i have RAW dump of current firmware, I did speak to a Shelly Engineer today about and he said they should be no reason that it should not flash via OTA.

my assumption is that there is some check that the stock firmware is looking for to make sure the new firmware is compatible, just like it does for other shellys, ie you can't flash a Shelly1 firmware over Shelly1L, so i am assuming we are missig a flag in @rojer firmware on the Shelly1L (at least on some devices).

i will report back once i can debug the Flash with serial connection.

ok, i reproduced and fixed the bug.
it looks like in 1.9 stock firmware started using hardware timer in NMI mode while our firmware uses it in non-nmi mode.
because this register doesn't get cleared during soft reset, during upgrade this causes an issue because interrupt is not properly configured and never fires.
long story short, https://github.com/cesanta/mongoose-os/commit/41f01a2c76d626249d42bfdc4ec8f068e7251d00 is the fix, i pushed 2.7.0-beta2, please test - https://github.com/mongoose-os-apps/shelly-homekit/issues/323

Now it works great! Thanks a lot @rojer and @andyblac for your help

I am even not able to load the BETA firmware to my device.
Same behavior like with the released version.

Did you use the right URL?

http://A.B.C.D/ota?url=http://rojer.me/files/shelly/2.7.0-beta2/shelly-homekit-Shelly1L.zip

Now it works great! Thanks a lot @rojer and @andyblac for your help

Same from me: you guys rock! 👍 thanks a lot

Did you use the right URL?

http://A.B.C.D/ota?url=http://rojer.me/files/shelly/2.7.0-beta2/shelly-homekit-Shelly1L.zip

Yes. This is was I did.
After adding the link, I receive following message and only stock firmware loads.

{"status":"updating","has_update":false,"new_version":"","old_version":"20201205-115619/v1.9.2_1L@8f181f76"}

Regards
Dirk

I have changed the Shelly from static IP to DHCP and Voila: it worked!
Great job guys.,

Thanks a lot!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Baza207 picture Baza207  ·  5Comments

Rappelsack picture Rappelsack  ·  10Comments

andyblac picture andyblac  ·  9Comments

Snekatis picture Snekatis  ·  4Comments

rojer picture rojer  ·  13Comments