Smart Nora

Moderator: leecollings

User avatar
FireWizard
Posts: 1770
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Smart Nora

Post by FireWizard »

Hi, @Gravityz

You wonder:
regarding the new functionality in the smartnora nodes to filter out topics.

my guess is that when you use this functionality it will create a lot of workload on nora since every nodes gets multiple communication strings
No, don't worry.

You have already a switch, just after the MQTT input node. This splits e.g. the On/Off switches and the dimmers, plus anything else you want to add.

So only devices with msg.payload.switchType === On/Off will come trough.

How many do you have in your house? I have at the moment 10 pieces.

Domoticz sends only a message as the switch is updated, so in this case, if it is switched from Off to On or On to Off.

How often do you operate the switches from Domoticz, either manual, included in a scene, part of a script or timer based?
Not that often, that it will become a problem for the SmartNora node.
If i leave the switch in place this will reduce this workload a lot
I do not think so. I think extra nodes make the flow more complex and may cause also a workload.

Regards
Thelion
Posts: 54
Joined: Saturday 08 October 2016 12:15
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: The Netherlands
Contact:

Re: Smart Nora

Post by Thelion »

How do I put the temperature and humidity from a sensor in Domoticz into Google using Node-RED and Smart NORA.

My sensor puts temperature in msg.payload.svalue1 and humidity in msg.payload.svalue2, but I can't get it into the correct format so the sensor in Google (used this: https://github.com/andrei-tatar/node-re ... des/sensor) accepts the values.

I've got switches and dimmers working, but temperature/humidity seems to be on a completely different level ;-)
User avatar
FireWizard
Posts: 1770
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Smart Nora

Post by FireWizard »

Hello @Thelion,

From your MQTT Input node, with topic "domoticz/out" (without " ") and Output as "a parsed JSON object", you should connect a "Function" node with the following contents:

Code: Select all

let temp = msg.payload.svalue1;
let hum = msg.payload.svalue2;

msg. payload = {
    temperature: parseInt(temp),
    humidity: parseInt(hum)
}
return msg;
Connect the output of this "Function" node to the SmartNORA node.
Do not forget to tick the boxes marked "Temperature" and Humidity".

I did not test it, as I do not use SmartNORA, but it should work.

Regards
Thelion
Posts: 54
Joined: Saturday 08 October 2016 12:15
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: The Netherlands
Contact:

Re: Smart Nora

Post by Thelion »

FireWizard wrote: Saturday 29 October 2022 21:43 Connect the output of this "Function" node to the SmartNORA node.
Do not forget to tick the boxes marked "Temperature" and Humidity".
Hi @FireWizard,

Thanks for your quick response!

Works great! I added the msg.topic to be able to filter per device.

Code: Select all

temp = msg.payload.svalue1;
hum = msg.payload.svalue2;
msg.topic = msg.payload.idx
msg. payload = {
    temperature: parseInt(temp),
    humidity: parseInt(hum)
}
return msg;
The only thing is that the decimals are stripped from the value. It should be 24.7 and 53.37, but 24 and 53 is passed to the Google sensor.
Any way around this?
User avatar
FireWizard
Posts: 1770
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Smart Nora

Post by FireWizard »

Hello @Thelion,

You asked:
The only thing is that the decimals are stripped from the value. It should be 24.7 and 53.37, but 24 and 53 is passed to the Google sensor.
Any way around this?
This is quite simple.

Replace "parseInt" with "parseFloat", as follows:

Code: Select all

temp = msg.payload.svalue1;
hum = msg.payload.svalue2;
msg.topic = msg.payload.idx;
msg.payload = {
    temperature: parseFloat(temp),
    humidity: parseFloat(hum)
}
return msg;
Regards
Thelion
Posts: 54
Joined: Saturday 08 October 2016 12:15
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: The Netherlands
Contact:

Re: Smart Nora

Post by Thelion »

FireWizard wrote: Sunday 30 October 2022 11:59 Hello @Thelion,

You asked:
The only thing is that the decimals are stripped from the value. It should be 24.7 and 53.37, but 24 and 53 is passed to the Google sensor.
Any way around this?
This is quite simple.

Replace "parseInt" with "parseFloat", as follows:
Yee. That is quite simple. Never has been my strongsuit, there kind of things ;-)
Thanks. Works like a charm!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest