New add-on to add support for Easywave devices

Hello Marcselis, first of all, my enormous appreciation for the amazing work you’ve been doing for this niko integration so far. Niko ending the support for remote controlling these switches was huge bummer but it seems you might actually be the person who came to our rescue, not all hero’s wear capes :slight_smile:

I’ve been tinkering around with this setup a bit, and I think I’m almost there, however, for some reason my light dont react to the commands send…yet

My config:

{
  "LogLevel": "Information",
  "SerialPort": "/dev/ttyUSB0",
  "EasywaveActionTimeout": "500",
  "EasywaveRepeatTimeout": "80",
  "MQTTServer": "192.168.1.203",
  "MQTTPort": "1883",
  "MQTTUser": "My",
  "MQTTPassword": "secret",

  "Devices": [
    {
      "Id": "0ae33b",
      "Type": "Transmitter",
      "Name": "Poolhouse lichtschakelaar",
      "Area": "Poolhouse",
      "Buttons": ["A", "B"]
    },
    {
      "Id": "phpl",
      "Type": "Light",
      "Name": "Poolhouse plafondverlichting",
      "Area": "Poolhouse",
      "Subscriptions": [
        {
          "Address": "0ae33b",
          "KeyCode": "A"
        },
        {
          "Address": "000010",
          "KeyCode": "A",
          "CanSend": "true"
        }
      ]
    }
  ]

}```



When I press the button to turn off/on the lights I get something like this in the logging:

[19:14:22.678 DBG Easywave2Mqtt.Mqtt.MessagingService] Topic mqtt2easywave/phpl/set received with payload OFF
[19:14:22.679 DBG Easywave2Mqtt.Mqtt.MessagingService] Received OFF on phpl
[19:14:22.681 DBG Easywave2Mqtt.Easywave.EldatRx09Transceiver] Sent TXP,10,B
[19:14:22.683 WRN Easywave2Mqtt.Easywave.EasywaveSwitch] Switch Poolhouse plafondverlichting is turned Off
[19:14:22.684 DBG Easywave2Mqtt.Mqtt.MessagingService] Publishing topic easywave2mqtt/phpl/state with payload OFF
[19:14:22.689 DBG Easywave2Mqtt.Easywave.EldatRx09Transceiver] Received OK
[19:14:22.689 DBG Easywave2Mqtt.Easywave.EldatRx09Transceiver] Eldat Transceiver confirmed last command
[19:14:22.699 DBG Easywave2Mqtt.Mqtt.MessagingService] Topic easywave2mqtt/phpl/state received with payload OFF
[19:14:24.337 DBG Easywave2Mqtt.Mqtt.MessagingService] Topic mqtt2easywave/phpl/set received with payload ON
[19:14:24.338 DBG Easywave2Mqtt.Mqtt.MessagingService] Received ON on phpl
[19:14:24.338 DBG Easywave2Mqtt.Easywave.EldatRx09Transceiver] Sent TXP,10,A
[19:14:24.341 WRN Easywave2Mqtt.Easywave.EasywaveSwitch] Switch Poolhouse plafondverlichting is turned On
[19:14:24.341 DBG Easywave2Mqtt.Mqtt.MessagingService] Publishing topic easywave2mqtt/phpl/state with payload ON
[19:14:24.345 DBG Easywave2Mqtt.Easywave.EldatRx09Transceiver] Received OK
[19:14:24.345 DBG Easywave2Mqtt.Easywave.EldatRx09Transceiver] Eldat Transceiver confirmed last command
[19:14:24.348 DBG Easywave2Mqtt.Mqtt.MessagingService] Topic easywave2mqtt/phpl/state received with payload ON```

I’m far from an expert, but to me this all seems to be okay, but still the lights don’t react to commands sent from HomeAssistant at all, any ideas what I am doing wrong?

From the logs it seems everything is working ok: the EasyWave stick is sending out instructions when you turn on/off lights using Home Assistant. But is something listening to them? The USB stick is just the same like every other new switch that you add to your home: you need to manually tell the light that it needs to listen to the instructions of the new switch to be able to operate the light with that switch. I think you forgot this step, and now the light’s controllers see the EayWave messages flying by and do not know they are meant for them.

Usually the controllers have some kind of button that you need to press to put it in programming node, and then you’ll need to make HA send the “turn light on” signal for that light (so make sure the light is off in HA before putting the controller in programming mode) and when the controller’s light blinks, they will be linked. Then wait for the programming mode timeout and you will be able to control that light with HA. You’ll need to do that for each light you want to control, and also make sure that in the config file, each of the lights is listening to another EasyWave address, so you can control them individually.

You can find detailed instructions for your controllers on the Niko site. See an example here.

1 Like

Hello,

I’m still struggling a bit…

My stick is functioning and the state of the light is changing in home assistant trough MQTT. So I assume that part is working correctly. As mentioned in your previous reply. I need to program everything in my easy wave relay box? I assume that there is where your subscription address from in the light configuration comes from? This is to differentiate between different lights so you can switch them individually?

The main issue I’m having is that after some time the add-on just becomes very unresponsive at this point. I’ve just added one light and switch just for testing purposes. The state changes using the physical button. The home assistant switch I still need to configure in the controller.

[23:18:57.102 DBG Easywave2Mqtt.Easywave.EldatRx09Transceiver] Received REC,2d4ed7,A
[23:18:57.103 VRB Easywave2Mqtt.Easywave.EldatRx09Transceiver] -->Parse(REC,2d4ed7,A) start
[23:18:57.103 VRB Easywave2Mqtt.Easywave.EldatRx09Transceiver] <--Parse returns EasywaveTelegram { Address = 2d4ed7, KeyCode = A }
[23:18:57.103 VRB Easywave2Mqtt.Easywave.EasywaveTransmitter] -->HandleButton 2d4ed7:'A'
[23:18:57.103 VRB Easywave2Mqtt.Easywave.EasywaveButton]   -->HandlePress 'A' (36 elapsed)
[23:18:57.104 DBG Easywave2Mqtt.Easywave.EasywaveButton]     Increasing repeat counter to 5
[23:18:57.104 INF Easywave2Mqtt.Mqtt.MessagingService] Button 2d4ed7:'A' held
[23:18:57.104 DBG Easywave2Mqtt.Mqtt.MessagingService] Publishing topic easywave2mqtt/2d4ed7/action with payload button_A_hold

My suspicion is that my hardware is getting a bit old to run this add-on? At this point I’m trying to run it on a Raspberry Pi 3. That might be a bit light? It doesn’t show excessive RAM or CPU Usage tough?

On Raspberry PIs it’s usually not the CPU & Memory that are the bottleneck on performance, but the SD Card definitely is. Especially when logging is increased to Debug or Trace, the plugin is writing a lot of data to the disk in a short time, and this can cause delays in its working. Generally it is not advised to run HA on SD Cards, due to their slow writing/reading speeds & the quick wear-out of these cards.

I run Home Assitant on an RPI 4, but instead of using an SD Card, I configured it to boot from an 256GB SSD drive attached to one of the USB3 ports.

As for your other question: in general it works like this:

My plugin has no idea whether there really is a poolhouse light and what state it is in. It just builds it’s own little view on reality and tries to interact with it, based on the configuration that you gave it. The Eldat stick can receive all Easywave messages, sent on all addresses, and my plugin uses these to update its view on reality, but unfortunately the stick can only send on addresses 000000 to 00004F or 00007F depending on whether you have the 64 or 128 channel version. This means that my plugin can not send out the exact same messages that your lights currently react to.

In the configuration you have shared earlier, you added 2 subscriptions to your Poolhouse light:

  • one for address 0ae33b and keycode A: that is the one that tells my plugin that when it sees that message passing by, the Poolhouse light is probably turned On, or Off (with keycode B). My plugin then adapts the in-memory state of it’s virtual Poolhouse Light object, and sends an MQTT message to HA to reflect that new state. It seems that this part is already working fine.
  • the other subscription with address 000010, keycode A and CanSend True is used by the plugin when it receives an MQTT message from HA requesting to control the light. When HA asks to turn the light On, my plugin instructs the Eldat stick to send out keycode A on address 000010 and then assumes the light is on and reports that state to HA. When HA asks to turn the light off, it instructs to send out keycode B on address 000010, and assumes that happened as well.

And that is where the story ends for the plugin. It has no idea whether the poolhouse light really turned on or not as unlike newer protocols like Zigbee, Easywave receivers that control devices do not send out messages and thus not report their state.

You need to configure somewhere that the poolhouse light need to turn on when keycode A on Easywave address 000010 is sent and turned off when keycode B is sent on that same address, on top of the commands the light currently listens to.

Each of my lights are are normal household ligths that are controlled by their own Easywave receiver relay that is mounted in the ceiling. That relay has a little button, and when I press it for a few seconds, the relay switches to ‘learning mode’. If I then press the on button of any Easywave wall mounted transmitter switch, or I make my plugin send out an A message, the light on the Easywave relay will start blinking, meaning that it is now linked to the device that sent out that message, and will start listening to it.

I don’t know what you have as setup and I don’t know what an Easywave Relay Box is. I’m guessing it’s some kind of bridge device to link Easywave to the Niko Home Control system, or something, but as I’m not familiar with that, I can’t help you with that. You’ll need to figure out a way to make that poolhouse light to turn on when keycode A is sent out on Easywave address 000010, and of when keycode B is sent, on top of its current working.

Once that is working ok, you can start adding other lights, and linking them with other Easywave addresses.

After that you can do more advanced things. Because my plugin is able to detect hold, release and single, double & triple button presses, you can do more with your Easywave buttons using HA. For example when double-pressing the On button of a light, the light will turn on, because it’s dumb controller saw the messages passing by, but in HA you can make that double-press start an automation that starts a timer for X seconds and turn the light back off.

1 Like

Hi Marc,

A very big thank you from my side as well for your plugin. I got is working on RPI4. I was using the Niko connected switch solution until end of June 2024 when Niko decided to cancel the service…
I bought the Eldat RX09 128 channel USB stick and have now have my 2 Niko 410-00100 switches under control of your plug-in.
As you explained in the previous message, I indeed needed to reset the switches and link them again to the channel being sent out by your plugin. Some more info is in the user manual of the Niko 410-00100 switch (https://www.niko.eu/-/downloadfile/b127689ec3af408193e9a74c013ad7e2). Mode M1 is needed when sending the A and B command, in mode M2 sending A turns it on and sending A again turns it off. I didn’t try the M3 sfeer mode.
I modified the appsettings.json file and used channel 00 and 01.

I have the 2 lights also under control in Node-Red. It’s not required to operate them but I’m using Node-Red for other stuff and it was nice to have the switches also in the same flow.

Thanks to your solution I didn’t need to buy expensive new Niko equipment and now I’m also independent of any service they may cancel again in a few years.

Hi Tom,

Thanks for your kind message.

As you probably know (or found out), my plugin only supports the M1 mode of these switches. All the wireless switches in my home (I have more than 10 of them) are configured in M1 mode, to keep them “compatible” with the operating mode of the “dumb” switches we had before them, and still have for some lights that I don’t want to automate. I first tried to configure the first one in M2 mode, but the other inhabitants in my home found it very annoying that that one particular switch behaved different than all other switches and “demanded” me to change it back :slight_smile:

Hi Marcselis,

Thanks for this great addon.

I am hoping that you may help a newcomer. I have the Eldat RX09 in my Home assistant box and have installed your addon and it’s working. Here is debug log message.

[16:56:54.662 INF Easywave2Mqtt.Worker] Service running…
[16:56:54.672 INF Easywave2Mqtt.Easywave.EldatRx09Transceiver] Easywave service is starting…
[16:56:54.695 DBG Easywave2Mqtt.Easywave.EldatRx09Transceiver] Opening serial port /dev/ttyUSB0
[16:56:54.732 DBG Easywave2Mqtt.Easywave.EldatRx09Transceiver] Sent GETP?
[16:56:54.762 DBG Easywave2Mqtt.Easywave.EldatRx09Transceiver] Sent ID?
[16:56:54.773 INF Easywave2Mqtt.Easywave.EldatRx09Transceiver] Service is running…
[16:56:54.798 DBG Easywave2Mqtt.Easywave.EldatRx09Transceiver] Received GETP,40 OK
[16:56:54.825 DBG Easywave2Mqtt.Easywave.EldatRx09Transceiver] Received ID,155a,1006,0100 OK
[16:56:54.828 INF Easywave2Mqtt.Easywave.EldatRx09Transceiver] Eldat Transceiver detected with identifier 155a:1006
[16:56:55.863 INF Microsoft.Hosting.Lifetime] Application started. Press Ctrl+C to shut down.
[16:56:55.865 INF Microsoft.Hosting.Lifetime] Hosting environment: Production
[16:56:55.865 INF Microsoft.Hosting.Lifetime] Content root path: /app
[16:56:55.868 DBG Microsoft.Extensions.Hosting.Internal.Host] Hosting started

If I now press the button on the eldat RCP05 socket that I have I see no DBG Easywave2Mqtt.Easywave.EldatRx09Transceiver] Received REC coming up in the log, as understand that I need the address of the RCP05 in order to add that the the appsettings.json file in order for HA to be able to control it.

Also after about 2 mins my log says

[16:58:34.040 ERR Easywave2Mqtt.Mqtt.MessagingService] Failed to connect to MQTT broker: null
Error: MQTT connect canceled.
[17:00:19.061 ERR Easywave2Mqtt.Mqtt.MessagingService] Failed to connect to MQTT broker: null
Error: MQTT connect canceled.

My question is, how do I obtain the address of the RCP05?

Many thanks

I think you misunderstand the function of that button. An Easywave receiver can not send any messages, hence the name receiver. That button is a “program” button. When you briefly press that button, the receiver is switched to “Learning mode”, and will bind itself to any Easywave message it receives. It can be bound to multiple addresses to be able to control it via a number of different physical switches (that can only transmit messages), or the Eldat transceiver that can both transmit and receive messages.

So, what you need to do is:

  1. Choose what address you want the receiver to bind to.
    That address is a hexadecimal number between 000000 and 000040 or 000080 depending on whether you have the 64- or 128 channel version of the transceiver. (Easywave switches send messages on higher channels).
  2. Define the receiver in the plugin config with "Type": "Light", and add the chosen address to the subscriptions with "KeyCode": "A" and "CanSend": true.
  3. Restart the plugin
  4. Your receiver should no show up as a new light in Home Assistant. Make sure that light is “Off” in Home Assistant.
  5. Press the button on the receiver to switch it to Learning mode. Make sure the receiver is in 2 button mode (see the manual), as that is the only mode my plugin supports.
  6. Turn the light on in Home Assistant. That should make my plugin instruct the transceiver to a message with the address and keycode you configured. The led in the programming button should light up for 2 seconds to acknowledge the receival.
  7. Wait 30 seconds until the Learning mode of the receiver has stopped.

You should then be able to control the receiver from Home Assistant.

1 Like

I forgot to respond to your 2nd problem. My plugin needs MQTT to work in order to communicate with Home Assistant.

The steps I described above won’t work until you fix that MQTT problem first!

  • Make sure you have an MQTT broker installed in your home network and that it works correctly. If you don’t have one, you can install the Mosquitto addon in Home Assistant, which contains a lightweight MQTT broker.
  • Make sure the MQTT Integration is installed in Home Assistant as well, and configured to connect to your MQTT broker.
  • Make sure you configured the address, port, user and password to use in my plugin as well.
1 Like

Dear Marcselis,

Many thanks for answering so quickly, that all makes sense. Haven’t quite got MQTT broker taking to your easywave plugin yet, but I will get there! Just wanted to say thanks for your support.

Best wishes

Ian