@craigweb said in HTTP Retriever and JSON data:
Looks like your URL has illegal characters. try replacing [ & ] with %5B and %5D respectively.
Thanks, that helped.
@craigweb said in HTTP Retriever and JSON data:
Looks like your URL has illegal characters. try replacing [ & ] with %5B and %5D respectively.
Thanks, that helped.
Hello,
Im trying to read data from JSON service.
JSON data addres is: http://192.168.1.250/iolinkmaster/port[4]/iolinkdevice/pdin/getdata
Data is: {"cid":-1,"data":{"value":"0079FD03"},"code":200}
I used HTTP Retriever, with that URL. Received value is in hexadecimal format, Im interestet in first 4 characters.
Using https://regex-testdrive.com/en/dotest I made a RegEx: .*"value":"([0-9A-Z]+)FD03"},"code":200}
Next I made a data point with that RexEx. But when I click on "Test value parameters" button I get error: java.lang.IllegalArgumentException: Illegal character in path at index 38: http://192.168.1.250/iolinkmaster/port[4]/iolinkdevice/pdin/getdata
Also it doesn't matter if I use RegEx on data point - I still get that error trying to test value. .
And now I need help how to resolve this error.
Also my next question is how to convert hexadecimal data value to decimal.
Regards.
Yes I tried to stop and start Mango again but it didn't help at all.
Finally I resolved it by editing script in ma-start.bat -
"%EXECJAVA%" %JPDA% %JAVAOPTS% -server -Xmx2500m -Xms1000m -Dma.home="%MA_HOME%" -cp "%MA_CP%" com.serotonin.m2m2.Main
Maybe it's not elegant but now I see change in memory usage after starting Mango.
Thanks for help.
Greetings
Yes, Mango is running od Windows system.
So I tried with putting a .bat file in "ext-enabled" folder.
memory-small.bat
if "%1" == "init" (
rem Startup with Java Memory setup for small installation
set JAVAOPTS=%JAVAOPTS% -Xms2500m -Xmx3200m
)
It still doesn't work. But when I tried .bat file on my test Mango installation with core 3.2.1 it worked perfectly.
//Edit
Hm, in Mango 3,2,1 on Windows max memory space limit comes from .sh file. I tried deleting .bat file and nothing changes. When I changed limits in .sh file to 1600M, I see in task manager the Java is taking that 1600M.
Hello,
I wanted to use script to increase memory space for Java to use.
I've copied "memory-small.sh" script from "ext-available" to "ext-enabled" folder. And unfortunally nothing happens. In internal metrics there's still "JVM maximum available memory (MB) - 622Mb" and nothing changes.
Mango version is licensed 2.8.8.
Greetings
Thanks for help. Now it's fine :)
Hello,
I'm working with serial charts coding. At the moment I have chart showing two series and it works fine. First series is for temperature and the second is for humidity,
But I want to add maximum and minimum limit lines (horizontal) to that chart too. So it would be 3 lines - min and max for temperature and max for humidity.
I tried with guides:
options="{guides: [{fillAlpha: 0.25,value: 20, color: blue }]}"
It's almost what I need but this way I can only add one line on chart.
Do you have any ideas how to add more lines to chart ?
Thanks ! This way works fine.
So maybe I should wait for the next 2.8.X update?
What's interesting:
I installed Mango 3.0 beta version. And I noticed on example page "Energy Dashboard" that Maximum Demand (kW) and Total Energy (kWh) gauges aren't working corecctly - they have same problem that I have - showing "NaN" value.
But in this case adding rendered="false" to <ma-point-statistics> solved the problem.
Why isn't it helping to me? :)