Integration - RFplayer

Hello everyone,

I’m working on an external Gladys integration for the RFPlayer RFP1000 key (Ziblue / GCE Electronics, 433 and 868 MHz).

:backhand_index_pointing_right: Code: GitHub - prohand/gladys-rfplayer: Gladys external integration to connect rfplayer devices in Gladys · GitHub

What it does

  • Sensors heard, proposed in the Discovery tab: Oregon probes (temperature, humidity, pressure, wind, rain, UV) and OWL meters.
  • Detectors Visonic, X2D, and KD101: alarm, self-protection, low battery.
  • Remotes: Chacon/DiO, X10, Somfy RTS, Blyss, X2D, Visonic key fobs…
  • Actuators controlled by the key: outlets, switches, dimmable lamps, Somfy RTS blinds (the « my » button serves as a stop) and gates.
  • One-click pairing: the « Pair an actuator » button sends the pairing frame and adds the device to the configuration.
  • Radio jamming detection of the key, useful for a wireless alarm.
  • Scene triggers (Gladys 5.1): remote button pressed, detector triggered, low battery, jamming.
  • Scene actions (Gladys 5.1): send a radio command, simulate jamming.
  • Widget « RFPlayer Radio » on the dashboard.
  • 100 % local, no cloud.

:warning: The problem: the integration cannot access the USB

External integrations run in an isolated container, and this container receives no serial port: neither /dev/ttyUSB*, nor /dev/ttyACM*.

In the manifest, the only hardware classes we can request are coral-usb, coral-pcie, gpu, and video. And even then: only for sub-containers, not for the main container.

Result: impossible to plug a serial USB key directly into an external integration.

I had the same problem with a Téléinfo integration. It will also affect Zigbee and Z-Wave keys, RFXtrx, EnOcean, Arduino…

Current workaround

We expose the key’s serial port as TCP with ser2net (or socat) on the machine where it is plugged in. The integration then connects to IP:port.

Example of /etc/ser2net.yaml:

connection: &rfplayer
  accepter: tcp,4000
  enable: on
  options:
    kickolduser: true
  connector: serialdev,/dev/serial/by-id/usb-XXXX-if00-port0,115200n81,local

Then, in the integration configuration: host = local IP of the machine (not localhost), port = 4000.

It works, but it’s not ideal:

  • One more technical step for the user: install and configure ser2net. This is not the « one-click » spirit of the store.
  • No password on the TCP port: anyone on the local network can control the radio devices. You need to limit listening to an IP or filter with the firewall.
  • One more service to monitor on the host machine.

The request is made :bullseye:

I proposed a serial hardware class: the integration requests it, the user chooses which key to give it, and Gladys mounts only that port in the container. The sandbox remains secure.

Changes are needed in 3 places, one issue for each:

:backhand_index_pointing_right: If you are concerned (RFPlayer, Téléinfo, Zigbee, Z-Wave…), put a :+1: on these issues or add your case in a comment. It helps to prioritize.

@pierre-gilles, I can help test as soon as there is something.

Call for testers

The integration follows the official RFPlayer API specification and is covered by automated tests. However, I haven’t tested it on a real key yet.

If you have an RFPlayer, your feedback helps a lot, especially on:

  • Somfy RTS blinds: the « my » function and pairing;
  • Chacon/DiO outlets: pairing;
  • Oregon probes and Visonic detectors.

The complete installation documentation is in French, including ser2net: gladys-rfplayer/docs/fr.md at main · prohand/gladys-rfplayer · GitHub

Thanks! :slightly_smiling_face:

@prohand I think the message is cut off, or I just don’t get it at all ^^

Thank you :slight_smile:
It’s fixed