Post your best Lua script examples here

User avatar
By Raoulos
#16500 Hi,
First thx, i use the last firmware, it's works on arduino and when i test it with the esp8266(i use the Esp-07), it do that:
Publishing...25
Publishing...24
Publishing...23
Publishing...22
Publishing...21
Publishing...25
Publishing...24
Publishing...23
Publishing...22
Publishing...21
Publishing...25
Publishing...24

...

It restart everytime after 21. The time between each "Publishing" is around 5-6sec

Do you have any idea ?
User avatar
By rutierut
#16723
Raoulos wrote:Hi,
First thx, i use the last firmware, it's works on arduino and when i test it with the esp8266(i use the Esp-07), it do that:
Publishing...25
Publishing...24
Publishing...23
Publishing...22
Publishing...21
Publishing...25
Publishing...24
Publishing...23
Publishing...22
Publishing...21
Publishing...25
Publishing...24

...

It restart everytime after 21. The time between each "Publishing" is around 5-6sec

Do you have any idea ?


Yes, that is how the script is designed, after 5 seconds it tries to publish again, apparently the ESP fails to publish to the broker.
User avatar
By bubnikv
#21662 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