Fibaro Wall Plug Issues

Having plugged my Christmas lights into the Wall Plugs I discovered a problem with my automation code when grouping several wall plugs together and triggering them as one. The automation is kicked off several times and some will not run throwing an error that the script is already running. This results in some of the devices shown in the wrong state. This an be fixed by adding “mode: parallel” to the automation so that multiple instances of the automation can be running at the same time, “mode: queued” could also be used.

- alias: "Refresh Wall Plug"
  initial_state: True
  trigger:
  - platform: mqtt
    topic: "OpenZWave/1/command/setvalue/"
  mode: parallel
  action:
    - delay:
        milliseconds: 200
    - service_template: mqtt.publish
      data_template:
        topic: "OpenZWave/1/command/refreshvalue/"
        payload_template: "{{ trigger.payload.split(',')[0] +'\n}' }}"

When switching many devices at the same time the states can take a while to be correctly reflected in Home Assistant but with this change they do get there within a few seconds.

1 Like

I found solution to my issue. I receive error when I start this automation manually. It is failing because when an automation is executed manually it skips trigger part and goes strait to the action part which fails because there is no payload to split.
service_template was deprecated in Home Assistant 0.115 - because of that I receive that warning about deprecation.
I’ve changed service_template to service and data_template to data. Automation seems to refresh nodes correctly, but it sometimes take a few seconds to do it despite I have only 4 nodes in my ZWave network.

  initial_state: True
  trigger:
    - platform: mqtt
      topic: "OpenZWave/1/command/setvalue/"
  mode: parallel
  action:
    - delay:
        milliseconds: 200
    - service: mqtt.publish
      data:
        topic: "OpenZWave/1/command/refreshvalue/"
        payload_template: "{{ trigger.payload.split(',')[0] +'\n}' }}"

I am not going to go all overly lovable here but suffice to say: Thank you so much @knutz for suppling a workaround to this problem.

As mentioned earlier also, I see this problem more often after switching to ozw - but having spent too much time already setting it up I am not switching back. :slight_smile:

Let’s hope this can be solved in ozw given time - it works very nice after all.

BR

//UlfThomas

I have not found that I have needed it much but I also wrote a python script that refreshes my 3 Fibaro Wall Plugs. I have a button in the GUI that will run it if I need it (which I did for a bit before adding mode: parallel).
It loops through a list of devices using their ValueIDKey. I have not found a way of pulling these from the database although I believe it can be done. I found the values my OZW is using by looking at the MQTT messages. So this can be a way to correct the status manually if you need a way that is not driven by an event that has the ValueIDKey.

refresh_zwave.py

device_list = ['38354960','55132176','71909392'] #These are the ValueIDKey for my devices
for i in device_list:
    payload = "{\"ValueIDKey\":" + i + "}"
    hass.services.call('mqtt', 'publish', { "topic": "OpenZWave/1/command/refreshvalue/", "payload": payload })
    time.sleep(0.1)

Regards

1 Like

This thread has saved my switch to Home Assistant, one or two times a day I am getting a timeout on a Get command after a Set command. I implemented the automation, and hopefully no more unresponsive buttons in Home Assistant.

Better is of course a good solution in Openzwave.

Sietse

To follow up on this thread, I moved across to the new Z-Wave JS interface a few weeks ago and have not seemed need the automation detailed above. It seems to work properly.
https://www.home-assistant.io/integrations/zwave_js/

Perhaps others could add their experiences.
Regards

1 Like