Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JS console error when opening a linked service #278

Closed
dxdc opened this issue Jul 1, 2020 · 18 comments
Closed

JS console error when opening a linked service #278

dxdc opened this issue Jul 1, 2020 · 18 comments
Labels
bug 🐛 There is at least high chance that it is a bug!

Comments

@dxdc
Copy link

dxdc commented Jul 1, 2020

I see this error in console when opening up a Linked service, e.g.

Validation error: homekit-service 67ab973.9aeb868 property: parentService value: null TypeError: Cannot read property 'length' of null

Screen Shot 2020-07-01 at 12 14 12 PM

@Shaquu
Copy link
Member

Shaquu commented Jul 1, 2020

Versions?

@dxdc
Copy link
Author

dxdc commented Jul 1, 2020

node: 10.21.0
npm: 6.14.5
node-red-contrib-homekit-bridged: 1.1.1
node-red: 1.1.1

Didn't test before the NR upgrade, but may have been an issue then too (not sure).

@dxdc
Copy link
Author

dxdc commented Jul 1, 2020

image

@Shaquu
Copy link
Member

Shaquu commented Jul 1, 2020

Open Parent Service, modify something and save.

@dxdc
Copy link
Author

dxdc commented Jul 1, 2020

Open Parent Service, modify something and save.

Didn't fix it. Here's the parent service.

Screen Shot 2020-07-01 at 12 20 05 PM

@Shaquu
Copy link
Member

Shaquu commented Jul 1, 2020

Can you give me full data from Info panel? Of course blur what you need.
Info panel is on the right, you have to click "show more".
image

@dxdc
Copy link
Author

dxdc commented Jul 1, 2020

Screen Shot 2020-07-01 at 12 38 10 PM

Screen Shot 2020-07-01 at 12 37 10 PM

Maybe this is the problem?

Screen Shot 2020-07-01 at 12 40 41 PM

@Shaquu
Copy link
Member

Shaquu commented Jul 1, 2020

Maybe, put something here :)

@dxdc
Copy link
Author

dxdc commented Jul 1, 2020

But, I want to leave it blank/undefined?

@crxporter
Copy link
Member

Side question, how do you get node red in dark mode??

@dxdc
Copy link
Author

dxdc commented Jul 1, 2020

https://github.com/node-red-contrib-themes/midnight-red

@Shaquu
Copy link
Member

Shaquu commented Jul 1, 2020

@dxdc some of them are mandatory fields. I’m not sure how you get them empty but it’s not good.

@dxdc
Copy link
Author

dxdc commented Jul 1, 2020

Can you reproduce this on your end with the same parent/linked relationship I showed? It doesn't cause an error per se, just in the JS console.

I have been using this plugin ~6 months so its been through some upgrades, not sure if it's related.

@Shaquu
Copy link
Member

Shaquu commented Jul 2, 2020

Could you export your flow and share? Then I will try to run it on my device.

@dxdc
Copy link
Author

dxdc commented Jul 3, 2020

I had to do it as 2 separate exports, hopefully it will still work for you.

[{"id":"67ab973.9aeb868","type":"homekit-service","z":"f2ecc746.8566a8","isParent":false,"bridge":"","parentService":"68e3c02b.08094","name":"XYZ Temperature","serviceName":"TemperatureSensor","topic":"","filter":false,"manufacturer":"XYZ","model":"XYZ","serialNo":"XYZ","firmwareRev":"","hardwareRev":"","cameraConfigVideoProcessor":"ffmpeg","cameraConfigSource":"","cameraConfigStillImageSource":"","cameraConfigMaxStreams":2,"cameraConfigMaxWidth":1280,"cameraConfigMaxHeight":720,"cameraConfigMaxFPS":10,"cameraConfigMaxBitrate":300,"cameraConfigVideoCodec":"libx264","cameraConfigXYZoCodec":"libfdk_aac","cameraConfigXYZo":false,"cameraConfigPacketSize":1316,"cameraConfigVerticalFlip":false,"cameraConfigHorizontalFlip":false,"cameraConfigMapVideo":"0:0","cameraConfigMapXYZo":"0:1","cameraConfigVideoFilter":"scale=1280:720","cameraConfigAdditionalCommandLine":"-tune zerolatency","cameraConfigDebug":false,"cameraConfigSnapshotOutput":"disabled","cameraConfigInterfaceName":"","characteristicProperties":"{}","x":590,"y":740,"wires":[[],[]]},{"id":"4a1a6bd9.fb35c4","type":"mqtt in","z":"f2ecc746.8566a8","name":"XYZ Temperature","topic":"XYZ/sensor/temperatureC","qos":"2","datatype":"auto","broker":"ff616ea9.e8b37","x":200,"y":740,"wires":[["b89aaeb8.85b0f"]]},{"id":"b89aaeb8.85b0f","type":"change","z":"f2ecc746.8566a8","name":"Set payload","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\"CurrentTemperature\": $number(payload)}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":390,"y":740,"wires":[["67ab973.9aeb868"]]},{"id":"ff616ea9.e8b37","type":"mqtt-broker","z":"","name":"Mosquitto","broker":"wss://localhost:8083/mqtt","port":"8883","tls":"","clientid":"","usetls":true,"compatmode":false,"keepalive":"60","cleansession":true,"birthTopic":"nodered/status","birthQos":"1","birthPayload":"online","closeTopic":"nodered/status","closeQos":"0","closePayload":"offline","willTopic":"nodered/status","willQos":"0","willPayload":"lwtoffline"}]
[{"id":"e458ca33.c58268","type":"mqtt in","z":"f2ecc746.8566a8","name":"XYZ Active","topic":"XYZ/sensor/isActive","qos":"2","datatype":"auto","broker":"ff616ea9.e8b37","x":190,"y":940,"wires":[["fef16b66.7d7f38"]]},{"id":"aed9dbc4.0712d8","type":"mqtt in","z":"f2ecc746.8566a8","name":"XYZ @ Home","topic":"XYZ/sensor/isHome","qos":"2","datatype":"auto","broker":"ff616ea9.e8b37","x":190,"y":980,"wires":[["9cda6bb5.f975a8"]]},{"id":"68e3c02b.08094","type":"homekit-service","z":"f2ecc746.8566a8","isParent":true,"bridge":"4ce6891e.94b2d8","parentService":"","name":"XYZ Occupancy","serviceName":"OccupancySensor","topic":"","filter":false,"manufacturer":"XYZ","model":"XYZ","serialNo":"XYZ","firmwareRev":"","hardwareRev":"","cameraConfigVideoProcessor":"ffmpeg","cameraConfigSource":"","cameraConfigStillImageSource":"","cameraConfigMaxStreams":2,"cameraConfigMaxWidth":1280,"cameraConfigMaxHeight":720,"cameraConfigMaxFPS":10,"cameraConfigMaxBitrate":300,"cameraConfigVideoCodec":"libx264","cameraConfigXYZoCodec":"libfdk_aac","cameraConfigXYZo":false,"cameraConfigPacketSize":1316,"cameraConfigVerticalFlip":false,"cameraConfigHorizontalFlip":false,"cameraConfigMapVideo":"0:0","cameraConfigMapXYZo":"0:1","cameraConfigVideoFilter":"scale=1280:720","cameraConfigAdditionalCommandLine":"-tune zerolatency","cameraConfigDebug":false,"cameraConfigSnapshotOutput":"disabled","cameraConfigInterfaceName":"","characteristicProperties":"{}","x":590,"y":980,"wires":[[],[]]},{"id":"9cda6bb5.f975a8","type":"change","z":"f2ecc746.8566a8","name":"Set payload","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\"OccupancyDetected\": (payload = 'true' ? 1 : 0)}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":390,"y":980,"wires":[["68e3c02b.08094"]]},{"id":"fef16b66.7d7f38","type":"change","z":"f2ecc746.8566a8","name":"Set payload","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\"StatusActive\": (payload = 'true' ? true : false)}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":390,"y":940,"wires":[["68e3c02b.08094"]]},{"id":"b7de4b3d.e5bbd8","type":"mqtt in","z":"f2ecc746.8566a8","name":"XYZ Low Fuel","topic":"XYZ/sensor/lowFuel","qos":"2","datatype":"auto","broker":"ff616ea9.e8b37","x":190,"y":900,"wires":[["963bf9ec.72ba28"]]},{"id":"963bf9ec.72ba28","type":"change","z":"f2ecc746.8566a8","name":"Set payload","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\"StatusLowBattery\": (payload = 'true' ? 1 : 0)}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":390,"y":900,"wires":[["68e3c02b.08094"]]},{"id":"ff616ea9.e8b37","type":"mqtt-broker","z":"","name":"Mosquitto","broker":"wss://localhost:8083/mqtt","port":"8883","tls":"","clientid":"","usetls":true,"compatmode":false,"keepalive":"60","cleansession":true,"birthTopic":"nodered/status","birthQos":"1","birthPayload":"online","closeTopic":"nodered/status","closeQos":"0","closePayload":"offline","willTopic":"nodered/status","willQos":"0","willPayload":"lwtoffline"},{"id":"4ce6891e.94b2d8","type":"homekit-bridge","z":"","bridgeName":"Node-RED Bridge","pinCode":"031-45-111","port":"51800","allowInsecureRequest":true,"manufacturer":"Node-RED","model":"Node-RED","serialNo":"Node-RED","customMdnsConfig":false,"mdnsMulticast":true,"mdnsInterface":"","mdnsPort":"","mdnsIp":"","mdnsTtl":"","mdnsLoopback":true,"mdnsReuseAddr":true,"allowMessagePassthrough":true}]

Shaquu added a commit that referenced this issue Jul 3, 2020
### Fixed
-   JS console error when opening a linked service [#278](#278)
-   Fixed outputs number not being remembered by editor
@Shaquu Shaquu mentioned this issue Jul 3, 2020
@Shaquu
Copy link
Member

Shaquu commented Jul 3, 2020

@dxdc thanks for reporting it. Should be resolved in latest dev branch
npm i node-red-contrib-homekit-bridged@1.2.0-dev.1

@Shaquu Shaquu added the bug 🐛 There is at least high chance that it is a bug! label Jul 3, 2020
@Shaquu
Copy link
Member

Shaquu commented Jul 4, 2020

@crxporter or @NRCHKB/test I would be grateful for double check from someone so we could close it :)

@Shaquu
Copy link
Member

Shaquu commented Jul 22, 2020

Fixed.

@Shaquu Shaquu closed this as completed Jul 22, 2020
@Shaquu Shaquu mentioned this issue Aug 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 There is at least high chance that it is a bug!
Projects
None yet
Development

No branches or pull requests

3 participants