Is there a way to click a button in relation to a specific page?

Is there any way to click a button for a specific page?

for example
I wish there was a way to automatically click the red box in the picture by a message received.

Any examples or simple way?

Normally one would use a mouse. :rofl:

How is this related to node-red? Could you explain a bit more?


For example, there are cases where an mqtt message suddenly does not come from a nodered flow.

In this case, using a trigger node, I made a case that reboots the computer if there is no message after 1 minute.

The problem is that if you press the button to reset mqtt rather than reboot, you will receive a message again.

So, when I receive a specific message, I inquired if I could click a button on a specific page.

Is the button a node-red dashboard button? If so then send a message to wherever that button sends it's message, containing the same contents as the message from the button does.

It's not a nodered button.
Another site button.

So are you asking that node-red somehow manages to press a button in a browser tab that is not in any way associated with node-red? If you think about whether you want your browser to allow code on one tab to somehow perform actions on a separate website tab (possibly your bank's webpage for example) you will see that this is not something the browser is going to let happen.


I don't have time to dig into it at the moment, but it should be possible to use similar techniques to e.g. eBay bidding software to open a page and send the appropriate button click. Whether it can be done with existing nodes or would need either a custom node or some JavaScript magic is also something to look into.

Based on the underlying protocols involved I can't see any reason why it shouldn't be possible.

I don't think that is what is being asked for, but perhaps I misunderstood the question.

... or I've misunderstood it, which is very possible :smiley:

Going by the OP's second post :

It sounded like he wanted to click a button on an MQTT-related page somewhere, although it is a bit vague.

Perhaps @Athurian could explain in a bit more detail?

you're right.

For example, if you open Chrome on Raspberry Pi,
I have a page localhost:5000/mqttsettings.
On this page there is a button to save mqtt.
This is a function that automatically presses the mqtt save button when a specific message comes up.

The reason for doing this is to receive mqtt from the current nodered.
But strangely, I don't know why, but after a few hours the reception suddenly cuts off.

I do not know the cause, but if I reboot or press the save button of the mqtt setting page, it will resume again.

So, I asked how to press the save button as a way to do it without rebooting.

What do you have running at that location to provide the page?

This is where you set the sensor.

And this is the web page setting page provided by the sensor.

As far as I know, it is based on .Net and Blazer.

What sensor it is? Is this a known problem with the sensor?

When you say that the MQTT stops do you mean it appears to stop publishing data?

Is it publishing to a broker on the node-red system? If so have you looked at the mqtt log to see what it says?

Also install MQTT Explorer and see what you see there.

There are many types of sensors.

Atlas Scientific's sensor.

mqtt works fine in the beginning... I also checked the log.

There is nothing more than a star.

The problem is that it suddenly stops.

I can't find the cause.

As a result of checking on the Raspberry Pi, there is a phenomenon that mqtt data cannot be transmitted.

For now, we will continue to test it.

Which log did you check and what do you mean about there being only a star?

Exactly what stops?

I thought it was the sensor that stopped. Do you mean the node-red can't publish to MQTT? You must be more explicit about what happens, without knowing the details it is difficult to help.

What did MQTT Explorer show?

Something else I don't understand. You said you connect to the sensor using localhost:5000, but that is a web page on the computer you are running on, not the sensor. So what software is providing that interface?

Is this the same problem that you reported in a previous thread? I notice that there you just stopped answering questions.

There is software provided by sensor vendors.

The sensor supports mqtt through software.

The mqtt again receives messages through nodered. Sensor data > Publish sensor software mqtt > Receive node red mqtt It comes out like this.

Here, you can set the settings as a web page.

However, sometimes the message is suddenly dropped from mqtt and the message cannot be published.

Idon't know what the reason is. If there is no message for a few minutes, I set No message in Node Red.

So, if you press the save button again in the mqtt settings of the software webpage provided by the sensor, it resumes again.

So, if there is no mqtt message from Node Red, we are looking for a function that can automatically press a button on the mqtt setting page.

You will need to inspect the source for the page that provides the button to work out what it is doing when you click it. Hopefully it is just doing an http get or post of some sort, but will depend how or what security is in place as to whether you can just replicate that with an http request node.

Also you still haven't told us the answer to that question. That will confirm whether the broker is receiving data from the sensor.