Trigger nor working in some cases

Hi, I’ve changed my project to be compatible with MQTT as per Cayenne’s advise. I use the Arduino to control the blinds at home and it’s working OK. After changing I am experiencing some strange things and I believe it’s a bug.

I use channels 2 to 7. It’s pretty simple, a Custom Widget button, 0/1 to control the relay. After executing the command, pin goes to 1, I want to reset the pin to 0 so I use a trigger: if pin 2 is 1 then set pin 0.

If works for channels 4, 5, 6 & 7 but not for channels 2 & 3. It does execute the command but its does not reset to 0. All the channels are exactly the same and these 2 do not reset, I have to do it manually by clicking again on the icon.

Any idea of why this is happening ? With the “old” code it was working.


try deleting the widget and trigger with channel 2 and 3 and add them again,

Done several times.

can you post the code and screenshot of your dashboard and trigger. also if the problem is with channel 2 and 3 change them to another channel.

Hi, this is very strange. When I was using a Raspberry, after setting a GPIO to High I had to reset it to low and I did it by using a trigger (IF GPIOX → High than GPIOX-> Low). I swapped to Arduino and I tought I had to do the same thing. It seems that, with the MQTT library I do not need to reset the GPIOX. It does that by itself. Great but the symbol in the interface does not reset to Off, it stays lit. Well, by triggering the same way I was able to unlit the desktop symbol. This does not work for channels 2 & 3.

OK, let’s use channels 8 & 9. 10 & 11. 12 & 13. Channels 8 & 9 are @ 1,45V; 10 & 11 @ 5V; 12 @ changing between 2.2V and 2.7V; 13 @ 0V. I cannot use these channels. Are these the values they should present ? I am using shield 5100.

To create the action I use Custom Widget Button, Digital Actuator, Digital 0/1, Channel X, Icon Motor, Add widget. No code.


So, I cannot change to channels > 7, and I cannot reset the desktop icon for channels 2 & 3.

Any ideas ?

it is a bit confusing from the above detail you gave . so can you give points wise answers. so i can understand better your problem and help you out.

1)what is your project about.
2)can you post the code.
3)hardware you have used.
4)what problem you are facing
5)dashboard screenshot
6)trigger screenshot.

OK, here it is:

1)what is your project about - controlling blinds by activating the remote control. The transition to HIGH on the Arduino acts if you push the blind remote control button
2)can you post the code - there is no code. Which code do you mean ? I am using the Button Custom Widget as described before
3)hardware you have used - Arduino Uno with shield 5100
4)what problem you are facing - described earlier but the icon in the desktop does not reset to Unlit. It does not go OFF on channels 2 & 3 but is does on all the others
Lit button
5)dashboard screenshot - attached
6)trigger screenshot - attached

He means the code you uploaded to the Arduino

I did not upload any code, I just installed the Arduino following the instructions on the site. I did not write a single line of code.


Might be related to this bug now that I think about it. Have you ever deleted the widgets for the channels you are triggering on?

Yes, many times. I deleted the widgets and the triggers and created them again. What is the difference between channels 2 & 3 and 4, 5, 6 & 7 ?

Why channels from 8 up to 13 do not work either ?

They work but as @adam pointed there is a bug currently.

Try this

  1. Delete device you have (Escritorio)
  2. Add new device
  3. Add your actuators on dashboard
  4. Add triggers for your actuators, be carefull not to make a mistake

If you make a mistake, delete the trigger, delete the actuator, add that actuator on different pin and set trigger.

Then try if your triggers combo works.

I have had issue with triggers on temp sensors, now we need someone to confirm it on actuators :wink:

1 Like

OK, I created a second device with another Arduino, created the widgets and then the Triggers. Now the icon is reset.

I also see the device is creating a Widget for channel 0. I delete it and it appears, again and again. Maybe another bug ?

BUT, the GPIO do not change state meaning I cannot control the blinds. As a precaution I did not delete the former device, I just added a new one. When I control the blinds with the old one, they work fine. With the new device, they don’t work. I started all over again and I got the same result.

I deleted all the triggers in the old one and created new ones. The same, in 4 of teh channels it does reset the icon. In 2 of them, it doesn’t.

I installed the code exactly as I did before. Any ideas ?

Its not a bug, mqtt adds channels automaticly based on the code.
You probably have CAYENNE_IN_DEFAULT somwhere in the code, and i think that is causing the problem.
CAYENNE_IN_DEFAULT maps pins according to hardware hardware pin 0 virtual pin 0, hardware pin 1 virtual pin 1 etc.
Since pins 2 and 3 are Interupt pins on arduino board maybe they cause the problem.

Delete CAYENNE_IN_DEFAULT part of the code and use CAYENNE_IN(1) CAYENNE_IN(2) etc. for every arduino pin you have actuator connected to. You can find code in mqtt exmples.

1 Like