Media select_source is sending turn_on when in a sequence


I have a simple sequence on a flow (actually a subset of a more complex flow, but removed for testing). If I click the Inject trigger on the Start Plex option, it sends select_source (as can be seen in the first debug entry). However, when it is triggered as part of the longer sequence, it sends turn_on as the service instead of select_source and so fails.

Anyone have a clue as to why it would change the command sent, depending on whether it was part of a sequence or tiggered by an inject?

Thanks for any pointers in advance.

FYI: core-2021.1.5, supervisor-2021.01.7, docker 18.09.8 running on a Synology DS220+

Can you post your whole flow?
I assume its a problem of taking into account previous messages from other nodes. Try to either overwrite/delete the old messages that are not needed anymore, or simply to rename them.

1 Like
[{"id":"c6caf3c7.b43af","type":"tab","label":"Test","disabled":false,"info":""},{"id":"7c92e0a.37f0a2","type":"inject","z":"c6caf3c7.b43af","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":180,"y":120,"wires":[["f632d8cf.5a1378"]]},{"id":"f632d8cf.5a1378","type":"api-call-service","z":"c6caf3c7.b43af","name":"TV On","server":"72b70295.15700c","version":1,"debugenabled":true,"service_domain":"media_player","service":"turn_on","entityId":"media_player.lg_webos_smart_tv","data":"","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":370,"y":120,"wires":[["5b67eb55.dd62b4"]]},{"id":"5b67eb55.dd62b4","type":"ha-wait-until","z":"c6caf3c7.b43af","name":"Wait for TV","server":"72b70295.15700c","outputs":2,"entityId":"media_player.lg_webos_tv_1a62","entityIdFilterType":"exact","property":"state","comparator":"is","value":"ok","valueType":"str","timeout":"30","timeoutType":"num","timeoutUnits":"seconds","entityLocation":"","entityLocationType":"none","checkCurrentState":true,"blockInputOverrides":false,"x":570,"y":200,"wires":[["758557b2.2adfc8"],["e59269ec.ddf3e8"]]},{"id":"758557b2.2adfc8","type":"delay","z":"c6caf3c7.b43af","name":"Wait 5s","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"5","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":920,"y":260,"wires":[["e59269ec.ddf3e8"]]},{"id":"6676f491.c2473c","type":"catch","z":"c6caf3c7.b43af","name":"Plex start err","scope":["e59269ec.ddf3e8"],"uncaught":false,"x":970,"y":200,"wires":[["758557b2.2adfc8"]]},{"id":"e59269ec.ddf3e8","type":"api-call-service","z":"c6caf3c7.b43af","name":"Start Plex","server":"72b70295.15700c","version":1,"debugenabled":true,"service_domain":"media_player","service":"select_source","entityId":"media_player.lg_webos_smart_tv","data":"{\"source\":\"Plex\"}","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":980,"y":320,"wires":[[]]},{"id":"80a4a007.0054c","type":"inject","z":"c6caf3c7.b43af","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":740,"y":320,"wires":[["e59269ec.ddf3e8"]]},{"id":"72b70295.15700c","type":"server","name":"Home Assistant","addon":true}]

Thanks AlmostSerious
Whilst it didn’t give me the answer, it put me on the correct path. The CALL_SERVICE_NODE were defaulting to output to MSG, when I set them to output NONE they worked fine. I thought msg.payload values were only from the previous step in the sequence. I didn’t realise they were carried forward. Worth knowing.