shelly-homekit
shelly-homekit copied to clipboard
Shelly Plug US support (gen 1 / not Plus)
103016521 shelly_update.c:168 Starting ota from http://rojer.me/files/shelly/shelly-homekit-ShellyPlug.zip
103521936 mgos_ota_http_clien:270 Update URL: http://rojer.me/files/shelly/shelly-homekit-ShellyPlug.zip
104063910 mgos_ota_core.c:253 Starting, timeout 240, commit timeout 0, mem 36244
104075316 mgos_ota_core.c:487 FW: shelly-plug2 esp8266 2.9.3 20210714-210002/2.9.3-g2f89855-master
104080117 shelly_update.c:90 BEGIN: shelly-plug2
104085763 shelly_update.c:98 will not update shelly-plug-u1 with shelly-plug2
I could override this manually and force it to go, as I seriously doubt the esp8266 inside is wired differently, and I do have the ability to hot-air it off and manually flash it back to something usable, but I thought I'd ask about it prior to attempting that!
As it turns out, it's a good thing I didn't! I was completely wrong - the GPIOs are used differently between the plug and the plug US.
https://templates.blakadder.com/shelly_plug_US.html and https://templates.blakadder.com/shelly_plug.html
Shelly Plug US (shelly-plug-u1)
GPIO # | Component |
---|---|
GPIO00 | Led1 |
GPIO01 | None |
GPIO02 | Led2i |
GPIO03 | None |
GPIO04 | Relay1 |
GPIO05 | BL0937 CF |
GPIO09 | None |
GPIO10 | None |
GPIO12 | HLWBL SELi |
GPIO13 | Button1 |
GPIO14 | HLWBL CF1 |
GPIO15 | LedLink |
GPIO16 | None |
FLAG | None |
Shelly Plug (shelly-plug-2)
GPIO # | Component |
---|---|
GPIO00 | None |
GPIO01 | None |
GPIO02 | None |
GPIO03 | None |
GPIO04 | Relay 1 |
GPIO05 | HLW8012 CF |
GPIO09 | None |
GPIO10 | None |
GPIO12 | Button_i 1 |
GPIO13 | Led 1 |
GPIO14 | Led 2 |
GPIO15 | None |
GPIO16 | Led 3 |
GPIO17 | None |
Looks like some GPIO wrangling needs to be done.
The reason why it doesn't flash is that the US plug has a different name then the (EU) plug2, shelly-plug-u1 vs shelly-plug2. During the update the name of the current and the new firmware is compared and the flash will be aboard if not match.
I think you mixed some things: There are 3 Shelly plugs out there
- Shelly Plug
- Shelly Plug 2
- Shelly Plug US
The pinout you listed as "Shelly Plug (shelly-plug-2)" is that one of the "Shelly Plug", but the "Shelly Plug US" is more like the "Shelly Plug2".
I can give you a test build for the Plug US, but I have no test hardware at hand so I need to trust the Tasmota template, so it can happen that it brick your device.
I have 4 sitting here and the ability to pop it open and manually re-flash, so let’s do it. :)
Also, I did paste froM the tasmota template for us, but I was initially confused.
@Numbski ok, try this one - http://rojer.me/files/shelly/shplgu1.zip built from the commit above, i think it might work. if it does, please report if power consumption figures look ok (a good way to test is pluggin a heater, or a a fan, or iron and comparing power consumption numbers). also, let me know if system temperature in web ui looks reasonable (should be 45-60C or thereabouts). also please test reverting back to stock.
Thank you for that. My mother-in-law is critically ill, and we had to leave on a moments’ notice to get to her, and my return timeline is unknown. I will get to this when I can. I am so sorry for you to go to that effort then make you wait. I may be able to do it remotely, but that may not be feasible.
Tony Shadwick
@Numbski oh, sorry to hear that! don't worry, there's absolutely no rush with this.
@Numbski ok, try this one - http://rojer.me/files/shelly/shplgu1.zip built from the commit above, i think it might work. if it does, please report if power consumption figures look ok (a good way to test is pluggin a heater, or a a fan, or iron and comparing power consumption numbers). also, let me know if system temperature in web ui looks reasonable (should be 45-60C or thereabouts). also please test reverting back to stock.
I was able to try the OTA update with this build, but it doesn't take for me.
This issue is stale because it has been open 30 days with no activity. Comment or this will be closed in 7 days.
@Numbski any updates with your testing?
Not yet. I am back in town though, will try tomorrow.
Tony Shadwick
I'd be willing to test a new firmware on my plug if needed. It appears the previous iteration didn't work?
I tried compiling @rojer 's commit after rebasing master but the firmware doesn't apply for me either.
{"ts":1658371765.180, "level":2, "data":"mgos_ota_core.c:656 FW: shelly-plug-us1 esp8266 2.11.1 20220721-022206/2.11.1-3-g1f555d8-dirty sig 0x00\n"}
{"ts":1658371765.191, "level":2, "data":"shelly_update.cpp:242 Signature check: 00\n"}
{"ts":1658371765.198, "level":0, "data":"shelly_update.cpp:234 Wrong app name 'shelly-plug-us1'\n"}
{"ts":1658371765.206, "level":2, "data":"mgos_ota_core.c:1051 Update finished, result -13 (Aborted by event handler)\n"}```
Has the name changed for my plug?
{"name":null,"id":"shellyplugus-XXXXXXXX","mac":"XXXXXXXX","model":"SNPL-00116US","gen":2,"fw_id":"20220211-132652/plugusprod2_app-gcb4621f","ver":"plugusprod2","app":"PlugUS","auth_en":false,"auth_domain":null}
What is the state of Shelly Plug US support? yay or nay?
Attempted to install shelly-homekit today (after updating to latest stock firmware) and I get stuck with this message: "Trying to update from http://shelly.rojer.cloud/update."
Cheers and Thanks
I had a death in my family last year about the time a test build was made available, and I never got around to testing it. I have five of them here, so I really should get on that.
There is no support for "Shelly Plus Plug US"?
First off @Numbski, so sorry for your loss. Hope you and your family have been doing well.
I've tried to compile @rojer's commit linked above, but am getting some build errors. I can wade in and try to work around them myself, but maybe this is the wrong path entirely. Anyone have suggestions?
/Users/raphael/Downloads/shelly-homekit/src/shelly_main.cpp: In function 'void shelly::InitApp()':
/Users/raphael/Downloads/shelly-homekit/src/shelly_main.cpp:955:58: error: too few arguments to function 'void mgos_hap_add_rpc_service_cb(HAPAccessoryServerRef*, void (*)(HAPAccessoryServerRef*), void (*)(HAPAccessoryServerRef*))'
955 | mgos_hap_add_rpc_service_cb(&s_server, StartHAPServerCB);
| ^
In file included from /Users/raphael/Downloads/shelly-homekit/src/shelly_main.cpp:24:
/Users/raphael/Downloads/shelly-homekit/deps/homekit-adk/include/mgos_hap.h:126:6: note: declared here
126 | void mgos_hap_add_rpc_service_cb(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
make: *** [/Users/raphael/Downloads/shelly-homekit/build_ShellyPlugUS1/objs/shelly_main.cpp.o] Error 1
There is no support for "Shelly Plus Plug US"?
I too would like support for the Shelly Plus Plug US please. Then I can flash all my shelly stuff, hopefully, and stop using the Shelly Bridge via HOOBS. :)
here is a new build of @rojer commit, please test it, it it works the next release will support PlugUS. ~PlugUS.zip~ Edit: out dated files removed, for newer version see 4 comments later
here is a new build of @rojer commit, please test it, it it works the next release will support PlugUS.
Sir- I am unsure how to install the plugin from a ZIP file in HOOBS, if that is even possible. Can it be installed through the HOOBS interface? I would love to test it out.
curl -F [email protected] http://shelly.local/update
, you must replace shelly.local
with the hostname or ip of your Shelly
Hi @timoschilling, thanks so much for your work on this. I tried the above command with your new PlugUS.zip and got a -13 Aborted by event handler
response. Is there something else I should try?
here is a new build http://rojer.me/files/shelly/misc/shelly-homekit-ShellyPlugUS.zip, now it can be flash like every other shelly too. http://a.b.c.d/ota?url=http://rojer.me/files/shelly/misc/shelly-homekit-ShellyPlugUS.zip
Doesn't seem to be working for me, no specific error given. I'm on the Shelly 0.12 firmware, do you think that might be an issue?
@RaphiePS do you have a Plug US or a Plus Plug US? If you say you have version 0.12 it sounds like a Plus Plug US, the firmware from this PR is for the old Plus US without Plus. Support for the Plus version will follow in the future.
@timoschilling Here are the results of GET /shelly
, I think this implies a non- Plus plug, but I could be wrong.
{
"name": null,
"id": "shellyplugus-c049ef892e60",
"mac": "C049EF892E60",
"model": "SNPL-00116US",
"gen": 2,
"fw_id": "20221206-140846/0.12.0-gafc2404",
"ver": "0.12.0",
"app": "PlugUS",
"auth_en": false,
"auth_domain": null
}
Note that it didn't come with v0.12 firmware, that was a relatively recent upgrade suggested by the Shelly Web GUI. Do you have a suggested firmware version I should downgrade to before attempting the HomeKit flash? (And if so, where I could find these older firmware files? http://archive.shelly-tools.de doesn't seem to have files for the US Plug).
@RaphiePS There three reasons why yours must be a Plus:
- the output you posted shows
gen: 2
- The current version of non Plus US Plug is 1.x
- The model of the gen 1 is SHPLG-U1
Take a look in the web Ui of your Shelly in the left top corner is a logo, I expect it contains a Plus.
I suppose I should get on trying this today, as all of mine are plug US.
Tony Shadwick
@gedeyenite If you like to test it, you could simply do it by open this url in your browser http://a.b.c.d/ota?url=http://rojer.me/files/shelly/misc/shelly-homekit-ShellyPlugUS.zip (replace a.b.c.d with the ip of your shelly)
@Numbski @just-inlewis @evanpierre @ryanshuck was someone of you able to test that build? Reminder it's only for the "Plug US" not for the "Plus Plug US".