Questions tagged [phpmqtt]

a simple php class to connect/publish/subscribe to a MQTT broker

A simple PHP class to connect/publish/subscribe to an MQTT broker.

Source: https://github.com/bluerhinos/phpMQTT

30 questions
0
votes
0 answers

How to make Laravel run MQTT listener or subscribe

Currently I am running using command php arisan start.listening.mqtt. However, it will be killed if no more active on the screen. So can any one suggest a better way for 2 objective Run the MQTT listener as background process through Laravel…
Joe Ijam
  • 2,123
  • 4
  • 19
  • 30
0
votes
1 answer

how to communicate between regular MQTT and websocket MQTT?

I have a main App that initializes fastAPI and uses fastAPI MQTT. Now, this file is running in an event loop and is looking for regular MQTT port. I have a second app that uses MQTT Websocket and is running in an event loop. Now, I want the two apps…
0
votes
1 answer

How can I receive all the messages send to a topic of MQTT to a webpage everytime I load the index?

So I'm new to MQTT and I have to make a "messaging" project that loads all the messages (sent to a certain topic) in my index page without a long load time, I'm working with Yii2 Framework Advanced Project and I've already done the publish code, in…
João Neves
  • 77
  • 1
  • 10
0
votes
2 answers

Implement MQTT client using PHP to connect MQTT broker

I'm new to the PHP world, facing problem while connecting to MQTT. I'm using the phpMQTT.php library, and I'm using the IP address to connect to the MQTT broker. I'm trying to publish to MQTT broker, getting error in phpMQTT.php library file The…
Pavan A
  • 21
  • 1
  • 2
0
votes
0 answers

Subscriber of MosquittoClient doesn't show single subscribed message in a interval time period

I'm using Mosquitto/Client php library. I have made connected properly between broker and client. When i execute publisher and subscriber then subscriber displays a number of messages but I want to get a single published message when publisher…
Salman Quader
  • 195
  • 2
  • 13
0
votes
1 answer

Not able to connect to Mosquitto server using Mosquitto-PHP

I have installed mosquitto broker on a centos server. for communication I installed Mosquitto-PHP library. publisher and subscriber are working fine on the same server but when I am trying to publish message from this centos server and running…
Sujit Verma
  • 172
  • 1
  • 8
0
votes
0 answers

How can we use mosquitto to send push notification to android users from web server using php?

Can we use Mosquitto instead of https://fcm.googleapis.com/fcm/send to send push notification to android users from web server using php ? if possible then please explain in detail how ? I read many docs of mosquitto but didn't found that we can…
Sujit Verma
  • 172
  • 1
  • 8
0
votes
1 answer

Paho mqtt client got connection lost

I have a little problem about paho mqtt library. I register a callback function MQTTClient_messageArrived and MQTTClient_connectionLost. And I call MQTTClient_subscribe() or MQTTClient_unsubscribe() in this callback function. After running this…
Cloud Lee
  • 31
  • 1
  • 5
0
votes
1 answer

How to subscribe to mosquitto on a yii2 project

I have an yii2 project with the advanced template and I want to implement notifications using a mosquitto broker. I already have the publish part done and working, now I'd like to have some help on subscribing to a topic on my frontend app. I…
0
votes
1 answer

Return in function not working

I am subscribing to data from a MQTT broker with phpMQTT. I have successfully set up a pub / sub routine based on their basic implementation. I can echo the information just fine inside the procmsg() function. However, I need to take the data I…
Mikkel
  • 43
  • 7
0
votes
1 answer

PHP MQTT subscribe not consistent

I am trying to display some values using MQTT on a PHP based page. The PHP code contains the subscriber. I am using Bluemix IoT service for the MQTT broker. Also, the messages are published via Python code on local machine. When I try to display…
Sid411
  • 703
  • 2
  • 9
  • 25
0
votes
2 answers

MQTT Subscribe with PHP to IBM Bluemix

I want to connect to IBM Bluemix through the MQTT protocol using PHP to subscribe to messages come from IoT Foundation. I use this code: 't9m318', 'port' => '1883', 'app_id' =>…
0
votes
1 answer

phpMQTT publish not working

I have installed Mosquitto on the server, and it's running, and working fine. I have installed Paho mqtt client plugin to check. and I wrote the code for android and it's working fine on the emulator. now in my own computer everything works fine, I…
M D P
  • 4,525
  • 2
  • 23
  • 35
-1
votes
1 answer

I'm having trouble getting JavaScript variables passed to a php script

I'm trying to set up a webpage with Jquery that will receive button clicks from the user, pass those click values to a PHP script, that will then publish them to a MQTT broker. My connection to the broker seems to be working. I'm having problems…
user3147697
  • 91
  • 1
  • 9
-2
votes
3 answers

I tried to connect MQTTS with my HTTPS server but it didn't work. It works fine on MQTTX but with PHP it doesn't connect

I tried to connect MQTTS with my HTTPS server but it didn't work. It works fine on MQTTX but with PHP it doesn't connect.
1
2