-->
Page 12 of 15

Re: Fully working MQTT examples temperature, buttons, RGB, e

PostPosted: Sun Jul 12, 2015 5:15 pm
by jmccoy555
Hi,

Have I lost the plot here......

I'm trying to get the button code to work and have managed to get it to publish a message when the button is pressed, which is great........ but then it stops!

If I press the button again notthing happens, no error, no crash, no publish, even if i wait a while.

Any idea??

Thanks.


****** EDIT ******

Sussed it, a pull up is needed to bring the pin up again after it has been pulled down by pressing the switch.

Well that works anyway, would be good to know if that's the correct way of doing it.

Thanks again.

Re: Fully working MQTT examples temperature, buttons, RGB, e

PostPosted: Thu Jul 16, 2015 8:20 am
by rutierut
jmccoy555 wrote:Hi,

Have I lost the plot here......

I'm trying to get the button code to work and have managed to get it to publish a message when the button is pressed, which is great........ but then it stops!

If I press the button again notthing happens, no error, no crash, no publish, even if i wait a while.

Any idea??

Thanks.


****** EDIT ******

Sussed it, a pull up is needed to bring the pin up again after it has been pulled down by pressing the switch.

Well that works anyway, would be good to know if that's the correct way of doing it.

Thanks again.


Hey,

Sorry for my long absence but that is indeed how to code is designed, thanks for updating your question with a solution? If you read this, do you happen to know what version of NodeMCU you are running?

Tnx

Re: Fully working MQTT examples temperature, buttons, RGB, e

PostPosted: Thu Jul 16, 2015 8:24 am
by rutierut
bubnikv wrote:Dear Rutierut,

I am in a need for a remote tuning knob for a software defined radio running on the other side of the house. I would like to transmit the state of the rotary encoder with low latency over WiFi.

Would you please elaborate on why the immediate reporting of the rotary encoder state is not stable? Does the WiFi processing block the reading of the rotary encoder state? If so, would it then help to let an external low cost controller handle the rotary encoder and let the Lua script poll the external low cost controller for the state of the rotary encoder?

Thanks, Vojtech


The problems is that the esp tries to send too many MQTT messages at a time, the poor esp just needs a little break in between :D. Though if someone would design another script from scratch implementing a system where a maximum messages per second are send this would be possible.

Re: Fully working MQTT examples temperature, buttons, RGB, e

PostPosted: Mon Jul 20, 2015 9:26 am
by Will Guo
Dear all,
I have try the code for controlling gpio2, but my esp8266-01 cannot connect MQTT node of node-red running by Raspberry pi. Who can show me the configuration of MQTT node in Node-red, I do not know where exist problems.