#769 HTTP REST API pointWrite boolean

Wilm Dittmer Fri 13 Dec 2019

Hi,

I'm making a call to a Nhaystack service running on N4.8 Edge 10.

Item 1 API call: http://192.168.178.59/haystack/[email protected]&level=9&val=66&who=null.

This call set the value to 66 on priority 9, it works fine.

Item 2 API call: http://192.168.178.59/haystack/[email protected]&level=9&val=true&who=null.

This call should set the binary to active = true, but it doesn't work. It run in an ClassCastException:

java.lang.ClassCastException: org.projecthaystack.HStr cannot be cast to org.projecthaystack.HBool at nhaystack.server.PointIO.onControlPointWriteLevel(PointIO.java:508) at nhaystack.server.PointIO.onControlPointWrite(PointIO.java:420) at nhaystack.server.PointIO.onPointWrite(PointIO.java:131) at nhaystack.server.NHServer.onPointWrite(NHServer.java:339) at org.projecthaystack.server.HServer.pointWrite(HServer.java:267) at org.projecthaystack.server.PointWriteOp.onService(HStdOps.java:293) at org.projecthaystack.server.HOp.onService(HOp.java:48) at org.projecthaystack.server.HServlet.onService(HServlet.java:88) at org.projecthaystack.server.HServlet.doGet(HServlet.java:45) at nhaystack.server.BNHaystackServlet.doGet(BNHaystackServlet.java:79) at javax.baja.web.BWebServlet.service(BWebServlet.java:149) at javax.baja.web.BWebServlet.doService(BWebServlet.java:196) at javax.baja.web.BWebServlet.access$000(BWebServlet.java:34) at javax.baja.web.BWebServlet$Serv...

Can anyone point me in the right direction?

Kind Regards, Wilm

Login or Signup to reply.