Hi,
I was running a script on my CAPsMAN to report device presence to an external REST service.
At some point end of January this stopped working unnoticed. Since I didn’t change anything with my script at this point in time I can only guess that some upgrade in the 6.43 line broke it.
The script does only limited things:
- it checks caps-man registrations for certain MAC addresses
- it reports via /tool fetch to the REST service
- and it uses a global persistent variable to reduce the reports to changes only
I’m not exactly sure what stopped working exactly but previously I had files in the base directory after the /tool fetch execution which do not appear anymore.
I’m struggling to find the reason or exact detail what is failing.
The script looks roughly like this:
:global WolfgangON
{
:local exists [/caps-man reg find mac-address="MAC"];
:if ($exists!="") do={
:if ($WolfgangON != 1) do={
/tool fetch url="http://192.168.250.12:8080/rest/items/SensorPhoneWolfgang" http-content-type="text/plain" http-data="ON" ascii=yes http-method=post;
:set WolfgangON 1
}
} else={
:if ($WolfgangON != 0) do={
/tool fetch url="http://192.168.250.12:8080/rest/items/SensorPhoneWolfgang" http-content-type="text/plain" http-data="OFF" ascii=yes http-method=post;
:set WolfgangON 0
}
}
}
Any hints? As said this was working for some time before it suddenly stopped.
Currently I’m on version 6.44
Thanks,
Wolfgang