Can I control a smart socket from BI?

May 12, 2020
1
0
Glasgow
Been thinking about this a while, it'd be good to be able to switch a light / TV on in the house when motion is detected in one of the outdoor cameras. Also sometimes my cameras 'hang' and require a reboot, which I can do remotely via a smart socket, but was wondering if BI could do that automatically after several timeouts?

I control all the sockets via the Tuya app on my phone, I see there are PC programs to do the same but look quite tricky to set up.
 
BI can be configured to send HTTP commands to network devices based on many conditions or as the result of an input to BI . I used Shelly Wi-Fi relays and wrote the article found at the bottom in August of 2024 explaining how. Be sure to download the attached PDF file at the bottom of that post.

Each camera setting in BI has a "watchdog" which can be set to "Fire" an action "on loss" (of video) and that action could be an HTTP command to power-cycle the camera using a smart plug. And motion can also be used to turn on a lamp, etc.

I mention Shelly because my understanding is that their newest "Shelly Plug US Gen4" works similarly to the Shelly 1 Wi-Fi relay regarding receiving HTTP comands to switch it on or off. Plus, you can connect using Wi-Fi, Bluetooth, or ZigBee.

Examples:
  • To switch it on: http://YOUR_DEVICE_IP/rpc/switch.set?id=0&on=true
  • To switch it off: http://YOUR_DEVICE_IP/rpc/switch.set?id=0&on=false
Note that the newest (Gen4) devices have differences in control protocol from the Gen1 devices I used in my post.

 
Last edited:
As Tony said, the short answer is yes.

The long answer is "it depends on your smart plug". BI can definitely send out "commands" based on various triggered events. You just need to make sure your specific plugs can accept one of these forms of "commands" sent by BI.
 
  • Like
Reactions: looney2ns and TonyR
As Tony said, the short answer is yes.

The long answer is "it depends on your smart plug". BI can definitely send out "commands" based on various triggered events. You just need to make sure your specific plugs can accept one of these forms of "commands" sent by BI.
+1^^^...

I tend to be verbose, likely a holdover from writing technical training materials between 1980 and 2000....I've tried but fail at being more to the point.

There may be other brands but I am sure regarding HTTP and HTTPS using the Shelly. Other brands as well as Shelly can also work with MQTT commands.
 
Last edited:
@Glasgow7000 , after I answered your post I ordered a Shelly Smart Plug US Gen4. It arrived after lunch today and I set up one camera to turn it on with video loss and turn it off when restored. I unplugged the POE cable going to that camera to test and it worked well. Below are screenshots of the various pages and tabs under "Settings" for that camera in Blue Iris.

Another nice thing about the Shelly Smart Plug US Gen4: it's UL-listed, which is important to me. I cannot say regarding other brands.

BI-watchdog.jpg

BI-action-set_on-loss.jpg

BI-action-set_web-request-ON.jpg

BI-action-set_on-restore.jpg

BI-action-set_web-request-OFF.jpg

EDIT: I don't belive this particular Shelly Smart Plug is available in the UK although some Shelly devices are, such as this one below which can operate on 240VAC and can switch on a lamp if wired up to a lamp socket to do so and configured pretty much like I did the Smart Plug.

Shelly 1 Gen4 - Wi-Fi Smart Relay Switch, 1 Channel, 16A, Dry Contacts, Home Automation, Garage Door Remote Control, No Hub Required, Matter, Alexa, Google Home, Apple HomeKit, Zigbee
 
Last edited: