Rule Machine: 1024 variable length error on 473 characters

I'm sending a request to my DirecTV receiver (local GET based API) using the built in rule machine "set variable to response from GET" and am getting an error from Rule Machine when trying to put the response into a variable - saying it's greater than 1024 characters, but it's not.

While this is crude, it gets what I want and prevents me from having to learn Groovy programming and having to write a driver. If only Hubitat could parse JSON for me...

Error from log (showing what it being cut off):
Variable length limit exceeded for DeviceDirecTVResponse, value truncated, disposed: , msg=OK., query=/tv/getTuned}, title=KTVU FOX 2 News at 7:30pm}

Actual response from my receiver shows the length is not greater than 1024 characters, it's 473. This is copied from issuing the command directly in the browser and not through Rule Machine.

{
"callsign": "KTVU",
"duration": 1800,
"isOffAir": false,
"isPclocked": 3,
"isPpv": false,
"isRecording": false,
"isVod": false,
"major": 2,
"minor": 65535,
"offset": 40838,
"programId": "259949746",
"rating": "No Rating",
"startTime": 1700537400,
"stationId": 2725705,
"status": {
"code": 200,
"commandResult": 0,
"msg": "OK.",
"query": "/tv/getTuned"
},
"title": "KTVU FOX 2 News at 7:30pm"
}

Need to see a screenshot of the actual logs with the error, and the rule.

Here goes:
Log error

rule:

For reference, I first send the query to the receiver to ask what it's mode is (active or standby since there's no on/off status", then if it's on, I send a second query (getTuned) to see what channel it's on.. the "/tv/getTuned" command response (previously shown) is what is throwing the error.

App 2029 is not Rule Machine, but some integration you have for DirecTV. I have no idea about that app and its error. App 2063 is the RM rule.

it is rule machine...
here's the full RM app.



Yeah, there's a bug in RM for long strings into variables. We updated the limit in the hub, but that didn't get caught up into RM. Will be fixed.

3 Likes