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


HC(x) + NODE-RED


10der

Recommended Posts

Thanks for the quick reply. Does this mean I need mqtt to make it work with the hc3?

 

I've installed your node-red node for FIBARO HCx on a Raspberry 4 and executed the following flow to read the light level of a Fibaro Motion sensor attached to a HC3 :

 

Please login or register to see this attachment.

 

The green ready status is blinking below fibaroEvent so connection to the HC3 seems to work and I get the correct light level of 69 after deploying the flow. But I do not get any additional debugging message, when the light level changes nor does the status value below the Fibaro Light Sensor node change.

 

Maybe I'm doing something wrong?

Link to comment
Share on other sites

  • Topic Author
  • 15 minutes ago, Automator said:

    Does this mean I need mqtt to make it work with the hc3?

     

    up to u. 

    node is not not required mqtt

     

    15 minutes ago, Automator said:

    But I do not get any additional debugging message, when the light level changes nor does the status value below the Fibaro Light Sensor node change.

     

    Maybe I'm doing something wrong?

     

    1) in teh node blinking - node working...

    2) should be updateed

    3) enable check passthrow and connect debuger

     

    Please login or register to see this image.

    /monthly_2020_07/image.png.b448efe757521c4f1ddd55e3ba22643f.png" />

     

     

    Edited by 10der
    Link to comment
    Share on other sites

    Are there any benefits in using mqtt for the communication or do you use it just because you have a mqtt broker already installed for communication with other services? I try to keep the number of services minimal so in case there are no benefits just for communication wit the hc I tend not to use mqtt until I have a special use case where it is necessary.

     

    Did what you asked. Filtered the events from HC3 for ID = 162 and property = value otherwise it is hard to spot the ones for the Fibaro light sensor in the stream of events:

     

    Please login or register to see this attachment.

     

    As you can see, the sensor gets its initial value (599) immediately after the node is deployed. The value doesn't change afterwards.

     

    But in the DevicePropertyUpdatedEvent from the HC3 API node the value changes correctly. Occasionally the event is sent twice but it is always sent when the light intensity changes.

     

    Somehow the hc:sensor node doesn't get triggered to update its value according to the DevicePropertyUpdatedEvent.

     

    Addition: If I manually trigger a Fibaro query:state node pointed at Device ID 162, I get the correct value in the payload.

    Edited by Automator
    Link to comment
    Share on other sites

  • Topic Author
  • strange.

    maybe its'a bug.

    leyt me check

    reproducing,.,

     

    Please login or register to see this image.

    /monthly_2020_07/image.png.92a756be50a736e973337343a6abec44.png" />

     

    ok. cover sensor with black paper

     

    image.png.27d53fcf703e5c9065d328c9e848320f.png

     

    un-cover again

     

    image.png.32cd09a1868d31fae7205d21123b8310.png

     

     

    Link to comment
    Share on other sites

  • Topic Author
  • btw

     

    Please login or register to see this image.

    /monthly_2020_07/image.png.1942c6f819a379eda31cd045555b498a.png" />

     

    can you change Id on numeric id?

     

     

     

    image.png.c8312eca458de08870d6d8a777fc4c1a.png

    Edited by 10der
    Link to comment
    Share on other sites

    Changed it and now it works. Many thanks for spotting my mistake.

    The 159.0.2 was the autogenerated name by HC3 for the sensor.

     

    May I ask again my question concerning mqtt?

     

    Are there any benefits in using mqtt for the communication or do you use it just because you have a mqtt broker already installed for communication with other services? I try to keep the number of services minimal so in case there are no benefits just for communication wit the hc I tend not to use mqtt until I have a special use case where it is necessary. 

     

    When I connected to node red to change the ID to numeric, the Fibaro API node showed an error, that it cannot connect to the HC3. Reason was, the HC3 had crashed and I had to power cycle it to work again. This has not happened during the 2 month I have the HC3. It can be just a random coincidence and completely unrelated to the Fibaro api note, that was connected to the HC3 during the crash. But would a mqtt broker in-between node red and HC3 put less stress on the HC3 and make the communication more stable?

    Edited by Automator
    Link to comment
    Share on other sites

    • 1 month later...

    hello good morning @10der,

    Any idea how to solve this error?

    According log PI and Nodered have the latest version

    Please login or register to see this attachment.

     

    Thanks in advance,

    //Sjakie

     

     

    Link to comment
    Share on other sites

  • Topic Author
  • added you to private forum for HC + NODE-RED

    Link to comment
    Share on other sites

    • 6 months later...

    I'm using node-red-contrib-fibaro-devices. I'm trying to control a virtual binary sensor and nothing. The virtual switch works well, but the sensor doesn't want to. I have a bunch: motion cameras must activate the sensor, and then the HC3 processes it.

    From the QA itself it looks like self: updateProperty ("value", true) is exactly the same in the switch. Help me please

    Link to comment
    Share on other sites

    • 4 weeks later...

    Can someone share how to set percentage value to Light or Roller shutter?

    I have tried node-red and I`m able to control On/Open Off/Close but have no idea how to set certain value.

     

    Thanks :)

    Link to comment
    Share on other sites

    OK, got it :)

    i was missing this part: /api/callAction?deviceID=602&name=setValue&arg1={{payload}}

    • Thanks 1
    Link to comment
    Share on other sites

    • 10 months later...

    Hello

    I need some help here. 

    I have 2 flow in Node-red and I am not sure how to run them separately

    Announcement

    Please login or register to see this attachment.

    This on I can activate/run from HC3 with this command I have in a quick app

    self:getHttp("http://192.168.0.75:1880/googlehome?announcement=front%20gate%20is%20opening%20now")

     

    Camera stream

    Please login or register to see this attachment.

    I have no idea how to run this flow.

    self:getHttp("http://192.168.0.75:1880/googlehome?announcement=XXXXXXXXX")

     

    I did try to create one called  

    Please login or register to see this link.

    ? (In node-red) not working (from fibaro smart home) http GET

    This issues is I am using the announcement with different quick app – announcing different announcement

     

    So if i link them everytime i get an announcement the camera are shown and I only want to show the camera when the “doorbell” and "gate" quick app is running from a scene

    Can anyone guide in the right direction

    THX

    martin

    Link to comment
    Share on other sites

    • 3 months later...

    I was hoping to change the temperature of a HC3 Quick App Temperature sensor, via node red, just cant get anything to work, any ideas ?

    Link to comment
    Share on other sites

    • 5 weeks later...
    On 1/12/2020 at 4:17 PM, Guest kallecux said:

    Hi 10der!

     

    Is there a way to change a global variable?

     

    I found different informations in the forum, but .....

     

    Thanks for your good job!

    Karl Heinz 

    Hi was looking for the same information, i have a  global variable i needed to change

    change node data to change my darkness global variable

    {
        "name": "Darkness",
        "value": "1",
        "readOnly": false,
        "isEnum": false
    }

     

     

    Please login or register to see this image.

    /monthly_2022_05/image.png.c0065321c0e9d7b1e47cf612eff3fd37.png" />

    image.png.87372d7ab0593469340eef756dba790d.png
     

    image.png.2fe460a020f00ba33441c46ea393624f.png

     

     

     

     

     

     

     

     

    Link to comment
    Share on other sites

    • 2 weeks later...

    Hi,

    Have a question about updating the field of a Fibaro Virtual Device. I am quite new to node red, so this is probably a really stupid question.

    I have the code working with the node-red in the example: this uses a fibaroXActor node to update the field on the VD. And this works fine.
    However, I'd need to replace the hardcoded value in the JSON with a value from the message object (e.g. msg.value). How do I do this?

    While at it (since I have not yet found any doc for the fibaroXActor node):
    What is the significance of "Hello" and "topic 1590" in the message object?

    Why must I fill in both Properties and Actions in the fibaroXActor node, while only Actions seems to have any significance.


    Thank you

    Please login or register to see this attachment.

    Link to comment
    Share on other sites

    • 4 months later...

    Hi All,

     

    So I've been racking my brains a bit which is bad for an old guy like me.

    Recently it looks like Google assistant has stopped working with the Harmony Hub. No issues as I have the Harmony node red installed on my palette - and it works brilliantly for activities and commands.

     

    So I have been trying to use the Fibaro API node red nodes. While this has been successfully logging temperatures etc for me in the past - I cannot seem to get an instant state change from any of the nodes.

     

    I'd appreciate it if someone could let me know:

     

    1. For the API node I have the polling set to 1s although this is quite frequent to log temperatures etc at.

    Is there a way to have the updates triggered by a change rather than polling?

    I normally keep the polling at 10S for the number of values being requested 

     

     

    Please login or register to see this image.

    /monthly_2022_10/image.png.a0ff988add0ffb84cb4be9efe620f21f.png" />

     

     

    2. I have tried the following nodes to receive the trigger from a QA:

    Basically its a binary switch which when turned on - waits for 1s then turns off.

     

    image.png.16ebd27ab5defff40dfc84f3ac2764a4.png

     

    I TRIED A SENSOR NODE:

     

    image.png.96636f3ba4b912d71e7c894d2451ad77.png

     

    And this appears to send through the true then false state based on the API polling time but I am wondering if there is a way to get the status change as an event?

    That way I could keep the polling at 10 seconds and still have binary switches work "instantaneously"?

     

     

     

     

    I have also tried an events node:

     

    image.png.4d35ef409daa88d457a26dee00a1422d.png

     

     

    And even tried an actor node.

     

    None of them appear to pickup the change from the QA. To be honest Im not really sure what each node is used for specifically and how they should be setup. Is there any further detail on this? I have looked through the thread but cannot find the detail I am looking for.

     

     

    Thanks

     

    Anthony

     

     

     

    Link to comment
    Share on other sites

    • 1 month later...

    if i run in NodeRed a http request for my HC2 it is

    http://user:password@ip/api/sceneControl?id=20&action=start (works great)

    I think it is for my HC3

    http://user:password@ip/api/scenes/20/execute (doesn't work)

     

    But that doesn't work. In my browser it works for HC2 and HC3

     

    Can someone help me with this. thx

     

    Link to comment
    Share on other sites

    • 11 months later...

    is there a way to get more than 1 payload values to HC3

    /api/plugins/callUIEvent?deviceID={{ID}}&elementName=Trigger&eventType=onChanged&value={{data}}

    payload data tru NodeRed =16

    in HC3 i get UIEvent: {"deviceId":966,"values":[16],"eventType":"onChanged","elementName":"Trigger"}

     

    in values i wanted a extra static number like 999 from NodeRed

     

     

    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
    Reply to this topic...

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