MQTT sniffer, why no text imports?
Moderators: grovkillen, Stuntteam, TD-er
MQTT sniffer, why no text imports?
I am using MQTT to shove data out to a couple of D1's with displays to display weather data and would like to include the direction of the wind. For example SSW or N. Kids and wife would not get degrees.
So, why can't text be sniffed?
So, why can't text be sniffed?
Re: MQTT sniffer, why no text imports?
Perhaps global sync is an option here?
Re: MQTT sniffer, why no text imports?
It would be but one of them would still need to accept the feed from MQTT that has letters in it.
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: MQTT sniffer, why no text imports?
But using rules which convert the number to a letter shouldn't be a problem.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: MQTT sniffer, why no text imports?
You can do that with rules?
Re: MQTT sniffer, why no text imports?
Speaking of rules... can one do an if, else, else, endif? I have not been able to get the second else to work...
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: MQTT sniffer, why no text imports?
Please study the wiki tutorials for the if else.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: MQTT sniffer, why no text imports?
I have studied that and it does not make sense to me...
I see that I need this section:
BUT, only simple if/else is possible - so nesting and Boolean logic are not supported. However there is a workaround for the limitation of not being able to nest. An "event" can be called from a "trigger".
on <trigger> do
if <test1>
event <EventName1>
endif
endon
on <EventName1> do
if <test2>
<action>
endif
endon
I am trying to use a button to change the OLED contrast from high to medium to low and finally to off.
The other thing I am trying to make work is conversion of degrees to letter values and without multiple else checks I do not see how to make that work either. I will keep at it.
I see that I need this section:
BUT, only simple if/else is possible - so nesting and Boolean logic are not supported. However there is a workaround for the limitation of not being able to nest. An "event" can be called from a "trigger".
on <trigger> do
if <test1>
event <EventName1>
endif
endon
on <EventName1> do
if <test2>
<action>
endif
endon
I am trying to use a button to change the OLED contrast from high to medium to low and finally to off.
The other thing I am trying to make work is conversion of degrees to letter values and without multiple else checks I do not see how to make that work either. I will keep at it.
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: MQTT sniffer, why no text imports?
You could try this for the contrast.
For the degree to direction you could do something similar.
Code: Select all
On Switch#Button Do
If [Dummy#Value1]>2
TaskValueSet,2,1,0
Event,SetToOff
Else
TaskValueSet,2,1,[Dummy#Value1]+1
EndIf
If [Dummy#Value1]=1
Event,SetToLow
EndOn
If [Dummy#Value1]=2
Event,SetToMed
EndOn
If [Dummy#Value1]=3
Event,SetToHigh
EndOn
Endon
//Below is events
On SetToOff Do
OLEDFRAMEDCMD,Off
EndOn
On SetToLow Do
OLEDFRAMEDCMD,Low
EndOn
On SetToMed Do
OLEDFRAMEDCMD,Med
EndOn
On SetToHigh Do
OLEDFRAMEDCMD,High
EndOn
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: MQTT sniffer, why no text imports?
I have always kinda wondered what the dummy values were for and I could not see a use.
I will try working on that and thanks for your input, still learning and building.
Thanks Matt
I will try working on that and thanks for your input, still learning and building.
Thanks Matt
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot] and 32 guests