CORE2 HIVEMQ



  • 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
    Felix

    It 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 to true. The root certificates are used to verify the broker.

    I believe that in UiFlow keyFile and certFile 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 on SSL.

    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:

    0_1646259139268_UiFlow_HIVEMQ_20220302.png

    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:

    0_1646259139268_UiFlow_HIVEMQ_20220302.png

    Thanks
    Felix

    Thanks @felmue Have you contacted @IAMLIUBO about this issue and reported it in the UIFlow 1.9.2 discussion?



  • Hi @felmue @ajb2k3

    It finally works. Thank you so much guys for everything. Now I need to change the Qos of the messages I publish to 2, but I think UiFlow does not have that function implemented yet and will add in a future version.

    Javier



  • @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



  • @felmue - I use the desktop 1.0.17 UiFlow version. Also, I did not reload the M5stick but it just stopped working. (??) Is there a way to access/load an older version of UiFlow to try to get this working again? Thanks for all you have done BTW.

    Background: I found a digital signage offering that has both live TV and the customers content. We discovered that it can switch back and forth between the content feeds with MQTT commands.

    We wanted a wearable button that would switch to the client content when annoying TV commercials come on. When we see a TV commercial it can be made to disappear with one press of a button. - FUN!

    We decided to start with HiveMQ because will need fewer than 100 devices but need to sort them into user groups.

    Even at 57 and with no programming skills I can grasp Blockly.

    So........

    Is there another broker similar to HiveMQ Cloud?

    Is there another way to program the M5Stick other than UiFlow so it can publish to HiveMQ knowing that I have no skills?

    We we turn on the M5StickC Plus and it automatically connects to WIFI
    Connect to Hive
    Display "Connected" for 5 seconds
    Send command: {"operation": "layout/set", "parameters": {"layoutId": 2, "length": 360}}
    Display "Published" for 5 seconds
    Display Battery percentage for 5 seconds
    Power off the M5stick. (This gives us 3 to 4 days of use on a single charge)

    This has been a fun project so far - A few weeks ago I did not even know what MQTT was!

    • Paul


  • Hello @LBP-of-MO

    In M5Burner for each M5Stack device there is a drop-down menu through which you should be able to select older UIFlow firmware versions to download and burn.

    Good luck!

    Thanks
    Felix