The HA logs don’t show anything (this one, right: https://local-ip:8123/logbook)?
It does not… API error. I removed the quotes around the stream, and it still errors.
Thanks for the suggestion, though. I’m stuck as to why this won’t work. I have a lot of call service nodes; in maybe 5% I actually use the data field, but in those, they all work. I’m not using a play_audio service in any other node, though.
No at /config/logs. It is in the configuration menu.
Oh, OK - no, I’ve just run both flows again; the one that calls the script still works. Neither results in a log entry.
Actually, it’s /hassio/addon/a0d7b954_nodered/logs
Ah, OK - no, unfortunately not. A lot of “Unable to find referenced entities xxx.xxxxxxx…”
There are a bunch of these:
Logger: frontend.js.latest.202112291
Source: components/system_log/__init__.py:189
First occurred: January 26, 2022, 9:15:44 AM (42 occurrences)
Last logged: 3:56:09 PM
https://mydomain:8123/frontend_latest/core.0edfd71e.js:1:9840 3
https://localIP:8123/front-door-tablet/main_front_door_tablet?disable_km:0:0 Uncaught
https://mydomain:8123/frontend_latest/core.0edfd71e.js:1:9246 Uncaught Error: Suspend promise not set
https://mydomain:8123/front-door-tablet/main_front_door_tablet:0:0 Uncaught
https://mydomain:8123/front-door-tablet/front_door_camera_front_door_tablet:0:0 Uncaught
…but I don’t believe they’re related?
That’s the node red logs, but you can also have errors showing in the HA Logs which is at the address I gave.
Look at the log, run the flow, look at the log again. Anything new is very likely related to what you just ran. I’d be worried about any of those errors in my logs…
I know, but that’s where you’re going to find more details about the API Error.
Those are not Node-RED logs. But, as @RogTP said, I’d be a little worried about those errors.
You can find Node-RED logs at Configuration > Add-ons, Backups & Supervisor > Node-RED > Logs
Ok, I’ll leave you guys to it…
It’s now working, with this:
[{"id":"7a60727b6e5fa9a9","type":"api-call-service","z":"ba095f4f03e8eb72","name":"Announce Exit","server":"296c0678.b5f9ca","version":3,"debugenabled":true,"service_domain":"fullykiosk","service":"play_audio","entityId":"","data":"{ \"entity_id\": \"media_player.fire_tablet_media_player\", \"url\": \"https://mydomain:8123/local/sounds/please_exit_lights.mp3\", \"stream\": 1}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":420,"y":340,"wires":[[]]},{"id":"7cdd06d048ef7a9c","type":"inject","z":"ba095f4f03e8eb72","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":200,"y":340,"wires":[["7a60727b6e5fa9a9"]]},{"id":"296c0678.b5f9ca","type":"server","name":"Home Assistant","version":2,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30}]
There’s no “trick” that I can see. The JSON looks the same as a few suggestions above. I suppose one key is that the stream value doesn’t require quotes, as it’s not a string. But at any rate… thanks for all that provided help. I can now move on to making these announcements dynamic.
If you’re going to use mustache templates to pass a url variable, you’ll need to use a triple mustache. {{{payload}}}
.
https://zachowj.github.io/node-red-contrib-home-assistant-websocket/guide/call-service.html