zachowj / node-red-contrib-home-assistant-websocket

Node-RED integration with Home Assistant
https://zachowj.github.io/node-red-contrib-home-assistant-websocket/
MIT License
508 stars 98 forks source link

Node-red wont start #1062

Closed blokl closed 1 year ago

blokl commented 1 year ago

Describe the bug

I can start it in safe mode. The error I get is "TypeError: (0 , lodash_1.cloneDeep) is not a function" from several poll state and trigger state.

To Reproduce

Start in safe mode Do a deploy get error "TypeError: (0 , lodash_1.cloneDeep) is not a function" The Node-red crashes see log below

Expected behavior

I like to use Node Red. I allready reinstall Node Red that;s not the solution

After a deploy i get:

16-9-2023 11:01:48node: Youles msg : error "TypeError: (0 , lodash_1.cloneDeep) is not a function" 16-9-2023 11:01:52node: Solis < 150 msg : string[42] "(0 , lodash_1.cloneDeep) is not a function" 16-9-2023 11:01:52node: Kamer temp. msg : string[42] "(0 , lodash_1.cloneDeep) is not a function"

This are my packages:

"name": "node-red-project", "description": "A Node-RED Project", "version": "0.0.1", "private": true, "dependencies": { "node-red-contrib-blindcontroller": "~4.8.6", "node-red-contrib-boolean-logic": "~0.0.3", "node-red-contrib-calc": "~1.0.5", "node-red-contrib-custom-node": "~2.0.0", "node-red-contrib-eztimer": "~1.2.7", "node-red-contrib-home-assistant-websocket": "~0.56.1", "node-red-contrib-homegear-mqtt": "~0.0.4", "node-red-contrib-huemagic-fork": "~4.2.8", "node-red-contrib-stoptimer": "~0.0.7", "node-red-contrib-suncalcinput": "~1.0.0", "node-red-contrib-sunpos": "~1.4.1", "node-red-contrib-traffic": "~0.2.1", "node-red-dashboard": "~3.6.0", "node-red-node-email": "~2.0.1", "victron-dynamic-ess": "~0.1.3" }

Screenshots

No response

Example Flow

[{"id":"6861c72af0d2d192","type":"tab","label":"Zonnescherm","disabled":false,"info":"","env":[]},{"id":"48a0b82d0cebdfdc","type":"inject","z":"6861c72af0d2d192","name":"auto","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":"600","topic":"","payload":"auto","payloadType":"str","x":90,"y":40,"wires":[["e92fa7db718b171d"]]},{"id":"81d8a2cc8d977a92","type":"inject","z":"6861c72af0d2d192","name":"Stop","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":110,"y":240,"wires":[["e73da579b64e5fee"]]},{"id":"81917a741f630656","type":"api-call-service","z":"6861c72af0d2d192","name":"Zonnescherm uit","server":"2648e2f2c45b100c","version":5,"debugenabled":true,"domain":"cover","service":"set_cover_position","areaId":[],"deviceId":["b71cc860f7430a0b46f8b5cb39dcdda5"],"entityId":["cover.zonnescherm_position_1"],"data":"{\"position\": 80}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":990,"y":160,"wires":[["f9c5d1a71a91f2c3"]]},{"id":"e73da579b64e5fee","type":"api-call-service","z":"6861c72af0d2d192","name":"Zonnescherm stop","server":"2648e2f2c45b100c","version":5,"debugenabled":false,"domain":"cover","service":"stop_cover","areaId":[],"deviceId":["b71cc860f7430a0b46f8b5cb39dcdda5"],"entityId":["cover.zonnescherm_position_1"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":350,"y":240,"wires":[["e8aaeb6562378f32"]]},{"id":"e8aaeb6562378f32","type":"debug","z":"6861c72af0d2d192","name":"debug 32","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":500,"y":340,"wires":[]},{"id":"46b44aa6efbfc867","type":"inject","z":"6861c72af0d2d192","name":"In","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":110,"y":520,"wires":[["cbaa59236bdd4237"]]},{"id":"cbaa59236bdd4237","type":"api-call-service","z":"6861c72af0d2d192","name":"Zonnescherm in","server":"2648e2f2c45b100c","version":5,"debugenabled":false,"domain":"cover","service":"close_cover","areaId":[],"deviceId":["b71cc860f7430a0b46f8b5cb39dcdda5"],"entityId":["cover.zonnescherm_position_1"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":500,"y":500,"wires":[["6fd9efd5b5abd744"]]},{"id":"6fd9efd5b5abd744","type":"debug","z":"6861c72af0d2d192","name":"debug 33","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":780,"y":440,"wires":[]},{"id":"b470005a6fd26356","type":"eztimer","z":"6861c72af0d2d192","name":"","debug":false,"autoname":"sunsetStart","tag":"eztimer","topic":"","suspended":false,"sendEventsOnSuspend":false,"latLongSource":"haZone","latLongHaZone":"zone.home","lat":"52.0158786941136","lon":"4.483108520507813","timerType":"2","startupMessage":false,"ontype":"1","ontimesun":"sunsetStart","ontimetod":"17:00","onpropertytype":"msg","onproperty":"payload","onvaluetype":"str","onvalue":"close","onoffset":"-30","onrandomoffset":true,"onsuppressrepeats":false,"offtype":"1","offtimesun":"dusk","offtimetod":"dusk","offduration":"00:01:00","offpropertytype":"msg","offproperty":"payload","offvaluetype":"num","offvalue":0,"offoffset":0,"offrandomoffset":0,"offsuppressrepeats":false,"resend":false,"resendInterval":"0s","mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"sun":true,"x":110,"y":580,"wires":[["cbaa59236bdd4237"]]},{"id":"b7d1eb90f167f62f","type":"poll-state","z":"6861c72af0d2d192","name":"Wind > 9","server":"2648e2f2c45b100c","version":2,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"updateinterval":"6","updateIntervalType":"num","updateIntervalUnits":"seconds","outputinitially":false,"outputonchanged":false,"entity_id":"sensor.station_station_station_windmeter_wind_strength","state_type":"str","halt_if":"9","halt_if_type":"num","halt_if_compare":"gte","outputs":2,"x":100,"y":460,"wires":[["cbaa59236bdd4237"],[]]},{"id":"b44fa1096dcf23e6","type":"poll-state","z":"6861c72af0d2d192","name":"Solis < 150","server":"2648e2f2c45b100c","version":2,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"updateinterval":"60","updateIntervalType":"num","updateIntervalUnits":"seconds","outputinitially":true,"outputonchanged":false,"entity_id":"sensor.solis_dc_power_pv1","state_type":"num","halt_if":"150","halt_if_type":"num","halt_if_compare":"lt","outputs":2,"x":100,"y":340,"wires":[[],[]]},{"id":"569ffa0f08e14b94","type":"poll-state","z":"6861c72af0d2d192","name":"Regen voorspelling","server":"2648e2f2c45b100c","version":2,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"updateinterval":"60","updateIntervalType":"num","updateIntervalUnits":"seconds","outputinitially":false,"outputonchanged":false,"entity_id":"weather.buienradar","state_type":"str","halt_if":"rain","halt_if_type":"str","halt_if_compare":"is","outputs":2,"x":130,"y":400,"wires":[["cbaa59236bdd4237"],[]]},{"id":"6bc2781f84825613","type":"api-current-state","z":"6861c72af0d2d192","name":"Kamer temp >22","server":"2648e2f2c45b100c","version":3,"outputs":2,"halt_if":"22","halt_if_type":"num","halt_if_compare":"gt","entity_id":"sensor.station_temperature","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":750,"y":40,"wires":[["7f9822b64ff642e2"],[]]},{"id":"e92fa7db718b171d","type":"bigtimer","z":"6861c72af0d2d192","outtopic":"","outpayload1":"","outpayload2":"","name":"Big Timer","comment":"","lat":"52.015830","lon":"4.483050","starttime":"540","endtime":"1020","starttime2":0,"endtime2":0,"startoff":0,"endoff":0,"startoff2":0,"endoff2":0,"offs":0,"outtext1":"on","outtext2":"off","timeout":"0","sun":true,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"jan":false,"feb":false,"mar":false,"apr":true,"may":true,"jun":true,"jul":true,"aug":true,"sep":true,"oct":false,"nov":false,"dec":false,"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":0,"month7":0,"day8":0,"month8":0,"day9":0,"month9":0,"day10":0,"month10":0,"day11":0,"month11":0,"day12":0,"month12":0,"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":0,"xmonth7":0,"xday8":0,"xmonth8":0,"xday9":0,"xmonth9":0,"xday10":0,"xmonth10":0,"xday11":0,"xmonth11":0,"xday12":0,"xmonth12":0,"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":true,"atstart":true,"odd":false,"even":false,"x":240,"y":80,"wires":[[],["9f13154821033305"],[]]},{"id":"c21d7870196731f3","type":"inject","z":"6861c72af0d2d192","name":"1","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":"600","topic":"","payload":"manual on","payloadType":"str","x":90,"y":100,"wires":[["e92fa7db718b171d","6bc2781f84825613"]]},{"id":"70bb1b977ead46ac","type":"inject","z":"6861c72af0d2d192","name":"0","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":"600","topic":"","payload":"manual off","payloadType":"str","x":90,"y":160,"wires":[["e92fa7db718b171d"]]},{"id":"06c76681f256f02e","type":"poll-state","z":"6861c72af0d2d192","name":"Kamer temp.","server":"2648e2f2c45b100c","version":2,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"updateinterval":"60","updateIntervalType":"num","updateIntervalUnits":"seconds","outputinitially":true,"outputonchanged":true,"entity_id":"sensor.station_temperature","state_type":"str","halt_if":"21.5","halt_if_type":"str","halt_if_compare":"is","outputs":2,"x":270,"y":160,"wires":[[],[]]},{"id":"1c30132986306573","type":"api-current-state","z":"6861c72af0d2d192","name":"Youles ","server":"2648e2f2c45b100c","version":3,"outputs":2,"halt_if":"-1500","halt_if_type":"num","halt_if_compare":"lte","entity_id":"sensor.phase_2_power","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":530,"y":100,"wires":[["551cf2cdc1d88b7c"],[]]},{"id":"7f9822b64ff642e2","type":"api-current-state","z":"6861c72af0d2d192","name":"Closed?","server":"2648e2f2c45b100c","version":3,"outputs":2,"halt_if":"closed","halt_if_type":"str","halt_if_compare":"is","entity_id":"cover.zonnescherm_position_1","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":920,"y":40,"wires":[["81917a741f630656","f9c5d1a71a91f2c3"],[]]},{"id":"f9c5d1a71a91f2c3","type":"debug","z":"6861c72af0d2d192","name":"debug 38","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1000,"y":300,"wires":[]},{"id":"9f13154821033305","type":"switch","z":"6861c72af0d2d192","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":390,"y":120,"wires":[["1c30132986306573"]]},{"id":"d942a0c9790f049b","type":"change","z":"6861c72af0d2d192","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"1","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":440,"y":700,"wires":[["ae516b528d1b4ae2"]]},{"id":"36437c03311e2542","type":"poll-state","z":"6861c72af0d2d192","name":"Regen voorspelling","server":"2648e2f2c45b100c","version":2,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"updateinterval":"60","updateIntervalType":"num","updateIntervalUnits":"seconds","outputinitially":false,"outputonchanged":false,"entity_id":"weather.buienradar","state_type":"str","halt_if":"cloudy","halt_if_type":"str","halt_if_compare":"is","outputs":2,"x":110,"y":720,"wires":[["d942a0c9790f049b"],[]]},{"id":"20415d2fd527e656","type":"poll-state","z":"6861c72af0d2d192","name":"Wind > 8","server":"2648e2f2c45b100c","version":2,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"updateinterval":"6","updateIntervalType":"num","updateIntervalUnits":"seconds","outputinitially":false,"outputonchanged":false,"entity_id":"sensor.station_station_station_windmeter_wind_strength","state_type":"str","halt_if":"8","halt_if_type":"num","halt_if_compare":"gte","outputs":2,"x":80,"y":660,"wires":[["d942a0c9790f049b"],[]]},{"id":"d220b18bdecd33b7","type":"poll-state","z":"6861c72af0d2d192","name":"Regen voorspelling","server":"2648e2f2c45b100c","version":2,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"updateinterval":"60","updateIntervalType":"num","updateIntervalUnits":"seconds","outputinitially":false,"outputonchanged":false,"entity_id":"weather.buienradar","state_type":"str","halt_if":"rain","halt_if_type":"str","halt_if_compare":"is","outputs":2,"x":110,"y":780,"wires":[["d942a0c9790f049b"],[]]},{"id":"ae516b528d1b4ae2","type":"debug","z":"6861c72af0d2d192","name":"debug 41","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":660,"y":700,"wires":[]},{"id":"551cf2cdc1d88b7c","type":"api-current-state","z":"6861c72af0d2d192","name":"Zonnig","server":"2648e2f2c45b100c","version":3,"outputs":2,"halt_if":"sunny","halt_if_type":"str","halt_if_compare":"is","entity_id":"weather.forecast_ns58_hourly","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"5","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":530,"y":160,"wires":[["6bc2781f84825613"],["be7944614b3de5eb"]]},{"id":"3c71b66c1cb1c42d","type":"poll-state","z":"6861c72af0d2d192","name":"Wind > 9","server":"2648e2f2c45b100c","version":2,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"updateinterval":"6","updateIntervalType":"num","updateIntervalUnits":"seconds","outputinitially":false,"outputonchanged":false,"entity_id":"sensor.station_station_station_windmeter_wind_strength","state_type":"str","halt_if":"9","halt_if_type":"num","halt_if_compare":"gte","outputs":2,"x":380,"y":360,"wires":[[],[]]},{"id":"367718dd0389bbd4","type":"api-current-state","z":"6861c72af0d2d192","name":"Wind < 6","server":"2648e2f2c45b100c","version":3,"outputs":2,"halt_if":"6","halt_if_type":"num","halt_if_compare":"lt","entity_id":"sensor.station_station_station_windmeter_wind_strength","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"5","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":580,"y":280,"wires":[["6bc2781f84825613"],[]]},{"id":"be7944614b3de5eb","type":"api-current-state","z":"6861c72af0d2d192","name":"Licht bewolkt","server":"2648e2f2c45b100c","version":3,"outputs":2,"halt_if":"partlycloudy","halt_if_type":"str","halt_if_compare":"is","entity_id":"weather.forecast_ns58_hourly","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"5","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":550,"y":220,"wires":[["367718dd0389bbd4"],[]]},{"id":"2648e2f2c45b100c","type":"server","name":"Home Assistant","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":"30","areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":": ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"default","statusTimeFormat":"h:m","enableGlobalContextStore":false}]

This package's version (not the Home Assistant add-on version)

2023.9.2

Is Node-RED running in Docker?

Yes

Node-RED version

14.5.0

Node.js version

14.17.1

Additional context

at Websocket.getStates (/config/node-red/node_modules/node-red-contrib-home-assistant-websocket/dist/homeAssistant/Websocket.js:388:39) at HomeAssistant.getEntities (/config/node-red/node_modules/node-red-contrib-home-assistant-websocket/dist/homeAssistant/HomeAssistant.js:73:39) at getEntities (/config/node-red/node_modules/node-red-contrib-home-assistant-websocket/dist/routes.js:92:127) at Layer.handle [as handle_request] (/opt/node_modules/express/lib/router/layer.js:95:5) at next (/opt/node_modules/express/lib/router/route.js:144:13) at checkHomeAssistant (/config/node-red/node_modules/node-red-contrib-home-assistant-websocket/dist/routes.js:33:5) at Layer.handle [as handle_request] (/opt/node_modules/express/lib/router/layer.js:95:5) at next (/opt/node_modules/express/lib/router/route.js:144:13) at disableCache (/config/node-red/node_modules/node-red-contrib-home-assistant-websocket/dist/routes.js:21:5) at Layer.handle [as handle_request] (/opt/node_modules/express/lib/router/layer.js:95:5) TypeError: (0 , lodash_1.cloneDeep) is not a function at Websocket.getStates (/config/node-red/node_modules/node-red-contrib-home-assistant-websocket/dist/homeAssistant/Websocket.js:388:39) at getProperties (/config/node-red/node_modules/node-red-contrib-home-assistant-websocket/dist/routes.js:110:137) at Layer.handle [as handle_request] (/opt/node_modules/express/lib/router/layer.js:95:5) at next (/opt/node_modules/express/lib/router/route.js:144:13) at checkHomeAssistant (/config/node-red/node_modules/node-red-contrib-home-assistant-websocket/dist/routes.js:33:5) at Layer.handle [as handle_request] (/opt/node_modules/express/lib/router/layer.js:95:5) at next (/opt/node_modules/express/lib/router/route.js:144:13) at disableCache (/config/node-red/node_modules/node-red-contrib-home-assistant-websocket/dist/routes.js:21:5) at Layer.handle [as handle_request] (/opt/node_modules/express/lib/router/layer.js:95:5) at next (/opt/node_modules/express/lib/router/route.js:144:13) 16 Sep 10:49:17 - [info] [server:Home Assistant] Connecting to http://supervisor/core 16 Sep 10:49:17 - [info] [server:Home Assistant] Connected to http://supervisor/core 16 Sep 10:49:18 - [error] [poll-state:Solis < 150] (0 , lodash_1.cloneDeep) is not a function 16 Sep 10:49:18 - [error] [poll-state:Kamer temp.] (0 , lodash_1.cloneDeep) is not a function 16 Sep 10:49:18 - [error] [api-call-service:5a9045d745239b2b] TypeError: (0 , lodash_1.cloneDeep) is not a function TypeError: (0 , lodash_1.cloneDeep) is not a function at Websocket.getStates (/config/node-red/node_modules/node-red-contrib-home-assistant-websocket/dist/homeAssistant/Websocket.js:388:39) at getEntitiesSelect2 (/config/node-red/node_modules/node-red-contrib-home-assistant-websocket/dist/routes.js:67:44) at Layer.handle [as handle_request] (/opt/node_modules/express/lib/router/layer.js:95:5) at next (/opt/node_modules/express/lib/router/route.js:144:13) at checkHomeAssistant (/config/node-red/node_modules/node-red-contrib-home-assistant-websocket/dist/routes.js:33:5) at Layer.handle [as handle_request] (/opt/node_modules/express/lib/router/layer.js:95:5) at next (/opt/node_modules/express/lib/router/route.js:144:13) at disableCache (/config/node-red/node_modules/node-red-contrib-home-assistant-websocket/dist/routes.js:21:5) at Layer.handle [as handle_request] (/opt/node_modules/express/lib/router/layer.js:95:5) at next (/opt/node_modules/express/lib/router/route.js:144:13) TypeError: (0 , lodash_1.cloneDeep) is not a function at Websocket.getStates (/config/node-red/node_modules/node-red-contrib-home-assistant-websocket/dist/homeAssistant/Websocket.js:388:39) at getEntitiesSelect2 (/config/node-red/node_modules/node-red-contrib-home-assistant-websocket/dist/routes.js:67:44) at Layer.handle [as handle_request] (/opt/node_modules/express/lib/router/layer.js:95:5) at next (/opt/node_modules/express/lib/router/route.js:144:13) at checkHomeAssistant (/config/node-red/node_modules/node-red-contrib-home-assistant-websocket/dist/routes.js:33:5) at Layer.handle [as handle_request] (/opt/node_modules/express/lib/router/layer.js:95:5) at next (/opt/node_modules/express/lib/router/route.js:144:13) at disableCache (/config/node-red/node_modules/node-red-contrib-home-assistant-websocket/dist/routes.js:21:5) at Layer.handle [as handle_request] (/opt/node_modules/express/lib/router/layer.js:95:5) at next (/opt/node_modules/express/lib/router/route.js:144:13) TypeError: (0 , lodash_1.cloneDeep) is not a function at Websocket.getStates (/config/node-red/node_modules/node-red-contrib-home-assistant-websocket/dist/homeAssistant/Websocket.js:388:39) at getEntitiesSelect2 (/config/node-red/node_modules/node-red-contrib-home-assistant-websocket/dist/routes.js:67:44) at Layer.handle [as handle_request] (/opt/node_modules/express/lib/router/layer.js:95:5) at next (/opt/node_modules/express/lib/router/route.js:144:13) at checkHomeAssistant (/config/node-red/node_modules/node-red-contrib-home-assistant-websocket/dist/routes.js:33:5) at Layer.handle [as handle_request] (/opt/node_modules/express/lib/router/layer.js:95:5) at next (/opt/node_modules/express/lib/router/route.js:144:13) at disableCache (/config/node-red/node_modules/node-red-contrib-home-assistant-websocket/dist/routes.js:21:5) at Layer.handle [as handle_request] (/opt/node_modules/express/lib/router/layer.js:95:5) at next (/opt/node_modules/express/lib/router/route.js:144:13) TypeError: (0 , lodash_1.cloneDeep) is not a function at Websocket.getStates (/config/node-red/node_modules/node-red-contrib-home-assistant-websocket/dist/homeAssistant/Websocket.js:388:39) at getEntitiesSelect2 (/config/node-red/node_modules/node-red-contrib-home-assistant-websocket/dist/routes.js:67:44) at Layer.handle [as handle_request] (/opt/node_modules/express/lib/router/layer.js:95:5) at next (/opt/node_modules/express/lib/router/route.js:144:13) at checkHomeAssistant (/config/node-red/node_modules/node-red-contrib-home-assistant-websocket/dist/routes.js:33:5) at Layer.handle [as handle_request] (/opt/node_modules/express/lib/router/layer.js:95:5) at next (/opt/node_modules/express/lib/router/route.js:144:13) at disableCache (/config/node-red/node_modules/node-red-contrib-home-assistant-websocket/dist/routes.js:21:5) at Layer.handle [as handle_request] (/opt/node_modules/express/lib/router/layer.js:95:5) at next (/opt/node_modules/express/lib/router/route.js:144:13) 16 Sep 10:49:23 - [red] Uncaught Exception: 16 Sep 10:49:24 - [error] TypeError: (0 , lodash_1.cloneDeep) is not a function at Websocket.getStates (/config/node-red/node_modules/node-red-contrib-home-assistant-websocket/dist/homeAssistant/Websocket.js:385:42) at PollState.onTimer (/config/node-red/node_modules/node-red-contrib-home-assistant-websocket/dist/nodes/poll-state/controller.js:60:46) at listOnTimeout (node:internal/timers:569:17) at processTimers (node:internal/timers:512:7)

blokl commented 1 year ago

I removed all my flows. And also removed the node-red-contrib-home-assistant-websocket I restarted the Node-Red and importd my flows. He installed the node-red-contrib-home-assistant-websocket automaticly. Now I get the following error:

Error: at Object.evaluateJSONataExpression (/opt/node_modules/@node-red/util/lib/util.js:775:18) at JSONataService.evaluate (/opt/node_modules/node-red-contrib-home-assistant-websocket/dist/common/services/JSONataService.js:58:39) at CallService.evaluateJSONata (/opt/node_modules/node-red-contrib-home-assistant-websocket/dist/nodes/BaseNode.js:131:36) at CallService.onInput (/opt/node_modules/node-red-contrib-home-assistant-websocket/dist/nodes/call-service/controller.js:63:50) at CallService.preOnInput (/opt/node_modules/node-red-contrib-home-assistant-websocket/dist/nodes/BaseNode.js:208:18) at /opt/node_modules/@node-red/runtime/lib/nodes/Node.js:210:26 at Object.trigger (/opt/node_modules/@node-red/util/lib/hooks.js:166:13) at callServiceNode.Node._emitInput (/opt/node_modules/@node-red/runtime/lib/nodes/Node.js:202:11) at callServiceNode.Node.emit (/opt/node_modules/@node-red/runtime/lib/nodes/Node.js:186:25) at callServiceNode.Node.receive... 16-9-2023 11:21:41 msg : string[270] "Deprecated API warning: Calls to RED.util.evaluateJSONataExpression must include a callback. This will not be optional in Node-RED 4.0. Please identify the node from the following stack and check for an update on npm. If none is available, please notify the node author." 16-9-2023 11:21:41 msg : string[754] "Error: ↵ at Object.evaluateJSONataExpression (/opt/node_modules/@node-red/util/lib/util.js:775:18)↵ at JSONataService.evaluate (/opt/node_modules/node-red-contrib-home-assistant-websocket/dist/common/services/JSONataService.js:58:39)↵ at ComparatorService.getComparatorResult (/opt/node_modules/node-red-contrib-home-assistant-websocket/dist/common/services/ComparatorService.js:108:94)↵ at PollState.getComparatorResult (/opt/node_modules/node-red-contrib-home-assistant-websocket/dist/nodes/BaseNode.js:128:39)↵ at PollState.onTimer (/opt/node_modules/node-red-contrib-home-assistant-websocket/dist/nodes/poll-state/controller.js:82:30)↵ at listOnTimeout (node:internal/timers:569:17)↵ at processTimers (node:internal/timers:512:7)" 16-9-2023 11:21:53 msg : string[270] "Deprecated API warning: Calls to RED.util.evaluateJSONataExpression must include a callback. This will not be optional in Node-RED 4.0. Please identify the node from the following stack and check for an update on npm. If none is available, please notify the node author."

OwnsJo commented 1 year ago

https://github.com/zachowj/node-red-contrib-home-assistant-websocket/issues/898#issuecomment-1710789191