Tasmota node not working after Tasmota 8.30 firmware update?

node-red-contrib-tasmota 0.9.4 shows errors instead of the three nodes Tasmota Switch, Sensor and Light.

16 May 10:42:48 - [info] Node-RED Version: v1.0.6
16 May 10:42:48 - [info] Node.js  Version: v12.16.2
16 May 10:42:48 - [info] Linux 5.4.35-v7+ arm LE
16 May 10:42:49 - [info] Paletten-Nodes werden geladen
16 May 10:42:56 - [info] Dashboard version 2.21.0 started at /ui
16 May 10:42:57 - [warn] ------------------------------------------------------
16 May 10:42:57 - [warn] [node-red-contrib-zigbee2mqtt/in] SyntaxError: Invalid or unexpected token (line:3)
16 May 10:42:57 - [warn] [node-red-contrib-zigbee2mqtt/get] SyntaxError: Invalid or unexpected token (line:2)
16 May 10:42:57 - [warn] [node-red-contrib-zigbee2mqtt/out] SyntaxError: Invalid or unexpected token (line:2)
16 May 10:42:57 - [warn] [node-red-contrib-zigbee2mqtt/bridge] SyntaxError: Invalid or unexpected token (line:2)
16 May 10:42:57 - [warn] [node-red-contrib-zigbee2mqtt/server] SyntaxError: Invalid or unexpected token (line:2)
16 May 10:42:57 - [warn] [node-red-contrib-tasmota/Tasmota switch] SyntaxError: Invalid or unexpected token
16 May 10:42:57 - [warn] [node-red-contrib-tasmota/Tasmota sensor] SyntaxError: Invalid or unexpected token
16 May 10:42:57 - [warn] [node-red-contrib-tasmota/Tasmota light] SyntaxError: Invalid or unexpected token

Is it possible, that this due to an update to Tasmota 8.3 firmware which I did on two plug devices 40 minutes ago?? I did not change anything else since yesterday.
I cannot deinstall the the node and installation per CLI shows no errors, but either does not work.

Show us what happens when you try to uninstall it in the command line. Go to the node red folder and run
nmp remove node-red-contrib-zigbee2mqtt

There is also other tasmota nodes which may work better.

There is also a forum that may be of help:
Here
Then go to the bottom and click on this link:
Tasmota forum

And this is the node of which I was speaking:
node-red-contrib-tasmota
(In the library)

FYI,
I loaded Tasmota 8.3 (Fred) to on ESP8266 NodeMCU yesterday and all is running OK here using MQTT. I can also see that REST API is OK as well.

Because zigbe22mqtt also got an error, I deinstalled this one, too:
npm remove node-red-contrib-zigbee2mqtt

removed 7 packages and audited 490 packages in 14.369s

Then:

npm remove node-red-contrib-tasmota

removed 43 packages and audited 447 packages in 17.864s

After a reboot I installed tasmota again:

npm install node-red-contrib-tasmota

+ node-red-contrib-tasmota@0.9.4
added 43 packages from 40 contributors and audited 490 packages in 28.314s

I can see the three tasmota nodes, but as soon as I use the Tasmota switch I get:

16 May 14:20:00 - [info] Installiertes Modul: node-red-contrib-tasmota
16 May 14:20:00 - [info] Hinzugefügte Node-Typen:
16 May 14:20:00 - [info]  - node-red-contrib-tasmota:Tasmota Switch : SyntaxError: Invalid or unexpected token (line:3)
16 May 14:20:00 - [info]  - node-red-contrib-tasmota:Tasmota Sensor : SyntaxError: Invalid or unexpected token (line:3)
16 May 14:20:00 - [info]  - node-red-contrib-tasmota:Tasmota Light : SyntaxError: Invalid or unexpected token (line:3)

I removed both new plugs with the new Tasmota firmware and used for the test another plug with Tasmota 8.2.0 just to be safe, but that was not the reason for the errors!

not true, what I wrote. The following error comes right after the installation of the tasmota node.
So there is no need to USE one of the nodes to get this error.

16 May 15:13:48 - [info] Installiertes Modul: node-red-contrib-tasmota
16 May 15:13:48 - [info] Hinzugefügte Node-Typen:
16 May 15:13:48 - [info]  - node-red-contrib-tasmota:Tasmota Switch : SyntaxError: Invalid or unexpected token (line:3)
16 May 15:13:48 - [info]  - node-red-contrib-tasmota:Tasmota Sensor : SyntaxError: Invalid or unexpected token (line:3)
16 May 15:13:48 - [info]  - node-red-contrib-tasmota:Tasmota Light : SyntaxError: Invalid or unexpected token (line:3)

Does that node have a Config node associated with it? Look in the hamburger menu for Configuration Nodes and see if any of those are configured. Delete them if found, and I expect the error will go. If so that means it is the config node that is giving the problem.
It sounds as if the node is not compatible with the latest tasmota s/w. I seem to remember seeing that there are some breaking changes in a recent version.
I was about to say that there is an open issue against the node, but I think you know that as I guess you submitted it.
I don't use that node, I just get the data via mqtt, which may be what you will have to do if there is no response to the issue.

There is no config node for tasmota.

... an open issue against the node, but I think you know that as I guess you submitted it.

Yes, I tried it also that way.

I used mqtt for the tasmota plugs before, but had problems reading the state of the switches when starting / deploying Node-RED. With the tasmota node it was very easy to get the current state.

Well you can't get an error message from a node that is not installed. Assuming you have restarted node red since removing it.

Sorry, I misread your post, I thought you were saying the error was after removing the nodes.
Do you actually have to have a device connected to get the error? If not then that suggests the upgrade is not the issue and that something else is the problem. Did you do anything else at the same time?

It is very odd that you are getting the same error on several nodes. I wonder whether something else is messed up. I suggest stopping node-red and renaming the node_modules folder. The go into the .node-red folder and run
npm install
That will re-install and re-build all the locally installed nodes. See if that helps.

1 Like

I already wrote:

After a full backup, rename of the node_modules folder and
npm install
without the tasmota node, I get

added 450 packages from 410 contributors and audited 450 packages in 209.309s

Right after installing the tasmota node the same error like before:

17 May 09:45:59 - [info] Installiertes Modul: node-red-contrib-tasmota
17 May 09:45:59 - [info] Hinzugefügte Node-Typen:
17 May 09:45:59 - [info]  - node-red-contrib-tasmota:Tasmota Switch : SyntaxError: Invalid or unexpected token (line:3)
17 May 09:45:59 - [info]  - node-red-contrib-tasmota:Tasmota Sensor : SyntaxError: Invalid or unexpected token (line:3)
17 May 09:45:59 - [info]  - node-red-contrib-tasmota:Tasmota Light : SyntaxError: Invalid or unexpected token (line:3)

So I renamed the node_modules folder again (with tasmota node installed) and run npm install again:

added 493 packages from 437 contributors and audited 493 packages in 181.152s

In the startlog I can see:

17 May 09:52:35 - [info] Node-RED Version: v1.0.6
17 May 09:52:35 - [info] Node.js  Version: v12.16.2
17 May 09:52:35 - [info] Linux 5.4.35-v7+ arm LE
17 May 09:52:36 - [info] Paletten-Nodes werden geladen
17 May 09:52:46 - [info] Dashboard version 2.22.1 started at /ui
17 May 09:52:47 - [warn] ------------------------------------------------------
17 May 09:52:47 - [warn] [node-red-contrib-tasmota/Tasmota switch] SyntaxError: Invalid or unexpected token
17 May 09:52:47 - [warn] [node-red-contrib-tasmota/Tasmota sensor] SyntaxError: Invalid or unexpected token
17 May 09:52:47 - [warn] [node-red-contrib-tasmota/Tasmota light] SyntaxError: Invalid or unexpected token

But since zigbee2mqtt gets the same error when installing or running:


17 May 09:54:28 - [info] Modul wird installiert: node-red-contrib-zigbee2mqtt, Version: 0.4.1
17 May 09:54:51 - [info] Installiertes Modul: node-red-contrib-zigbee2mqtt
17 May 09:54:51 - [info] Hinzugefügte Node-Typen:
17 May 09:54:51 - [info]  - node-red-contrib-zigbee2mqtt:zigbee2mqtt-in : SyntaxError: Invalid or unexpected token (line:3)
17 May 09:54:51 - [info]  - node-red-contrib-zigbee2mqtt:zigbee2mqtt-get : SyntaxError: Invalid or unexpected token (line:2)
17 May 09:54:51 - [info]  - node-red-contrib-zigbee2mqtt:zigbee2mqtt-out : SyntaxError: Invalid or unexpected token (line:2)
17 May 09:54:51 - [info]  - node-red-contrib-zigbee2mqtt:zigbee2mqtt-bridge : SyntaxError: Invalid or unexpected token (line:2)
17 May 09:54:51 - [info]  - node-red-contrib-zigbee2mqtt:zigbee2mqtt-server : SyntaxError: Invalid or unexpected token (line:2)

...I will dive into the mqtt node, which both seems to use. Stay tuned or give an advice :wink:

I don't think you said whether you did anything else at the same time as updating the devices (which it seems is not a factor since they don't even need to be connected). Something must have changed.

Sorry, dumb question #2 from me:

So you can access the device's http page and it is configured and all that part of things is good - yes?

the device the thing with tasmota installed.

It is nothing to do with the devices, they don't even need to be connected to get the error.

As I said: Dumb question.

Sorry. Brain really not working as expected just now.
Looking for a trade-in, but not really seeing any which are better than the one I have. :frowning:

@Trying_to_learn
yes, I can connect to the tasmota plugs without any problem. I did not change anything.

I have just deinstalled Node-RED and in the process of installing it again!

Well something must have changed, unless you have not rebooted or restarted flows for some time, so whatever the change was it did not take effect till then.
You didn't upgrade or re-install any nodes or anything?

Edit - if the system actually works even though you see that error, are you sure the error was not there before?

I didn't upgrade or reinstall somethon when the error occured :wink:

I am quite sure, because I'm currently adding features to Node-RED and do deploy or even restart the Pi regularly. But the tasmota error just started yesterday without any change from me.

BTW: node.js v.12 is ok? I read something to stick to node.js v10 (LTS)!?

Yes, 12 is ok, but you have been using that for some time so you know that.
12 is LTS too.

I deinstalled and installed Node-RED with all nodes and settings several times now and get the errors described above with tasmota AND zigbee2mqtt, as soon as I install the node node-red-contrib-enocean.

But this combination has worked for 4-5 days. I was able to check the state of my Enocean based Hoppe door handle together with all other nodes.

Is there an alternative to use my Enocean USB300 stick with Node-RED?