I’d like to have the following happen via a rule.....
1. On system boot have the led stay lit for 3 seconds
2. If WiFi connection is made blink led 3 times slow
3. If MQTT connection is made blink led 3 times fast
4. Publish to MQTT server every 5 mins and blink the led when that happens
I’ve read about the pulse command that I think will help with the led blinking.
As for the others, I’ve read on this forum the possibily using ping could help with this. The issue I have with ping is that I can’t guarantee which ip to hit for testing.
I’m sure there are a few ways to handle this so I thought I would toss this out to the masses for ideas.
Advice on rule design
Moderators: grovkillen, Stuntteam, TD-er
Re: Advice on rule design
So here’s my start. I was trying to mess around with variables but didn’t have much luck. I thought I would set them during an event and then test for them later.
On System#Boot do
Pulse,14,1,500
endon
On WiFi#Connected do
Let,1,1
timerSet,1,1
Endon
on Rules#Timer=1 do
Pulse,14,1,500
Pulse,14,0,500
Pulse,14,1,500
Pulse,14,0,1000
Endon
On MQTT#Connected do
Let,2,1
timerSet,2,1
Endon
on Rules#Timer=2 do
Pulse,14,1,500
Pulse,14,0,500
Pulse,14,1,500
Pulse,14,0,500
Pulse,14,1,500
Endon
On System#Boot do
Pulse,14,1,500
endon
On WiFi#Connected do
Let,1,1
timerSet,1,1
Endon
on Rules#Timer=1 do
Pulse,14,1,500
Pulse,14,0,500
Pulse,14,1,500
Pulse,14,0,1000
Endon
On MQTT#Connected do
Let,2,1
timerSet,2,1
Endon
on Rules#Timer=2 do
Pulse,14,1,500
Pulse,14,0,500
Pulse,14,1,500
Pulse,14,0,500
Pulse,14,1,500
Endon
Re: Advice on rule design
This discussion should help you: viewtopic.php?t=6288I was trying to mess around with variables but didn’t have much luck.
- Thomas
Who is online
Users browsing this forum: No registered users and 42 guests