-
Notifications
You must be signed in to change notification settings - Fork 30
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
ioBroker node and MQTT format does not work as expected #325
Comments
Please provide a debug log (set instance of node-red to debug loglevel) of that above and tell exactly what you expect to be changed. From your words I'm (as the "not using node-red nor MQTT-in-node-red" developer) have no real idea what your issue exactly is :-) Give me more details (like your speak to a node-red/mqtt dau) ;-) |
First of all: the in node seems to work with MQTT formatted topics.
This worked afer reloading the node-red page. Apparrently my browser dropped some of the logs. -- If the switched was pressed on the brightness should be changed. Here is the code of the function node:
Here is the debug log after switching off: The catch apparently did not work, but from the ioBroker log:
|
Thank you, that helped, will look into it soon |
Seems the problem is, that the "ioBroker out node" replaces '/' with '.' after checking the adapter prefix of the ID on node input. So the node does not recognize an adapter namespace and prefixes it with 'node-red.0.'. I have done some changes in my forked repo and would test these in my ioBroker instance. But I dont' know how. Is there a tutorial / documentation / howto? |
In fact change the same files the same way locally in /opt/iobroekr/node_modules/iobroker.node-red ... and restart the adapter ... should have immediate effect. Thats easiest to test for you I think |
I created an ioBroker in node with
But the node never outputs a message. This is confusing.
If I change
The node outputs messages and re-formats the messages topic to MQTT (with '/'). Now it makes sense.
Later on such a MQTT-topic-formatted messages arrives at an ioBroker out node and an error message is shown:
Seems that the ioBroker out node tries to reformat the MQTT style topic into an ioBroker style topic but prefixes it with the node-red instance name.
As a node-red user I want to work with a consistent style of topic without converting it every time from one format into another. This keeps my flows clean and reduces bolierplate code. The step to MQTT topics was good, but all ioBroker nodes should be able to handle it uniformly.
The text was updated successfully, but these errors were encountered: