what a real mqtt message looks like - mqtt

I want to publish a message from the device to the mqtt server,but I don't know how to send this message with the correct format, something like json ?please give me some help to figure out this .Thanks a lot.

There is no "correct format" - MQTT is only a transport, it does not define the payload format.

You can send JSON , String , Integer etc... There is no specific format. Whatever you send you will reach the client which subscribed it.Clients connect to a broker by subscribing and/or publishing to topics and accessing the information.

Related

Send a downlink message to TTN via thingsboard

I have integrated thingsboard and ttn to view uplink messages and creating dashboards. I'm interested in sending downlink messages as well. The examples I read ,take input from the uplink and add it as a payload field to the downlink and trigger the message by some change in attributes.
I want to send a custom payload (6 bytes) every hour and also change it based on user input.
Any help is appreciated.
Sorry for silly questions, newbie here...
Cheers

send message from metatrader4 to telegram bot in python

I am working on automating the trade signals generated in metatrader 4. Idea is to encode the buy/sell signals into message and send to a python telegram receiver code which will decode the message and take appropriate action (like placing orders with broker using broker provided python APIs). any idea how this can be done?
I have so far tried below code, which receives message from my telegram account and replies same text back.
https://github.com/python-telegram-bot/python-telegram-bot/blob/master/examples/echobot2.py
my requirement is instead of using telegram account on mobile, i need it in the metatrader
today with bit of struggle i figured out a way to achieve my requirement. not an efficient solution but its working. so i am explaining below,
MT4 EA code: once buy/sell signals generated, a message is sent to my first telegram bot (call it A_bot).
A_bot: forwards the received message to second bot(call it B_bot)
python server on vps: same token as that of B_bot is listening to incoming messages. in other words python version of B_bot is listening to incoming messages.
so when A_bot forwards the message recieved by MT4 EA to B_bot, copy of same message is received is received by python server. So in python server code now i am able to process the message and place order accordingly.
so the original problem is i can't do this with just A_bot. there is an extra step involved to forward message from one telegram bot to another to make it work. for this i am using android app Tforwarder.

Twilio - Digium: Sending FAX using T.38

I do not know if this is the appropriate forum for asking help for my issue, in case it is not i would like to apologies for any inconvenience.
So, the story goes somehow like that, i have purchased a number from Twilio in order to use it for sending/receiving faxes. Our Telephony System is a Digium switchvox and i have also configured a Cisco CUBE to the edge of my network.
When we try to send a fax, we can see that the packet reaches Twilio, but there is an error:
Error - 32102
SIP: Bad SDP
Please let me know if you had the chance to make it work.
Kind Regards,
Twilio don't support t.38
You can't archive that through twilio as a provider

can I send a request via publish subscriber model

My question is related to pub and sub communication model. Specifically, can I send a request via this system. for example, If I'm the publisher, can I send a request to the subscribers saying I need more information about your system or some information about a specific thing. what i know that I can only publish data, but I do not know if I can send a request.
Yes, you can, the question is how correct is the use of the protocol for that..
Your client can pub a topic home/xoce/readyToGetInfo/ true and maybe all other clients subscribed to that topic can readdct to that and begin to push
home/xoce/temperature/ 11.11
but it looks very weird...

Fetch MessgaeSid (SmsSid) of the message i send. When Someone replies to my message

I am Developing a Sms Convesation Application using Twilio API. What My Application does is It Send SMS to Mobile device prompting some options to chose. Users should reply back with anyone of the given option. What i want is when someone replies back to my application, I want the MessageSid of sent message(Message sent from Application). How can I acheive this? Please Help me
Twilio evangelist here.
There is no way to get the sid of a previous message from an inbound message since we don't track that. The SMS protocol has no facility for a "conversation" in it so we don't know that the inbound message is a "reply" to anything.
What you need to do is store in your app the fact that you sent a text message to a specific phone number. Then when that user replies from that number you would be able to know that you had previously sent them a message.
Hope that helps.
Devin
I don't believe this is possible. SMS messages are "stateless", much like HTTP requests. The only thing you could use like a session id would be the phone number. What about tracking conversation history by mapping an array of MessageSids to the phone number?

Resources