Help with Mastodon - Node please

Hey!

I have set up an application on my Mastodon-Account so my Node-Red can set Toots.

I am using the 'node-red-contrib-mastodon : sendMessage' node to do this. See the screenshot for the setup
grafik

This is the Flow I have configured
grafik

The inject-node is configured as follows (writing a string to payload.text)
grafik

Now the problem:
While the getMessage-Node receives messages with the configured hastag and the sendMessage-Node sends the message
grafik

I do not see this Toot in my profile or my timeline and the debug-node 1 does not receive any message (confirgured to show the complete message object)

What is wrong here?

  1. Are you using your main Mastodon account for this?

  2. Is it on mastodon.social?

  3. The node doesn't output anything so that is why you don't see anything using the debug node

  4. On mine when it says it has sent something, I've always seen the message so it's suprising that your not seeing it - can you change your msg.payload.text to
    @cymplecy@fosstodon.org test from My_Millenium
    and I'll see if I receive it

  5. Could your help the rest of us out, as no-one else has managed to get the receive node to work :frowning: Can you post image of that node and how you've got it configured to receive messages?

1 Like

I'll second that request for any information on a working receive node. I've been using the Twitter node to pick up the position of a local ferry for a few years but the maintainer of that bot has rejected Twitter and moved to Mastodon.

See this for workarounds

  1. Yes I do, because I wanted to check it out first and then make a new account for that

  2. My account is on mastodontech.de --> And that was the solution. I thought Mastodon would have only one API (and every tutorial I found has used mastodon.social :rofl:). I changed mastodon.social to mastodontech.de and now it works! So thank you for that!!

  3. OK, thanks for the information!

  4. Could be a bug in the node.

  5. Yesterday I set up the getMessage-Node with a hashtag. It delivered a text-array with subordinated arrays where each one contained a toot that contained the hashtag. Today it does not work anymore. Sounds strange ... I know. But I would not have written it if that has not been true. Strangely I am now experiencing, that for each push to the getMessage-Node, Node-Red loses the connection to the server.
    The only difference between yesterday and today is, that I have set up and tested the getMessage-node after I have installed it without having restarted Node-Red or the server. Today the server has made a reboot.
    Guys .. I swear that the node has worked :crazy_face:

Glad 2 sorted it :slight_smile:

I was looking into this again after you said it worked for you and re-read this

image

So this contrib node is old and uses v1 search API so it's going to stop working sometime but I configured the hashtag field to be a JSON array instead of just the #tag and it worked for me! It returned 20 results

But is that what you did yesterday?

image

image

[EDIT} But now its working for me without the {} and !!!!!

image
image

Something iffy going on somewhere! :slight_smile:

No :crazy_face: I just entered #dogs and it worked. But your solutions works for me, too. If I enter {[dogs]} it reveives the mentioned arrays. And if I then change {[dogs]} to dogs, it works, too.

a ghost in the machine :rofl:

1 Like

Thanks, I realized I had not looked carefully enough at the receive node docs. The messages I needed have no # hashtag. I was able to adapt your flow to give me the latest update to the user's (@bowenferry) bot timeline by checking every 5 minutes during the scheduled ferry runs.

[{"id":"27a10abd9f6cf7ce","type":"inject","z":"3754c020.afda5","name":"Every 5 minutes","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"*/5 4-22 * * *","once":true,"onceDelay":0.1,"topic":"","payloadType":"date","x":110,"y":220,"wires":[["a62853eec8740870"]]},{"id":"a62853eec8740870","type":"http request","z":"3754c020.afda5","name":"Mastodon @Bowenferry","method":"GET","ret":"txt","paytoqs":"ignore","url":"https://mstdn.ca/@bowenferry.rss","tls":"","persist":false,"proxy":"","authType":"","senderr":false,"x":510,"y":220,"wires":[["70f6c3f59b601ee3"]]},{"id":"70f6c3f59b601ee3","type":"xml","z":"3754c020.afda5","name":"","property":"payload","attr":"","chr":"","x":90,"y":280,"wires":[["fb8f71fc05e984fc"]]},{"id":"fb8f71fc05e984fc","type":"change","z":"3754c020.afda5","name":"Extract latest update","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.rss.channel[0].item[0].description[0]","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":280,"y":280,"wires":[["a1da5687476eb4b4"]]},{"id":"a1da5687476eb4b4","type":"function","z":"3754c020.afda5","name":"Remove HTML tags","func":"msg.payload = msg.payload.slice(3, -4);\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":520,"y":280,"wires":[["cadac481.c68368"]]}]

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