And what’s a Shelly Button 1? To not be confused with the OTHER Shelly Button which is a white plastic case to place round a Shelly One or related.. . I’ve after all used the Ikea Zigbee Good button (bear in mind the good plain button that they stopped producing and I’m questioning if that’s due to the crappy magnetic wall fastening) however that’s defunct. I used to be simply getting all upset about that once I came across the WiFi-based,rechargeable battery powered Shelly Button 1 product. In the meantime my Aqara Zigbee buttons are doing simply high-quality (additionally battery powered however utilizing a non-rechargeable CR2032 battery).

This text was initially written in February 2022 and I’m updating (finish part) in February 2023 whereas patiently ready for brand spanking new merchandise to debate following on from the current Covid+Chinese language New Yr shutdowns – and I’ve to say, Shelly proceed to amaze me although my expertise with the buttons wasn’t at first an excellent success – learn on… having reviewed their Shelly Plus 1 and Plus 1PM merchandise (on the time of the primary draft of this weblog entry) – simple to make use of and highly effective – when alongside got here this button.

After I began this write-up, the one issues I knew had been that the button is WiFi, battery powered, has a USB enter possibility for setup/charging and appears LOVELY. I received the white one – they do black as properly.

Fortunately, like all of their merchandise – there’s a ton of English-language data on the market and also you get loads of data with the machine itself. As for set-up, in step with their different units, the Button 1 product can create it’s personal entry level or connect with an present WiFi community (not .192.168.4.x as Tasmota firmware followers could count on however 192.168.33.x). The Shelly Button 1 has programmable choices for MQTT must you select to go down that route (as I’ve executed). I plugged mine into USB (good concept as a result of the built-in re-chargeable battery was at 50% on arrival) and the machine created it’s personal entry level.

I may have gone straight for the APP at this level however selected as a substitute to level my cellphone to that machine entry level at which period the cellphone acquired an handle within the 192.168.33.x vary. Pointing the cellphone browser to 192.168.33.1 gave me entry to the setup for the button – I set the button shopper mode to level to considered one of my dwelling entry factors after which went to play, updating the firmware over-the-air (OTA), giving it a customized identify and many others.

At that time I fired up the Shelly APP and instantly I may entry the button by means of the APP. Apart from the multi-function button, that’s about it or so it appeared. I went again to the interface on my cellphone and was given the chance to replace the button firmware – and that took a while throughout which mentioned button was unobtainable.

Unsure why the updating takes longer than related units, particularly on condition that the machine was plugged into USB, however hey, ho. After 5 minutes of updating I used to be beginning to have my doubts nevertheless.

I went off to the PC internet interface and positive sufficient the updating was executed.

I’m placing the overly-complicated model of this in purple – initially I had one hell of a time getting the buttons to work – however in the long run I received there – in case you get bored simply – skip over the purple textual content as that is in all probability probably the most convoluted setup Ive ever executed on a WiFi machine – partly my fault, partly I imagine, the APP.

I’m satisfied some work is required on the APP as it doesn’t matter what I did, the APP continued to say the button was updating over many minutes – far more than the 5 steered within the directions. I dropped out of the APP and went again in after which all appeared properly. At this level I left the button to cost.

Button choices are long-press, single-press, two presses and three presses, just about just like the Aqara Zigbee buttons.

Subsequent morning

This time, checking the now-charged second button, I powered up the APP andd I used to be requested if I wished so as to add a brand new machine – shelly_xxxx – I did, specifying solely which entry level I needed to make use of, The brand new button didn’t seem in “Workplace” – my default location, so I went again to “dwelling” and famous “add found units”.

Add to workplace? Certain, why not. Title? Certain, we’ll name this one “shelly-button-2” at which level I famous the brand new button was frantically flashing. I pressed the button 3 instances in a row to check.

Shelly Button

Whereas I used to be on, I turned on my new Shelly Plus 1PM and pressed the in-APP button to show it’s output on – however I digress. See pic to the correct and notice the picture of the 2nd button has 3 dots – I like that – indicating that my final press was a triple-press.

Urgent the button as soon as resulted in a brief flourish of white gentle then a momentary inexperienced gentle earlier than going darkish. You possibly can see the results of all this button-pressing above-right – a flourish of sunshine blue flashing adopted by a gradual inexperienced gentle for a short while. I made a decision to improve to the newest firmware (OTA). This time I famous the brand new button flashing blue whereas updating which appeared to be taking a number of minutes.

The directions say “as much as 5 minutes”. I’m used to Sonoffs taking a few minute however then that is primarily a battery powered machine regardless that I did have it plugged into USB. After 5 minutes+ the machine was nonetheless flashing blue and the APP nonetheless claiming the button was updating so I left them to get on with it.

Shelly Button

quarter-hour later, the button was nonetheless flashing blue and the APP was nonetheless claiming the button was updating. A bit work wanted right here and the directions are just a little obscure as regards to updating. It will possibly’t take THAT lengthy…. I disconnected button 2 from USB and reconnected. Now not flashing however the APP nonetheless mentioned the battery was at 58% cost – no means – I rebooted my cellphone. Nonetheless 58% however now working usually. The replace had not occurred.

Because the cloud was enabled on the machine I used to be at a loss. I hit “settings” “machine reboot”. Button 2 then flashed then returned to regular. Button presses labored however nonetheless 58% – nonetheless not up to date. I famous that the brand new firmware obtainable is a yr newer than the one put in (2021 as in opposition to 2020). I set it off updating once more. The button began flashing and the APP mentioned “UPDATING”.

I needed to sidetrack and replace one thing on my cellphone, once I got here again 10 minutes later, the battery mentioned 100% however the APP, on hitting “settings” nonetheless mentioned “Firmware replace obtainable”.

I rebooted the cellphone and began up the Shelly APP – noting that my SHELLY PLUS 1 mentioned it was offline. Why? In the meantime, each buttons now mentioned “100%”. Button 1 settings indicated that the outdated and new firmware had been now equivalent – 2021.

The opposite button was nonetheless on the 2020 replace… Oh and after a minute or so, SHELLY Plus 1PM got here again on-line. That is wanting increasingly more just like the APP wants work.

Why did one button not give me any of this bother whereas the opposite did? I despatched an e-mail off to Allterco.

2 days later – no response from Allterco – so I checked my buttons and there’s been one other software program replace – to make sure the units responded I plugged them into USB (blue lights on).

Within the APP I went to settings – replace machine – positive sufficient an replace was obtainable – I pressed go and the APP confirmed a busy circle – updating – I waited for a number of minutes – the APP confirmed UPDATING however no change within the blue gentle on the button (that’s unhealthy – I might have made it do one thing)….. after 7 or 8 minutes I twigged that one thing should be mistaken – as this occurred on my different button I’m turning into more and more satisfied there’s something mistaken with the OTA replace course of right here.

It CAN’T take THAT lengthy to OTA improve a WiFi machine. 12 minutes+ – erm, too lengthy. I attempted the SECOND button – this time the machine flashed on and off because it was updating.

That’s extra prefer it… I left it alone to get on with the improve whereas penning this.. 10 minutes later the APP was nonetheless displaying UPDATING and the second button was nonetheless flashing. The primary button was nonetheless sitting there with a easy blue gentle on. Backing out on the APP so I may see each buttons – each had rotating indicators, each confirmed UPDATING.

Time for espresso. quarter-hour later one button nonetheless flashing – one button displaying static blue, then each buttons within the APP simply stopped saying “Updating”. So I pulled the USB from each – plugged again in – each static blue – time to attempt once more. Each now mentioned 100% battery. Time to attempt OTA once more. Button 1 “Firmware replace obtainable” “UPDATE”. “Updating”.

This might not be proper – absolutely? the primary button stopped updating after a couple of minutes and as soon as once more “replace obtainable”. In the meantime my PC with Superior IP Scanner (AIS) was displaying 2 units – identical identify – sort of – “shellybutton1-89xxxxxxx.broadband” at 192.168.14.125 and “shellybutton1-C4xxxxxxx.broadband” at 192.168.4.185 – the names bore no resemblance to the names I gave both button. Finally the APP confirmed my first button as utilizing firmware “20211109-125924 and many others” whereas the newest firmware is “20211109-125831 and many others” which I might have taken to be older.

In the meantime the second button was nonetheless displaying “20201210-145729 and many others” which was positively so much older than the brand new firmware model quoted as “20211109-125831 and many others”.

I made a decision it was time to comply with the suggestion within the APP to offer these mounted IP numbers… 192.168.14.94 and 95 – would this make a distinction? I ran AIS on my PC… the units got here up on the proper addresses however now with no names in AIS – simply the numbers.

Within the APP I appeared on the first button – settings – machine data – the unique IP handle was nonetheless displaying – WHAT? I hit reboot for the machine. “REBOOTING” mentioned the APP. Minutes later – nonetheless REBOOTING. After some time I used to be becoming bored and instructed the second machine to reboot – the machine began flashing and stopped after a number of seconds – however the APP STILL confirmed REBOOTING. I backed out a stage and will see each units displaying “REBOOTING”.

Shortly thereafter they each confirmed “100%” for battery. Time to test once more. Now, SURELY I may OTA with out subject? Once more no flashing gentle on the primary button – the second flashed constantly and the APP mentioned “UPDATING”. With static addresses what may POSSIBLY be inflicting these points? BUTTON 1 now confirmed an online interface on my PC whereas button 2 continued to flash – minutes later.

On the PC a really completely different consequence to the cellphone APP – button 1:

Button 2 after all was nonetheless flashing – this was one other 10 minutes later. I disconnected the USB and reconnected – now a strong blue gentle. I checked with Superior IP Scanner – nonetheless no internet interface on button 2.

Time for manufacturing facility reset on each units. I stay satisfied there’s something mistaken with the APP. Each units flashing – my cellphone would present each had entry factors… I gave the primary one a static IP of .94 once more and the online interface appeared. I began on the second. The machine could properly have reset to manufacturing facility settings however the APP nonetheless remembered the unique machine identify. Again to AIS. The second machine had accepted it’s new identify and I may arrange the mounted IP handle – it stopped flashing – AIS – machine 192.168.14.95 there – STILL no internet interface.

This was beginning to get severe – now wanting on the PC internet interface, regardless of just one machine displaying in AIS as having an online interface, I may see each buttons replace each to the newest BETA software program on the PC, neither now confirmed any updates obtainable – but after a reboot one flashed blue, the opposite had the strong blue gentle. Similar energy provide – identical model of USB lead. BUTTON 1 no entry to the cloud, BUTTON 2 had entry. That’s why the distinction…

I enabled cloud within the button which did had it turned off – now BOTH units had been equivalent – a lot for “restore to manufacturing facility settings”. Now, NEITHER confirmed in AIS as having an online interface obtainable but BOTH labored on the PC by IP. Neither after all had been now displaying up within the APP.

I disabled CLOUD in each – now each had been flashing… so THAT’s why the distinction. I checked in AIS. BOTH now confirmed internet interfaces (the little right-facing arrow (beneath left) in AIS – when clicked goes in deeper and allows you to see what entry is accessible on a selected IP handle – invaluable instrument.

NOW I may add MQTT to have the ability to learn values with out USB linked. I did that and disconnected each units from USB after giving them customized prefixes sh1 and sh2.

Each at the moment are updated, neither want the APP or the cloud to function, each are on mounted sequential IPs. THAT was HARD WORK.

So having enabled MQTT on the Shelly buttons and disabled cloud – my native MQTT dealer – would it not reply to a button press by on the lookout for sh1/# or sh2/#

Hell, no.

However that’s what the online is for… I realised it’s important to prefix the machine identify subject with “shellies” – so I had the MQTT look out for (on this case) “shellies/sh1/#” and right here we go, press a button and we’ll quickly see what got here out of the MQTT node in Node-Purple:

The consequence may have contained S or SS or SSS for single-press, double-press or triple-press or “L” for long-press. I did a single-press. The depend is auto-incrementing. Timing for a number of presses is a bit finicky and IMHO the default worth for long-press needs to be longer however you may alter these in settings.

Apparent when you get there, however I had a long-haul getting thus far – sorry to bore you (if anybody continues to be with me). I count on to have a lot of enjoyable with these buttons NOW. Plugged in and urgent a button:

05/02/2022, 00:00:19node: c849e4625e32befd
shellies/sh1/sensor/battery : msg.payload : string[3]
"100"
05/02/2022, 00:00:19node: c849e4625e32befd
shellies/sh1/sensor/charger : msg.payload : string[4]
"true"
05/02/2022, 00:00:19node: c849e4625e32befd
shellies/sh1/sensor/error : msg.payload : string[1]
"0"
05/02/2022, 00:00:19node: c849e4625e32befd
shellies/sh1/sensor/act_reasons : msg.payload : string[13]
"["ext_power"]"
05/02/2022, 00:00:19node: c849e4625e32befd
shellies/sh1/input_event/0 : msg.payload : string[28]
"{"occasion":"S","event_cnt":22}"

What I gave you above was the output from Node-Purple debug when the button was already plugged into USB and also you press a button – right here’s the longer model – the FIRST output BEFORE you press a button after you plug the unit in…

shellies/sh1/on-line : msg.payload : string[4]
"true"
04/02/2022, 23:59:34node: c849e4625e32befd
shellies/sh1/announce : msg.payload : string[135]
"{"id":"sh1","mannequin":"SHBTN-2","mac":"C45BBE6BADEE","ip":"192.168.14.94","new_fw":false,"fw_ver":"20220126-175327/v1.11.8-rc2-g9861f53"}"
04/02/2022, 23:59:34node: c849e4625e32befd
shellies/sh1/data : msg.payload : string[647]
"{"wifi_sta":{"linked":true,"ssid":"","ip":"192.168.14.94","rssi":-39},"cloud":{"enabled":false,"linked":false},"mqtt":{"linked":true},"time":"","unixtime":0,"serial":1,"has_update":false,"mac":"C45BBE6BADEE","cfg_changed_cnt":0,"actions_stats":{"skipped":0},"inputs":[{"input":0,"event":"","event_cnt":21}], "is_valid":true,"bat":{"worth":100,"voltage":4.21},"charger":true,"act_reasons":["ext_power"],"connect_retries":0,"sensor_error":0,"replace":{"standing":"unknown","has_update":false,"new_version":"","old_version":"20220126-175327/v1.11.8-rc2-g9861f53"},"ram_total":51576,"ram_free":40768,"fs_size":233681,"fs_free":162648,"uptime":0}"
04/02/2022, 23:59:34node: c849e4625e32befd
shellies/sh1/sensor/battery : msg.payload : string[3]
"100"
04/02/2022, 23:59:34node: c849e4625e32befd
shellies/sh1/sensor/charger : msg.payload : string[4]
"true"
04/02/2022, 23:59:34node: c849e4625e32befd
shellies/sh1/sensor/error : msg.payload : string[1]
"0"
04/02/2022, 23:59:34node: c849e4625e32befd
shellies/sh1/sensor/act_reasons : msg.payload : string[13]
"["ext_power"]"
04/02/2022, 23:59:34node: c849e4625e32befd
shellies/sh1/input_event/0 : msg.payload : string[27]
"{"occasion":"","event_cnt":21}"

and now what comes out when the unit is NOT plugged in and also you press a button:

04/02/2022, 23:48:31node: c849e4625e32befd
shellies/sh1/on-line : msg.payload : string[5]
"false"
04/02/2022, 23:48:31node: c849e4625e32befd
shellies/sh1/on-line : msg.payload : string[4]
"true"
04/02/2022, 23:48:31node: c849e4625e32befd
shellies/sh1/announce : msg.payload : string[135]
"{"id":"sh1","mannequin":"SHBTN-2","mac":"C45BBE6BADEE","ip":"192.168.14.94","new_fw":false,"fw_ver":"20220126-175327/v1.11.8-rc2-g9861f53"}"
04/02/2022, 23:48:31node: c849e4625e32befd
shellies/sh1/data : msg.payload : string[646]
"{"wifi_sta":{"linked":true,"ssid":"","ip":"192.168.14.94","rssi":-37},"cloud":{"enabled":false,"linked":false},"mqtt":{"linked":true},"time":"","unixtime":0,"serial":1,"has_update":false,"mac":"C45BBE6BADEE","cfg_changed_cnt":0,"actions_stats":{"skipped":0},"inputs":[{"input":0,"event":"S","event_cnt":21}], "is_valid":true,"bat":{"worth":100,"voltage":4.21},"charger":false,"act_reasons":["button"],"connect_retries":0,"sensor_error":0,"replace":{"standing":"unknown","has_update":false,"new_version":"","old_version":"20220126-175327/v1.11.8-rc2-g9861f53"},"ram_total":51576,"ram_free":40596,"fs_size":233681,"fs_free":162648,"uptime":0}"
04/02/2022, 23:48:31node: c849e4625e32befd
shellies/sh1/sensor/battery : msg.payload : string[3]
"100"
04/02/2022, 23:48:31node: c849e4625e32befd
shellies/sh1/sensor/charger : msg.payload : string[5]
"false"
04/02/2022, 23:48:31node: c849e4625e32befd
shellies/sh1/sensor/error : msg.payload : string[1]
"0"
04/02/2022, 23:48:31node: c849e4625e32befd
shellies/sh1/sensor/act_reasons : msg.payload : string[10]
"["button"]"
04/02/2022, 23:48:31node: c849e4625e32befd
shellies/sh1/input_event/0 : msg.payload : string[28]
"{"occasion":"S","event_cnt":21}"

Clearly for sensible functions you may select to subscribe to a subset of that output. See shellies/sh1/input_event/0 for instance. Personally I’ll even be subscribing to get the state of the battery as properly….

Replace February 2023

Okay, after leaving the Shelly buttons alone for a while – right here’s an replace – this time issues are simplified. I’m onto replace 20221027 (and many others) so principally the October 2022 firmware replace. I’ve a brand new cellphone – I added a button to the Shelly APP no drawback and with the button plugged into USB for energy (therefore continuously on) I used to be now onto day 2 of utilizing the button with Node-Purple on my Raspberry Pi – utilizing node-red-config-shelly. It was simply over 24 hours since I charged the battery absolutely and the APP mentioned 90% – so I didn’t count on incredible cost time. I used to be additionally now wanting on the output from Node-Purple and seeing “Battery 4.12v” – which appeared like greater than 90% to me.

So what was concerned in getting the button working in Node-Purple with the Shelly node? Little or no as soon as I received previous my very own incompetence. Mainly, with the button working within the APP, I first gave the button a set handle on my community as advisable by Shelly. This may be executed by fixing the addresss within the APP or, I suppose, by mapping the MAC to an IP in your router – I did the previous. I then appeared up the IO ACTIONS possibility within the APP. As one instance, for brief push, I enabled that motion (tick field) and put in “http://192.168.1.19:10000/webhook?information=shortpush_url?0?192.168.1.250” with out the quotes.

Why? Effectively, the 192.168.1.19 is the handle of my RPi on my community and the 192.168.1.250 is the handle I mounted within the APP for that button.

All that remained was to put in the node-red-contrib-shelly node into node-red by way of Node-Purple’s “Handle Pallette” possibility.

I added a “Shelly Gen 1” node to my circulation. Within the edit for the node – I chosen “Button – Shelly Button, I3” then in hostname entered “192.168.1.250”. In Description I entered “First Shelly Button” – Ieft username and password clean and in “Mode” I used “Callback” and chosen server worth 10000 (artitrary port quantity – so long as each the APP model – which results in the button – and the Node-Purple worth are the identical and never a port used elsewhere).

For output I chosen “Standing” and for the retry interval I left the default 5000ms worth.

I added a Node-Purple perform node to the output (nothing on the enter) and…

msg.payload = "SH1 Occasion:" + msg.standing.inputs[0].occasion+" Batt:" + msg.payload.bat.voltage;
return msg;

The consequence (and this was simply what I wished – you possibly can change this round) I ended up with an output msg.payload to say, for instance on a brief button press: “SH1 Occasion:S Batt:4.12”

The important thing gadgets listed here are the thing values popping out of the Shelly node…. in case you’re not within the battery state you solely want msg.standing.inputs[0].occasion

Simple – however as I mentioned above – it will likely be a while (hopefully) earlier than I understand how lengthy a cost lasts… it’s now per week since I began this and eliminated USB energy from the button and now I see battery 4.1v on 14/02/2023 – wanting good.

I’ve included a really brief video on Youtube to go along with this replace.

Facebooktwitterpinterestlinkedin