Comments (8)
I think it's fine... Here is how I have it setup:
The red node is the actual hardware switch. So each change (from switch/google/dashboard) is reported back to the others and vice versa.
from node-red-contrib-nora.
from node-red-contrib-nora.
@nosaj66au Maybe you need to connect the Physical Switch
output to the inputs of the dashboard and google home nodes.
from node-red-contrib-nora.
I realize this is closed but I am noticing a similar issue. I'm using an MQTT topic as a secondary "switch" to the nora light node. I can't really tie the two together the way @andrei-tatar did above as the MQTT output payload is different than the nora input payload. Thumbing through the code, it appears I simply need to send a JSON object to the nora node like this (this is actual output from my flow's debug):
{"payload":{"on":true}}
This gets sent to the input of the nora light node but my device in google home never updates. It does update when I toggle the light using the google home app though. Here is my flow:
The GetNoraPayload
function node is just changing the message to match what the nora node is looking for. Code here:
on_off = msg.payload.value;
msg = {};
msg['payload'] = {};
msg.payload['on'] = on_off;
return msg;
Any help or thoughts appreciated. If this works out I'll definitely donate something to the cause!
from node-red-contrib-nora.
I have successfully deployed a working version of this.
The trick was converting the STRING from MQTT to a BOOLEAN state
There is a switch to output true/false then they are converted to the Boolean state. Same on the other end.
I am sure there is a more efficient way to do this, but it works.
from node-red-contrib-nora.
@sarreck can you show what you're doing in your switch and change nodes?
I have my MQTT topic input set to output a parsed JSON object
, so it's definitely not outputting as a string. I verfied by debug the contents are::
{"time":1582090043840,"value":false}
I modified the GetNoraPayload
function to make sure it's outputting what the nora light node needs and here's where it ended up:
on = false;
if (msg.payload.value === true) {
on = true;
}
msg = {};
msg["payload"] = {};
msg.payload.on = on;
return msg;
I verified that output with debug here:
{"on":false}
Which is what the nora light node says it needs to update state.
from node-red-contrib-nora.
from node-red-contrib-nora.
Thanks for this, it made me realize since it's a simple switch (not dimmable or colored) that I just needed to send the raw bool and not the full JSON string. I also noticed with the switch on the screen under google home it wasn't immediately updating, I just had to refresh it or back out to the previous screen, which is no big deal. Thanks!
from node-red-contrib-nora.
Related Issues (20)
- stopped connecting and can not relink HOT 1
- login in NORA app does not work HOT 1
- Google thinks lamps are "offline" HOT 3
- Devices appear twice in Google Home HOT 9
- Looking for volunteers to help with development HOT 19
- Unraid docker
- NORA cannot be reached from Google Home mini HOT 26
- Disadvantages for some google accounts to work with nodered + NORA
- Cannot login to NORA homepage HOT 1
- I cant revoke my Node-Red Token HOT 6
- Unable to access Nora HOT 2
- socket connection error: not authorized HOT 4
- Node Red Flow does not CONNECT anymore. Already took a new TOKEN an edidited Nora.config. No Devices Appear in Google home APP HOT 3
- NORA down? HOT 4
- nm
- how does the speaker node work? HOT 1
- Support for sensor-only devices
- socket connection error: not authorized HOT 2
- Google Home App problem after connecting to Nora HOT 8
- Trouble connecting light - dummy light created instead of control over intended light HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-red-contrib-nora.