Giter Club home page Giter Club logo

smartthings's Introduction

SmartThings

https://github.com/codersaur/SmartThings

Copyright (c) 2017 David Lomas

Overview

This repository contains device handlers and SmartApps for use with Samsung's SmartThings home automation platform.

SmartApps

  • This SmartApp connects your Honeywell Evohome System to SmartThings.
  • Note, the Evohome Heating Zone device handler (below) must also be installed.
  • This SmartApp logs SmartThings device attributes to an InfluxDB database.

SmartApp Installation Procedure

Part One: Install the code using the SmartThings IDE

  1. Within the SmartThings IDE, click 'My SmartApps', then '+ New SmartApp'.
  2. Select the 'From Code' tab and paste in the contents of the relevant groovy file.
  3. Click 'Create', and then 'Publish' (For Me).

Part Two: Create a SmartApp instance

  1. Using the SmartThings app on your phone, navigate to the 'Marketplace'.
  2. Select 'SmartApps', then browse to 'My Apps' at the bottom of the list.
  3. Select the new SmartApp, complete the configuration options and press 'Done'.

Note: Some SmartApps may support multiple instances, whereas others may only allow one instance.

Device Handlers

  • This device handler is written specifically for the Aeon Home Energy Meter Gen2 UK version, with a single clamp.
  • It supports live reporting of energy, power, current, and voltage, as well as energy and cost statistics over multiple pre-defined periods.
  • This device handler is required for the Evohome (Connect) SmartApp.
  • An advanced device handler for the Fibaro Dimmer 2 (FGD-212) Z-Wave Dimmer, with support for full parameter synchronisation, multi-channel device associations, protection modes, fault reporting, and advanced logging options.
  • The Nightmode function forces the dimmer to switch on at a specific level (e.g. low-level during the night). It can be enabled/disabled manually using the Nightmode tile, or scheduled from the device's settings.
  • An advanced SmartThings device handler for the Fibaro Flood Sensor (FGFS-101) (EU), with support for full parameter synchronisation, multi-channel device associations, and advanced logging options.
  • This device handler is written specifically for the Fibaro RGBW Controller (FGRGBWM-441).
  • It extends the native SmartThings device handler to support editing the device's parameters from the SmartThings GUI, and to support the use of one or more of the controller's channels in IN/OUT mode (i.e. analog sensor inputs).
  • An advanced SmartThings device handler for the GreenWave PowerNode (Single socket) Z-Wave power outlet, with support for power and energy reporting, the Room Colour Wheel, local and RF protection modes, an Auto-off Timer, full parameter synchronisation, and advanced logging options.

  • This device handler is written specifically for the Philio Dual Relay (PAN04), when used as a single switch/relay only.
  • It supports live reporting of energy, power, current, voltage, and power factor, as well as energy and cost statistics over multiple pre-defined periods.
  • This device handler is written specifically for the TKB Metering Switch (TZ88E-GEN5).
  • It supports live reporting of energy, power, current, voltage, and power factor, as well as energy and cost statistics over multiple pre-defined periods.
  • A SmartThings device handler to assist with interrogating and tweaking Z-Wave devices. Useful for end-users and SmartThings developers.

Device Handler Installation Procedure

Part One: Install the device handler code using the SmartThings IDE

  1. Within the SmartThings IDE, click on 'My Device Handlers'.
  2. Click the '+ Create New Device Handler' button.
  3. Select the 'From Code' tab and paste in the contents of the relevant groovy file.
  4. Click 'Create'.
  5. Click 'Publish' (For Me).

Part Two: Connect your device to SmartThings

If your device is already connected to SmartThings, you can skip straight to part three, however if your physical device is not yet connected to SmartThings, you will need to follow these instructions to Add a Thing.

During the joining process SmartThings will select an appropriate device handler, if the correct device handler (installed in part one) is selected, you can skip to part four, otherwise you will need to change the handler as described in part three.

Part Three: Update existing device types

When you add new devices, SmartThings will automatically select the device handler with the closest-matching fingerprint. However, this process is not perfect and it often fails to select the desired device handler. You may also have pre-existing devices you want to switch to new device handler. In these cases, you need to change the device type of each device instance from the IDE.

  1. Within the SmartThings IDE, click on 'My Devices'.
  2. Click on the appropriate device to bring up its properties.
  3. Click the 'Edit' button at the bottom.
  4. Change the 'Type' using the drop-down box (custom devices will be near the bottom of the list).
  5. Hit the 'Update' button at the bottom.

Part Four: Update existing device settings

If you have changed the type of an existing device, it is very important to update the device's settings to ensure the device instance is fully initialised and ready for use with the new device handler.

  1. Within the SmartThings IDE, click on the 'Live Logging' tab to monitor an messages generated by the following steps.
  2. In the SmartThings app on your phone, navigate to the device (you should find the GUI has changed to reflect the new tiles configuration).
  3. Press the gear icon to edit the device's settings.
  4. Review each setting to ensure it has a suitable value, then press 'Done'.
  5. Back in the SmartThings IDE, review any messages from the device in the 'Live Logging' screen.

Note: Android users may encounter some errors in the SmartThings app after a device type has been changed. This can usually be resolved by completely closing the SmartThings app and restarting it.

License

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at:

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

smartthings's People

Contributors

codersaur avatar crazystick 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  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  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  avatar  avatar  avatar  avatar

Watchers

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

smartthings's Issues

No signature of method

Hiya,

Bit of a noob here, but I'm receiving the following message when pasting the code when creating "A new Smartapp" within the smarthings ide.

No signature of method: script_app_metadata_4f356889_0d09_44c6_907d_1332e8358580.metadata() is applicable for argument types: (script_app_metadata_4f356889_0d09_44c6_907d_1332e8358580$_run_closure1) values: [script_app_metadata_4f356889_0d09_44c6_907d_1332e8358580$_run_closure1@54bdd45f] Possible solutions: getMetadata(), getState(), setState(java.lang.Object), metaClass(groovy.lang.Closure)

Any suggestions?

Thanks

Smartapp continues to report for offline devices

Hello,

I have a device on my network which stopped reporting to SmartThings at some point and for whatever reason. SmartThings correctly reports it as offline and marks it with a red dot in the app since then.
However, InfluxDB Logger continues to report the last temperature value every 10 minutes for more than a month. Which doesn't help in noticing the lack of updated value from InfluxDB/Grafana.

Would it be possible to have InfluxDB Logger stopping its reports for offline devices?

Thank you

Issue with Cyrillic device name

Hello guys,
did you notice that when some device name is named on Cyrillic is showing an error. I`m sure about it because I have reproduce it. Can someone give me a fix for that?

postToInfluxDB(): Something went wrong! Response from InfluxDB: Headers: [content-length:348, x-influxdb-error:unable to parse 'temperature,deviceId=2eba5601-f5bd-4792-b274-689a6cba9437,deviceName=Сушилня\ Месо,groupId=95e1bc3c-1804-4510-ae04-428bb1818d48,groupName=Дрешник,hubId=f4e82edf-6ece-483c-a4af-d861b6124731,hubName=SmartThings\ Hub,locationId=0726f3d8-a031-4241-8b39-9a64b8c31df6,locationName=Mansio': missing fields, request-id:f56a7992-1a84-11eb-b184-000c29416d42, http/1.1 400 bad request:null, x-request-id:f56a7992-1a84-11eb-b184-000c29416d42, x-influxdb-build:OSS, content-type:application/json, date:Fri, 30 Oct 2020 07:53:12 GMT, x-influxdb-version:1.8.3], Body: {"error":"unable to parse 'temperature,deviceId=2eba5601-f5bd-4792-b274-689a6cba9437,deviceName=Сушилня\ Месо,groupId=95e1bc3c-1804-4510-ae04-428bb1818d48,groupName=Дрешник,hubId=f4e82edf-6ece-483c-a4af-d861b6124731,hubName=SmartThings\ Hub,locationId=0726f3d8-a031-4241-8b39-9a64b8c31df6,locationName=Mansio': missing fields"}

Where on the code can I fix a default color?

Hi:

I'm doing a complete new installation at home and I'm still learning / understanding the possibilities of the ZWave system. I would like to fix a default color for the Fibaro RGBW, so whenever there's a reset of the system, it gets back to this default color...

Where can I define it?

Thanks!

Typo in "WAN" code

I need to use the "WAN" bit of code (thank you!) in Codersaur-InfluxDB-Logger.groovy and there is a small typo on line #759.

The url variable should be databasePort instead of databastPost

adapting code to change a parameter on ZW5 version

Hi there! I've been trying to modify the official device handler for the Fibaro Flood Sensor ZW5 to change one of the parameters (namely #2 in order to silence the audio alarm). Haven't been able to figure it out though - any thoughts on how to do this? Thanks!

MissingMethodException for uint24FromBytes(java.util.ArrayList$SubList, java.lang.Integer)

I'm using version 0.08 from date 2017-03-16. After couple of iterations of scanning and setting values I hit Clean Up button. Now when I hit Scan General button I see following in Live logging:

da12f524-995b-43b4-9518-2984f6eef03b  22:13:44: error groovy.lang.MissingMethodException: No signature of method: static physicalgraph.zwave.ZwaveUtils.uint24FromBytes() is applicable for argument types: (java.util.ArrayList$SubList, java.lang.Integer) values: [[0, 56, 64, 1], 0]
Possible solutions: uint24FromBytes(java.util.ArrayList, int) @ line 1550
da12f524-995b-43b4-9518-2984f6eef03b  22:13:43: info Version Report: Application Version: 1.01, Z-Wave Protocol Version: 3.92, Z-Wave Library Type: 03 (Enhanced Slave)
da12f524-995b-43b4-9518-2984f6eef03b  22:13:41: info Powerlevel Report: Power: NormalPower, Timeout: 0
da12f524-995b-43b4-9518-2984f6eef03b  22:13:40: info Manufacturer-Specific Report: Manufacturer ID: 0115, Manufacturer Name: Z-Wave.Me, Product Type ID: 0100, Product ID: 0101
da12f524-995b-43b4-9518-2984f6eef03b  22:13:38: info scanGeneral(): Scanning for common device attributes.

The device is Z-Wave.me Secure Wall Controller. This is what I see I hit Print General button (I have reversed order of log entries):

General Information:
Device Name: Vypínač
Raw Description: zw:Ss type:1801 mfr:0115 prod:0100 model:0101 ver:1.01 zwv:3.92 lib:03 cc:5E,8F,73,98,86,72,70,85,2D,8E,80,84,5A,59,5B ccOut:20,5B,26,27,2B,60 secOut:62 role:04 ff:8B00 ui:8B01
Supported Command Classes: [SCENE_CONTROLLER_CONF (0x2D), ASSOCIATION_GRP_INFO (0x59), DEVICE_RESET_LOCALLY (0x5A), CENTRAL_SCENE (0x5B), ZWAVEPLUS_INFO (0x5E), CONFIGURATION (0x70), MANUFACTURER_SPECIFIC (0x72), POWERLEVEL (0x73), BATTERY (0x80), WAKE_UP (0x84), ASSOCIATION (0x85), VERSION (0x86), MULTI_CHANNEL_ASSOCIATION (0x8E), MULTI_CMD (0x8F), SECURITY (0x98)]
Security: Device is paired securely.
=> Command classes supported with security encapsulation: UNKNOWN (0xNULL)
=> Command classes supported for CONTROL with security encapsulation: UNKNOWN (0xNULL)
Manufacturer ID: 0115
Manufacturer Name: null
Product Type ID: 0100
Product ID: 0101
Firmware Metadata: Firmware ID: null, Checksum: null
Application (Firmware) Version: 1.01
Z-Wave Protocol Version: 3.92
Z-Wave Library Type: 03 (Enhanced Slave)
Powerlevel: NormalPower
Protection Mode: [ Local: null (null), RF: null (null) ]
Switch_All Mode: null (null)

Discovery Stats:
Number of association groups discovered: 5 [Print Assoc Groups]
Number of endpoints discovered: 0 [Print Endpoints]
Number of parameters discovered: 31 [Print Parameters]
Number of unique command types received: 10 [Print Commands]
Number of MeterReport types discovered: 0 [Print Sensor]
Number of NotificationReport types discovered: 0 [Print Sensor]
Number of SensorMultilevelReport types discovered: 0 [Print Sensor]

Hubitat

Any plans to port this to hubitat

cleanup method

Suggest you use state.remove("variable") as it will remove all from state rather than leaving them as null.

Are you also cleaning up settings?

Fahrenheit

Hi, can you add support to have temperature measured in Fahrenheit?

Folder structure does not allow ST-Github integration

Please take look at developers' documentation (http://docs.smartthings.com/en/latest/tools-and-ide/github-integration.html) and rename folders as specified: DTHs should reside in devicetypes/dth1.src, devicetypes/dth2.src etc. and Smart Apps in smartapps/app1.src and smartapps/app2.src folders respectively.

This way that folders have been created here, user is forced to copy/paste code in IDE making future updates (and code change detection) a pain.

Hub firmware no longer supports Z-Wave association interactions

I have long been a fan of the Z-Wave Tweaker device handler for making one-time configuration changes to a device (that its normal device handler does not consider/support) and then reverting to the normal device handler.

For example, I have 3 Aeotec Nano Dimmer devices that I want associated with each other so that they can talk between themselves without getting SmartThings involved. I got this all to work before using Z-Wave Tweaker as described. This recently broke as one ND dropped off the network and needed to be added back. Of course, when it came back it had a new Device Network Id and the associations broke. When I tried to fix them, Z-Wave Tweaker can no longer do it. It seems that its HubActions no longer work with the latest Hub firmware.

When Setting Dimmer Level - java.lang.NullPointerException: Cannot invoke method and() on null object @ line 481

Hi - thanks for the work you've obviously put into this :)

I have a couple of issues - not sure if they mean anything to you or they can be fixed or not. I will put them into separate posts so that other people can see and follow them more easily.

  1. When I try to set the dimmer level from the app tile - I get:
    "java.lang.NullPointerException: Cannot invoke method and() on null object @ line 481"
    extract from Live Logging below:
    ===========
    15:06:50: error java.lang.NullPointerException: Cannot invoke method and() on null object @ line 481
    15:06:50: info Dimmer level is 90%
    15:06:50: info Dimmer turned on.
    15:06:31: info Setting dimmer to 90%
    5:06:30: error java.lang.NullPointerException: Cannot invoke method and() on null object @ line 481
    ===========

Many thanks,
Mark

Cannot invoke method startsWith() on null object @ line 1619

I get the following:

error java.lang.NullPointerException: Cannot invoke method startsWith() on null object @ line 1619

This comes from a second smart things controller on the same network as the main controller I use (which is not the SIS).

invalid field format

given this ngrep towards influxdb 1.6.1

T 93.17.19.201:41240 -> 209.126.18.9:8086 [AP]
  POST /write?db=smartthings HTTP/1.1..Accept: */*..User-Agent: Linux UPnP/1.0 SmartThings..Authorization: Bas
  ic c2xluZ3M6NjcxxxxxxxTcz..Content-Type: application/x-www-form-urlencoded..HOST: 209.126.18.9:8086..Con
  tent-Length: 241....temperature,deviceId=2f6712bd-5b1a-48e4-a9db-329af912120f,deviceName=wc\ kap..,groupId=n
  ull,groupName=Home,hubId=68ac12fa-f184-4d5a-b269-2e87328c293a,hubName=K..y,locationId=cfa4c8f6-63b7-4bd0-b05
  a-bcccf6ea398f,locationName=k..y,unit=C value=25
##
T 209.126.18.9:8086 -> 93.17.19.201:41240 [AP]
  HTTP/1.1 400 Bad Request..Content-Type: application/json..Request-Id: 1f3332c6-32b5-11e9-a2cc-000000000000..
  X-Influxdb-Build: OSS..X-Influxdb-Error: unable to parse 'temperature,deviceId=2f6712bd-5b1a-48e4-a9db-329af
  912120f,deviceName=wc\ kap..,groupId=null,groupName=Home,hubId=68ac12fa-f184-4d5a-b269-2e87328c293a,hubName=
  K..y,locationId=cfa4c8f6-63b7-4bd0-b05a-bcccf6ea398f,locationName=k..y,unit=C value': invalid field format..
  X-Influxdb-Version: 1.6.1..X-Request-Id: 1f3332c6-32b5-11e9-a2cc-000000000000..Date: Sun, 17 Feb 2019 13:08:
  30 GMT..Content-Length: 295....{"error":"unable to parse 'temperature,deviceId=2f6712bd-5b1a-48e4-a9db-329af
  912120f,deviceName=wc\\ kap..,groupId=null,groupName=Home,hubId=68ac12fa-f184-4d5a-b269-2e87328c293a,hubName
  =K..y,locationId=cfa4c8f6-63b7-4bd0-b05a-bcccf6ea398f,locationName=k..y,unit=C value': invalid field format"
  }.

i have tried to debug this issue several hours, all these 'null' will simply be logged as 'null' which is ok. I see the POST contains value=25 and it looks valid format based on

# Line Protocol 
weather,location=us-midwest temperature=82 1465839830100400200
  |    -------------------- --------------  |
  |             |             |             |
  |             |             |             |
+-----------+--------+-+---------+-+---------+
|measurement|,tag_set| |field_set| |timestamp|
+-----------+--------+-+---------+-+---------+

is there something i am doing wrong? I am using unicode char (ö) as "Location" might this be an issue?

Support for pushing "list of rooms" as an attribute

It would be nice to use somethings like tags to filter out which devices to present in a stacked graph.

There is no such things in ST as tags afaik, but there is rooms. May be pushing rooms as an attribute could be an idea?

Sonos Bug

Thanks for the great repo!

Have a small issue with trackDescription data coming from Sonos:

postToInfluxDB(): Something went wrong! Response from InfluxDB: Headers: [content-length:489, request-id:c464608c-7473-11e7-b65d-000000000000, http/1.1 400 bad request:null, content-type:application/json, date:Sat, 29 Jul 2017 15:37:02 GMT, x-influxdb-version:1.3.1], Body: {"error":"unable to parse 'trackDescription,deviceId=9c93ae4e-671d-4ffa-998d-895cb3d16e45,deviceName=Office,groupId=null,groupName=Home,hubId=655bcc7a-dfd6-4458-a163-21c2b670325e,hubName=Home\\ Hub,locationId=d0288ea8-7456-442d-b4c8-41e83f5a69a5,locationName=Home,unit=null value=Okay\\ Then': invalid boolean\nunable to parse 'by\\ Sokro': missing fields\nunable to parse 'from\\ LA\\ FAMILIA\\ PT.\\ 1': missing fields\nunable to parse 'Grouped\\ with\\ Living\\ Room': missing fields"}

Z-Wave Tweaker

I tried copying the text of the .groovy file into the "From code" section of the Smartthings IDE. I get this:

No signature of method: script_app_metadata_6f145d90_f28e_4c8f_b8c6_2c14c744e163.metadata() is applicable for argument types: (script_app_metadata_6f145d90_f28e_4c8f_b8c6_2c14c744e163$_run_closure1) values: [script_app_metadata_6f145d90_f28e_4c8f_b8c6_2c14c744e163$_run_closure1@48e9ac14] Possible solutions: getMetadata(), getState(), setState(java.lang.Object), metaClass(groovy.lang.Closure)

Sorry in advance if I am doing something wrong :)

A network or server error occurred. Try again later.

First of all: THANK YOU for this work! It is greatly appreciated!

Now, after installing/publishing the device driver, and editing the type on my device (GE Motion Sensor Dimmer), and restarting SmartThings App (iPhone), when I select my device, I get a popup error: "A network or server error occurred. Try again later."

Any words of wisdom on this?

Troubleshooting Fibaro Dimmer 2 David Lomas code

Hi

I am new to ST but just got 25+ Fibaro Dimmer 2 installed in a new build. I followed all the instructions for using David’s Device Handler on IDE and iPhone. Used default setting for all parameters. However, my dimmer just is not responding to on/off or brightness commands from iPhone. Momentary switch works fine. What are possible ways to resolve this? I have a three wire system with momentary switches. Light load of 15 watts or do.

Logging of 3rd Party Integrated Devices?

Hi there,

I’m currently using the InfluxDB Logger (awesome by the way!) and it’s working great with Samsung devices but It’s not logging my integrated Tp-Link SmartSwitches (https://github.com/DaveGut/TP-Link-SmartThings) so just wondering:

(A) Whether it supports logging of such 3rd party devices / handlers?
(B) If not, which areas of the code I should look at the amend to also log these?

Thanks!

Hot water zone for evohome

Hi there,

You said you were looking for people with the evohome hot water zone. I have just had a system with this installed. I've PMed you in the smartthings forum, however, I see you've not logged in there for a while.

Let me know if I can be of any help and thanks again for your great code.

Chris

Generic sensor attributes

Thanks for writing this! I have an issue with a custom device handler I've written that doesn't have any capabilities beyond "sensor" - it's an oil tank monitor that just reports the number of gallons in the tank. I have defined a custom attribute, "gallons" that I would like to monitor.

Currently, I've just hacked the pressureSensor type (which you've mapped to sensor) to include my custom attribute, but I was wondering if it were possible to allow the discovery and/or selection of non-standard attributes in devices with "sensor" capability?

Here's a link to the code if I haven't been clear about what I'm asking:

https://github.com/dlaporte/SmartThings/blob/master/DeviceHandlers/rollie-gauge/rollie-gauge.groovy

thanks!

On/Off Tile incorrectly showing ON most of the time

Hi - I have an issue where the on/off tile always seems to default to showing as being ON - regardless of whether it is indeed on. The attached screengrab from my phone shows what I mean (the light is physically OFF).

I can operate the light with no problem however I cannot determine what state it's in to start with. To be sure - I have to first turn it OFF with the app, just so that I actually know where I'm starting from.

Many thanks for any help anyone can offer with this,
Mark
img_6564

influxdb-logger use DNS instead of IP?

Hello,

first of all, thanks for sharing it really a brilliant repo.

Just a simple question, I've tried to use a DNS instead of an IP for the influxDB logger but it seems it does not work (no exceptions) tried with IP and it worked fine.

Is there any possible changes that can enable DNS resolution on the server name?

Thanks

error java.lang.IndexOutOfBoundsException: toIndex = 3 @ line 1550 with Scan Assoc Grps

I'm using version 0.08 from date 2017-03-16. After couple of iterations of scanning and setting values I hit Clean Up button. Now every time when I hit Scan Assoc Grps button I see following error in Live logging:

97773ca0-3a2e-4d9f-b6d0-57ef1c287b25  22:20:36: error java.lang.IndexOutOfBoundsException: toIndex = 3 @ line 1550
97773ca0-3a2e-4d9f-b6d0-57ef1c287b25  22:20:36: info Association Group #1 contains nodes: [01] (hexadecimal format)
97773ca0-3a2e-4d9f-b6d0-57ef1c287b25  22:20:35: info Association Group #1 contains destinations: [01] (hexadecimal format)
97773ca0-3a2e-4d9f-b6d0-57ef1c287b25  22:20:34: error java.lang.IndexOutOfBoundsException: toIndex = 3 @ line 1550
97773ca0-3a2e-4d9f-b6d0-57ef1c287b25  22:20:33: info Association Group #1 contains nodes: [01] (hexadecimal format)
97773ca0-3a2e-4d9f-b6d0-57ef1c287b25  22:20:32: info Association Group #1 contains destinations: [01] (hexadecimal format)
97773ca0-3a2e-4d9f-b6d0-57ef1c287b25  22:20:32: error java.lang.IndexOutOfBoundsException: toIndex = 3 @ line 1550
97773ca0-3a2e-4d9f-b6d0-57ef1c287b25  22:20:31: info Association Group #1 contains nodes: [01] (hexadecimal format)
97773ca0-3a2e-4d9f-b6d0-57ef1c287b25  22:20:30: info Association Group #1 contains destinations: [01] (hexadecimal format)
97773ca0-3a2e-4d9f-b6d0-57ef1c287b25  22:20:29: error java.lang.IndexOutOfBoundsException: toIndex = 3 @ line 1550
97773ca0-3a2e-4d9f-b6d0-57ef1c287b25  22:20:28: info Association Group #1 contains nodes: [01] (hexadecimal format)
97773ca0-3a2e-4d9f-b6d0-57ef1c287b25  22:20:27: info Association Group #1 contains destinations: [01] (hexadecimal format)
97773ca0-3a2e-4d9f-b6d0-57ef1c287b25  22:20:27: error java.lang.IndexOutOfBoundsException: toIndex = 3 @ line 1550
97773ca0-3a2e-4d9f-b6d0-57ef1c287b25  22:20:26: info Association Group #1 contains nodes: [01] (hexadecimal format)
97773ca0-3a2e-4d9f-b6d0-57ef1c287b25  22:20:25: info Association Group #1 contains destinations: [01] (hexadecimal format)
97773ca0-3a2e-4d9f-b6d0-57ef1c287b25  22:20:24: error java.lang.IndexOutOfBoundsException: toIndex = 3 @ line 1550
97773ca0-3a2e-4d9f-b6d0-57ef1c287b25  22:20:23: info Association Group #1 contains nodes: [01] (hexadecimal format)
97773ca0-3a2e-4d9f-b6d0-57ef1c287b25  22:20:23: info Association Group #1 contains destinations: [01] (hexadecimal format)
97773ca0-3a2e-4d9f-b6d0-57ef1c287b25  22:20:22: error java.lang.IndexOutOfBoundsException: toIndex = 3 @ line 1550
97773ca0-3a2e-4d9f-b6d0-57ef1c287b25  22:20:21: info Association Group #1 contains nodes: [01] (hexadecimal format)
97773ca0-3a2e-4d9f-b6d0-57ef1c287b25  22:20:20: info Association Group #1 contains destinations: [01] (hexadecimal format)
97773ca0-3a2e-4d9f-b6d0-57ef1c287b25  22:20:19: error java.lang.IndexOutOfBoundsException: toIndex = 3 @ line 1550
97773ca0-3a2e-4d9f-b6d0-57ef1c287b25  22:20:19: info Association Group #1 contains nodes: [01] (hexadecimal format)
97773ca0-3a2e-4d9f-b6d0-57ef1c287b25  22:20:18: info Association Group #1 contains destinations: [01] (hexadecimal format)
97773ca0-3a2e-4d9f-b6d0-57ef1c287b25  22:20:17: info scanAssocGroups(): Scanning Association Groups (#0 to #10).

The device is Fibaro Wall Plug. This is what I see I hit Print General button (I have reversed order of log entries):

General Information:
Device Name: ...
Raw Description: zw:Ls type:1001 mfr:010F prod:0602 model:1001 ver:3.02 zwv:4.05 lib:03 cc:5E,22,59,56,7A,32,71,73,98,31 sec:85,70,72,5A,8E,25,86 role:05 ff:8700 ui:8700
Supported Command Classes: [APPLICATION_STATUS (0x22), SWITCH_BINARY (0x25), SENSOR_MULTILEVEL (0x31), METER (0x32), CRC_16_ENCAP (0x56), ASSOCIATION_GRP_INFO (0x59), DEVICE_RESET_LOCALLY (0x5A), ZWAVEPLUS_INFO (0x5E), CONFIGURATION (0x70), NOTIFICATION (0x71), MANUFACTURER_SPECIFIC (0x72), POWERLEVEL (0x73), FIRMWARE_UPDATE_MD (0x7A), ASSOCIATION (0x85), VERSION (0x86), MULTI_CHANNEL_ASSOCIATION (0x8E), SECURITY (0x98)]
Security: Device is paired securely.
=> Command classes supported with security encapsulation: UNKNOWN (0xNULL)
=> Command classes supported for CONTROL with security encapsulation: UNKNOWN (0xNULL)
Manufacturer ID: 010F
Manufacturer Name: null
Product Type ID: 0602
Product ID: 1001
Firmware Metadata: Firmware ID: 0612, Checksum: 5432
Application (Firmware) Version: 3.02
Z-Wave Protocol Version: 4.05
Z-Wave Library Type: 03 (Enhanced Slave)
Powerlevel: NormalPower
Protection Mode: [ Local: null (null), RF: null (null) ]
Switch_All Mode: null (null)

Discovery Stats:
Number of association groups discovered: 3 [Print Assoc Groups]
Number of endpoints discovered: 0 [Print Endpoints]
Number of parameters discovered: 22 [Print Parameters]
Number of unique command types received: 16 [Print Commands]
Number of MeterReport types discovered: 2 [Print Sensor]
Number of NotificationReport types discovered: 0 [Print Sensor]
Number of SensorMultilevelReport types discovered: 1 [Print Sensor]

According to manual it has indeed three association groups that has been discovered. I'm not sure why it prints those errors.

Tiles not working?

Hi!

New to this (and Smarthings). Is this old so it doesnt work with the current version of smarthings? I dont see any tiles to interact with the device once I changed the device handler.
In settings I can see that the device handler is in play, but I cant see any tiles to interact with it?

Support for new Sensors, Device Types

Hi David - Ive been using your wonderful app for logging "for ever".

Since its its inception, there have been some new device types, e.g AirQuality Sensor - any plans to update?

Problem with Fibaro RGBW controller

I'm trying to set up the RGBW controller as a simple switch to operate 4 led strips from smartthings - can you tell me what I need to do to the code? I've tried everything I can think of, but can't get it to work.

Actiontiles color setting is all wrong, same in home bridge

Hey there,

I logged a fault with actiontiles and they said the DTH is probably wrong, this is what they sent me

you may be able to modify your Fibaro DTH to handle it.

setting device color [hue:0, saturation:100, hex:#2550000, red:37, green:80, blue:0, white:0]

You'll notice that the "hex:" value is not in the correct format for a hex color value. It should be "#FF0000", not the decimal number "255...".

The specs for Capability Color are complete nonsense to us, frankly; so this might not make 100% sense to you.

We expect all DTHs to use the hue and saturation values, not the hex color value. https://smartthings.developer.samsung.com/develop/api-ref/capabilities.html#Color-Control

Some old DTHs, however, if they receive a bad value for attribute "color" will attempt to use it instead of Hue and Saturation.

Missing value digit

I do have strange behaviour:

T 93.157.189.201:42672 -> 209.126.18.59:8086 [AP]
  POST /write?db=smartthings HTTP/1.1..Accept: */*..User-Agent: Linux UPnP/1.0 SmartThings..Authorization: Ba
  sic xxx..Content-Type: application/x-www-form-urlencoded..HOST: 209.126.18.59:8086..C
  ontent-Length: 242....temperature,deviceId=2f6712bd-5b1a-48e4-a9db-329af912120f,deviceName=wc\ kapi,groupId
  =null,groupName=Home,hubId=68ac12fa-f184-4d5a-b269-2e87328c293a,hubName=K..y,locationId=cfa4c8f6-63b7-4bd0-
  b05a-bcccf6ea398f,locationName=koey,unit=C value=25

this request is stored as:

1550412800599626821 2f6712bd-5b1a-48e4-a9db-329af912120f wc kapi null Home 68ac12fa-f184-4d5a-b269-2e87328c293a Köy cfa4c8f6-63b7-4bd0-b05a-bcccf6ea398f koey C 2

as you see it stores the 25 as 2 for reason i dont understand. If i use CURL and put the line protocoll manually it does store it properly as 25.

Any suggestions?

InfluxDB Error: unsupported mean iterator type: *query.stringInterruptIterator + Refresh issue

I followed the directions here - http://codersaur.com/2016/04/smartthings-data-visualisation-using-influxdb-and-grafana/

All good except for two issues

  1. When I add a device I have to switch between attributes (temperature and contact for example) for grafana to pull in any data.

  2. I am getting an error on a lot of devices - InfluxDB Error: unsupported mean iterator type: *query.stringInterruptIterator

Object
message:"InfluxDB Error: unsupported mean iterator type: *query.stringInterruptIterator"
data:Object
results:Array[1]
executedQueryString:"SELECT mean("value") FROM "thermostatOperatingState" WHERE ("deviceName" = 'Ecobee - Thermostat') AND time >= now() - 15m GROUP BY time(1s) fill(null)"

https://prnt.sc/u83qwv

request:Object
method:"GET"
url:"api/datasources/proxy/5/query"
params:Object
db:"SmartThings"
q:"SELECT mean("value") FROM "thermostatOperatingState" WHERE ("deviceName" = 'Ecobee - Thermostat') AND time >= now() - 15m GROUP BY time(2s) fill(null)"
epoch:"ms"
data:null
precision:"ms"
response:Object
results:Array[1]
0:Object

Groupnames

I am trying to get the InfluxDB Logger to work in my environment. So far I do not get any data into the Database. Could that be related to the mapped GROUPNAMES? I can figure out where to find the groupnames to map them correctly in the SmartApp. Looked under 'MyLocations', clicked on my only location where I can see all my defined groups but no associated 'unique group ID'.
Any help would be associated.

Problem posting influxdb

Probably an issue with escaping single quotes

deviceName=Andrew’s\ Bedroom\ (SPG6)

postToInfluxDB(): Something went wrong! Response from InfluxDB: Headers: [content-length:323, x-influxdb-error:unable to parse 'temperature,deviceId=387accbc-197e-401a-860b-30216863e23b,deviceName=Andrew’s\ Bedroom\ (SPG6),groupId=76973841-1133-4c88-898a-9e06934a1ad7,groupName=Dining\ Room,hubId=null,hubName=null,locationId=89a3cb26-6280-43ba-85a7-8495f9d9cc5a,locationName=Home,unit=F value=': missing field value, request-id:a2e4c97a-49ca-11ea-bdce-b827eb78a875, http/1.1 400 bad request:null, x-request-id:a2e4c97a-49ca-11ea-bdce-b827eb78a875, x-influxdb-build:OSS, content-type:application/json, date:Fri, 07 Feb 2020 16:55:25 GMT, x-influxdb-version:1.7.9], Body: {"error":"unable to parse 'temperature,deviceId=387accbc-197e-401a-860b-30216863e23b,deviceName=Andrew’s\\ Bedroom\\ (SPG6),groupId=76973841-1133-4c88-898a-9e06934a1ad7,groupName=Dining\\ Room,hubId=null,hubName=null,locationId=89a3cb26-6280-43ba-85a7-8495f9d9cc5a,locationName=Home,unit=F value=': missing field value"}

invalid number, possible powerLevel=high

postToInfluxDB(): Something went wrong! Response from InfluxDB: Headers: [content-length:349, x-influxdb-error:unable to parse '_stHub,locationId="89a3cb26-6280-43ba-85a7-8495f9d9cc5a",locationName="Home",hubId="79bdc377-ff47-4a88-ac5f-0f7dafb77fc6",hubName="Home\ Hub",hubIP="192.168.254.X" status="ACTIVE",batteryInUse=0i,uptime=nulli,zigbeePowerLevel=-6i,zwavePowerLevel="full",firmwareVersion="000.028.00012"': invalid number, request-id:9d1e32b8-49c1-11ea-b9bc-b827eb78a875, http/1.1 400 bad request:null, x-request-id:9d1e32b8-49c1-11ea-b9bc-b827eb78a875, x-influxdb-build:OSS, content-type:application/json, date:Fri, 07 Feb 2020 15:50:50 GMT, x-influxdb-version:1.7.9], Body: {"error":"unable to parse '_stHub,locationId=\"89a3cb26-6280-43ba-85a7-8495f9d9cc5a\",locationName=\"Home\",hubId=\"79bdc377-ff47-4a88-ac5f-0f7dafb77fc6\",hubName=\"Home\\ Hub\",hubIP=\"192.168.254.X\" status=\"ACTIVE\",batteryInUse=0i,uptime=nulli,zigbeePowerLevel=-6i,zwavePowerLevel=\"full\",firmwareVersion=\"000.028.00012\"': invalid number"}

Dimmer 2 Device Handler Issue

Have been using this amazing code for several months. It has worked really well until about a couple of weeks ago. I noticed that there were no message being shown on the “Recent” tab of the device from within the app. I tried to exclude it but this failed so had to forcibly remove it from ST via the IDE. I was then unable to re-add it so had to perform a factory reset via the B-button on the unit. This then allowed me to re-add the FGD-212 back into ST. If I revert back to the default ST DH it works fine (although I obviously loose the customisations and ability to control the S2 button/scene control (which is pretty crucial to my setup)) so I know the communication is occurring between hub and dimmer.

I have re-copied the code from Codersaur GitHub repository but no change - as soon as I change the DH to this I loose all ability to control from ST. The physical momentary button still works fine though. Device shows as “Sync Pending” and no matter how long I wait, or mask the button, it doesn’t show Synced as it used to. Have also amended the property to perform a full sync but no change.

There are a couple of error messages shown in the IDE, one in particular shows “ZW secure inclusion failed” which to me sounds very much like to root cause of the issue.

image

image

SmartThings Platform Change - no Groovy apps

I have been using this InfluxDB logger app for a long time and find it immensely useful and reliable. With Samsung's upcoming platform change, SmartApps will be shut down on December 31, 2022. Does anyone know of an alternate method for data logging?

Make it configurable to push data to a remote IP

I needed to modify the code in order to make it work outside the local network. I run grafana in the cloud and needed to use the commented out code. However; that worked welll!

Should be configurable which HTTP function to use.

Error: Invalid Number

Hey, great app (InfluxDB Logger)... I'm loving it and getting into it, but i am getting an occasional error that i thought you might be able to help me with... below is the output from the ST IDE

5:21:16 PM: error postToInfluxDB(): Something went wrong! Response from InfluxDB: Headers: [content-length:347, x-influxdb-error:unable to parse '_stHub,locationId="xxxxxxxxxxxxxxxxx",locationName="Home",hubId="xxxxxxxxxxxx",hubName="Home\ Hub",hubIP="192.168.1.xx" status="ACTIVE",batteryInUse=0i,uptime=nulli,zigbeePowerLevel=-6i,zwavePowerLevel="full",firmwareVersion="000.019.00019"': invalid number, request-id:xxxxxxxxxxxxxxxxxxx, http/1.1 400 bad request:null, x-request-id:2f1fe878-ec2e-11e7-8045-000000000000, x-influxdb-build:OSS, content-type:application/json, date:Fri, 29 Dec 2017 00:21:16 GMT, x-influxdb-version:1.4.2], Body: {"error":"unable to parse '_stHub,locationId=\"xxxxxxxxxx\",locationName=\"Home\",hubId=\"xxxxxxxxxxxxx\",hubName=\"Home\\ Hub\",hubIP=\"192.168.1.xx\" status=\"ACTIVE\",batteryInUse=0i,uptime=nulli,zigbeePowerLevel=-6i,zwavePowerLevel=\"full\",firmwareVersion=\"000.019.00019\"': invalid number"}

InfluxDB 2.0

InfluxDB 2.0 is now available. Has anyone thought about refining this app to work with it? I may start looking at tweaking the code to that end but I fear I may be out of my depth.

Fibaro RGBW

Is this still available and working? When I try to copy the code into the IDE I get this error. Sorry if something basic, I'm a total newb with GitHub and Groovy stuff.

No signature of method: script_app_metadata_1022158d_8be6_4b89_9aaf_973162bcb725.metadata() is applicable for argument types: (script_app_metadata_1022158d_8be6_4b89_9aaf_973162bcb725$_run_closure1) values: [script_app_metadata_1022158d_8be6_4b89_9aaf_973162bcb725$_run_closure1@6b830c43] Possible solutions: getMetadata(), getState(), setState(java.lang.Object), metaClass(groovy.lang.Closure)

Flood Leak sensor US support?

I see in the readme that this is an EU version. Does it support the US version?
Is there a way to change the temp from C to F?

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.