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

Node Red integration with hc2 SOLVED


MARCUSP.I.L

Question

I wondered if anyone can point me in the right direction to find help with setting up basic node red structures for hc2? using node-red-contrib-fibaro-hc2 by @10der .I have a node red flow which turns on my tv , turns on netflix or youtube or live tv , all with wol command.

I want to run this from a device or scene from hc2. I can post from node red to hc2 -no problem but can't find a way to get commands from hc2, any ideas ??

 

Edited by MARCUSP.I.L
Link to comment
Share on other sites

Recommended Posts

  • 0

@MARCUSP.I.L just install from node-red MQTT node-red plugin 

Look at the pic 

Please login or register to see this link.

thats all is you do not want dancing with raspberry pi apt-get install editing configs etc 

Link to comment
Share on other sites

  • 0
18 minutes ago, 10der said:

@MARCUSP.I.L just install from node-red MQTT node-red plugin 

Look at the pic 

Please login or register to see this link.

thats all is you do not want dancing with raspberry pi apt-get install editing configs etc 

I get it that node is the bridge

Link to comment
Share on other sites

  • 0
  • Inquirer
  • Any luck @Jamie mccrostie? Man oh Man , round and round.....

    Understand from last reply from @10der that the set up is,

    install npm install node-red-contrib-mqtt-broker, (remembering to install it in node red directory i.e.  

                            $ node-red

                             install npm install node-red-contrib-mqtt-broker) ,

                                        took ages to figure this out,thanks git hub

    That gave me a mosca broker , set up with defaults, and i used mqtt node in and mqtt node out, both with node red ip and mosca port nr.

    So far so good, get connection after 10 secs and steaming ahead....publish and subscribe to mqtt box working as a side treat.

    However , the setup for mqtt VD hc2 is a little blurred.  I set up ip and port to standard 127.0.0.1 port 11111 and changed url in main loop to my mqtt settings. Created global variable Last Check , and debugged , no messages.

    Got the basics but how on this earth do i get the hc2 device to work ?

    Little frustrated , interested less and less by trial and error , feel a distinct need to send the whole enterprise the way of the dodo.... Thanks in advance for any suggestions.

    Edited by MARCUSP.I.L
    Link to comment
    Share on other sites

    • 0
    6 hours ago, MARCUSP.I.L said:

    install npm install node-red-contrib-mqtt-broker, (remembering to install it in node red directory i.e.  

    why you do not install from UI?

    Please login or register to see this image.

     

     

    you do not need to install VD / php / etc

    just use node-red-contrib-fibaro-hc2 ease and simple!!!!

     

    Link to comment
    Share on other sites

    • 0
    9 hours ago, MARCUSP.I.L said:

    the setup for mqtt VD

    forget it not needed replaced by device node and server node

     

    9 hours ago, MARCUSP.I.L said:

    how on this earth do i get the hc2 device to work

    Worked this out via reading old posts

    This shows Device setup I got working. It shows kitchen table dimmer at 38%

     

     

    Please login or register to see this attachment.

     

     

    .....And device off

     

    Please login or register to see this image.

    /monthly_2019_05/2060928316_deviceoff.PNG.16e85ce9ce13e09a8f8a54a6cfb96e9b.PNG" alt="2060928316_deviceoff.PNG.16e85ce9ce13e09a8f8a54a6cfb96e9b.PNG" />

     

    Inject node "poll" needs a "0" as payload

    Please login or register to see this attachment.

     

     

    Link to comment
    Share on other sites

    • 0

    1) please remove all

     

    2) import this

    Please login or register to see this code.

    3) configure mqtt server ip address

    4) configure hc2

    turn on debug

    and you should see debug info from your HC2

    Please login or register to see this image.

    turn off debugging

    uvERBYapH5.png

     

    so, now we can connect 1st device

     

    1) drop mqtt in

    2) drop 

    hc2-device

     

    3) connect mqtt in to hc2-device

    4) setup Hc2 server in device

    XdbkNbkxL4.png

     

    5) try key any device name in inputline QEQY6TEfUN.png

    press fnDbLwNmbW.png

    and pick up your device

    6) add /value

    GfZuqaj6Ou.png

     

    70fo9ULQLD.png

    9LNbttsF22.png

     

     

     

     

    Edited by 10der
    • Thanks 1
    Link to comment
    Share on other sites

    • 0

    ok no output

    Hc2 flashing under node with time stamp

    Please login or register to see this image.

    /monthly_2019_05/10.PNG.85a5dd1b0b667efffa9ea14ee050c73b.PNG" alt="10.PNG.85a5dd1b0b667efffa9ea14ee050c73b.PNG" />

    Link to comment
    Share on other sites

    • 0

    Good!!!!! very good!

    but you forgot about GREEN button. just press here

    Please login or register to see this image.

    Link to comment
    Share on other sites

    • 0

    right so "re-init" inject causes to continually poll

     

    Re device... first poll good then error?

    Please login or register to see this image.

    /monthly_2019_05/err.PNG.608c668fa703cb4123c79d6ed40aeb2b.PNG" alt="err.PNG.608c668fa703cb4123c79d6ed40aeb2b.PNG" />

     

    Link to comment
    Share on other sites

    • 0
    10 minutes ago, Jamie mccrostie said:

    right so "re-init" inject causes to continually poll

    once an hour we re-init all device. we can disable it. for example. if you do not infrequent do renaming devices or add/remove devices/.

     

    10 minutes ago, Jamie mccrostie said:

    Re device... first poll good then error?

    show me flow.

    idk

    Edited by 10der
    Link to comment
    Share on other sites

    • 0
    12 minutes ago, Jamie mccrostie said:

    Must remember to hit deploy after deleting.

    it flash RED for this =)

    Link to comment
    Share on other sites

    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...