"call service node is missing api "domain" property, not found in config or payload"

Hi,

I New to Home assistant and node red, i have set up HA on a Pi 2 and seem to have all my Sonoffs running on there original firmware on HA, i have now installed node red and trying to switch a Sonoff on and off but it keeps coming up with a bug saying

“call service node is missing api “domain” property, not found in config or payload”

i can see all my sonoff devices, i have uninstalled and re installed node red, from what i found is that node red should run with out much setting up.

please can some point me to what im doing wrong.

Can you upload your exported flow? Did you configure the call service node properly (double click on it and fill in the boxes)?

Hi Rick,

Thanks for replying, i think i have set it up correctly but im must be doing something wrong, here is the flow export, i am just trying to get a light to turn on right now.

[{“id”:“2183211a.00bbee”,“type”:“tab”,“label”:“Flow 1”,“disabled”:false,“info”:""},{“id”:“1d8f88bb.e77277”,“type”:“api-call-service”,“z”:“2183211a.00bbee”,“name”:"",“server”:“999126a2.1e5eb8”,“version”:1,“debugenabled”:false,“service_domain”:"",“service”:“light_on”,“entityId”:“switch.sonoff_kitchen_light”,“data”:"",“dataType”:“json”,“mergecontext”:"",“output_location”:“on”,“output_location_type”:“msg”,“mustacheAltTags”:true,“x”:430,“y”:40,“wires”:[[“d2605f67.29d5d”]]},{“id”:“d558f01b.feeec”,“type”:“inject”,“z”:“2183211a.00bbee”,“name”:"",“props”:[{“p”:“payload”},{“p”:“topic”,“vt”:“str”}],“repeat”:"",“crontab”:"",“once”:false,“onceDelay”:0.1,“topic”:"",“payload”:“light_on”,“payloadType”:“str”,“x”:110,“y”:80,“wires”:[[“1d8f88bb.e77277”]]},{“id”:“d2605f67.29d5d”,“type”:“debug”,“z”:“2183211a.00bbee”,“name”:"",“active”:true,“tosidebar”:true,“console”:false,“tostatus”:false,“complete”:“payload”,“targetType”:“msg”,“statusVal”:"",“statusType”:“auto”,“x”:560,“y”:200,“wires”:[]},{“id”:“999126a2.1e5eb8”,“type”:“server”,“name”:“Home Assistant”,“legacy”:false,“addon”:true,“rejectUnauthorizedCerts”:true,“ha_boolean”:“y|yes|true|on|home|open”,“connectionDelay”:true,“cacheJson”:true}]

image|690x387

Hi, you have to fill in domain and service the right way in your service node, in your case you have a switch, not a light:

Thanks i have done that now still getting the same error, I tried Light, Switch and sonoff as Domain did not change anything

Did you get any autocomletion, when typing the domain? Can you post your flow, when trying with domain switch?

this is what i have now, i have changed it to toggle the light

[{“id”:“2183211a.00bbee”,“type”:“tab”,“label”:“Flow 1”,“disabled”:false,“info”:""},{“id”:“635ed5b5.dd8c7c”,“type”:“inject”,“z”:“2183211a.00bbee”,“name”:“toggle light”,“props”:[],“repeat”:"",“crontab”:"",“once”:false,“onceDelay”:0.1,“topic”:"",“x”:100,“y”:220,“wires”:[[“f5517e36.c3b57”]]},{“id”:“5d95ccb0.8ab324”,“type”:“debug”,“z”:“2183211a.00bbee”,“name”:"",“active”:true,“tosidebar”:true,“console”:false,“tostatus”:false,“complete”:“false”,“statusVal”:"",“statusType”:“auto”,“x”:870,“y”:260,“wires”:[]},{“id”:“f5517e36.c3b57”,“type”:“api-call-service”,“z”:“2183211a.00bbee”,“name”:“kitchen light toggle”,“server”:“999126a2.1e5eb8”,“version”:1,“debugenabled”:false,“service_domain”:“light”,“service”:“turn_off”,“entityId”:“switch.sonoff_kitchen_light”,“data”:"",“dataType”:“json”,“mergecontext”:"",“output_location”:“payload”,“output_location_type”:“msg”,“mustacheAltTags”:false,“x”:310,“y”:220,“wires”:[[“ac04968b.a11468”]]},{“id”:“ac04968b.a11468”,“type”:“debug”,“z”:“2183211a.00bbee”,“name”:"",“active”:true,“tosidebar”:true,“console”:false,“tostatus”:false,“complete”:“true”,“targetType”:“full”,“statusVal”:"",“statusType”:“auto”,“x”:490,“y”:220,“wires”:[]},{“id”:“999126a2.1e5eb8”,“type”:“server”,“name”:“Home Assistant”,“legacy”:false,“addon”:true,“rejectUnauthorizedCerts”:true,“ha_boolean”:“y|yes|true|on|home|open”,“connectionDelay”:true,“cacheJson”:true}]

Is your entity id correct? If yes, you definitely have to use “switch” domain.

I have no idea what changed, i tried switch domain a and it still did not work, changed to a different entity id and that worked, changed back to kitchen and it working now.

Thanks you, im sure i will have lots more questions in the future.

Hi I seem to have things almost working, but it still seems to be giving me a issue, i have set up a few bigtimers to control some lights, but they not working, if i “inject” a signal directly into the “call service” it takes a few attempts (3-6) before the light turns on/off,bellow are the errors im getting and the flow.

3/22/2021, 5:14:42 PMnode: Already off?msg : string[170]
“Entity could not be found in cache for entity_id: switch.sonoff_kitchen_light, switch.sonoff_lounge_light_switch, switch.sonoff_passage_light, switch.sonoff_hallway_light”

3/22/2021, 5:15:49 PMnode: Inside Lights on at nightmsg : string[52]
“Call-Service attempted without connection to server.”

[{“id”:“78e2672b.10e738”,“type”:“bigtimer”,“z”:“84f6bd9b.41dae”,“outtopic”:"",“outpayload1”:“on”,“outpayload2”:“off”,“name”:“Sunset > 2200”,“comment”:"",“lat”:"-29.791969",“lon”:“30.833040”,“starttime”:“1035”,“endtime”:“1320”,“startoff”:“0”,“endoff”:0,“startoff2”:"",“endoff2”:"",“offs”:“0”,“outtext1”:“on”,“outtext2”:“off”,“timeout”:1440,“sun”:true,“mon”:true,“tue”:true,“wed”:true,“thu”:true,“fri”:true,“sat”:true,“jan”:true,“feb”:true,“mar”:true,“apr”:true,“may”:true,“jun”:true,“jul”:true,“aug”:true,“sep”:true,“oct”:true,“nov”:true,“dec”:true,“day1”:0,“month1”:0,“day2”:0,“month2”:0,“day3”:0,“month3”:0,“day4”:0,“month4”:0,“day5”:0,“month5”:0,“day6”:0,“month6”:0,“day7”:"",“month7”:"",“day8”:"",“month8”:"",“day9”:"",“month9”:"",“day10”:"",“month10”:"",“day11”:"",“month11”:"",“day12”:"",“month12”:"",“d1”:0,“w1”:0,“d2”:0,“w2”:0,“d3”:0,“w3”:0,“d4”:0,“w4”:0,“d5”:0,“w5”:0,“d6”:0,“w6”:0,“xday1”:0,“xmonth1”:0,“xday2”:0,“xmonth2”:0,“xday3”:0,“xmonth3”:0,“xday4”:0,“xmonth4”:0,“xday5”:0,“xmonth5”:0,“xday6”:0,“xmonth6”:0,“xday7”:"",“xmonth7”:"",“xday8”:"",“xmonth8”:"",“xday9”:"",“xmonth9”:"",“xday10”:"",“xmonth10”:"",“xday11”:"",“xmonth11”:"",“xday12”:"",“xmonth12”:"",“xd1”:0,“xw1”:0,“xd2”:0,“xw2”:0,“xd3”:0,“xw3”:0,“xd4”:0,“xw4”:0,“xd5”:0,“xw5”:0,“xd6”:0,“xw6”:0,“suspend”:false,“random”:false,“randon1”:false,“randoff1”:false,“randon2”:false,“randoff2”:false,“repeat”:false,“atstart”:true,“odd”:false,“even”:false,“x”:100,“y”:200,“wires”:[[“9d938316.f0f1e”],[],[]]},{“id”:“9d938316.f0f1e”,“type”:“switch”,“z”:“84f6bd9b.41dae”,“name”:"",“property”:“payload”,“propertyType”:“msg”,“rules”:[{“t”:“eq”,“v”:“on”,“vt”:“str”},{“t”:“eq”,“v”:“off”,“vt”:“str”}],“checkall”:“true”,“repair”:false,“outputs”:2,“x”:270,“y”:200,“wires”:[[“739d41f1.71568”],[“1f3b59e3.4c9cd6”]]},{“id”:“739d41f1.71568”,“type”:“api-call-service”,“z”:“84f6bd9b.41dae”,“name”:“Inside Lights on at night”,“server”:“999126a2.1e5eb8”,“version”:1,“debugenabled”:false,“service_domain”:“switch”,“service”:“turn_on”,“entityId”:“switch.sonoff_kitchen_light, switch.sonoff_lounge_light_switch, switch.sonoff_passage_light, switch.sonoff_hallway_light”,“data”:"",“dataType”:“json”,“mergecontext”:"",“output_location”:“payload”,“output_location_type”:“msg”,“mustacheAltTags”:false,“x”:510,“y”:200,“wires”:[[]]},{“id”:“1f3b59e3.4c9cd6”,“type”:“api-current-state”,“z”:“84f6bd9b.41dae”,“name”:“Already off?”,“server”:“999126a2.1e5eb8”,“version”:1,“outputs”:2,“halt_if”:“off”,“halt_if_type”:“str”,“halt_if_compare”:“is”,“override_topic”:false,“entity_id”:“switch.sonoff_kitchen_light, switch.sonoff_lounge_light_switch, switch.sonoff_passage_light, switch.sonoff_hallway_light”,“state_type”:“str”,“state_location”:“payload”,“override_payload”:“msg”,“entity_location”:“data”,“override_data”:“msg”,“blockInputOverrides”:false,“x”:270,“y”:260,“wires”:[[],[“7f46f2eb.5d6c7c”]]},{“id”:“7f46f2eb.5d6c7c”,“type”:“api-call-service”,“z”:“84f6bd9b.41dae”,“name”:“Inside Lights off at night”,“server”:“999126a2.1e5eb8”,“version”:1,“debugenabled”:false,“service_domain”:“switch”,“service”:“turn_off”,“entityId”:“switch.sonoff_kitchen_light, switch.sonoff_lounge_light_switch, switch.sonoff_passage_light, switch.sonoff_hallway_light”,“data”:"",“dataType”:“json”,“mergecontext”:"",“output_location”:“payload”,“output_location_type”:“msg”,“mustacheAltTags”:false,“x”:510,“y”:260,“wires”:[[]]},{“id”:“999126a2.1e5eb8”,“type”:“server”,“name”:“Home Assistant”,“legacy”:false,“addon”:true,“rejectUnauthorizedCerts”:true,“ha_boolean”:“y|yes|true|on|home|open”,“connectionDelay”:true,“cacheJson”:true}]