someone could help me understand why I had 2 Shelly 1 Mini Gen3 unusable after I run a very simple script on them?
Below is the script:
Shelly.addEventHandler(
function (event, ud) {
print('raw event from Shelly1MiniGen3' + JSON.stringify(event));
Shelly.emitEvent("sample_event", event)
},
null
);
Just after I run the script for the first time the device went offline. No recovery action was successful (factory reset with user button had no effect, same result for the safe mode activation). When I power on the device I can see the wi-fi is active, but going up and down. It's impossible to access the device throught the usual 192.168.33.1 address. I thought the device had and hw fault so I decided to run the same script on another device; also the second device is lost! :(
The aim of the script was simple: log in the console the events happening in the device and then have the same events emitted (to be elaborated by other Shelly devices)
A preliminary version of the script worked fine:
Shelly.addEventHandler(
function (event, ud) {
print('raw event from Shelly1MiniGen3' + JSON.stringify(event));
},
null
);
In this case I could read in the console every event happening to the input:0 or switch:0 of the device. So is the Shelly.emitEvent line of code that is generating the fault.
Thank you! Alessandro
Any hint about what caused the outage on the devices and the impossibility to restore factory settings would be appreciated.