Deprecated API-Warning using call service

Hi,
I´m using the “call service” node in many flows. I don´t know exactly since when, but right now I get an API-Warning and an Error when using these nodes. Must have been one of the last updates. For example an easy test:

image

Setting a input number with service “set value” and the data “{“value”: 100}”.

This results in:

“Deprecated API warning: Calls to RED.util.evaluateJSONataExpression must include a callback. This will not be optional in Node-RED 4.0. Please identify the node from the following stack and check for an update on npm. If none is available, please notify the node author.”

and

 "Error: ↵    at Object.evaluateJSONataExpression (/opt/node_modules/@node-red/util/lib/util.js:775:18)↵    at CallService.evaluateJSONata (/config/node_modules/node-red-contrib-home-assistant-websocket/dist/nodes/BaseNode.js:266:30)↵    at CallService.onInput (/config/node_modules/node-red-contrib-home-assistant-websocket/dist/nodes/call-service/controller.js:63:50)↵    at CallService.preOnInput (/config/node_modules/node-red-contrib-home-assistant-websocket/dist/nodes/BaseNode.js:411:18)↵    at /opt/node_modules/@node-red/runtime/lib/nodes/Node.js:210:26↵    at Object.trigger (/opt/node_modules/@node-red/util/lib/hooks.js:166:13)↵    at callServiceNode.Node._emitInput (/opt/node_modules/@node-red/runtime/lib/nodes/Node.js:202:11)↵    at callServiceNode.Node.emit (/opt/node_modules/@node-red/runtime/lib/nodes/Node.js:186:25)↵    at callServiceNode.Node.receive (/opt/node_modules/@node-red/runtime/lib/nodes/Node.js:494:10)↵    at deliverMessageToDestination (/opt/node_modules/@node-red/r..."

But the value gets changed.

What can I do?

Thanks!

Update your home assistant websocket nodes.

This issue was fixed in v0.57.0 (details of issue/fix at https://github.com/zachowj/node-red-contrib-home-assistant-websocket/pull/1063

There have been a number of changes recently, so updates to Home Assistant and Node-RED should be followed with corresponding (and matching) updates to the HA websocket nodes, and to the NR Companion integration.

It is worth reading through the HA websocket release list at https://github.com/zachowj/node-red-contrib-home-assistant-websocket/releases first to check for breaking changes to ensure that you have the necessary versions of HA and NR.

The release list for the Node-RED companion is at https://github.com/zachowj/hass-node-red/releases and has similar breaking changes.

If I read the current situation correctly, we are now at:

HA Companion v3.1.1 - requires HA Nodes 0.57.0+
HA Nodes v0.61.0 - requires NR v3.1.1+, HA v23.12+

This seems to be a problem.
I have NR 16.02 (latest) in HA → NR 3.0
This should already include Websocket 0.58.02 (since NR 15.1.1). When I look in NR under Palette, there´s Websocket 0.61 updateable but it needs NR 3.1.1. So I can´t update.
For my understanding the error shouldnt appear, becaus eit´s already fixed in WS 0.58.

For what it is worth

I have the standard current issue NR addon, which is 16.0.2

My NR pallet shows my HA Websocket nodes currently at 0.57.4. These are indeed manually updateable to 0.61.0, but yes I am not updating just yet since this might break something.

My NR Companion is currently 3.0.1 (again I’m leaving it at that).

I have no issues and it all works nicely.

Updating the Websocket to 0.61.0 definitely breaks a lot. I tested it in a test environment…
Because the NR Version in NR addon 16.0.2 is 3.0.
So Websocket won´t start and all HA Nodes are beeing removed during startup.

This error message is just a warning and is not critical. The ‘issue’ was extensively reported and soon resolved, but this posting

https://community.home-assistant.io/t/just-upgraded-to-nodered-add-on-v14-5-0-all-sorts-of-errors-ive-never-seen-before-in-the-add-on-log-and-debug-log/614078/1

provides a work-around to turn off the logging.

The conundrum is that we have to keep on updating otherwise things stop working, but when we do, things stop working, and if we only update one thing in a group of interconnected things, something else stops working.

1 Like