Coder Social home page Coder Social logo

node-red-contrib-smartthings's People

Contributors

deltachaos avatar dependabot[bot] avatar derek-st avatar johnwalicki avatar otaviojr avatar shawner18 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

node-red-contrib-smartthings's Issues

Can't get events?

I installed using npm install node-red-contrib-smartthings

I have followed the 11 steps and installed the smartApp from code. Set it up for local control and even tried the simulator:

Skærmbillede 2020-01-11 kl  23 49 33

and I get this (which I assume is ok for non-virtual buttons):

Skærmbillede 2020-01-11 kl  23 51 10

And the devices (wemo switch and IKEA remote) are available in the Node-RED nodes:

Skærmbillede 2020-01-11 kl  23 55 08

But I can't get any events in Node-RED and I can't control any devices. Also, the examples don't seem to be working:

Skærmbillede 2020-01-11 kl  23 56 49

What am I missing? Why isn't it working? Any help is greatly appreciated :)

no smartthings/webhook

Hello!

I have installed the node-red-contrib-smartthings without issue and all of the configuration nodes are in the node-red UI. I have generated my smartthings token and applied it without issue and installed the smartapp, and configured it to use the local network.

However, on my local node-red server there is no exposed smartthings/webhook path. I have tried http://:1880/smartthings/webhook and http:///smartthings/webhook. I have also tried both with https. The URL without my node-red port reports there is no http server running there (as expected) and port 1880 reports there is no such path as smartthings/webhook.

Any insights appreciated!

Ecobee Thermostat via Smartthing to NodeRed Not working.

Hi all,
I been reading I have got my philips hue light to smartthing to NodeRed working fine. When the light status changes so does the LED on my dash board. Now when I move to the smartthings thermostat it does not update when a value is change in smartthings or by the ecobee app.. It does change if I redeploy it. Any ideas? I am using the NodeRed WebHook by Otávio Ribeiro [email protected].

[{"id":"3191a77d.d0dee8","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"d16a5d5e.694b5","type":"smartthings-node-thermostat","z":"3191a77d.d0dee8","conf":"2112d7ee.75a448","name":"Main Floor(thermostat)","capability":"thermostat","device":"ee67ebc9-3ca6-4d23-8d36-e87d614798bf","x":120,"y":280,"wires":[["fafcd0a2.8dbaf"],["35fbc7ac.fd97d8"],["2b2ec6fb.cd967a"],["b74416ec.ac9ab8"],["8bd8471.31271b8"],["905767a1.999128"],["1bd558bd.9300d7"]]},{"id":"fafcd0a2.8dbaf","type":"ui_gauge","z":"3191a77d.d0dee8","name":"Livingroom","group":"e3b769c0.51d808","order":4,"width":0,"height":0,"gtype":"gage","title":"Main","label":"{{msg.payload.unit}}","format":"{{msg.payload.value}}","min":"0","max":"100","colors":["#3a8ccb","#00b500","#ca3838"],"seg1":"","seg2":"","x":590,"y":180,"wires":[]},{"id":"b74416ec.ac9ab8","type":"debug","z":"3191a77d.d0dee8","name":"main Thermo","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":670,"y":300,"wires":[]},{"id":"35fbc7ac.fd97d8","type":"function","z":"3191a77d.d0dee8","name":"COOLING","func":"/*var max = 100;\nvar unit = \"F\";\nvar data = \"COOLING +10\"\ncontext.data = context.data || {};\nvar msg2={};\n//msg2.payload=msg.payload.deviceType;\n//node.send(msg2)\nswitch (msg.payload.deviceType)\n{\n    case \"coolingSetpoint\":\n        max = (msg.payload.value) + 10;\n        break;\n}\n\nmsg = {payload:data,ui_control:{max:max},topic:\"COOLING\"};\nreturn msg;\n*/\nmsg = {ui_control:{max:(msg.payload.value)+10}};\nreturn msg;","outputs":1,"noerr":0,"x":350,"y":120,"wires":[["fafcd0a2.8dbaf"]]},{"id":"2b2ec6fb.cd967a","type":"function","z":"3191a77d.d0dee8","name":"HEATING","func":"/*var min = 0;\nvar data = \"HEATING -10\";\nvar unit = \"F\"\ncontext.data = context.data || {};\nvar msg2={};\n//msg2.payload=msg.payload.deviceType;\n//node.send(msg2)\nswitch (msg.payload.deviceType)\n{\n    case \"heatingSetpoint\":\n        min = (msg.payload.value) - 10;\n        break;\n    \n\n}\n\nmsg = {payload:data,ui_control:{min:min},topic:\"Soil\"};\nreturn msg;*/\nmsg = {ui_control:{min:(msg.payload.value)-10}};\nreturn msg;","outputs":1,"noerr":0,"x":340,"y":160,"wires":[["fafcd0a2.8dbaf"]]},{"id":"8bd8471.31271b8","type":"ui_text","z":"3191a77d.d0dee8","group":"e3b769c0.51d808","order":1,"width":0,"height":0,"name":"","label":"Fan Mode:","format":"{{msg.payload.value}}","layout":"row-spread","x":690,"y":340,"wires":[]},{"id":"905767a1.999128","type":"ui_text","z":"3191a77d.d0dee8","group":"e3b769c0.51d808","order":1,"width":0,"height":0,"name":"","label":"Mode:","format":"{{msg.payload.value}}","layout":"row-spread","x":690,"y":400,"wires":[]},{"id":"1bd558bd.9300d7","type":"ui_text","z":"3191a77d.d0dee8","group":"e3b769c0.51d808","order":1,"width":0,"height":0,"name":"","label":"Status:","format":"{{msg.payload.value}}","layout":"row-spread","x":700,"y":440,"wires":[]},{"id":"3f7d073.6770bf8","type":"smartthings-node-onoff","z":"3191a77d.d0dee8","conf":"2112d7ee.75a448","name":"Kitchen Fan 3","device":"e4f6ad55-f10f-4b59-8f28-b90adf5f7789","x":200,"y":40,"wires":[["b7409489.c456f8"]]},{"id":"61b222b4.07231c","type":"ui_led","z":"3191a77d.d0dee8","group":"e3b769c0.51d808","order":4,"width":0,"height":0,"label":"","labelPlacement":"left","labelAlignment":"left","colorForValue":[{"color":"red","value":"false","valueType":"bool"},{"color":"green","value":"true","valueType":"bool"}],"allowColorForValueInMessage":false,"name":"","x":810,"y":40,"wires":[]},{"id":"b7409489.c456f8","type":"change","z":"3191a77d.d0dee8","name":"","rules":[{"t":"change","p":"payload.value","pt":"msg","from":"0","fromt":"num","to":"false","tot":"bool"},{"t":"change","p":"payload.value","pt":"msg","from":"1","fromt":"num","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":460,"y":40,"wires":[["a42196c9.d9e888"]]},{"id":"a42196c9.d9e888","type":"change","z":"3191a77d.d0dee8","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":640,"y":60,"wires":[["61b222b4.07231c"]]},{"id":"2112d7ee.75a448","type":"smartthings-config","z":"","name":"MyToken","token":"7735097c-73ae-4f63-90d6-73f459230446"},{"id":"e3b769c0.51d808","type":"ui_group","z":"","name":"Livingroom","tab":"37e2dcb9.596df4","order":3,"disp":true,"width":"6","collapse":false},{"id":"37e2dcb9.596df4","type":"ui_tab","z":"","name":"House","icon":"dashboard","order":2,"disabled":false,"hidden":false}]

Button support

I recently got a Smartthings button. There does not appear to be support for it, can it be added? The button supports single press, double press, and long press (hold).

Can't set coolingSetpoint of Samsung A/C over Thermostat node

Hello
I'm trying to setup a cooling setpoint of Samsung A/C using Thermostat Node.
I can already switch this A/C on and off using switch node, but with temperature happens something weird.
When I send a message to Thermostat node it throws following error:
"StatusCodeError: 422 - {"requestId":"0D190591-A9C8-48E3-B7B3-7E7B9DB18EC4","error":{"code":"ConstraintViolationError","message":"The request is malformed.","details":[{"code":"NotValidValue","target":"[0].capability","message":"thermostat is not a valid value.","details":[]}]}}"

What does it mean? The input message seem to have correct format:
image

Node for thermostat set point

I can select my thermostat temp sensor as well as the thermostat set point in the smartapp, however there is only a node red node to read temperature, no node to set it. It would be great if you could add it ;) thanks!

Loading dependency from github

Is there a particular reason you need to load your smartthings-node dependency direct from github ? Doing so forces clients to have to install git or they get an error trying tom install your nodes.

    "promise": "^8.0.3",
    "smartthings-node": "https://github.com/otaviojr/smartthings-node.git",
    "http-signature": "*",

without git fails as below

2020-03-08T15:04:08.959Z [err] npm
2020-03-08T15:04:08.960Z [err] ERR! code ENOENT
2020-03-08T15:04:08.960Z [err] npm ERR! syscall spawn git
2020-03-08T15:04:08.960Z [err] npm ERR! path git
2020-03-08T15:04:08.960Z [err] npm ERR! errno ENOENT
2020-03-08T15:04:08.960Z [err] npm
2020-03-08T15:04:08.960Z [err] ERR! enoent Error while executing:
2020-03-08T15:04:08.960Z [err] npm ERR!
2020-03-08T15:04:08.960Z [err] enoent undefined ls-remote -h -t https://github.com/otaviojr/smartthings-node.git
2020-03-08T15:04:08.960Z [err] npm ERR! enoent
2020-03-08T15:04:08.960Z [err]
2020-03-08T15:04:08.960Z [err] npm ERR! enoent
2020-03-08T15:04:08.960Z [err]
2020-03-08T15:04:08.960Z [err] npm ERR! enoent spawn git ENOENT
2020-03-08T15:04:08.960Z [err] npm
2020-03-08T15:04:08.960Z [err] ERR! enoent This is related to npm not being able to find a file.
2020-03-08T15:04:08.960Z [err] npm ERR!
2020-03-08T15:04:08.961Z [err] enoent

Can't force updates using topic: update on input

Greetings,

First off, I really really appreciate your Smartthings contribution. It means a lot to me, and is a life saver in tying together my z-wave, mqtt, modbus project together. Much respect. My issue involves status updates. Whenever I deploy, the output status / values for smartthings shows in debug...

"device : msg.payload : Object
object
deviceId: "546fbc2b-fe82-412d-8f04-9133909ebdd2"
deviceType: "contact"
name: "KITCHEN DOOR"
value: 0"

however, when I change the device state, the node-red status does not change, unless I re-deploy.

I read your help statement:
"Besides, if you need it to output the status, like when responding a http request, you can use the topic with the update value to force it to report."

I can't get the update to work for the life of me. I've tried everything and the kitchen sink.

Can you please clarify. With "Inject", I type "update" in the topic field, and leave the payload type "string" and the field blank. Is this correct?

When I trigger the input I get...

"update : msg.payload : string[0]"

in debug, on the output of the smartthings node.

I tried the update in topic for contact, motion... with the same result.

Can you please help... what am I missing.

Thanks a lot.

Feature Request: Lock to include "description" in payload when available.

Hi,
I have a pair of Yale locks and a schlage lock both are programmed with user codes.

I currently have both of these paired with Vera and smartthings (secondary) and am looking to retire my vera, and move to nodered via smart things for managing these locks.

In anycase, currently, when a specific user code is entered in my system, I take different action, and alert myself say when the cleaning lady arrives and let's herself in...

Therefore I was hoping you could make it so that in the payload the "description" field is passed through. I noticed smartapp passes it to the webhook handler in a POST message. So was hoping this wouldn't be a hard change...

Below is a capture of the info caught in the wireshark capture.

POST /smartthings/webhook HTTP/1.1
Accept: /
User-Agent: Linux UPnP/1.0 SmartThings
HOST: xxxx
Content-Type: application/json
Content-Length: 359

{"id":"xxxx","date":"2020-05-11T02:07:41.669Z","value":"unlocked","name":"lock","display_name":"Back Door Lock","description":"Unlocked by \"Code 2"","source":"DEVICE","state_changed":true,"physical":false,"location_id":"xxxxx","hub_id":"xxxxxx","smartapp_id":null}HTTP/1.1 200 OK

X-Powered-By: Express
Access-Control-Allow-Origin: *
Content-Type: text/html; charset=utf-8
Content-Length: 2
ETag: W/"xxxx"
Date: Mon, 11 May 2020 02:07:41 GMT
Connection: keep-alive

OK

TypeError: Cannot read property 'token' of null

Hi all, Ive tried running NodeRed as the standard DockerHub container and now also as a newbuilt Ubuntu 16.04, following the install for the latest node.js and all the requisites for NodeRed.
I consistently get this error after configuring the SmartThings token

4 Nov 22:16:33 - [info] Server now running at http://127.0.0.1:1880/
HTTP REQUEST: devices: 3e19d.30b56663c : temperatureMeasurement
TypeError: Cannot read property 'token' of null
at /home/gcaley/node-red/node_modules/node-red-contrib-smartthings/smartthings/smartthings-config.js:97:21
at Layer.handle [as handle_request] (/home/gcaley/node-red/node_modules/express/lib/router/layer.js:95:5)
at next (/home/gcaley/node-red/node_modules/express/lib/router/route.js:137:13)
at Route.dispatch (/home/gcaley/node-red/node_modules/express/lib/router/route.js:112:3)
at Layer.handle [as handle_request] (/home/gcaley/node-red/node_modules/express/lib/router/layer.js:95:5)
at /home/gcaley/node-red/node_modules/express/lib/router/index.js:281:22
at param (/home/gcaley/node-red/node_modules/express/lib/router/index.js:354:14)
at param (/home/gcaley/node-red/node_modules/express/lib/router/index.js:365:14)
at param (/home/gcaley/node-red/node_modules/express/lib/router/index.js:365:14)
at Function.process_params (/home/gcaley/node-red/node_modules/express/lib/router/index.js:410:3)
at next (/home/gcaley/node-red/node_modules/express/lib/router/index.js:275:10)
at expressInit (/home/gcaley/node-red/node_modules/express/lib/middleware/init.js:40:5)
at Layer.handle [as handle_request] (/home/gcaley/node-red/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/home/gcaley/node-red/node_modules/express/lib/router/index.js:317:13)
at /home/gcaley/node-red/node_modules/express/lib/router/index.js:284:7
at Function.process_params (/home/gcaley/node-red/node_modules/express/lib/router/index.js:335:12)
at next (/home/gcaley/node-red/node_modules/express/lib/router/index.js:275:10)
at query (/home/gcaley/node-red/node_modules/express/lib/middleware/query.js:45:5)
at Layer.handle [as handle_request] (/home/gcaley/node-red/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/home/gcaley/node-red/node_modules/express/lib/router/index.js:317:13)
at /home/gcaley/node-red/node_modules/express/lib/router/index.js:284:7
at Function.process_params (/home/gcaley/node-red/node_modules/express/lib/router/index.js:335:12)

4 Nov 22:26:00 - [info] Node-RED version: v1.0.3
4 Nov 22:26:00 - [info] Node.js version: v13.0.1
4 Nov 22:26:00 - [info] Linux 4.4.0-131-generic x64 LE
4 Nov 22:26:00 - [info] Loading palette nodes
SmartthingsConfigNode
4 Nov 22:26:01 - [info] Settings file : /home/gcaley/.node-red/settings.js
4 Nov 22:26:01 - [info] Context store : 'default' [module=memory]
4 Nov 22:26:01 - [info] User directory : /home/gcaley/.node-red
4 Nov 22:26:01 - [warn] Projects disabled : editorTheme.projects.enabled=false
4 Nov 22:26:01 - [info] Flows file : /home/gcaley/.node-red/flows_nodered.json
4 Nov 22:26:01 - [info] Creating new flow file

I used the personal access token creation as mentioned in the docs, I assigned all the priveleges
Any ideas? Thanks.

Can't request "update"

There seem to be a lot of commands/topics (update, hue, saturation, temperature …) on many of the contrib-smartthings nodes that don't work for me. I haven't tested all nodes but in the case of the "update" topic, I cannot get the onoff, color, openclose or temperature nodes (among others) to return the device state, they only echo the request object sent via the standard inject node. Looking through the code I found:

if(original !== undefined){ Object.assign(msg,original); }

which is what is responsible for replacing the device status message and echoing my request. This looks like it would be useful for debugging but if I comment it out, the update request works as expected. Am I missing something? Thanks for any insights you may have.

Unable to install SmartThings

I have installed Node red on my Ubuntu 20.04
I have installed alexa palette but when I try to install SmartThings palette I have this error:

2021-02-28T05:23:13.949Z Install : node-red-contrib-smartthings 0.0.20

2021-02-28T05:23:13.956Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production [email protected]
2021-02-28T05:23:15.416Z [err] npm
2021-02-28T05:23:15.416Z [err] ERR! code ENOENT
2021-02-28T05:23:15.416Z [err] npm
2021-02-28T05:23:15.416Z [err] ERR! syscall
2021-02-28T05:23:15.416Z [err] spawn git
2021-02-28T05:23:15.416Z [err] npm
2021-02-28T05:23:15.416Z [err] ERR!
2021-02-28T05:23:15.416Z [err] path
2021-02-28T05:23:15.416Z [err] git
2021-02-28T05:23:15.416Z [err] npm
2021-02-28T05:23:15.417Z [err] ERR!
2021-02-28T05:23:15.417Z [err] errno
2021-02-28T05:23:15.417Z [err] ENOENT
2021-02-28T05:23:15.419Z [err] npm
2021-02-28T05:23:15.419Z [err] ERR! enoent Error while executing:
2021-02-28T05:23:15.419Z [err] npm ERR!
2021-02-28T05:23:15.419Z [err] enoent undefined ls-remote -h -t https://github.com/otaviojr/smartthings-node.git
2021-02-28T05:23:15.419Z [err] npm
2021-02-28T05:23:15.419Z [err] ERR!
2021-02-28T05:23:15.420Z [err] enoent
2021-02-28T05:23:15.420Z [err]
2021-02-28T05:23:15.420Z [err] npm ERR! enoent
2021-02-28T05:23:15.420Z [err] npm ERR! enoent spawn git ENOENT
2021-02-28T05:23:15.420Z [err] npm ERR! enoent This is related to npm not being able to find a file.
2021-02-28T05:23:15.420Z [err] npm ERR! enoent
2021-02-28T05:23:15.426Z [err]
2021-02-28T05:23:15.426Z [err] npm ERR! A complete log of this run can be found in:
2021-02-28T05:23:15.426Z [err] npm ERR! /root/snap/node-red/675/.npm/_logs/2021-02-28T05_23_15_421Z-debug.log
2021-02-28T05:23:15.430Z rc=1

Can you help me?

No Updated Data in Node Red from Smartthings Thermostats

First of all - awesome solution, has been really useful for me, thank you for the great work.

Not exactly sure when this started happening, but it was all working correctly when I first installed late last year. I can't be sure it is limited to Thermostats, but that is where my issue lies at the moment.

The issue is that a change to the Thermostat in the ST app triggers an event in Node Red but the data sent from the Thermostat node is the same as it was on deploy of the flow. IE. it never changes.

The screenshot from Node Red below is the result of me changing the set temperature 3 times, from 21 down to 18. You can see it always reports as 20

image

I do have the required devices set in the SmartApp configuration and when I run the simulator for the SmartApp, I get the error as below:

Screenshot 2020-05-11 at 15 14 10

My Version of node-red-contrib-smartthings is 0.0.20

Hope you can help with this

Inconsistency on temperature reporting

Hi,

There is inconsistency on temperature reports between normal update and forced update.

I am using latest release (0.15).

Normal update reports temperature as float, but forced update reports temperature as string. I think float would be preferred format in both cases.

Device normal report:
{"deviceId":"xxx","deviceType":"temperature","name":"Smoke Sensor Downstairs","value":23.3,"unit":"C"}

Forced update:
{"deviceId":"xxx","deviceType":"temperature","name":"Smoke Sensor Downstairs","value":"23.3","unit":"C"}

Kind regards,
Juha

Sending topic "switch" with payload as 0 or 1 doesn't change switch state in SmartThings

Hi, I'm going mad with this. I have so far:

  • deployed the SmartThings palette in my NodeRed instance and keyed it to my SmartThings setup. I can see all of my SmartThings devices in NodeRed.
  • I've installed the Smart App (I've written my own Smart Apps so I know how to do that) and I can see SmartThings events being trapped for m subscribed devices and state changes happening in NodeRed for those devices.
  • My setup is all local and the URL is correct. As I say, I can see events in NodeRed from SmartThings.

However, I cannot inject a switch state change into a NodeRed device and that state change be sent successfully to SmartThings to turn on/off a light or socket.

I'm new to NodeRed, so I may be doing something wrong. I have setup a simple manual inject that sends the topic of "switch" with numeric payload value of 1 to the SmartThings switch node. I've got a debug output on the switch node and whenever I manually trigger the inject, nothing changes in the SmartThings node and the switch state doesn't change, nothing is output in debug.

The injector is sending the following to the switch node which appears to be what is required based on the information for the node.

object
_msgid: "94103186.f2953"
topic: "switch"
payload: "1"

I have managed to get NodeRed to send commands to SmartThings through a light node and I can see individual device events, but each event is simply a turn off event. I have no idea how to send a turn on event or a level event from a NodeRed initiated inject. They simply don't work.

Please help, this is driving me mad! :(

"OnOff node" issue

I have an issue with OnOff node.

Request for status works perfectly fine (Node Inject - Topic: Update).

However the action of turning the device On/Off (Node Inject - Topic: "switch", Payload: 1) does not work at all. I can only see the message "Input Message Received" in the console log, but nothing happens. The flow stops in OnOff node, no message in debug.

Where does "smartthings/webhooks" come from?

I'm running node-red on my local server. Installed the node-red-contrib-smarthings package, and no problem sending events, but now I want to receive. Installed SmartApp, etc, as per the instructions. But I don't get this part:

  1. The first field is the webhook address. This must be your NodeRed public address followed by /smartthings/webhook. So, if your NodeRed public address is nodered.example.com it will be something like this https://nodered.example.com/smartthings/webhook. You must use HTTPS. Otherwise Smartthings hub will not call your webhook

Where provides the smartthings/webhook handler? Node-red is running on port 1880 on my local machine. My firewall forwards ports 80 and 453, but certainly not 1880. Is there supposed to be an apache module installed that forwards this somehow? I've been Googling on this, and have yet to find an answer.

Seems this was asked in [#13] a couple weeks ago, and then the OP closed the post without bothering to indicate if he gave up, found a resolution, or what.

It might help to update the README.md to indicate where the smartthings/webhook comes from, and a link to information about installing it, etc.

Thanks!

onoff switch not updating

I ran a loop with the update topic for the on-off switch to get the current state for a light
it just keeps saying the same value given when the light was off

the only time the value changed was when I would make a change on more red and save (deploy)
for some reason, it is not forcing an update from the api

error Installing from npm or UI

Trying to install this node (latest version) into a node-red version. 1.0.2 running on ubuntu 18.04 and getting Errors trying to install. I have tried both npm install command line and UI based pallet install, neither work I am getting the following error while trying to install this capability.

/.node-red$ npm install node-red-contrib-smartthings
npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno ENOENT
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t https://github.com/otaviojr/smartthing s-node.git
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent spawn git ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR! /home/ab/.npm/_logs/2020-02-05T13_11_19_277Z-debug.log

Full Log file is attached..
Appreciate any pointer on how to install this for a project I am working on.
Thanks
2020-02-05T13_16_13_584Z-debug.log

Device Box

Would be good if the device box could use msg.topic to add device, at the moment i have a sub flow with 30 smartthings nodes for each device i want to check, with switch nodes. to be able to use 1 smartthings node would be great.

Connecting to Ikea Button via SmartThing hub

Hi

I'm trying to get an Ikea Button (connected via SmartThings) to excute a command in NodeRED. However, when I press the button I don't get a message in NodeRED.

In the devicelist in IDE I see the button but unlike my lightbulbs the button's "Execution Location" is "Cloud". Would this impact how I get the signal from the button?

On a sidenote I see that in the description of the Button-node it states that it will only send a message when the button is pushed or held. The Ikea button has a top and a bottom button, will this result in two different messages or just one? and how about the long press?

Should I use the Ikea hub instead and use Ikea-nodes, to get the full functionallity?

Thanks a bunch!

/Mads

Location Mode

I was wondering if there is any way to add in support for getting / setting the "Location Mode" from Smartthings (either by adding it as part of the Presence node or as a new node). I've recently purchased a few SmartThings buttons, and I'm currently augmenting their usage based on time + location mode, but am restricted to doing it through the SmartThings app itself.

Just for a bit of context, in the new SmartThings app, you can change your Location mode by going to the Kebab Menu, selecting "Manage location" and then changing the Location Mode. Currently, I'm automating all of my mode and button adjustments, and would love to be able to move this over to Node-RED.

Great tool by the way!

Unable to Download In Node-Red

I have tried downloading node-red-contrib-smartthings through the install Pallet menu in NR, the npm, and using sudo; all attempts have been unsuccessful. I keep getting the error "This is related to npm not being able to find a file." the full error can be seen in the picture attached (showing the error on NR). The error is the same regardless of where I try to install it.
Screen Shot 2021-01-09 at 11 48 20 PM

not connected to node red

Hello,
I have a problem with the integration in node red.
In the Simulator all is working.
Attached a debug screenshot.
What is wrong?
Thank you for helping
alpha
debug

Problem with SmartApp communicating with NodeRed

Hi there, thanks for the previous help.

I can now deploy a smartthings sensor and when i connect to debug and deploy, then i see the sensor readings etc. All good.

I dont however see any new updates from the sensor, unless i re-deploy the flow.

Ive followed the steps to test the smartapp using the simulator in the ST-IDE, and in the debug box i see the following when i, for example, turn a switch on. It looks like the ip and port,in hex, but no other obvious error.

Any ideas? thanks.

44b0879b-7700-4322-8752-3c49bf37c251 17:08:13: debug /smartthings/webhook
44b0879b-7700-4322-8752-3c49bf37c251 17:08:13: debug 0050
44b0879b-7700-4322-8752-3c49bf37c251 17:08:13: debug C0A801BF
44b0879b-7700-4322-8752-3c49bf37c251 17:08:13: debug Local POST fallback

Node red mqtt not updating

Hi,

When i in smarthings app or in smarthings simulator changes eg a contact (and the contact works), it doesnt update in nodered mqtt (i send a update command) and i cant send mqtt commands in nodered to smartthings. But when i send a "sudo systemctl restart nodered" to my PI with nodered, i get a correct mqtt, but from there it doesnt update anymore

POPP SMOKE SENSOR WITH CONTROLLABLE SIREN V 1.2

I just bought a smoke detector (z-wave) that I have connected to smartthings. Unfortunately there is only support for the battery level in node-red-contrib-smartthings. Is it possible to have a node that can receive an alarm in case of a fire/smoke detection?
BR Magnus

mqtt to contact node

This may be a node-red inexperience issue but would appreciate any assistance.

I have contact sensors reporting into node-red via mqtt, works well. I have node-red-smartthings installed, simulator proves connection is good. Native ST devices report status change in node-red.

My goal is to have the mqtt contact sensor node update ST via the OpenClose node.

[mqtt contact node] -> [OpenClose Node] -> ST.

Is this possible? The OpenClose node only reports status for what it sees in ST.

I'm assuming I'll have to convert the string from the mqtt node to an object for the OpenClose node (been at that for hours) and I'll continue working that once I know if my goal is possible. I've read thru the docs and all other posts with no luck. Maybe I'm just too tired to see what's right in front of me.

Much appreciated.

Can't update heatingSetpoint on HoneywellTCC thermostat

Hi there, I am working on a project where we have 15+ Honeywell TCC thermostats connected to ST. I know that ST has the ability to adjust the heatingSetpoint (since I can change it using the ST app), however I cannot adjust using Node-Red. I have the smartApp added and properly configured and I can grab the current temperature just fine.

I try manually sending a message to the Thermostat using an inject configured to send the following JSON payload:

{
"topic": "heatingSetpoint",
"payload": {
"value": 60
}
}

However the the Honeywell thermostat will not use the heatingSetpoint of 60.

I am not sure if I have the webhook configured correctly. However, from everything I have seen after reviewing other issues, I don't believe I need the webhook to send changes to the Thermostat node, correct?

Feature request: water sensor

Hi,

Would it be possible to do Water Leak Sensor -node?

I think Smartapp already has configuration for it (Water sensor), but I think there is no node for it?

Kind Regards,
Juha

Samsung Fridge

Hi,
on a Samsung Fridge with IceMaker I only get the temperature of the cooling part.
Is there a possibility to get also the so called "child devices" ?
I couldn't figure out how to configure the node-red-contrib-smartthings items to get also the freezer temperature and the switches like defrost, rapid cooling, ...

Thanks for help!

No devices in nodes

No devices in node and nothing but errors in the readout for node red.

Installed as per the if you can call it documentation but nothing works.

Unable to retrieve devices from Smartthings

I followed the install instructions but when I try to set up the first node with the SmartThings token I don't know if it is working. I expected the "Device" drop-down to populate with the devices discovered from SmartThings (of that particular type) but it keeps saying "Loading" and it never populates.
Not sure what I could be doing wrong. Are there any logs that I can look at?

Also, I have the node red instance running locally on a raspberry pi, when I get to the webhook set up on the Smartthings app should I specify port 1880 or is it just "http://192.168.1.155/smartthings/webhook" ? If the port is defaulted to 80, how can I change it ot a non-default port (I'm using 80 for something else)?

Thanks

Feature Request - Smartthings Windfree Airconditioner options

Hi there.

I'm trying to create a few flows to interact with my airconditioner unit. I can read out temp and hum and switch it on and off. still trying to figure out the thermostat. But i am missing nodes for other functions it has.

would it be possible to add more options?

like to dim the display (at night) (donotdisturb mode i think)
set it's modes (like dry, heat, cool, auto)
work the fan directions (not sure if that actually possible to do)
etc.

when i extract it's properties using the api i get this:

{
    "items": [
        {
            "deviceId": "_some_ugly_long_id_string_",
            "name": "[room a/c] Samsung",
            "label": "Room air conditioner",
            "manufacturerName": "Samsung Electronics",
            "presentationId": "DA-AC-RAC-000003",
            "deviceManufacturerCode": "Samsung Electronics",
            "locationId": "_some_ugly_long_id_string_",
            "ownerId": "_some_ugly_long_id_string_",
            "roomId": "_some_ugly_long_id_string_",
            "deviceTypeName": "Samsung OCF Air Conditioner",
            "components": [
                {
                    "id": "main",
                    "capabilities": [
                        {
                            "id": "ocf",
                            "version": 1
                        },
                        {
                            "id": "switch",
                            "version": 1
                        },
                        {
                            "id": "airConditionerMode",
                            "version": 1
                        },
                        {
                            "id": "airConditionerFanMode",
                            "version": 1
                        },
                        {
                            "id": "fanOscillationMode",
                            "version": 1
                        },
                        {
                            "id": "temperatureMeasurement",
                            "version": 1
                        },
                        {
                            "id": "thermostatCoolingSetpoint",
                            "version": 1
                        },
                        {
                            "id": "relativeHumidityMeasurement",
                            "version": 1
                        },
                        {
                            "id": "airQualitySensor",
                            "version": 1
                        },
                        {
                            "id": "odorSensor",
                            "version": 1
                        },
                        {
                            "id": "dustSensor",
                            "version": 1
                        },
                        {
                            "id": "veryFineDustSensor",
                            "version": 1
                        },
                        {
                            "id": "audioVolume",
                            "version": 1
                        },
                        {
                            "id": "remoteControlStatus",
                            "version": 1
                        },
                        {
                            "id": "powerConsumptionReport",
                            "version": 1
                        },
                        {
                            "id": "demandResponseLoadControl",
                            "version": 1
                        },
                        {
                            "id": "refresh",
                            "version": 1
                        },
                        {
                            "id": "execute",
                            "version": 1
                        },
                        {
                            "id": "custom.spiMode",
                            "version": 1
                        },
                        {
                            "id": "custom.thermostatSetpointControl",
                            "version": 1
                        },
                        {
                            "id": "custom.airConditionerOptionalMode",
                            "version": 1
                        },
                        {
                            "id": "custom.airConditionerTropicalNightMode",
                            "version": 1
                        },
                        {
                            "id": "custom.autoCleaningMode",
                            "version": 1
                        },
                        {
                            "id": "custom.deviceReportStateConfiguration",
                            "version": 1
                        },
                        {
                            "id": "custom.energyType",
                            "version": 1
                        },
                        {
                            "id": "custom.dustFilter",
                            "version": 1
                        },
                        {
                            "id": "custom.veryFineDustFilter",
                            "version": 1
                        },
                        {
                            "id": "custom.deodorFilter",
                            "version": 1
                        },
                        {
                            "id": "custom.electricHepaFilter",
                            "version": 1
                        },
                        {
                            "id": "custom.doNotDisturbMode",
                            "version": 1
                        },
                        {
                            "id": "custom.periodicSensing",
                            "version": 1
                        },
                        {
                            "id": "custom.airConditionerOdorController",
                            "version": 1
                        },
                        {
                            "id": "custom.ocfResourceVersion",
                            "version": 1
                        },
                        {
                            "id": "custom.disabledCapabilities",
                            "version": 1
                        },
                        {
                            "id": "samsungce.driverVersion",
                            "version": 1
                        }
                    ],
                    "categories": [
                        {
                            "name": "AirConditioner"
                        }
                    ]
                }
            ],
            "profile": {
                "id": "_some_ugly_long_id_string_"
            },
            "type": "OCF",
            "restrictionTier": 0
        }
    ],
    "_links": {}
}

so there is plenty to interact with, i guess...

I'ld love to see some more possibilities to play with :) Thanks!

Feature Request: Energy Meter Node

Hi Otávio,

In the smartapp config There is the following entry which picks up my home energy monitor.
input "energyMeter", "capability.energyMeter", title: "Energy Meter", required: false, multiple: true

It outputs total energy consumed in kWh once every minute for Gas and Electricity usage.

I'd be very grateful if you could add a node for this.

Thank you
Russell

OnOff switch, missing 3 lights in dropdown

Hi,

I'm missing 3 lights in switch (onOff), it works in simulator and i can find them in other dropdown boxes, but not in switch. I have triede many things, update api key, changed URL from local to external and many other things, even triede change the name of the lights... But i cant get them in the switch dropdown box (i have 7 lights, so im missing 3 lights, 2 RGB and one white 5000K from IKEA)

Anyone who can help?

Regards,
Jan

Unable to install

Hello!
I am unable to install.

`pi@raspberrypi:~ $ npm install node-red-contrib-smartthings
npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno ENOENT
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t https://github.com/otaviojr/smartthing          s-node.git
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent spawn git ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/pi/.npm/_logs/2019-12-16T17_57_40_684Z-debug.log
`

Node for Presence

This is a great tool to link everything I have together. I'm moving over from a Smartthings MQTT bridge and something that's missing is a "presence" node. This typically uses phone geolocation to determine if the user is "present" or "away". It'd be great if we can get a node for that. The device is already selectable in the smartapp.

Device change not triggering

I've been playing with the SmartThings Pallet a bit and I've got it working for the most part. I can send commands to my devices and the manual "update" will retrieve the current status. The issue I'm having is that when the device changes state, I'm not seeing that in Node Red unless I manually request an update.

Basically, I have a virtual dimmer (I've also tried dimmable bulbs and even simple switches) that I want to control via Google Assistant. When I set the dimmer to a particular level, I would expect to see the change in the debug node, but nothing happens.

Any thoughts?

Simulated Contact Sensor

Hey Otávio,

I was also able to get it installed and working, great work!

I have a question though:
My Node-Red runs on a raspberry pi, that monitors various hard wired door contacts via it's GPIO ports. I would like to push the open/close states of those contacts to my Smartthings hub, to a "Simulated Contact Sensor", so that I can run automations based on that Contact.

I tried to do it the same way as with a switch, by sending: { topic: "switch", payload: { value: (1|0) } }

But that doesn't seem to work. So I looked at: smartthings-openclose.js

It seems, based on:

 this.on('input', msg => {
                console.debug("Input Message Received");
                console.log(msg);

                if(msg && msg.topic !== undefined){
                    switch(msg.topic){
                        case "update":
                            this.reportStatus(msg);
                            break;
                    }
                }
            });

That this type of node only supports "update" but does not allows you change the state.
Is this a limitation of Smartthings, or could this logic also be added to smartthings-openclose.js?

I hope my explanation make sense.

Thanks!

Freezer Refrigerator and Oven don't function as expected

Hi, I use these nodes a lot and recently I have bought new Samsung freezer, fridge and oven so I was eager to use them in Node-Red together with my other automation.

I have setup this flow to test it out.
Flow

The fridge report the temp but never if the door is opened/closed as the Samsung App does.
Refrigerator the "contact" value is always 1.

If I open the fridge and keep it open the temp rise
Refrigerator open. Here I noticed that the "thermostatCoolingSetpoint" follows the "temperature" so it seems to be the same. The setpoint is set to 3 even then the door is opened.

When I close the door I got:
Refrigerator closed again

The Freezer have the same problem with the door open/close and a more critical problem is that it can't show any temp "value: NaN". Maybe it's because it's negative and will become a String?
Freezer

Lastly the Oven. It reacts to open/close but will not report the temp "value: NaN". In this case the problem could be that the temp has more then one value because the oven has individual settings for the upper and lower part.
Oven
Open/Close will result in:
Oven open,close

I am running version 0.0.20 of node-red-contrib-smartthings and I have double checked that all my devices have been activated in NodeRed WebHook.
Screenshot_20200301-120752_SmartThings
Screenshot_20200301-120833_SmartThings
Screenshot_20200301-120935_SmartThings
Screenshot_20200301-120922_SmartThings
Screenshot_20200301-120915_SmartThings

BR
Magnus

No Power or Energy Info

I have the aeotec smart plug 6, and when i receive trigger info, there is no info on power, energy or device mode, from any of the nodes, that i can use or update.

mqtt problem

Hi,

Just got the hole thing to work... I think. I got my devices

BUT, i have set up an onoff switch with an inject node, but cant switch it with payload "switch", i can get a status when i use topic "update"...

No mater what i do in smartthings or google, switch on or off. My mqtt always says 1 (on)

deviceId: "9840f6a2-f194-4b6b-a1a0-96fb0cc9f4b4"
deviceType: "switch"
name: "Tv"
value: 1

Can someone provide me an example to import in my nodered?

Regards
Jan

Is this package a stand-in for a smartthings hub?

I know this is a dumb question, but the answer is not obvious to me.

I have a Raspberry Pi 3 B. I've been using homebridge for awhile and I've also been playing around with node-red-contrib-homekit-bridged, both of which replace the need for purchasing an apple homekit hub (e.g. a home pod or designating a 4th-gen iDevice as the hub). I'm looking for an analogous version for SmartThings devices because I received a Smartthings button for Christmas and wanted to try it out. Everything I've read seems to say that you have to purchase a $70 ST hub in order to setup and use the $15 button.

If this package is not such a hub replacement, perhaps you can point me in the direction of a package that does this? I've been googling this for awhile now and I'm guessing there does not exist a package that can make my Pi act as an ST hub?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.