ImperiHAB JASON Issue

I am using Imperihome as an alternative client (because of it’s dashboard view). I noticed that the application fails to load when one of the items has a special character in its value.
Use Case/Issue Description: I am trying to pull the status of my Alarm Panel (alarmdecoder binding) to display it in the application. However, the item value has a double quotes ("**** DISARMED **** Hit…") and this causes the response (of imperhab servlet) to be parsed incorrectly by imperihome. Essentially ImperiHAB should escape these double quotes but does not.
Is the binding developer a member in this community? How do I report this and how can I contribute to the fix?

To report it I think you can file a bug report on the github issues tracking, though search first to make sure there isn’t already a bug report for this.

In the mean time you can strip the quotes off via a rule.

rule "Strip extraneous quotes"
when
    Item Alarm_Panel changed
then 
    if(Alarm_Panel.state.toString.startswith("\"") {
        val String st = Alarm_Panel.state.toString
        Alarm_Panel.postUpdate(st.substring(1, st.length-1)) // didn't test, I may have the indices wrong here, test
    }
end

The Item should only have a value that ImperiHome doesn’t like for a few dozen milliseconds. This might be good enough to get by with until a true fix becomes available.

If even those few milliseconds cause a problem, you can create a proxy item and instead of postUpdate() on the Alarm_Panel item above you would do it to the Alarm_Panel_Proxy item and then use the Proxy in ImperiHome and in your other rules.

Hello @rlkoshak Thanks for your quick response. I will post it on the issue tracker. Thanks for suggesting the workarounds.