Flashing light

how do you make it flash? it just says on

it just stays on because of the current delay and delaybetween bugs. The current delay implementation for example of 500ms will at the moment do 500 seconds instead. So if you wait long enough it will blink. Should be fixed soon

I know I’m not exactly sure how others have flashing setup, but with the way that @Sticks18 helped me get it set up for my GE Link bulbs, it’s still working properly without such long delays.

I assume the delay problem mentioned above is for people using something other than these bulbs, right?

That’s correct. The general flasher app turns the light on/off in a cycle to create the blinking. The method I described only works for zigbee bulbs, but it’s a hardware feature to blink, so it only needs 1 command from the ST system and the bulb hardware takes over from there. It’s much less susceptible to platform issues (of course that one command needs to be sent properly) than the general method; but it’s also device specific.

1 Like

OK, cool. That’s what I thought, but just wanted to check.
So, for anyone that just wants a small number of blinking bulbs for alerts or something like that (which is all I do with it), then getting a couple these GE Link bulbs when they’re on a cheap sale may be the way to go (I’d go buy a couple at normal price if I didn’t already have a few of them implemented around here).

[quote=“[deleted], post:38, topic:5394, full:true”]
Can anyone help with adding a cancel option for The Flasher?

I have my lights set-up to flash on an alarm situation (10 minutes worth of flashes) via a momentary button tile and rule machine.

When I disarm the Smart Home Monitor rule machine turns off my siren but it cant stop the flashing. The “set for specific mode” option in The Flasher can stop it starting in the first place but wont stop an ongoing sequence.

Would be great if the Flasher could be stopped through momentary button tile of switch. I have played around with the code for ages but cant figure it out.

For now I am using a clunky workaround using 2 instances of The Flasher. 1 to flash just once, triggered by the other to flash 100 times. I can then use modes to stop the individual flashes.
[/quote]

Not sure how much help we’ll get, and I assume this has already been discussed somewhere, but I couldn’t find it. So, I created a new thread for asking about this concept…

I need some help on this. I added the extra code into the Link Bulb device handler and tried to test the alert/flash but nothing happens. For testing, I have the following set up in Rule Machine.

Trigger: Porch Light On
Actions: Run Custom Command: alert(), on these devices:lamp. ( the lamp is the link bulb)

Did you edit the Link device in the IDE and change the device type to your modified code?

Hmm. I only added the extra code to the link bulb in device handler. Should I change something under the device itself as well? Under device type it still shows GE link bulb as I just modified the original without creating another.

When you initially add the device, ST will install a default device handler. You need to ensure that it’s your modified device handler that is being used, and not the original.

I run both types:
Default type:

My own modified version:

The easiest way to check is that your “personal” device handlers will be at the bottom of the list, whereas the default device types are alphabetically sorted and before the personal types. To avoid confusion, I normally rename my device types if they’re modifications of existing types.

Hello everyone.

I’m a complete noob to IOT and ST but I’m a quick study.

I installed flasher 2 (works great).

Is there a way to specify brightness and color?

I saw that whatever brightness the bulbs were prior being shut off is the max brightness they flash when I trigger this.

Choosing the color would be nice but I’m more interested in having the lights flash at 100% brightness.

Thanks!

Yes, I am using the modified type and even changed the name to be sure.

Even in the testing section of the device, alert shows up as an option but nothing happens when selected. All other commands work on the bulb.

I guess you’re going to have to do some debugging. I would start by adding a debug line to the alert() function and confirm in the IDE that the function is being called.

I have just added a brand new GE Link bulb to my setup tonight and it worked without any issues with the modified device type. I don’t use rule machine, though. I modified a version of flasher to invoke alert() and it’s been working great for months.

Don’t forget to add command "alert" right below the capability list at the top. Without that functions won’t run. If you have that right, then the debug suggestion your best bet.

When looking in logging as I press the alert button in the simulator, this is what I get:

	16a2dbe8-8797-4d22-bb1b-b01e4db4ac5e

8:47:23 PM:
error
groovy.lang.MissingMethodException: No signature of 

method: script1461890843726225246267.hex() is applicable for argument
types: (java.lang.Integer, java.lang.Integer) values: [5, 4]
Possible solutions: now(), off(), on(), run(), grep(), any() @ line 187

	16a2dbe8-8797-4d22-bb1b-b01e4db4ac5e

8:47:23 PM:
debug
5

There is an error there, but I don’t know what it means. I do have the command alert added in the top section as well.

Looks like they updated the GE Link device handler and removed some helper methods. Add the below to the very bottom. These just convert the values to the hex format used by zigbee.

private hex(value, width=2) {
	def s = new BigInteger(Math.round(value).toString()).toString(16)
	while (s.size() < width) {
		s = "0" + s
	}
	s
}

private String swapEndianHex(String hex) {
    reverseArray(hex.decodeHex()).encodeHex()
}

private byte[] reverseArray(byte[] array) {
    int i = 0;
    int j = array.length - 1;
    byte tmp;
    while (j > i) {
        tmp = array[j];
        array[j] = array[i];
        array[i] = tmp;
        j--;
        i++;
    }
    return array
}
2 Likes

That did it! Thanks!

1 Like

How would I add a command to stop the flashing based off of the 0000?

Thanks Scott. That did it for me too.
Can I get the rest of my lamps to flash?
I have several Osrams that use the default ZigBee Dimmer handler.
I’ve tried modifying the code the same way as the GE Link but am not having any luck. TIA

For Osrams, the 1 after the deviceNetworkId} part should be 3 instead. That’s the endpoint of the device. GE Links use 1. Osram uses 3.

2 Likes