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

amatt

Question

Can someone help me with Node-Red?

 

I need to tell node-Red to change a global value in HC2.

 

Thanks for the Help

Link to comment
Share on other sites

13 answers to this question

Recommended Posts

  • 0

node-red-contrib-fibaro-hc2

0.0.75

but this version still in development. no ETA. sorry

 

but you can use simple flow

 

Please login or register to see this code.

 

do not forget chage HC Ip address + set basic auth 

 

Link to comment
Share on other sites

  • 0
Guest kallecux

Hi there!

 

Do you have newer information to modify a global variable via node red?

 

Greetings!

Karl Heinz 

Link to comment
Share on other sites

  • 0

todo plan

 

1) fix reconenction on network errors

2) set global vars

 

when? maybe ath this weekend.

Link to comment
Share on other sites

  • 0

yes

oops: UPD no

only changed values :(

 

topic has name home/globalVariables

 

 

Edited by 10der
Link to comment
Share on other sites

  • 0

hoi 10der

i am totally new with node-red but wanted to try your "simple" flow

i have set my ip and credentials like this

http://user:password@ipHC2/api/globalVariables/{{{topic}}}

where put i my global like for example the global in HC2 = marantz into this flow

 

is it also possible to put the payload directly into the global of HC2 for example if i say to google or alexa or siri set input marantz to hdmi2

Link to comment
Share on other sites

  • 0

@Kage sorry, not sure what I right understand you

1st what url is? My not not required any http

2nd yes my node can’t change global var 

3d you can’t change global var if user is not admin

so, if you want to change global  var please simple create a new VD with button where you can. Change global var and call press this button from NodeRed

Link to comment
Share on other sites

  • 0

thx for quick replay,

 

This is what i wanted to do,

say to Alexa "set volume to 40

i have a global named marantzVol 

and the payload is, when i say the line, 40

now when the payload is 40 that is what i wand into my global to HC2 ?

 

When i youse your flow as above you mention change ip and basic auth.

so i did like

http://user:password@ipHC2/api/globalVariables/{{{topic}}}

 

do i have to change de topic in this line or where do i put my global from HC2 in

 

 

 

I get the variable to change only it is the value that is given as Ololo.

now only if it can be the payload of ALexa

 

Edited by Kage
progress
Link to comment
Share on other sites

  • 0

For what purposes you are trying to use HC?
node red has a native tons ready for use solution for Alexa/ sonos etc

its look like tripping from Ukraine Lviv to Poland Kraków (~300km) via for  example Los Angles 

Link to comment
Share on other sites

  • 0

When i say the frase "Alexa set reciever at 40" than the global in HC2 have to change in 40, That triggers a scene that controls the Marantz.

 

For now i get it to work only for text not numbers

i change the text value Ololo into a msg whit value payload

than when i say a frease like "On" it change the global in HC to ON

but whit numbers only it will not work.......Yet

 

 

Link to comment
Share on other sites

  • 0

HC2 (and not HC3) can hook parameters when you calling scenes 

why you use global s for it?!
just encode your parameters  to table and pass to call as last parameter 

in scene you can hook this parameters 

no global var at all

Link to comment
Share on other sites

  • 0

i know it can be done by parameters directly into a scene but i am new with node-red and this is stap one ?

 

its not only for the Marantz but this is de testcase for me now

 

so for completing the first stap, how can i change the number from Alexa into a text-value, 8 must be "8"

 

GOT IT!!?

made a function with

var x = msg.payload;

if (x>0) {
 var msg_o = {payload : String(msg.payload)}

 

 

thx again

just playing with it, just raining outside

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

  • 0

So global isn't a option because there is nog trigger if you work with startSource.

Then trigger it to startScene like 10der says. ☹️?

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