Re: [mh] Adding Tasmota HTTP support

Jeff Siddall via misterhouse-users <[email protected]>
Newsgroups gmane.comp.misc.misterhouse.user
Message-ID <[email protected]>
A couple of people have asked about detecting offline devices or 
transmission failures.  My general response is that I would prefer to 
make WiFi reliable enough that there is no need to keep tabs on 
individual devices.

Having said that, I understand stuff still happens (and I would be the 
first to tell you the best WiFi is _far_ from wired reliability) so 
there are a couple of other options.

One of the great things about standard IP/web devices is there are a 
_lot_ of existing tools, like monit 
(https://en.wikipedia.org/wiki/Monit), to do network monitoring. These 
are already readily available, well established and well supported so 
that would be an easy solution.

In addition, I have now added an HTTP timeout setting to the 
Tasmota_HTTP::Item module.  The default setting allows for the initial 
request, plus 2 re-transmissions.  That should take care of any 
individual packet loss without causing long pauses.

As part of that improvement, I also added the last request status line, 
coincidentally stored in the item variable "last_http_status" to help 
with monitoring items.  This is in addition to the ack tracking that I 
added yesterday.  It's probably best to start looking at ack, since 
ack=1 means you can be sure the last set was successful.  However, if 
ack is 0 then you can start digging into last_http_status.

Further, if any web request to an item comes back as anything but 
successful, a print log error message is generated so the issues is 
recorded and can be further analyzed.

Let me know if that makes sense to everyone.  Of course, anyone can add 
new code to do whatever other cool things they want if existing options 
don't meet everyone's needs.  I hope to have the code committed shortly 
and update the wiki accordingly so people can test this out.



________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.