Autor Thema: BG Smart Sockets  (Gelesen 1510 mal)

Offline malc_b

  • Developer
  • Full Member
  • ****
  • Beiträge: 110
BG Smart Sockets
« am: 21 Februar 2020, 11:54:36 »
Hi,

The latest specials for TLC includes BG Smart Sockets.  These are new to me but look interesting.  You can either replace a double socket or replace a plug.  A double socket is £13.50+VAT (on offer), a plug is £15.75+VAT.  They look to be using wifi.  There is a BG app for Android/IOS and they interface with Alexa and Google Home.

Can these interface with fhem?  If how?  Anyone done this?

Offline Davos2

  • New Member
  • *
  • Beiträge: 5
Antw:BG Smart Sockets
« Antwort #1 am: 12 März 2020, 18:27:58 »
Hello Malc_b,

yes, I've had some success with https://www.screwfix.com/p/british-general-900-series-13a-2-gang-sp-smart-socket-white/827gv which is I guess what your referring to. (My review is 23rd Jan on that page)

There's a project to provide mqtt integration, which is https://github.com/eschava/broadlink-mqtt#bg1 but also a couple of issues see here https://github.com/eschava/broadlink-mqtt/issues/47

I had a bit of a mare to get it installed (due to old raspian installation, I upgraded out of the problem) but probably this would be fine if your up to date (buster). I have to say I only have a single double socket [and a single plug] and so didn't test with any more than one double socket. I'm not sure the plugs work with this code, the sockets are fine. The android app appears to work as a master/slave with the sockets which slightly concerns me, when I buy a second double socket I'll be able to test thoroughly.

I'm still playing with this, definitely a work in progress:
defmod plug10 dummy
attr plug10 alias Boxroom Plugs
attr plug10 mqttPublish pwr1s:topic={"broadlink/plug10/power/1"} pwr2s:topic={"broadlink/plug10/power/2"} pwrs:topic={"broadlink/plug10/power"} brightnesss:topic={"broadlink/plug10/brightness"}
attr plug10 mqttSubscribe pwr:topic={"broadlink/plug10/state/pwr"} pwr1:topic={"broadlink/plug10/state/pwr1"} pwr2:topic={"broadlink/plug10/state/pwr2"} led:topic={"broadlink/plug10/state/idcbrightness"} maxworktime:topic={"broadlink/plug10/state/maxworktime"} maxworktime1:topic={"broadlink/plug10/state/maxworktime1"} maxworktime2:topic={"broadlink/plug10/state/maxworktime2"}
attr plug10 readingList pwr pwr1 pwr2 led maxworktime maxworktime1 maxworktime2 pwr1s pwr2s pwrs brightnesss
attr plug10 setList pwr1s pwr2s pwrs brightnesss
attr plug10 stateFormat power

It appears to play nice, I'm quite happy with it.


Offline Beta-User

  • Developer
  • Hero Member
  • ****
  • Beiträge: 14097
  • "Developer"?!? Meistens doch eher "User"
Antw:BG Smart Sockets
« Antwort #2 am: 12 März 2020, 22:28:29 »
Hi malc_c,

as the topic tree includes "broadlink", you may have a look at the broadlink module? There might be a chance FHEM can directly talk to them or they me easily be supported by this module.

If this doesn't work, you also might use the MQTT interface Davos2 mentiones. If so, I'd highly recommend to go the MQTT path using MQTT2_SERVER as broker/server, Davos2  uses a different implementation which is a bit  more complicated to configure.

Just do a
define m2server MQTT2_SERVER 1883 globalmake sure, autocreate (TYPE=autocreate) is activated, restart the device and you should end up with a new MQTT2_DEVICE (if your device has been configured to talk MQTT towards the IP addres/hostname of your FHEM server at port 1883).
Then pls post a RAW definition of the later, then we'll see how to complete configuration on it.

Good success,

Beta-User
Server: HP-T620@Debian 10, aktuelles FHEM + ConfigDB | CUL_HM (VCCU) | MQTT2: MiLight@ESP-GW | MySensors: seriell, v.a. 2.3.1@RS485 | ZWave | ZigBee@deCONZ | SIGNALduino | MapleCUN | BT@OpenMQTTGateway
svn:MySensors, WeekdayTimer, RandomTimer, Twilight,  AttrTemplate => {mqtt2, mysensors, zwave}

Offline malc_b

  • Developer
  • Full Member
  • ****
  • Beiträge: 110
Antw:BG Smart Sockets
« Antwort #3 am: 27 März 2020, 10:02:42 »
Thanks both for the info.  I'll give this a try, some time.  Offered in ended now but might come back.  I was also leaning towards a SONOFF solution which is in the fhem wiki.

When I thought how I might want to use this feature I reckoned that a plug or inline block might suit better than a fixed socket.  BG also do a plug adaptor so I could go BG too.  Down to which ever is easiest to implement so I guess I need to get some BG stuff and try it.  UK made sounds preferable.