Hi,
I have a “Shelly 1 Gen3” in use and I need to monitor if it is online or not in case of a power failure on this specific power circuit. (unfortunately this does not work with the shelly scene notification).
I setup the HiveMQ cloud and successfully connected the Shelly device. I receive messages when I turn on/off the switch.
NOW: I have no clue how to continue but I assume I need to write some code to ask the Shelly every minute or so if it is online or not and if it is, it’s OK and if it is not online, send an alert email to my mail adress.
I have none or veeery little programming skills and I can’t find any similar projects to adapt according to my needs.
Can anyone help me out here? I have an Arduino Mega or UNO available that I could use for this project, if that helps. What is the easiest way to do this?
Thank you for contacting HiveMQ support team. Sorry, but I’m unsure if understand what you want to perform. In case of power failure, the Shelly 1 Gen3 will be completely turned off since there is no power on it. Are you looking for some external tool to monitor the Shelly device?
Hi Diego, yes I want to “watch” if it is online or not and in case of power loss, it will go offline and in this case I need an alert sent to my mail address. I read in forums that people solved this exact problem using MQTT but I can’t get the instructions nor the code.
For better understanding, I need to know if a fuse blows in a remote location and for this I just plug in the shelly device and check it’s status. The wifi will still be on.
I found some hints in Arduino forums but still no sample code for this exact problem.
You can use an MQTT topic as a status indicator for your device. For example, when your device01 connects, it will publish a retained message to the topic device01/status with payload “Online”. When the device is about to disconnect, it will publish a retained message to the topic device01/status with payload “Offline”.
By subscribing to the topic device01/status and receiving the message, your monitoring service will always know in which state the device01 is.
To build on what my colleague Dasha mentioned, if you don’t have much programming experience, you might find it helpful to use a tool like Uptime Kuma. Uptime Kuma allows you to monitor the MQTT topics of your Shelly device and can send you an alert email if any changes occur. This way, you can effectively keep track of your Shelly device status without needing advanced programming skills.