set up rflink to respond to 433MHz devices and then integrate them with Home Assistant

26 Responses

  1. Miranda P says:

    Hi Roger,
    Thanks very much, great write-up.
    Do you know whether the same/similar process will work with 868MHz devices? I know there’s an 868MHz version of the RF kits.
    Thanks,
    Miranda

    • roger says:

      Hi, thanks for your question. Your first requirement is less about the frequency, it is that your devices are named on the list of compatible RF devices. For example many RF buttons and sockets work with RF Link and there are unexpected finds. Several doorbell buttons of mine didn’t work (possibly because they have some secure code to stop them working with the neighbour’s). So do that first. You might find OpenMQTTgaterway claims compatibility with your brand.

      Yes I’d say you were in with a very good chance of using 868MHz devices. Yes, the Nodo shop suggests it is indeed a case of using another transmitter/receiver pair for that frequency. Ebay sell modules too. What you read on this page took research and luck. Good luck

      http://www.rflink.nl/blog2/wiring

  2. Dave Q says:

    Is it possible to use the Mega+wifi R3 onboard WIFI instead of the USB serial

    • roger says:

      According to this doc Home Assistant can listen over TCP so a likely yes, https://www.home-assistant.io/integrations/rflink/

      I wanted to do this, to locate my RFlink somewhere central, but I found the RF signals to be quite good.
      Still I’d encourage you to explore your wish.
      While I do own similar kit I have still to understand how to send serial data from the Arduino > wifi.

  3. Kim says:

    Thanks for getting me up and running!

  4. Emile says:

    My turn to start dealing with RFlink ! I should have tonight the Arduino card and at least the RF receiver.
    I will try to get few sensors recognized in HA !

    • roger says:

      Best wishes!

      • Émile says:

        I’ve finished the setup.
        I’m using a real antenna, and condensators top optimize the reception of RXB6, but still very very weak reception…
        With a remote for switches, it’s working only once for 10 tries, and at less than 2 meters..
        Any idea what could be wrong ?

        • roger says:

          Well done for getting this far but Oh dear.

          I would have started with a regular receiver.
          I have never been lucky with aerials of any kind … However the range of my 443MHz signals is at least 50m.

          Best wishes.

  5. Dave says:

    Roger will any R3 mega work ?
    I notice on your list “+wifi”
    Do you have a link to the one you used or one in amazon

  6. Martijn says:

    Hi, thabks for this how to.

    Do you know of a way to “put” the light and switches in specific rooms?
    Now they are all collected under the “light” section of the homepage.

    The entitys mis an unique_id so i cant figure iut how to organise them in rooms

    • roger says:

      Hi and cheers for flagging this. I looked for you but only found a many people finding the same missing feature. This link looked promising however… (I can’t check it myself just now)

      https://community.home-assistant.io/t/moving-a-light-from-one-area-to-another/208360

      • Martijn says:

        Hi thanks for your replie.
        I forgot to answer.

        Ive tried every thing i found on the forums. Youre link was new to me but it didnt work.

        Seems like the RFLink setup does not cover rooms (yet). Shame there isnt a workearound for it.

        I want to keep the dashboard for my family simple and easy. So Ill look around for that. Maybe experimenting with different scenes and delete the “light” section from the dashboard

        • roger says:

          For the record:
          The sensors/lights/switches we’ve set up manually here do not have a unique ID nor do they ‘belong’ to a device. Had they belonged to a device we could change their area (as per the link).
          Hopefully someone knows where, at the back end the AREA (or ROOM) information is stored – and we could tweak that. Creative workarounds like your suggestion may well find a way.

          I see the value you gain from using Rooms / Areas in your user focussed dashboard. I haven’t used Areas largely due to my laziness. Instead I use entity cards to do my organising. The entity card headings I have give the flavour: They are quick switches; living room, zoom studio lights; readings from the last hour, graphs from the last week, alerts (oil, water tank, letterbox open).

          • Martijn says:

            Hi, yes did something similar and it fits my needs perfectly.

            I just created a new dashboard and inserted light entities.
            In the dashboard you can rename the entities themselves if needed but also the “headline” of the incertet entities. So I named them after the rooms and inserted the right rflink lights and switches.

            This is what I was searching for.
            Shame it can’t work with the original dashboard but at least this is a way things are better organized

          • roger says:

            Cheers. Nice idea to rename entities for a room.
            I just recalled that I title each automation eg ‘LIVING ROOM ….’ which also helps me a lot.
            One tip I’ve not yet shared is that every entity I have is titled in lowercase. Lowercase is so much easier to read. My Rooms and Groups have a capital letter.

  7. Fred Boliau says:

    Hello,
    Finally, I found the explanation I was looking for;
    I have some switches and plugs from Chacon DiO. They should have worked with RFLink, but I couldn’t get them working.
    Now they are working (from time to time) after a power shutdown they are disappeared in entities. Here some examples from the code I received from RFLink loader.
    20;11;NewKaku;ID=0054f47e;SWITCH=1;CMD=OFF;
    20;12;NewKaku;ID=0054f47e;SWITCH=1;CMD=ON;
    Do the 20.11 – 20.12 before the code matter ?
    I can make it work with Entities Card configuration but the ON button works as Toggle (That is not a problem, as long as it works.
    When I try to put them in the switch section of configuration.yaml I get the following error.
    * Invalid config for [switch.rflink]: expected a dictionary for dictionary value @ data[‘devices’]. Got None. (See ?, line ?). *
    (Config.yaml)

    light:
    – platform: rflink
    automatic_add: true
    switch:
    – platform: rflink
    automatic_add: true
    devices:
    0054f47e_1:
    name: Buro
    I also don’t know when to exactly change the automatic_add: true or false.
    Anyway, I very gratefull for the explanation, Its why I already came this far, after months of trying,
    Fred Boliau
    (apprentice Home assistant

    • roger says:

      Thank you for puzzling me Fred – it’s a while since I played with this. May I first recommend that you record your knowledge!
      However:

      1) I couldn’t myself pursue this as a solution but if the below idea fails do note that RFlink can learn codes and transmit them.
      2) Newkaku coding is used by the HomeEasy switches and sockets that I have. My sample below shows the correct config for the log lines you see. The invalid error I’ll wager is to do with HA/indentation because you otherwise have it correct.
      3) After some experience I’d agree that the response / behaviour is a bit iffy. HA might throw a complaint that it didn’t manage to switch and yet often it does.
      4) I’ve assumed that 20;11 describes the direction (send receive) and was not relevant. But see this explained in the ‘protocol reference’ here https://www.rflink.nl/protref.php
      5) I didn’t experience any toggles myself but a soln might be in Home Assistant. In Developer > Services I’d suggest to try calling each of the switch services. I’d then look at the docs for RFLink Switch and try eg fire_event etc to see if this changes the toggle behaviour.

      In my log from Home Assistant.log I see this
      2022-11-10 18:05:42.593 DEBUG (MainThread) [rflink.protocol] received data: 20;9E;NewKaku;ID=004c899e;SWITCH
      2022-11-10 18:05:42.597 DEBUG (MainThread) [rflink.protocol] received data: =c;CMD=ON;

      So I put in my Home Assistant configuration.yaml – but see the indents further below:
      switch:
      - platform: rflink
      devices:
      newkaku_004c899e_c:
      name: home-easyswitch

      INDENTATION

      switch:
      2 spaces – platform: rflink
      4 spaces devices:
      6 spaces newkaku_004c899e_c:
      8 spaces name: home-easyswitch

      All best wishes

  8. Fred says:

    O K
    Thanks,
    I’ll try again Tomorrow.
    Goodnight,

    Fred

    • fred boliau says:

      Hi,
      It worked what a few spaces more ore less can do.
      It is not 100% stable, sometimes switches need aliitle encouragement, a click or two.
      See what we can learn next,
      Many thanks again

      Fred

      • roger says:

        OK that’s progress. I’ve been exercising my switches and this is where it is:

        Years on and it still works.

        As this is RF we can never be sure what on/off state a socket is in. If you want to surely turn on, assuming you’re not toggling by this, send more than one on. My sockets are turning on studio lighting – it’s not critical. (As I said somehow RFlink can learn and send codes and perhaps that’s a way forward)

        I’ve had my value on the sensor side: door contact sensor, water detector, RF push button, oregon weather sensor, RF stick-on light switch.

  9. Dick says:

    Roger,
    Tot aan:
    rflink:
    poort: /dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0
    # deze poort wordt weergegeven in de afbeelding hierboven. uw detail kan anders zijn
    logger:
    standaard: fout
    # voeg het volgende toe aan de bestaande loggersectie
    logboeken:
    rflink: debuggen
    homeassistant.components.rflink: debuggen
    gaat alles goed, maar dan:
    ik krijg
    ttyACM0
    /dev/serial/by-id/usb-Arduino__www.arduino.cc__0043_8563231303935110C092-if00
    ttyAMA0
    ttyUSB0
    /dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0
    ttyUSB1
    /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0

    geen van alle geeft an dat er verbinding is.
    Doe ik iets fout, of vergeet ik iets?
    Dick

    • roger says:

      I’VE TRANSLATED TO THIS AND I HOPE I’VE READ THIS OK:
      roger,
      re:
      rflink:
      port: /dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0
      # this port is shown in the image above. your detail may be different
      logger:
      default: ???
      # add the following to the existing logger section
      logs:
      rflink: debug

      homeassistant.components.rflink: debug

      everything goes well, but then I get
      ttyACM0
      /dev/serial/by-id/usb-Arduino__www.arduino.cc__0043_8563231303935110C092-if00
      ttyAMA0
      ttyUSB0
      /dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0
      ttyUSB1
      /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0

      none of them indicate that there is a connection. Am I doing something wrong, or am I forgetting something?
      Dick

      REPLY:
      I can’t be sure. BUT the config I used to use stopped working in 2023 so I’ve changed the port and it worked again. Try this on a Raspberry Pi4:

      rflink:
      port: /dev/ttyAMA0

Leave a Reply

Your email address will not be published. Required fields are marked *