CORE2 HIVEMQ
-
Hi, I´m working on M5stack core2 and I want to send messages to my private server in Hivemq with MQTT. The server uses the port 8883. I open my SSL certificates in blockly but when I run the program, the messages don´t appear in my server.¿Any suggestion?
-
Hello @Javi
maybe try your blockly code with a different MQTT broker (e.g. https://test.mosquitto.org) and w/o SSL first? Does that work?
Thanks
Felix -
Have you set the following correctly?
Device ID
Server Instance End Point address,
Correct User Name,
Loggin password/Access key,How is your SSL cert named?
-
@felmue Yes, I can connect it without any problem when I connect it to a server with the 1883 port which doesn´t need ssl certificates, so I imagine is a certificates problem.
-
@ajb2k3 yes, I think it is certificates problems. How can I generate them in a properly way?
-
@javi I don’t know I’ve not used hiveMq and currently working on Access to adafruit services for my book due out this year. Is HiveMq free ?
I did have have an issue with the cert name being over 7 characters and having none letters in it. -
@ajb2k3 I don´t think the cert name is the problem, it is only 4 letters in its name. HiveMQ is free, you can create a private cluster and connect to it. For example when I try to connect to HiveMQ with mosquitto it works perfectly, but when I try to connect it with the uiflow it doesn´t.
-
@javi give me a week and I will see what I can work out.
-
Hello guys
I've setup a HIVEMQ account and I can connect with Arduino or CLI, but I cannot connect with UiFlow. Tried both AWS and Azure backend - same result.
That said, I can connect to my own MQTTs broker using UiFlow and both (my own and HIVEMQ) use the same certificate which makes me wonder about whether the certificate really is the issue here.
I think that maybe the hostname (which for HIVEMQ is rather long) might actually be the issue.
@ajb2k3 : looking forward to your findings.
Thanks
Felix -
@felmue said in CORE2 HIVEMQ:
Hello guys
I've setup a HIVEMQ account and I can connect with Arduino or CLI, but I cannot connect with UiFlow. Tried both AWS and Azure backend - same result.
That said, I can connect to my own MQTTs broker using UiFlow and both (my own and HIVEMQ) use the same certificate which makes me wonder about whether the certificate really is the issue here.
I think that maybe the hostname (which for HIVEMQ is rather long) might actually be the issue.
@ajb2k3 : looking forward to your findings.
Thanks
FelixIt Could be the host name but until I can sort out some issues with MQTT and Adafruit I'm not sure when I will get around to it.
I have someone checking the grammar of my IoT books first draft as we speak but its slow going. -
@felmue Hi, same problem, I can connect HiveMQ with Mosquitto and another clients but not with UiFlow.
-
Hi guys
with UiFlow I can also connect to
test.mosquitto.org
port 8886 (which uses a Lets Encrypt certificate - same as HIVEMQ I believe).For that to work in UiFlow I do not need to upload any certificate or key. I presume UiFlow has some root certificates built in which are used when
SSL
is set totrue
. The root certificates are used to verify the broker.I believe that in UiFlow
keyFile
andcertFile
are used if the client was to be verified on the broker side, but for that to actually work the public client key would need to be uploaded to the broker, but I don't see an UI on HIVEMQ where I could do that.I also experimented with long host names on my local MQTT broker and that worked fine, so my current conclusions are:
- either UIFlow has an issue if a host name has multiple dots in it
- the MQTT version used in UiFlow is not compatible with whatever version is used in HIVEMQ
Thanks
Felix -
Hi @felmue
But I don´t see how it could be a compatibility problem between UiFlow and HIVEMQ as I can connect to HIVEMQ public server. And I also can connect to my private HIVEMQ server with mosquitto. Let´s see if @ajb2k3 find a solution when he is available.
Another question, how could I generate a Lets Encrypt certificate for doing some test with the 8886 port?
Thanks
Javi -
Hello @Javi
I did not have to load any root certificate in UiFlow to connect to
test.mosquitto.org
on port 8886. The only thing I did is turn onSSL
.Too bad the HIVEMQ public broker is a) not using TLS and b) has a short (only two dots) domain. Not really useful for comparison. But yes I agree, the MQTT version argument gets a bit weak (unless TLS required a different version).
Edit: I've just modified my local MQTT broker so it has a similar domain name (same length, same amount of dots) as the HIVEMQ broker and using UiFlow still worked ok. So I guess the number of dots in the domain name is not the issue.
Thanks
Felix -
Hi guys
after long hours of searching and trying different things I finally stumbled over the missing piece here.
For HIVEMQ the
server_hostname
seems to be required which is part of the SSL parameters. In order to add that the regular MQTT block cannot be used, but the Execute block can fix that. Here is what works for me:Thanks
Felix -
Hi @felmue
Thanks for everything but what should I write instead of 'server_hostname' in my case?. When I create my cluster in HiveMQ I only recieve a host url that is what I write in 'HOST'. Maybe I do not have to write anything. I am going to test it and I will say you is something is going wrong.
Javier
-
@felmue said in CORE2 HIVEMQ:
Hi guys
after long hours of searching and trying different things I finally stumbled over the missing piece here.
For HIVEMQ the
server_hostname
seems to be required which is part of the SSL parameters. In order to add that the regular MQTT block cannot be used, but the Execute block can fix that. Here is what works for me:Thanks
FelixThanks @felmue Have you contacted @IAMLIUBO about this issue and reported it in the UIFlow 1.9.2 discussion?
-
-
@ajb2k3 Thanks so much! This worked perfectly on my M5stickcplus. We have been testing this about a week with no issues other than battery life.
Today for some reason it just stopped publishing the message. If we try it from MQTT.fx it still works. Now I am just confused. Could HiveMQ cloud have made a recent change that effected how this works?
This is the first time I have "MQTT'd" or used the M5StickCplus and until tonight it has been a hoot!
The M5sick still looks like it is functioning as it did yesterday. Is it possible it failed in someway? I have burned it and reinstalled the UIFlow program to no avail.
Thanks in advance BTW!
Paul
-
Hello guys
I think the issue is in UiFlow 1.9.5. The MQTT publish command now supports QoS, but it seems that breaks the publishing to HiveMQ. :-(
Thanks
Felix