Currently I migrate my fenecon/openems binding setup to a pure rest api based setup. Its more flexible an I can access much more data… But that not the problem.
The problem is the http binding. The rest api of openems is supporting regex syntax as part of the url
If I try to open it with the http binding, the pipe symbol is quoted to “%7C” and this result in a 500 error from openems. On the openems side I can see that the requested url is “http://192.168.100.67/rest/channel/(_sum|ess0)/.*” and this is not working.
I think the problem is the toASCIIString call inside the http binding. Maybe there should be a config option like “urlencode=true” by default with the possibility to disable it.
I think there are other scenarios for other people as well.
I had a similar issue when I needed to hash an http with an email address and needed to add
if (hash) {
// For hash generation, preserve + and @ characters in values.
encodedValue = encodedValue.replace("%2B", "+");
encodedValue = encodedValue.replace("%40", "@");
}
because they hash differently than their standard character sets. Based on the code snippet you may need a PR to add an additional .replace(%7C, |), but I’m not an expert