I have a Legrand Ecocompteur power measurement device for which I have created a virtual HTTP input in my Miniserver. Ie. Miniserver reads the instantaneous power from this unit via fetch/parse of a JSON file over HTTP.
The Legrand Ecocompteur functions perfectly, but I have noticed that since creating this virtual input it will sometimes stop responding to HTTP requests. It appears that something in the Miniserver requests is causing it's IP stack to crash!
To test the Legrand Ecocompteur device I wrote some code to perform the same HTTP requests to this device from a Linux server. Interestingly, these requests are handled perfectly by the Legrand Ecocompteur.
So I took a network packet capture and looked into what might be causing the Miniserver requests to make the Legrand Ecocompteur malfunction by comparing it's communications with those from the Linux server. I discovered that the Miniserver HTTP requests for this virtual input do not include the 'Connection: close' header.
It seems this is non-compliant with the RFC which states, "HTTP/1.1 applications that do not support persistent connections MUST include the "close" connection option in every message."
See https://tools.ietf.org/html/rfc2616#section-14.10
I imagine that this Legrand Ecocompteur will have a basic TCP implementation (as does the Miniserver) and will have limited connection tracking. I am guessing that after a certain period of time with many connections from the Miniserver without the 'Connection: close' header it may be trying to keep track of all these supposedly persistent connections and that causes a crash.
To be honest though, it doesn't really matter what the Legrand Ecocompteur is doing, the fact is that the Miniserver does not seem to be compliant with RFC 2616. It needs the 'Connection: close' header adding to each HTTP request that is made.
On this topic, I notice there is a 'User-Agent: [en]' header in the Miniserver HTTP request. This is clearly of little use think it would be better either remove this agent header or use something more useful that can identify the request as coming from a Loxone Miniserver.
I haven't checked requests that are emitted from the Miniserver as HTTP virtual outputs (and other HTTP traffic coming from the Minserver?), but if the same issue exists with them please correct there too.
I consider this a high priority bug as it can cause malfunction in other devices in my installation. Surely it is also a very easy fix and can be made quickly.
Have you heard back on this at all?
Any news on this topic ?
So do you access the data either via the app or a web broser and if so which one.
I also now have a question is the Loxone App just a modified browser and if it is, which one is it.
On Tuesday, 30 March 2021 at 18:26:28 UTC+2 Techdoctor wrote:So do you access the data either via the app or a web broser and if so which one.I think you are barking up the wrong tree here. Miniserver communicates with a device. You use an app or browser (or API) to communicate with the Miniserver. That second means of communication (you <-> Miniserver) really should have no bearing on the first (device <-> Miniserver).
I also now have a question is the Loxone App just a modified browser and if it is, which one is it.You mean the Loxone Android app? Looks like a standalone app to me, but that's just based on how it looks and runs.
--Robin
You received this message because you are subscribed to the Google Groups "Loxone English" group.
To unsubscribe from this group and stop receiving emails from it, send an email to loxone-englis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/loxone-english/e2dfc97b-c3b1-4dd3-bd89-73478d9be1adn%40googlegroups.com.