Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing 2.11.0 #868

Closed
rojer opened this issue Dec 17, 2021 · 208 comments
Closed

Testing 2.11.0 #868

rojer opened this issue Dec 17, 2021 · 208 comments

Comments

@rojer
Copy link
Contributor

rojer commented Dec 17, 2021

What's new:

alpha5:

alpha6:

  • Fix HAP setup timeouts
  • Show new version and build when updating
  • A couple minor fixes

alpha7:

alpha8:

alpha9:

beta1:

  • Enabled wifi power saving for Plus models.

beta2:

beta3:

beta4:

beta5:

  • Fix a regression with Duo and RGBW2 introduced in beta4

beta6:

  • Fix accessory identification for bulbs
@bmpalmeida
Copy link

I don’t know if it is intentional in the alpha builds. But the check for updates and revert to stock are missing.

rojer added a commit that referenced this issue Dec 17, 2021
@rojer
Copy link
Contributor Author

rojer commented Dec 17, 2021

no, it's a bug - fixed in alpha3

@timoschilling timoschilling pinned this issue Dec 17, 2021
@timoschilling
Copy link
Collaborator

timoschilling commented Dec 17, 2021

There is a problem with the Shelly 2.5 firmware. It is introduced between alpha1 and alpha2. I tested it with 3 different shelly, each with a different installed version. So I think the problem is the new firmware and not the old one.

Observed things:

  1. alpha1 can be installed
  2. alpha2 & 3 not
  3. alpha2 jumps up in size from 992747 to 1005036
  4. flash crashes with ConnectionResetError: [Errno 54] Connection reset by peer
  5. upload via UI stops at 0%

@bmpalmeida
Copy link

I'm also having the same behaviour from the script, i left the script running all night (while [[ 0 -eq 0 ]]; do python3 flash-shelly.py -m keep -y -i 3 -a --variant alpha; sleep 20; clear; done) and none of the 2.5 were updated. But all the 1PM are completely fine.

@andyblac
Copy link
Collaborator

I'm also having the same behaviour from the script, i left the script running all night (while [[ 0 -eq 0 ]]; do python3 flash-shelly.py -m keep -y -i 3 -a --variant alpha; sleep 20; clear; done) and none of the 2.5 were updated. But all the 1PM are completely fine.

I would like to see the output of that if poss, as it should have timed out.

add --log-file debug.log to your command line, post the log file itself.

Thx

@bmpalmeida
Copy link

Looks like the crash is the script trying to update my 3d printer.

Attachment the debug log and also the console output.

debug.log

Console output:

admin@iMac tools % python3 flash-shelly.py -m keep -y -i 3 -a --variant alpha --log-file debug.log
Scanning for Shelly devices...

Host: http://shellydimmer-D3E51C.local
Device Name: Extrator-Musica
Model: ShellyDimmer
Device ID: shellydimmer-D3E51C
Mode: White
SSID: bma-home
IP: 192.168.50.249
RSSI: -49
Up Time: 7 days, 14:44:55
Firmware: Stock 1.11.7 ✔

Host: http://Bomba-Casa-Maquinas.local
Device Name: Bomba-Casa-Maquinas
Model: Shelly1PM
Device ID: shelly1pm-D220EB
Mode: Switch
SSID: bma-home
IP: 192.168.50.247
Sys Temp: 30˚c
Up Time: 9:42:56
HAP Connections: 0 / 2 / 12
Firmware: HomeKit 2.11.0-alpha3 ✔

Host: http://Musica-Duplo.local
Device Name: Musica-Duplo
Model: Shelly25
Device ID: shellyswitch25-F2F3F6
Mode: Switch
SSID: bma-home
IP: 192.168.50.45
RSSI: -43
Sys Temp: 58˚c
Up Time: 7 days, 14:44:36
HAP Connections: 0 / 2 / 12
Firmware: HomeKit 2.10.1 ➜ 2.11.0-alpha3
Downloading Firmware...
Now Flashing HomeKit 2.11.0-alpha3

Host: http://Luz-Casa-Maquinas.local
Device Name: Luz-Casa-Maquinas
Model: Shelly1PM
Device ID: shelly1pm-FADBF9
Mode: Switch
SSID: bma-home
IP: 192.168.50.24
Sys Temp: 28˚c
Up Time: 9:43:29
HAP Connections: 0 / 2 / 12
Firmware: HomeKit 2.11.0-alpha3 ✔

Host: http://shellydimmer-D3EB09.local
Device Name: Exterior-Parede-Direita
Model: ShellyDimmer
Device ID: shellydimmer-D3EB09
Mode: White
SSID: bma-home
IP: 192.168.50.157
RSSI: -77
Up Time: 7 days, 14:44:55
Firmware: Stock 1.11.7 ✔

Host: http://Wc-cave.local
Device Name: Wc-cave
Model: Shelly1PM
Device ID: shelly1pm-FADDE2
Mode: Switch
SSID: bma-home
IP: 192.168.50.145
Sys Temp: 39˚c
Up Time: 6:20:48
HAP Connections: 0 / 0 / 12
Firmware: HomeKit 2.11.0-alpha3 ✔

Host: http://quarto-direita.local
Device Name: quarto-direita
Model: Shelly1PM
Device ID: shelly1pm-05F7CB
Mode: Switch
SSID: bma-home
IP: 192.168.50.39
Sys Temp: 39˚c
Up Time: 9:36:05
HAP Connections: 0 / 2 / 12
Firmware: HomeKit 2.11.0-alpha3 ✔

Host: http://Suite-Banheira.local
Device Name: Suite-Banheira
Model: Shelly25
Device ID: shellyswitch25-10C5DF
Mode: Switch
SSID: bma-home
IP: 192.168.50.213
RSSI: -59
Sys Temp: 53˚c
Up Time: 12 days, 16:22:09
HAP Connections: 0 / 2 / 12
Firmware: HomeKit 2.10.1 ➜ 2.11.0-alpha3
Downloading Firmware...
Now Flashing HomeKit 2.11.0-alpha3

flash-shelly version: 2.8.0
Try to update your script, maybe the bug is already fixed!
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/urllib3/response.py", line 438, in _error_catcher
yield
File "/usr/local/lib/python3.9/site-packages/urllib3/response.py", line 519, in read
data = self._fp.read(amt) if not fp_closed else b""
File "/usr/local/Cellar/[email protected]/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 463, in read
n = self.readinto(b)
File "/usr/local/Cellar/[email protected]/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 507, in readinto
n = self.fp.readinto(b)
File "/usr/local/Cellar/[email protected]/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/socket.py", line 704, in readinto
return self._sock.recv_into(b)
ConnectionResetError: [Errno 54] Connection reset by peer

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/requests/models.py", line 758, in generate
for chunk in self.raw.stream(chunk_size, decode_content=True):
File "/usr/local/lib/python3.9/site-packages/urllib3/response.py", line 576, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "/usr/local/lib/python3.9/site-packages/urllib3/response.py", line 541, in read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
File "/usr/local/Cellar/[email protected]/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/contextlib.py", line 137, in exit
self.gen.throw(typ, value, traceback)
File "/usr/local/lib/python3.9/site-packages/urllib3/response.py", line 455, in _error_catcher
raise ProtocolError("Connection broken: %r" % e, e)
urllib3.exceptions.ProtocolError: ("Connection broken: ConnectionResetError(54, 'Connection reset by peer')", ConnectionResetError(54, 'Connection reset by peer'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/admin/Downloads/shelly-homekit-master/tools/flash-shelly.py", line 941, in run_app
self.device_scan()
File "/Users/admin/Downloads/shelly-homekit-master/tools/flash-shelly.py", line 1579, in device_scan
self.probe_device(device)
File "/Users/admin/Downloads/shelly-homekit-master/tools/flash-shelly.py", line 1485, in probe_device
self.parse_info(device_info, hk_flash_fw_version)
File "/Users/admin/Downloads/shelly-homekit-master/tools/flash-shelly.py", line 1355, in parse_info
self.write_flash(device_info)
File "/Users/admin/Downloads/shelly-homekit-master/tools/flash-shelly.py", line 1105, in write_flash
response = device_info.flash_firmware(revert)
File "/Users/admin/Downloads/shelly-homekit-master/tools/flash-shelly.py", line 574, in flash_firmware
response = requests.post(url=f'http://{self.wifi_ip}/update', auth=HTTPDigestAuth(self.username, self.password), files=files)
File "/usr/local/lib/python3.9/site-packages/requests/api.py", line 117, in post
return request('post', url, data=data, json=json, **kwargs)
File "/usr/local/lib/python3.9/site-packages/requests/api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 697, in send
r.content
File "/usr/local/lib/python3.9/site-packages/requests/models.py", line 836, in content
self._content = b''.join(self.iter_content(CONTENT_CHUNK_SIZE)) or b''
File "/usr/local/lib/python3.9/site-packages/requests/models.py", line 761, in generate
raise ChunkedEncodingError(e)
requests.exceptions.ChunkedEncodingError: ("Connection broken: ConnectionResetError(54, 'Connection reset by peer')", ConnectionResetError(54, 'Connection reset by peer'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/admin/Downloads/shelly-homekit-master/tools/flash-shelly.py", line 1584, in
sys.exit(main.run_app())
File "/Users/admin/Downloads/shelly-homekit-master/tools/flash-shelly.py", line 947, in run_app
traceback.trace_exception(exc_type, exc_value, exc_traceback, file=sys.stdout)
AttributeError: module 'traceback' has no attribute 'trace_exception'

Devices found: 8 Upgradeable: 2 Flashed: 0
Log file created: debug.log

@andyblac
Copy link
Collaborator

please try version 3.0 beta of the script #686

@bmpalmeida
Copy link

Now it crashes trying to update one 2.5 (i believe that this is due to what timoschilling was reporting on the firmware problem with 2.5).

debug.log

admin@iMac Downloads % python3 flash-shelly.py -m keep -y -i 3 -a --variant alpha --log-file debug.log
Scanning for Shelly devices...

Host: http://quarto-direita.local
Device Name: quarto-direita
Model: Shelly1PM
Device ID: shelly1pm-05F7CB
Mode: Switch
SSID: bma-home
IP: 192.168.50.39
Sys Temp: 39˚c
Up Time: 9:50:44
HAP Connections: 0 / 2 / 12
Firmware: HomeKit 2.11.0-alpha3 ✔

Host: http://Bomba-Casa-Maquinas.local
Device Name: Bomba-Casa-Maquinas
Model: Shelly1PM
Device ID: shelly1pm-D220EB
Mode: Switch
SSID: bma-home
IP: 192.168.50.247
Sys Temp: 30˚c
Up Time: 9:57:36
HAP Connections: 0 / 2 / 12
Firmware: HomeKit 2.11.0-alpha3 ✔

Host: http://Luz-Casa-Maquinas.local
Device Name: Luz-Casa-Maquinas
Model: Shelly1PM
Device ID: shelly1pm-FADBF9
Mode: Switch
SSID: bma-home
IP: 192.168.50.24
Sys Temp: 28˚c
Up Time: 9:58:10
HAP Connections: 0 / 2 / 12
Firmware: HomeKit 2.11.0-alpha3 ✔

Host: http://shellyplug-s-51D7C0.local
Device Name: Frigorifico
Model: ShellyPlugS
Device ID: shellyplug-s-51D7C0
SSID: bma-home
IP: 192.168.50.59
RSSI: -55
Up Time: 22 days, 7:36:24
Firmware: Stock 1.11.7 ✔

Host: http://shellyem-C45BBE5FE4C8.local
Device Name: None
Model: ShellyEM
Device ID: shellyem-C45BBE5FE4C8
SSID: bma-home
IP: 192.168.50.253
RSSI: -76
Up Time: 7 days, 14:59:22
Firmware: Stock 1.11.7 ✔

Host: http://Lavandaria.local
Device Name: Lavandaria
Model: Shelly1PM
Device ID: shelly1pm-FAE0FC
Mode: Switch
SSID: bma-home
IP: 192.168.50.134
Sys Temp: 40˚c
Up Time: 9:44:47
HAP Connections: 0 / 2 / 12
Firmware: HomeKit 2.11.0-alpha3 ✔

Host: http://shellydimmer-D3E51C.local
Device Name: Extrator-Musica
Model: ShellyDimmer
Device ID: shellydimmer-D3E51C
Mode: White
SSID: bma-home
IP: 192.168.50.249
RSSI: -48
Up Time: 7 days, 14:59:37
Firmware: Stock 1.11.7 ✔

Host: http://Musica-Duplo.local
Device Name: Musica-Duplo
Model: Shelly25
Device ID: shellyswitch25-F2F3F6
Mode: Switch
SSID: bma-home
IP: 192.168.50.45
RSSI: -43
Sys Temp: 58˚c
Up Time: 7 days, 14:59:18
HAP Connections: 0 / 2 / 12
Firmware: HomeKit 2.10.1 ➜ 2.11.0-alpha3
Downloading Firmware...
Now Flashing HomeKit 2.11.0-alpha3

flash-shelly version: 3.0.0
Try to update your script, maybe the bug is already fixed!
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/urllib3/response.py", line 438, in _error_catcher
yield
File "/usr/local/lib/python3.9/site-packages/urllib3/response.py", line 519, in read
data = self._fp.read(amt) if not fp_closed else b""
File "/usr/local/Cellar/[email protected]/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 463, in read
n = self.readinto(b)
File "/usr/local/Cellar/[email protected]/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 507, in readinto
n = self.fp.readinto(b)
File "/usr/local/Cellar/[email protected]/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/socket.py", line 704, in readinto
return self._sock.recv_into(b)
ConnectionResetError: [Errno 54] Connection reset by peer

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/requests/models.py", line 758, in generate
for chunk in self.raw.stream(chunk_size, decode_content=True):
File "/usr/local/lib/python3.9/site-packages/urllib3/response.py", line 576, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "/usr/local/lib/python3.9/site-packages/urllib3/response.py", line 541, in read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
File "/usr/local/Cellar/[email protected]/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/contextlib.py", line 137, in exit
self.gen.throw(typ, value, traceback)
File "/usr/local/lib/python3.9/site-packages/urllib3/response.py", line 455, in _error_catcher
raise ProtocolError("Connection broken: %r" % e, e)
urllib3.exceptions.ProtocolError: ("Connection broken: ConnectionResetError(54, 'Connection reset by peer')", ConnectionResetError(54, 'Connection reset by peer'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/admin/Downloads/flash-shelly.py", line 1188, in run_app
self.device_scan()
File "/Users/admin/Downloads/flash-shelly.py", line 1691, in device_scan
self.probe_device(device)
File "/Users/admin/Downloads/flash-shelly.py", line 1634, in probe_device
self.parse_info(device, hk_flash_fw_version) # main convert run, or update stock to latest firmware if an update or color mode is required.
File "/Users/admin/Downloads/flash-shelly.py", line 1527, in parse_info
self.flash_firmware(device)
File "/Users/admin/Downloads/flash-shelly.py", line 1291, in flash_firmware
response = device.write_firmware() # do actual flash firmware.
File "/Users/admin/Downloads/flash-shelly.py", line 659, in write_firmware
response = requests.post(url=f'http://{self.wifi_ip}/update', auth=HTTPDigestAuth(self.username, self.password), files=files)
File "/usr/local/lib/python3.9/site-packages/requests/api.py", line 117, in post
return request('post', url, data=data, json=json, **kwargs)
File "/usr/local/lib/python3.9/site-packages/requests/api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 697, in send
r.content
File "/usr/local/lib/python3.9/site-packages/requests/models.py", line 836, in content
self._content = b''.join(self.iter_content(CONTENT_CHUNK_SIZE)) or b''
File "/usr/local/lib/python3.9/site-packages/requests/models.py", line 761, in generate
raise ChunkedEncodingError(e)
requests.exceptions.ChunkedEncodingError: ("Connection broken: ConnectionResetError(54, 'Connection reset by peer')", ConnectionResetError(54, 'Connection reset by peer'))

Devices found: 8 Upgradeable: 1 Flashed: 0
Log file created: debug.log

@andyblac
Copy link
Collaborator

ConnectionResetError: [Errno 54] Connection reset by peer same error as @timoschilling

@rojer
Copy link
Contributor Author

rojer commented Dec 19, 2021

hm, sorry, i don't understand - alpha3 cannot update?
seems to be working for me, uploading firmware to an alpha3 device worked just fine.

@andyblac
Copy link
Collaborator

@rojer it seem to going from 2.10.1 direct to alpha3, (I have not tried myself, getting rooms re-plastered here, everything upside down atm.)

@timoschilling
Copy link
Collaborator

timoschilling commented Dec 19, 2021

@rojer im not able to flash a 2.5 with 2.10.1/2.10.0/2.9.x to 2.11.0-alpha3. The upload via script, via curl and via UI didn’t work. Would work mean UI stops at 0% progress and curl/script getting a connection reset.

@lucaspinelli85
Copy link

Can't updateimage

@rojer
Copy link
Contributor Author

rojer commented Dec 23, 2021

ah, you're right. 2.5 firmware size has crossed the magic 716KB. 2.5 is the biggest of them and i did not happen to have one on hand for testing the alpha.
i will look at the things to trim, or this may in fact be the time when we need to shrink the FS to make more room for code.

@rojer
Copy link
Contributor Author

rojer commented Dec 23, 2021

i dropped rpc-service-ota and this freed up some space, so 2.5 should fit again. pushed alpha4, please give it a go.

@miguelpruivo
Copy link

miguelpruivo commented Dec 24, 2021

Hi! I have one question regarding 1 plus integration: does it uses Wi-Fi, Bluetooth or both to connect to a HomeKit hub (iPad, HomePod etc)? Because since it has a Bluetooth connection it might be handy to use it as a fallback only.

Also regarding this, is it possible to completely disable Bluetooth module and use only Wi-Fi in the settings? This should save some power while also preventing collision interference when a lot of IoT devices are present.

Thank you!

@Multisaft7
Copy link

Did I do something wrong when I try to do the firmware upgrade from my shelly 1 plus?

http://192.168.77.92/ota?url=http://rojer.me/files/shelly/2.11.0-alpha4/shelly-homekit-ShellyPlus1.zip

It says "Not Found"?!

@rojer
Copy link
Contributor Author

rojer commented Dec 24, 2021

Hi! I have one question regarding 1 plus integration: does it uses Wi-Fi, Bluetooth or both to connect to a HomeKit hub (iPad, HomePod etc)? Because since it has a Bluetooth connection it might be handy to use it as a fallback only.

so, situation with bluetooth is kinda unfortunate. i tried it, and it works but it doesn;t work seamlessly with wifi. once a bluetooth accessory, always a bluetooth accessory. accrding to apple, having accessory available on both BLE and IP transports is not supported. so when wifi becomes available, hub still insists on using BT, which in practice is slower and less responsive. additionally, bridge mode is not available over bluetooth and we use "bridge" mode to expose multiple accessories. so, in short, at the moment BLE is not supported. it's not much of a problem since when setting up shelly-hk, it's already connected to wifi.

firmware upgrade from my shelly 1 plus?

plus series cannot be upgraded this way, see instructions here.

@miguelpruivo
Copy link

@rojer so basically the 1 plus with HomeKit has Bluetooth completely disable? It’s not an issue for me, actually. I’d rather have Bluetooth off and all on Wi-Fi to prevent network collisions than having a lot of Shelly’s using both Wi-Fi and Bluetooth.

@rojer
Copy link
Contributor Author

rojer commented Dec 24, 2021

@miguelpruivo correct, currently bluetooth is not enabled in shelly-hk frmware.

@lucaspinelli85
Copy link

Hi all!
I managed to upgrade to alfa4, i have these questions:
1- how is the homekit qrcode generated now having two wifi? based on 1? or on the active one?
2- how does it connect to one wifi rather than the other? try the first if it fails, go to the second? or try both and connect to the best?
3- what happens if I put the same wifi in both?
4- by default the ap mode will be disabled, it would be convenient to auto-enable when the device fails to connect to the two wifi.
Thanks!

@rojer
Copy link
Contributor Author

rojer commented Dec 25, 2021

Hi all! I managed to upgrade to alfa4, i have these questions:
1- how is the homekit qrcode generated now having two wifi? based on 1? or on the active one?

based on wifi 1

2- how does it connect to one wifi rather than the other? try the first if it fails, go to the second? or try both and connect to the best?

try all usable APs (RSSI > -90) for wifi 1 first, from best to worst, then wifi 2.

3- what happens if I put the same wifi in both?

nothing much. APs will be deduplicated.

4- by default the ap mode will be disabled, it would be convenient to auto-enable when the device fails to connect to the two wifi.

this will be the case during initial setup. however, not after connection was established.
it might be convenient but since APs are open by default, it's kind of a security problem if device throws itself wide open on possibly transient connection failure. i think wifi reset via on/off or physical button is easy enough that this is not necessary.

@bmpalmeida
Copy link

Hello all,

i've installed alpha4 on a shelly 1PM before setup it on HomeKit, and every time i click setup i receive a request timeout (the interesting bit is that it was discoverable in the home app but i didn't knew the code).

This specific device is with RSSI -86 which could not help, but with 2.10.1 i manage to setup it perfectly.

@timoschilling
Copy link
Collaborator

@bmpalmeida I noticed something similar, try do make a reset and retry then.

@rojer
Copy link
Contributor Author

rojer commented Jun 2, 2022

pushed beta4. if everything goes well, this will be the last one.

@hughfr4nc15
Copy link

hughfr4nc15 commented Jun 3, 2022

Updated a ShellyBulbDuo to the latest beta and it does not report correctly the power state or turns on/off. Tried rebooting it several times.

Edit: Reverted to beta3 and all is ok now.

@peterandthejetsons
Copy link

peterandthejetsons commented Jun 3, 2022

For me everything works fine with beta4 version. I'm using for Garage Door opener. Thank you @rojer!

@chef76
Copy link

chef76 commented Jun 3, 2022

Shelly UNI works fine so far with beta4

@rojer
Copy link
Contributor Author

rojer commented Jun 3, 2022

@hughfr4nc15 probably my bad, most likely broke CCTController in 13b1e2c. reviewing the change i don't see what could've caused it, and i don't have a device to test with though, @timoschilling would you mind taking a look? we'll do beta5 then.

@rojer
Copy link
Contributor Author

rojer commented Jun 3, 2022

@hughfr4nc15 actually, i was able to test the CCT controller in emulation (with 889f850) and it works fine, home app is in sync with web ui and transitions seem to work correctly. can you open /debug/log in the browser and control the device with web ui and then homekit? post the log here. do it for both beta3 and beta4 please.

@kirbema
Copy link

kirbema commented Jun 4, 2022

@rojer: @hughfr4nc15 is right. you removed this line here: 13b1e2c#diff-2d3789d1c8b513abd98feaa6d455d9e2c5b68c1f372cb5933b571b5e3ad44b16L71

you added this in the white controller, 13b1e2c#diff-71ecb80d663c8bde307126569c514099165cb25ccd0e789b8729af858331bc67R33

but not in cct nor in rgbw code

rojer added a commit that referenced this issue Jun 4, 2022
@rojer
Copy link
Contributor Author

rojer commented Jun 4, 2022

@kirbema thanks Mark! yes, you[re right, thanks! pushed beta5 with the fix, @hughfr4nc15 please update and confirm.

@markirb
Copy link
Collaborator

markirb commented Jun 6, 2022

@rojer I can confirm, the issue is gone on RGBW2 with update from beta4 to beta5

@hughfr4nc15
Copy link

@rojer sorry for the delay on my answer. I've now updated to beta5 and like @kirbema said, the issue is gone.

Thanks.

@bmpalmeida
Copy link

bmpalmeida commented Jun 6, 2022

I have around 50 devices, 1PM, 2.5, rgbw2, and all of them are really stable with beta5, except one.

I’ve tried wifi power saving mode 2 in all of them, and i don’t notice any difference in performance, except this one.

I revert power save to disable, and looks like it is more stable, but i manage to catch the core dump which i sent via email to @rojer

just an update. It crashes in a way that I need to power cycle it for having working again. Not even the physical buttons work. Seems only stable with power saving disable.

@rojer
Copy link
Contributor Author

rojer commented Jun 9, 2022

@bmpalmeida i took a quick look at the dump - device ran out of memory, memory full of what looks like network traffic. it seems familiar, someone reported something like this before...

@timoschilling
Copy link
Collaborator

@rojer @markirb I have tested identify on a Duo, Vintage and Color Bulb, all with the same effect: Identify via HomeKit setup didn't work, via RPC it works.

Here is a log from a HomeKit setup identify request:

265967098 shelly_main.cpp:443     Up 265.96, HAP 0/1/12 ns 1, RAM: 27476/9160; st 0; 11.1: sta: on, b: 100, h: 0, sa: 100, ct: 400
267316038 HAPPlatformTCPStrea:121 0x3fff3d2c 10.0.0.188:60810 Incoming HAP connection, ns 0/1/12
267325475 HAPPlatformTCPStrea:276 0x3fff3d2c 10.0.0.188:60810 Accepted HAP connection, ns 0/2/12 ts 0x3fff56f4
273967010 shelly_main.cpp:443     Up 273.96, HAP 0/2/12 ns 2, RAM: 26988/9160; st 0; 11.1: sta: on, b: 100, h: 0, sa: 100, ct: 400
275657068 HAPPlatformTCPStrea:105 0x3fff3d2c 10.0.0.188:60810 HAP connection closed, ns 0/2/12 i 2
275665833 HAPPlatformTCPStrea:303 HAPPlatformTCPStreamClose ts 0x3fff56f4 nc 0x0 0/1/12
281967021 shelly_main.cpp:443     Up 281.96, HAP 0/1/12 ns 1, RAM: 27476/9160; st 0; 11.1: sta: on, b: 100, h: 0, sa: 100, ct: 400

@markirb
Copy link
Collaborator

markirb commented Jun 13, 2022

@timoschilling I only tested with RGBw2 via Eve. Can it be that the SetIdentifyCB is not called on Duo and ColorBulb? It is on vintage, so it should work there?

@timoschilling
Copy link
Collaborator

timoschilling commented Jun 13, 2022

@markirb I tested it again:

  1. Using ID function in Eve App, didn't flash any light
    1. returns error on Duo, ColorBulb and Vintage
    2. no error RGBW2 but no flashing light.
  2. Using http://xxxxx/rpc/Shelly.Identify?type=11&id=1 works on all devices.

@markirb
Copy link
Collaborator

markirb commented Jun 13, 2022

On RGBW2 you have to ID on the light, not on the device, did you do that?

image

I will try on vintage later

@timoschilling
Copy link
Collaborator

On RGBW2 the Eve app shows:
image
On Vintage, ColorBulb and Duo it shows:
image

But on RGBW2 it doesn't flash the led strip.

@kirbema
Copy link

kirbema commented Jun 13, 2022

Failed means that there is no Callback registered.

@rojer I see that these lines cannot work, as the accessory is created beforehand, and never registers the callback.
https://github.com/mongoose-os-apps/shelly-homekit/blob/master/src/ShellyVintage/shelly_init.cpp#L57-L62

But @timoschilling for me the Light flashes correctly on RGBW2. The callback seems to be there, otherwise it would also fail.
Do you have logs for the RGBW2? (The transititions should be there....)

@timoschilling
Copy link
Collaborator

Logs from the RGBW2 in RGB mode:

33551209807 HAPPlatformTCPStrea:121 0x3fff5f54 10.0.0.188:62714 Incoming HAP connection, ns 0/1/12
33551224255 HAPPlatformTCPStrea:276 0x3fff5f54 10.0.0.188:62714 Accepted HAP connection, ns 0/2/12 ts 0x3fff5334
33553017487 shelly_sys_led_btn.c:44 === IDENTIFY ===
33558131614 HAPPlatformTCPStrea:105 0x3fff5f54 10.0.0.188:62714 HAP connection closed, ns 0/2/12 i 2
33558145779 HAPPlatformTCPStrea:303 HAPPlatformTCPStreamClose ts 0x3fff5334 nc 0x0 0/1/12

When I use /rpc/Shelly.Identify?type=11&id=1, I got:

33671871618 mg_rpc.c:310            Shelly.Identify via HTTP 10.0.0.20:50071
33671880311 shelly_hap_light_bu:401 === IDENTIFY ===
33671897448 shelly_light_bulb_co:99 Starting transition: [r=0.00 g=0.00 b=0.00 w=0.00] -> [r=1.00 g=0.00 b=0.00 w=0.00], 500 ms
33671908229 shelly_rgbw_controll:38 Output 1: 0.00 => 1.00
33671917323 shelly_rgbw_controll:39 Output 2: 0.00 => 0.00
33671926450 shelly_rgbw_controll:40 Output 3: 0.00 => 0.00
33672403008 shelly_light_bulb_co:55 Transition finished, end state: [r=1.00 g=0.00 b=0.00 w=0.00]
33672419872 shelly_light_bulb_co:99 Starting transition: [r=1.00 g=0.00 b=0.00 w=0.00] -> [r=0.00 g=0.00 b=0.00 w=0.00], 500 ms
33672430442 shelly_rgbw_controll:38 Output 1: 1.00 => 0.00
33672439371 shelly_rgbw_controll:39 Output 2: 0.00 => 0.00
33672448346 shelly_rgbw_controll:40 Output 3: 0.00 => 0.00
33672779659 mg_rpc.c:310            Shelly.GetInfoExt via WS_in 10.0.0.20:50062
33672923223 shelly_light_bulb_co:55 Transition finished, end state: [r=0.01 g=0.00 b=0.00 w=0.00]
33672940105 shelly_light_bulb_co:99 Starting transition: [r=0.00 g=0.00 b=0.00 w=0.00] -> [r=1.00 g=0.00 b=0.00 w=0.00], 500 ms
33672950684 shelly_rgbw_controll:38 Output 1: 0.00 => 1.00
33672959640 shelly_rgbw_controll:39 Output 2: 0.00 => 0.00
33672968698 shelly_rgbw_controll:40 Output 3: 0.00 => 0.00
33673441421 shelly_light_bulb_co:55 Transition finished, end state: [r=0.99 g=0.00 b=0.00 w=0.00]
33673459221 shelly_light_bulb_co:99 Starting transition: [r=1.00 g=0.00 b=0.00 w=0.00] -> [r=0.00 g=0.00 b=0.00 w=0.00], 500 ms
33673468880 shelly_rgbw_controll:38 Output 1: 1.00 => 0.00
33673477819 shelly_rgbw_controll:39 Output 2: 0.00 => 0.00
33673487767 shelly_rgbw_controll:40 Output 3: 0.00 => 0.00
33673783078 mg_rpc.c:310            Shelly.GetInfoExt via WS_in 10.0.0.20:50062
33673957188 shelly_light_bulb_co:55 Transition finished, end state: [r=0.02 g=0.00 b=0.00 w=0.00]
33673974972 shelly_light_bulb_co:99 Starting transition: [r=0.00 g=0.00 b=0.00 w=0.00] -> [r=1.00 g=0.00 b=0.00 w=0.00], 500 ms
33673984622 shelly_rgbw_controll:38 Output 1: 0.00 => 1.00
33673993579 shelly_rgbw_controll:39 Output 2: 0.00 => 0.00
33674003523 shelly_rgbw_controll:40 Output 3: 0.00 => 0.00
33674479930 shelly_light_bulb_co:55 Transition finished, end state: [r=1.00 g=0.00 b=0.00 w=0.00]
33674496795 shelly_light_bulb_co:99 Starting transition: [r=1.00 g=0.00 b=0.00 w=0.00] -> [r=0.00 g=0.00 b=0.00 w=0.00], 500 ms
33674507399 shelly_rgbw_controll:38 Output 1: 1.00 => 0.00
33674516351 shelly_rgbw_controll:39 Output 2: 0.00 => 0.00
33674525341 shelly_rgbw_controll:40 Output 3: 0.00 => 0.00
33674781806 mg_rpc.c:310            Shelly.GetInfoExt via WS_in 10.0.0.20:50062
33674997893 shelly_light_bulb_co:55 Transition finished, end state: [r=0.01 g=0.00 b=0.00 w=0.00]

@kirbema
Copy link

kirbema commented Jun 13, 2022

shelly_sys_led_btn.c is wrong. Ok so we know, same error as in Vintage and co: this only works for non-primariy accessories as in my case.
We will need an Accessory->SetIdentifyCB() function

@markirb
Copy link
Collaborator

markirb commented Jun 13, 2022

see #1009 and mongoose-os-libs/homekit-adk#9

@rojer
Copy link
Contributor Author

rojer commented Jun 14, 2022

ok, thanks to @markirb we have identify for bulbs working. i pushed beta6 and very much hope this will be the last one.

@jonasman
Copy link

Will Plus 2PM be supported?

@rojer
Copy link
Contributor Author

rojer commented Jun 16, 2022

not in this release

@timoschilling
Copy link
Collaborator

I have tested the latest beta on my ColorBulb, Duo and Vintage and it works well!

@rojer
Copy link
Contributor Author

rojer commented Jun 19, 2022

pushed 2.11.0. it's a biggie!
thanks everyone for helping test the betas!

@rojer rojer closed this as completed Jun 19, 2022
@timoschilling timoschilling unpinned this issue Jul 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests