The use of the ESP8266 in the world of IoT

User avatar
By 4refr0nt
#40252
mariuszb wrote:My notes :) to simple-btn:
1. delay now is only up to 1 sec - can it be up to 5 sek ?
The function can be used if you want to make sure that the button has not been pressed accidentally - eg. Need to keep at least 3 seconds to activate something

Remember, IoT Manager send control packet always after button pressed.
And then, can be send periodicaly next packets every DELAY ms (until button in pressed state)
This time may be very long. And 5sec too.
You can count this packets on device. For example DELAY:200, we want action on device after 5sec, then we can expect 25 packets (5sec*5msg/sec). No problem for "5sec pressed" confirmation.

mariuszb wrote:2. Widget can't accept any status data...maybe it could ?
If would, it could be used this for example as status icons for something..."control" not be used by user, user only send "status" (simulating press) to change color etc.
Delay set to 0 by user to avoid unnecessary sending many massages by simle-btn.

You adeas? Change button fill color (text color) after status arrived? Forever? Temporary? How long? Tell me about this and I'm make this widget extension in next version.
User avatar
By mariuszb
#40254
4refr0nt wrote:You can count this packets on device. For example DELAY:200, we want action on device after 5sec, then we can expect 25 packets (5sec*5msg/sec). No problem for "5sec pressed" confirmation.


Thank you for solution :)

4refr0nt wrote:You adeas? Change button fill color (text color) after status arrived? Forever? Temporary? How long? Tell me about this and I'm make this widget extension in next version.

May be status = "color" forever until next "color" or "none".
After "none"(default) simple-btn work like button
(on the occasion: possibility of locking button function if status = 'color' ---- not necessarily because it can be done by the software user, the color just shows that the button is in a different state. )
User avatar
By 4refr0nt
#40256
May be status = "color" forever until next "color" or "none".
After "none"(default) simple-btn work like button
(on the occasion: possibility of locking button function if status = 'color' )

Our conception: "all logic on device, mobile app for visualization only and simplest as possible"
You can pub widget config not only after HELLO msg. You can change any widget config at the fly after any device event.
Status needed for smaller data exchange via broker. Try chage widget config on the fly and pub it, after device event (against status publishing). You can change button config (colors and other) and pub it, after control msg arrived and device change state. Try it and tell me feedback, please.
User avatar
By mariuszb
#40260
4refr0nt wrote:Our conception: "all logic on device, mobile app for visualization only and simplest as possible"
You can pub widget config not only after HELLO msg. You can change any widget config at the fly after any device event.
Status needed for smaller data exchange via broker. Try chage widget config on the fly and pub it, after device event (against status publishing). You can change button config (colors and other) and pub it, after control msg arrived and device change state. Try it and tell me feedback, please.

So it is clear to me, but ....
In this way, almost everything can be reduced to an icon with the text and signaling that it was depressed. This way you can make a button, keyboard, joystick, badget, label, heat index and .......just chage widget config on the fly.
And seriously, You can do eg. one tab panel indicating the status of eg. 16 zones in alarm usign simple-btn, but made in a way like you suggest will generate biger data exchange.

It was just my suggestion only that one widget can be implemented multiple functions ;)