Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


  • 0

Question

Posted (edited)

Guys, i am using this syntax to work with MQTT, but for some reason, i only got confirmed that client is connected, but never get the subscription confirmation.

I also tried to subscribe to that topic from a nodered client, and there it works.

Anyone any guess? Thanks ahead for any help.

 

Please login or register to see this code.

 

Edited by Neo Andersson

7 answers to this question

Recommended Posts

  • 0
Posted (edited)

This works on HC3 for me (running against an MQTT broker installed on Nodered)
 

Please login or register to see this code.

Please login or register to see this code.

 

Edited by jgab
  • 0
  • Inquirer
  • Posted
    3 minutes ago, jgab said:

    This works on HC3 for me (running against an MQTT broker installed on Nodered)
     

    Please login or register to see this code.

    Please login or register to see this code.

     

    strange, connect callback returns me code 0, so its connected, but the subscription never triggers. Another puzzle..

    • 0
    Posted (edited)

    The option should be 

    Please login or register to see this code.

    not

    Please login or register to see this code.

    Does it make a difference?

    Edited by jgab
    • 0
  • Inquirer
  • Posted
    7 minutes ago, jgab said:

    The option should be 

    Please login or register to see this code.

    not

    Please login or register to see this code.

    Does it make a difference?

    Sorry man, i dont see any difference against my usage..

     

    this is my, and it is exaclty what you suggest, or am i blind?

    Please login or register to see this code.

     

    • 0
    Posted

    In first post you have:

    Please login or register to see this attachment.

     

    • 0
  • Inquirer
  • Posted
    11 minutes ago, jgab said:

    In first post you have:

    Jan, i am telling you, this is coming with age..I was staring at it and did not see the double brackets...sorry..okay now i fixed it..and seems that subscription for the while data with # wildcard works, but i wanted to filter it only for celsuis temperature, so i tried this topic,

     

    Please login or register to see this code.

    but this doesnt work. This is the entire object that is returned

     

     

    ShellyOffice

    online = true
    status
    illuminance:0 = {"id":0,"lux":30,"illumination":"twilight"}
    temperature:0 = {"id":0,"tC":26.1,"tF":79}
    humidity:0 = {"id":0,"rh":35.2}
    ble = {}
    cloud = {"connected":true}
    mqtt = {"connected":true}
    switch:0 = {"id":0,"output":false,"source":"RPC Set"}
    input:0 = {"id":0,"state":false}
    wifi = {"sta_ip":"192.168.100.53","status":"got ip","mac":"00:08:22:A4:B8:9B","ssid":"zolinet1","rssi":-71,"netmask":"255.255.255.0","gw":"192.168.100.1","nameserver":"8.8.8.8"}
    media = {"total_size":0,"total_size_h":"0.000 B","item_counts":{"audio":0,"photo":0,"video":0},"playback":{"enable":false,"buffering":false,"volume":10}}
    devicepower:0 = {"id":0,"external":{"present":true}}
     
    how to subscribe for the status/temperature ?
    (so later in fibaro i can extract the tC part)
    • 0
  • Inquirer
  • Posted
    44 minutes ago, Neo Andersson said:

    Jan, i am telling you, this is coming with age..I was staring at it and did not see the double brackets...sorry..okay now i fixed it..and seems that subscription for the while data with # wildcard works, but i wanted to filter it only for celsuis temperature, so i tried this topic,

     

    Please login or register to see this code.

    but this doesnt work. This is the entire object that is returned

     

     

    ShellyOffice

    online = true
    status
    illuminance:0 = {"id":0,"lux":30,"illumination":"twilight"}
    temperature:0 = {"id":0,"tC":26.1,"tF":79}
    humidity:0 = {"id":0,"rh":35.2}
    ble = {}
    cloud = {"connected":true}
    mqtt = {"connected":true}
    switch:0 = {"id":0,"output":false,"source":"RPC Set"}
    input:0 = {"id":0,"state":false}
    wifi = {"sta_ip":"192.168.100.53","status":"got ip","mac":"00:08:22:A4:B8:9B","ssid":"zolinet1","rssi":-71,"netmask":"255.255.255.0","gw":"192.168.100.1","nameserver":"8.8.8.8"}
    media = {"total_size":0,"total_size_h":"0.000 B","item_counts":{"audio":0,"photo":0,"video":0},"playback":{"enable":false,"buffering":false,"volume":10}}
    devicepower:0 = {"id":0,"external":{"present":true}}
     
    how to subscribe for the status/temperature ?
    (so later in fibaro i can extract the tC part)

    UPDATE:

    Okay, seems that i can use right away the syntax 

    Please login or register to see this code.

     

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Answer this question...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    ×
    ×
    • Create New...