The use of the ESP8266 in the world of IoT

User avatar
By 4refr0nt
#38971
mariuszb wrote:if one device send deviceID eg. dev-01 and next another eg. dev-02 , when You open IoTmanager it receive only last dev-02.. or I am wrong ??


After starting, IoT Manager subscribed to topic "/IoTmanager"
IoT Manager will be receive all messages, published by any devices to this topic.

example exchange:
Image

You can look at IoTmanager4.ino (used ArduinoJson library and more simplest use)

If use "retained" flag for publishing config, we see all devices, include "dead devices", after IoTmanager reconnect.
At now, after HELLO, we receive actual sensor config data only from "live devices" after IoT Manager reconnect.
User avatar
By mariuszb
#38977
4refr0nt wrote:
mariuszb wrote:if one device send deviceID eg. dev-01 and next another eg. dev-02 , when You open IoTmanager it receive only last dev-02.. or I am wrong ??


After starting, IoT Manager subscribed to topic "/IoTmanager"
IoT Manager will be receive all messages, published by any devices to this topic.

example exchange:
Image

You can look at IoTmanager4.ino (used ArduinoJson library and more simplest use)

If use "retained" flag for publishing config, we see all devices, include "dead devices", after IoTmanager reconnect.
At now, after HELLO, we receive actual sensor config data only from "live devices" after IoT Manager reconnect.


Thanks a lot for this.
I will test it and let You know.

btw. You can use "last will" if You use "retained" message
User avatar
By mariuszb
#39133 Hi
First at all, I must say that's a cool app.

1. I have question about order of widgets
scr_1.png

scr_2.png

Signal100,Led100 and Temperatura100 have index: 1 ,2 and 3
Signal101,Led101 and Temperatura101 have index 11,12 and 13.
but in TAB named ALL I see strange order.Am I doing something wrong ??
Also have question how to remove and/or change order of ALL named TAB ??

2. Delays in trasmission, always cause hazards (I am not using Arduino, example is from Arduino)

First 0,5 sec delay could be removed eg. by the response from IoTmanager: "/It manager/DeviceId /I_See_You" - You can send now, or just "/IoTManager" with "deviceID" - what do you think about this?
2 and 3 delay, (do not know which implies ...it could be), but I have a question:
If several units give at the same time message (and here message distances are beyond our control) , what happen ?
You do not have the required permissions to view the files attached to this post.
User avatar
By 4refr0nt
#39143
mariuszb wrote: I have question about order of widgets
but in TAB named ALL I see strange order.

Sorting order by pageId+id. You can add attribute pageId for widgets sorting (pages sorting too). If pageId not received, then we have strange order (widget confg received timestamp + id)

mariuszb wrote: First 0,5 sec delay could be removed eg. by the response from IoTmanager: "/It manager/DeviceId /I_See_You" - You can send now, or just "/IoTManager" with "deviceID" - what do you think about this?


Its may be good idea in future, but we needed "backward compatibilities" for older sketches. Also, what about 2 or more smartphones?
Also, I'm thinking about "device keepalive messages" for displaying "device online status" and remove widgets from "dead devices".

mariuszb wrote:If several units give at the same time message (and here message distances are beyond our control) , what happen ?

its broker troubles, but all brokers can receive and send many messages per second.
Config payload send and receive with QoS=1, status message have QoS=0. Several status messages can be discarded by broker (or delayed), for high load traffic of messages, but config messages delivery guarantee by QoS=1.