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

ok. dear. lets go step by step.

so,. you send command to GA,

GA (I do not know how,. cuz I do not have any android devices at home) send command to NODE-RED.

As I can undetsnad node-red has ready for use node for interpret GA commands.

please fix me i am wrong,

 

so, next step we want interpret DA command via node to HC2 to set thermostat mode / temp /etc.

so 1s we shoukd understand / find commands for thermostat.

 

so now time for creating a new empty flow

drop HC2 device with your thermostat

also drop here inject node

 

Please login or register to see this image.

/monthly_2019_07/image.png.9bd2f2d76ba39e0c8c8a93cafee5e953.png" />

 

so, 

Please login or register to see this link.

 - turn off 

Please login or register to see this link.

  thermostat

Please login or register to see this link.

1 - turn on (heating) 

Please login or register to see this link.

  thermostat

 

back to node-red

edit inject mode

 

image.png.574f206926b71b6ba376645bbafedf56.png

 

Please login or register to see this code.

 

save / deploy

 

now we can inject nad your thermostat in Hc2 and real thermostat should be swithced to heating mode

 

so., now you can send any command to HC2, 

on, !@MARCUSP.I.L on!

 

Edited by 10der
Link to comment
Share on other sites

  • 0
  • Inquirer
  • Thanks @10der fro you assistance and indeed for the brilliant node red nodes, working great with voice commands.

    Thanking you also for recent help with Tv state , also working great with voice commands and scenes.

    Enjoy the summer :)

    Please login or register to see this attachment.

    working great now. Thank you for your time, brilliant !!

     

     

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

    • 0

    @MARCUSP.I.L what module you use for GA in node-red?

    update, sorry I can't see...it's nora

    Edited by drboss
    Link to comment
    Share on other sites

    • 0

    But @MARCUSP.I.L, can you send me export of your flow with GA (this is from diagram in your post) as example for me. I beginner in node-red :-(

    Link to comment
    Share on other sites

    • 0

    hi 10der you can send me the flow pls? i want to import it to my node red, i can learn many from your flow i hope

    Link to comment
    Share on other sites

    • 0

    @10der we wait for it, when You publish new version.

    BTW, can you resolve issue: when exist in system z-wave device without "value" property FibaroNode generate debug error: "SyntaxError: Unexpected token | in JSON at position 0"

    And another small problem (new functionality) for thermostat devices: To add to queryState possibility to retrieve not only value and time of modification but property "State" or "Mode". Many device not change "value" but only "State" or "Mode"

    And last question this time: what doing inject "device/1 {}" in your flow example? 

    And thanks for big good work.

    Link to comment
    Share on other sites

    • 0
    6 hours ago, drboss said:

    @10der we wait for it, when You publish new version.

    BTW, can you resolve issue: when exist in system z-wave device without "value" property FibaroNode generate debug error: "SyntaxError: Unexpected token | in JSON at position 0"

    And another small problem (new functionality) for thermostat devices: To add to queryState possibility to retrieve not only value and time of modification but property "State" or "Mode". Many device not change "value" but only "State" or "Mode"

    And last question this time: what doing inject "device/1 {}" in your flow example? 

    And thanks for big good work.

    dear boss. already fixed in this ver.

    but this v er is not compatiba;e with old :(

    re-wriien

    Link to comment
    Share on other sites

    • 0

    @drboss this ver can work in two modes.

    1) simple mode. when you have only 4 device types. 2 for in 2 for out.

    you can simple hook any events for in devices and simple turn on / off any dimmers / relays

    simple drop device / setup HCx server and that's all. no MQTT no other things

    2) for adv users. HC server can produce MQTT messages for all event from HC. all it's means all evenets what you can handle by LUA in header including central events etc

    3) also you can pass some command to HC2 directy 

    Please login or register to see this attachment.

     

    Please login or register to see this image.

    /monthly_2020_01/image.png.5cb70c3ab3149219fc771778e7e4f579.png" />

     

    ok. trying to query state of my thermosyay

     

    inject - devices/1483/properties/mode

     

    1/4/2020, 8:25:42 AM

    Please login or register to see this link.

    devices/1483/properties/mode : msg.payload : Object

    object

    value: 1
    modified: 1577024075
    yes - heating 
     
     
    and last. in adv mode you can handle any evenets and values (mode / blabla etc) 
    all values for devices pass to MQTT as ras values in payload 
     
    for example
     
    1/4/2020, 8:27:16 AM

    Please login or register to see this link.

    home/status/1199 : msg.payload : number
    28
    1/4/2020, 8:27:21 AM

    Please login or register to see this link.

    home/status/727 : msg.payload : number
    12
    1/4/2020, 8:27:22 AM

    Please login or register to see this link.

    home/status/1283 : msg.payload : number

    45

     

     
     
    any others properties as object. for example
     
    1/4/2020, 8:28:13 AM

    Please login or register to see this link.

    home/status/1442 : msg.payload : Object
    object
    property: "lastBreached"
    value: 1578119292
     
    1/4/2020, 8:28:37 AM

    Please login or register to see this link.

    home/status/1131 : msg.payload : Object
    object
    property: "energy"
    value: 12631.04
     
     
     

     

     

    about 

    image.png.6534df1f5aad59c377ef927fbcf161d0.png

     

    just for test turn on of my neocoolcam switch. you can pass to binary swither in payload 0 / 1 / true / falase / turnOn / turnOff

    Link to comment
    Share on other sites

    • 0

    custom actor

     

    Please login or register to see this image.

    /monthly_2020_01/image.png.d87a529a2616edde722ca7409944f5ff.png" />

     

    image.png.3e6dab0e46115a759eba4b17a25fff1a.png

     

     

    • Thanks 1
    Link to comment
    Share on other sites

    • 0

    thx, I serched in repo by "HC2" not by  "fibaro", founded and I start testing on my system;-)

    thx

    • Thanks 1
    Link to comment
    Share on other sites

    • 0

    0.0.4 1 day ago

     

    stop!/ it's initial version! now 0.0.8

    crazy

     

    Successfully published [email protected]
    npm Inc [email protected] через amazonses.com 

    A new version of the package node-red-contrib-fibaro-devices (0.0.10) was published at 2020-01-05T15:05:02.897Z from
    194.x.x.x. The shasum of this package was 5b5dd65b741bc8a8b764c3c4990b94f785840bd6.

    If you have questions or security concerns, you can reply to this message or
    email [email protected].

    npm loves you.

    @drboss

    Please login or register to see this link.

    • Thanks 2
    Link to comment
    Share on other sites

    • 0

    fast progress ;-) ..0.12  now. 

    BTW On 

    Please login or register to see this link.

     still 0.4 when serching

    image.png.3e63014e00745675ee51eda5004ff117.pngimage.png.39d0e31c72f97e8b1786225ed7edd5ca.png

    And not posible to update:

    Please login or register to see this attachment.

    but after remove 0.4 and doing npm i .... it install 0.12 ;-)

     

    Edited by drboss
    Link to comment
    Share on other sites

    • 0

    The node help for new fibaroAPI is displayed in 'old' hc2server node:

    Please login or register to see this attachment.

    Link to comment
    Share on other sites

    • 0

    lol

    btw, now poller do not require inject with periodic.

    HC2 now can poll HC without inject node

    Link to comment
    Share on other sites

    • 0

    dashboard

     

    Please login or register to see this code.

    Please login or register to see this image.

    /monthly_2020_01/image.png.d0db48145b36156674f573eab053afd4.png" />

     

    image.png.6267f0d9c0ec8a2df61a4c3fd181e0f7.png

    Edited by 10der
    Link to comment
    Share on other sites

    • 0

    please UPDATE to .14

    bug with resource deallocation and connection to HC.

    important!

    Link to comment
    Share on other sites

    • 0

    weather forecast (zambrettiI)

     

    Please login or register to see this image.

    /monthly_2020_01/image.png.ece7feeaa1cbedf41db375e863455db8.png" />

     

    Please login or register to see this code.

     

    image.png.c7a0ca11b001cc06f40da5f68690d000.png

    Edited by 10der
    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...