Error during activation :
Fatal error: Array and string offset access syntax with curly braces is no longer supported in /www/wp-content/plugins/wp-mqtt/lib/vendor/phpMQTT/phpMQTT.php on line 133
I wanted to suggest a code edit, but I’m not sure if the source has a public repo.
In either case, I noticed that event_pageview()
has no args passed to it. This is unfortunate because I think most people, me included, want to know which page has been viewed.
I suggest editing the code to get access to the wp_query:
public function event_pageview(){
global $wp_query;
$this->assemble_mqtt_message( 'event_pageview', (array) $wp_query );
}
Another suggestion is to also use replace_placeholders
in the topic. This way we can have a different subtopic depending on which page is actually viewed. This is easily achieved by adding: topic = $this->replace_placeholders( $topic, $args );
in the assemble_mqtt_message()
function.
Hello,
is there a way to use TLS encryption and store the CA certificate of the broker on the WordPress site?
Best regards,
Burkhard
I’m trying to do a button controlled MQTT message sender in my WordPress site with the help of WP-MQTT. But I’m newbie in this area of HTML, PHP and other things, and I don’t understand very well the hook structure that the plugin need to do a custom event. Anyone can help me?
]]>I would love to have the ability to ignore ip addresses.
I believe it is is possible to add another text field or paragraph field that could store a comma delimited list of ip addresses. Then in each hook this list could be checked. If the IP is in the list don’t do the actions in the hook.
]]>Hi Roy,
I installed your plugin and tried to print out the text to my WebSocket printer,
I can receive your message from the same topic, but I am not sure if I can edit the message format from your plugin?
Regards,
Tec
Thanks for sharing your great work on MQTT.
You wrote that I could create my own placeholder. But I am not able to figure out how. I have no example nor guide.
Can you please describe how to define custom placeholders, that publish MQTT messages to the broker when e.g. a button is pressed?
That would be really helpful.
Thanks in advance.
Best wishes Jan
Is it possible to publish mqtt to broker whenever a user changes a specific meta-data field and then pass that value of that field into the message? Is it also possible to pass the userID or similar into the mqtt “topic”?
(I need this for a IoT application and calling WP REST API seams much more complicated and not at all as light-weight.)
]]>