BG Smart Sockets

Begonnen von malc_b, 21 Februar 2020, 11:54:36

Vorheriges Thema - Nächstes Thema

malc_b

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?

Davos2

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.


Beta-User

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-elitedesk@Debian 12, aktuelles FHEM@ConfigDB | CUL_HM (VCCU) | MQTT2: MiLight@ESP-GW, BT@OpenMQTTGw | MySensors: seriell, v.a. 2.3.1@RS485 | ZWave | ZigBee@deCONZ | SIGNALduino | MapleCUN | RHASSPY
svn: u.a MySensors, Weekday-&RandomTimer, Twilight,  div. attrTemplate-files

malc_b

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.