-
Notifications
You must be signed in to change notification settings - Fork 6
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
Smart Garage Node #27
Comments
@wolli112 difficult to diagnose without having your input data and your attached code is not easily to parse. In future you should use code formatting when posting. I suggest you output your message to a debug node side-by-side with Meross node. So you should see if "true" is really sent – I think it won't. |
I have inserted the code which is an export of the Node Red Flow as code. You can simply import this into Node Red. I have already used the debug node and the result is “true”. The Meross Garage Node still reports: |
Sorry, but I‘m not able to import the code here. I just tried it without luck. Nevertheless I already analyzed your code with nonspecific result. If outcome is „true“ and true works without your function node via direct inject the issue must be in your function node. 🤷🏼♂️ |
This code works
|
This code doesn't work
At the end "true" should be sent to the Meross node if "Garage" is "false" and "Öffner" is "true". The "true" also comes, only the Meross node brings the error. |
The two inject nodes are just for testing, but it doesn't work that way either, the Meross always gives the error. And of course I removed my app code in the code inserted here. |
I was able to solve the problem, the nodes are as shown above. |
Hello, I have a problem with the Smart Garage Node.
I can open via Inject Node True and close via False.
As soon as I send a True from my logic I get an error message:
"There was an Error: Error: socket hang up"
If my logic says False it works
[{"id":"ba6fe5dfd84fa54c","type":"function","z":"ea46c87a4f403cf3","name":"Logic","func":"// Globale Variablen zum Speichern der Zustände\ncontext.set('input1', context.get('input1') || null);\ncontext.set('input2', context.get('input2') || null);\n\n// Eingangsnachrichten aktualisieren\nif (msg.topic === \"öffner\") {\n context.set('input2', msg.payload);\n} else if (msg.topic === \"garage\") {\n context.set('input1', msg.payload);\n}\n\n// Zustände abrufen\nvar input1 = context.get('input1');\nvar input2 = context.get('input2');\n\n// Überprüfen, ob beide Zustände gesetzt sind\nif (input1 !== null && input2 !== null) {\n if (input2 && !input1) {\n msg.payload = true;\n } else if (input2 && input1) {\n msg.payload = false;\n }\n context.set('input1', null);\n context.set('input2', null);\n return msg; // Nachricht senden, wenn beide Zustände gesetzt sind\n}\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1450,"y":240,"wires":[["4390c1b3138aceaf","94215792b28f06a5","0ca60b227692d41d"]]},{"id":"0ca60b227692d41d","type":"smartgarage-control","z":"ea46c87a4f403cf3","confignode":"6c0bd9f2.e89438","name":"Garage 2","ip":"172.22.100.213","channel":"0","x":1620,"y":340,"wires":[["94215792b28f06a5"]]},{"id":"6c0bd9f2.e89438","type":"meross-config","name":"Meross App","key":"xxx Key has been removed here yyy"}]
The text was updated successfully, but these errors were encountered: