Twitter Node delivers twice

#1

I have a NR Twitter node that looks for "cheerlights", no "@", no "#". I'm now getting two outputs in the debug node, 1s apart, with the same information except for the first line (time stamp) and last line (msg id). What could be causing this?

[Edit] If my "For" is #cheerlights as well as what I said above, I still get the same result: 2x information. [\Edit]

8/21/2018, 11:15:15 AMnode: fd2ca948.4c11f8
tweets/Smartirrigatio2 : msg : Object
object
topic: "tweets/Smartirrigatio2"
payload: "2018-08-21 6:15 pm and CheerLights is .”"
lang: "en"
tweet: object
created_at: "Tue Aug 21 16:15:15 +0000 2018"
id: 1031937786419527700
id_str: "1031937786419527680"
text: "2018-08-21 6:15 pm and CheerLights is .”"
source: "ThingTweet"
truncated: false
in_reply_to_status_id: null
in_reply_to_status_id_str: null
in_reply_to_user_id: null
in_reply_to_user_id_str: null
in_reply_to_screen_name: null
user: object
geo: null
coordinates: null
place: null
contributors: null
is_quote_status: false
quote_count: 0
reply_count: 0
retweet_count: 0
favorite_count: 0
entities: object
favorited: false
retweeted: false
filter_level: "low"
lang: "en"
timestamp_ms: "1534868115416"
_msgid: "c2bc9f6b.613c3"

8/21/2018, 11:15:16 AMnode: fd2ca948.4c11f8
tweets/Smartirrigatio2 : msg : Object
object
topic: "tweets/Smartirrigatio2"
payload: "2018-08-21 6:15 pm and CheerLights is .”"
lang: "en"
tweet: object
created_at: "Tue Aug 21 16:15:15 +0000 2018"
id: 1031937786419527700
id_str: "1031937786419527680"
text: "2018-08-21 6:15 pm and CheerLights is .”"
source: "ThingTweet"
truncated: false
in_reply_to_status_id: null
in_reply_to_status_id_str: null
in_reply_to_user_id: null
in_reply_to_user_id_str: null
in_reply_to_screen_name: null
user: object
geo: null
coordinates: null
place: null
contributors: null
is_quote_status: false
quote_count: 0
reply_count: 0
retweet_count: 0
favorite_count: 0
entities: object
favorited: false
retweeted: false
filter_level: "low"
lang: "en"
timestamp_ms: "1534868115416"
_msgid: "5df4d4c6.04bdbc"

0 Likes

#2

What version of the Twitter node are you using? Due to the API changes Twitter introduced last week, the node went through a huge rewrite.

I'll see if I can reproduce.

0 Likes

#3

I saw your post about the need to update to the newest everything and did so, but who knows if I got everything right. Briefly:

jm:.node-red jm$ node-red -v
22 Aug 00:10:53 - [info]
Welcome to Node-RED

22 Aug 00:10:53 - [info] Node-RED version: v0.19.1
22 Aug 00:10:53 - [info] Node.js version: v6.11.4
22 Aug 00:10:53 - [info] Darwin 16.7.0 x64 LE

And:

jm:.node-red jm$ node-red-admin list
-bash: node-red-admin: command not found
jm:.node-red jm$ npm ls -g node-red-node-twitter
/usr/local/lib
├─┬ node-red@0.19.1
│ └── node-red-node-twitter@1.1.2
└── node-red-node-twitter@1.1.2
jm:.node-red jm$

Based on that, I think I'm at the most recent version of NR and the Twitter node.

0 Likes

#4

Bump.
Not sure whether to interpret the quiet here as "We all have more important things to do" (which would be completely understandable) or "We don't see this, it must be something in your setup". Or something else.
Anybody else seeing this? If not, it must be me.
Thanks.

0 Likes

#5

Sorry - I didn't pay attention to your plight :frowning:

I get exactly the same result as you

2 Node-RED messages for every cheerlights tweet

I'm on v1.1.2 and NR 0.19.2 (standard Pi upgraded setup)

0 Likes

#6

Hi @CaptClaude

I did manage to recreate it at the end of last week, although I'm not sure how. I was then away for the weekend so forgot to follow up with you. I suspect the stream connection is hitting an error and starting a new stream... but the old stream is still receiving. So a restart of Node-RED will stop the duplicates (as it'll clean up the old streams).

Annoyingly, this is the one part of the node that didn't get completely rewritten - so I'm not sure why its behaviour would have changed.

Given it took a couple days of running (on and off whilst I'm busy developing other things), I can't say when a fix will be available. If anyone else wanted to dive in, it would certainly help.

Nick

0 Likes

#7

Nick, thanks for taking a look. And Simon for verifying.
There is comfort in knowing it's not just me. :smile:
And as I am playing with Cheerlights using @cymplecy's feed (for my ESP8266-based thingies) as well as using MQTTBox to get a feel for what the various streams actually deliver, there is no rush to fix this.
You do not want me diving in: I don't speak enough JavaScript to order a beer or find the loo. I do this for fun and education and to keep myself out of the asylum.
Thanks,
--Jeff

0 Likes

#8

And in the meantime, a simple workaround is to add an RBE node after the Twitter node to filter out duplicate messages

image

0 Likes

#9

I just got back to this and in the process had NR stop on me. When I restarted it (probably for the first time in a long while, all the strange errors stopped.

That explains all the strange stream-related errors I was getting. I'm in no rush for a fix as no lives depend on it. It's a cold, rainy day here so I'm playing again. Thanks.

0 Likes