Homekit-Service node: Invalid payload type: number

I don´t why but I always have someting wrong with relays. Now my LED Window Xmas light is always on. How can I make make it ok? Off an On

[{"id":"36278cb4.91f734","type":"tab","label":"Keittio","disabled":false,"info":""},{"id":"9f4f697c.cc255","type":"debug","z":"36278cb4.91f734","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":520,"y":200,"wires":[]},{"id":"7929a28.443435c","type":"function","z":"36278cb4.91f734","name":"on","func":"msg.payload = msg.payload.on;\nreturn msg;","outputs":1,"noerr":0,"x":440,"y":120,"wires":[["d265958d.32f7e"]]},{"id":"d265958d.32f7e","type":"rpi-gpio out","z":"36278cb4.91f734","name":"","pin":"24","set":"","level":"0","freq":"","out":"out","x":590,"y":120,"wires":[]},{"id":"c70b28d8.e6e5e","type":"homekit-service","z":"36278cb4.91f734","isParent":true,"bridge":"e9ee0869.36411","accessoryCategory":"LIGHTBULB","parentService":"","name":"Ikkuna LED","serviceName":"Relay","topic":"","filter":false,"manufacturer":"Default Manufacturer","model":"Default Model","serialNo":"Default Serial Number","cameraConfigVideoProcessor":"ffmpeg","cameraConfigSource":"","cameraConfigStillImageSource":"","cameraConfigMaxStreams":2,"cameraConfigMaxWidth":1280,"cameraConfigMaxHeight":720,"cameraConfigMaxFPS":10,"cameraConfigMaxBitrate":300,"cameraConfigVideoCodec":"libx264","cameraConfigAudioCodec":"libfdk_aac","cameraConfigAudio":false,"cameraConfigPacketSize":1316,"cameraConfigVerticalFlip":false,"cameraConfigHorizontalFlip":false,"cameraConfigMapVideo":"0:0","cameraConfigMapAudio":"0:1","cameraConfigVideoFilter":"scale=1280:720","cameraConfigAdditionalCommandLine":"-tune zerolatency","cameraConfigDebug":false,"cameraConfigSnapshotOutput":"disabled","characteristicProperties":"{}","x":270,"y":160,"wires":[["7929a28.443435c"],["9f4f697c.cc255"]]},{"id":"ec1c4ebb.3699e","type":"inject","z":"36278cb4.91f734","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":140,"y":60,"wires":[["c70b28d8.e6e5e"]]},{"id":"e9ee0869.36411","type":"homekit-bridge","z":"","bridgeName":"Ikkuna LED","pinCode":"845-25-104","port":"","allowInsecureRequest":false,"manufacturer":"Default Manufacturer","model":"Default Model","serialNo":"Default Serial Number","customMdnsConfig":false,"mdnsMulticast":true,"mdnsInterface":"","mdnsPort":"","mdnsIp":"","mdnsTtl":"","mdnsLoopback":true,"mdnsReuseAddr":true,"allowMessagePassthrough":false}]

Look at the error message and work out which node is showing the error. You should be able to click the node id above the error to go to the node. Then add a debug node showing what you are feeding into the node that generates the error. If you still can't see what the problem is then show us the debug and tell us which node it is.

Node Keittio

Not enough info

Sorry but I don´t know what I info and how I give ... ?

I suggested you added a debug node to show the information going to the failing node, you haven't shown us that. Also you haven't told us which node is failing. If it is a node type you have installed you need to tell us what type it is, probably node-red-contrib-something.

Hint: once you work out which node it is then look at the info tab for that node to see what message format it is expecting. Then compare that with your debug output to check you are giving it the right information. The error suggests that you are giving it a number when it expects something else,.

Hope this is the right answer:

Node e873a06d.60ed5
Debug: Invalid payload type: number

[{"id":"e873a06d.60ed5","type":"homekit-service","z":"36278cb4.91f734","isParent":true,"bridge":"bf8ad020.6614b8","accessoryCategory":"LIGHTBULB","parentService":"","name":"Keittiön Ikkuna LED","serviceName":"Switch","topic":"","filter":false,"manufacturer":"Default Manufacturer","model":"Default Model","serialNo":"Default Serial Number","cameraConfigVideoProcessor":"ffmpeg","cameraConfigSource":"","cameraConfigStillImageSource":"","cameraConfigMaxStreams":2,"cameraConfigMaxWidth":1280,"cameraConfigMaxHeight":720,"cameraConfigMaxFPS":10,"cameraConfigMaxBitrate":300,"cameraConfigVideoCodec":"libx264","cameraConfigAudioCodec":"libfdk_aac","cameraConfigAudio":false,"cameraConfigPacketSize":1316,"cameraConfigVerticalFlip":false,"cameraConfigHorizontalFlip":false,"cameraConfigMapVideo":"0:0","cameraConfigMapAudio":"0:1","cameraConfigVideoFilter":"scale=1280:720","cameraConfigAdditionalCommandLine":"-tune zerolatency","cameraConfigDebug":false,"cameraConfigSnapshotOutput":"disabled","characteristicProperties":"{}","x":150,"y":160,"wires":[["8b182f85.d586d","4863d8a1.b177a8"],[]]},{"id":"bf8ad020.6614b8","type":"homekit-bridge","z":"","bridgeName":"Puuikkuna LED","pinCode":"845-25-112","port":"","allowInsecureRequest":false,"manufacturer":"Default Manufacturer","model":"Ihan ite tehty joulu valo","serialNo":"Default Serial Number","customMdnsConfig":false,"mdnsMulticast":true,"mdnsInterface":"","mdnsPort":"","mdnsIp":"","mdnsTtl":"","mdnsLoopback":true,"mdnsReuseAddr":true,"allowMessagePassthrough":true}]

Which question do you think that may be the answer to?
Does it answer which node you have installed (node-red-contrib-something)
Does it answer the question which node is showing the error? (read the previous posts to find how to know that).
Does it show what a debug node showing the message that is going into the node generating the error displays?
Did you look at the hint in my last post?

Dear Colin.

  • I read the hints and I though I answer the right. But I don´t know what to answer anymore. Only What i know DHT22 is working fine. But the LED is staying on whole time.
  • Maybe one Q at time and easy one so I know what to answer
  • I´m so sorry that I´m dum.

Best Regards

Do you know which node in your flow is showing the error?

Dear Colin.

  • I try to explain:
  • On Flow "Keittio" I´m using node-red-contrib-homekit-bridged "Keittiön Ikkuna LED" Node "e873a06d.60ed5"
    msg.payload = msg.payload.on; return msg;
    PIN: 24
Invalid payload type: number

On Flow: Android ym keittio is "node-red-dashboardnode-red-dashboard"

  • there is the same problem .. ;-(.

LED Stays on :frowning:

Everytime when I change and save on Node red light turns off and on. After that always on :frowning:

Best Regards


Hi @eervi,

So it looks like the homekit-service is logging that error. Which module did you install to get the homekit nodes added to your palette?

I am not familiar with any of the homekit nodes, but I would suggest checking its documentation for what sorts of payloads it expects.

Is s this the right answer?

Yes, that's the one.

Looking at its code, it wants msg.payload to be an Object, not a plain number.

Add a Debug node next to the node logging the error so you can see exactly what you are passing into it. If you aren't passing in an Object, then the node is going to complain. You'll have to refer to the node's own docs for what format the payload should be in.

Dear knolleary!

I have been reading the document, but do not find/understand where the but this if that is right code?

Example: to signal that an Outlet is turned on and in use, send the following payload

  "On": 1,
  "OutletInUse": 1

I think maybe you are lacking in basic knowledge of node red fundamentals. Have a look at this link which will help you to understand a bit about messages. Also I think going back to basics and working through the node red guide would also help. Until you have more grasp of what is going on it is difficult to help you.

Hi @Eervi

unfortunately I've never used the homekit nodes, so I can't give you any first-hand advice on how to use them.

I've change the topic title, so hopefully someone with more experience of those nodes will step in to help.

Dear Colin.

  • have been reading it and every system what I have done working fine, but I realy don´t know how ask from you, I´m so sorry that I´m not pro on this node-red just trying to learn

Best Regards


Dear knolleary.

  • thank you from your help. I hope I find solution somwhere.

Best Regards