Problem importing a bit of code. (Bug report?)

Continuing the discussion from LED Brightness, for(), dash board slider, dimming:

Out of curiosity I imported this flow.

I can't use is / it doesn't work.

Clicking on the inject node - which injects 200 nothing happens. It is no injected.
I added an extra debug node and there is nothing coming out of the inject node.

Just above is another flow and when I click on it's inject node I get the message saying it was injected.

I'm open to why it isn't working.

Pictures:

The mouse turns into the finger indicating it is ready to be pressed, but clicking the mouse: nothing happens.

N.R. 1.0.3.

Update:

To further try and find out what is going on I opened the inject node.
Which I now notice is called inject

I also added an inject node from my palette. (Shown not deployed)

Look at how there is on name

Now look when I open my inject node:

I am suspicious this is a bug between the new Beta version and 1.0.3

you are importing an inject node that has been created with the new beta version, which makes the inject node more versatile, but breaks the ability to import flows using it in old versions (which is expected since it adds new functionality).

If you change something about the node material, e.g. change the name and then do a deploy, it should work again.

I am importing the flow as posted by @bakman2. Which has the inject node.

Looking at the pictures/screen shots it doesn't give me any options as I am only on 1.0.3.
Which means the flow is academic for use unless I add a local inject node and make it inject 200.

you are 100% correct

The point is, the JSON of an inject node created in 1.1 beta is different than the JSON of an inject node created below 1.1. Therefore, the old code (1.0.3 included) does not really know what to do with it.

You would need to change the code of 1.0.3 in order to correctly deal with it, which is kind of pointless, since then you can also update to the new version, when it is out.
The other way around, meaning that if you import an inject node that has been created below 1.1 into 1.1 is handled in the code.

Or I just use a local inject node and get it to inject 200 and test the flow.

But it is a problem of which people should be told to avoid problems like this when people with older versions import flows from people with the newer version and wonder why they don't work.

The changes made in 1.1 were meant to be backward compatible if the node was configure to inject only payload and topic so that we'd avoid this sort of issue. I'll investigate why it isn't working. Thanks for highlighting.

2 Likes

Just asking of anything has happened on this.
No big deal. Just asking.

fixed in dev branch.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.