codersaur / smartthings Goto Github PK
View Code? Open in Web Editor NEWSamsung SmartThings SmartApps and Device Handlers
License: Apache License 2.0
Samsung SmartThings SmartApps and Device Handlers
License: Apache License 2.0
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!
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"}
2
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
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?
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?
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.
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
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
I get an error every time it goes to post data to my InfluxDB database that says localhost hub action is not allowed on null. Any idea what I might be missing?
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.
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?
Can we please remove any spaces in the path name? This is causing issues when users try to install directly to SmartThings rather than copying pasting. Replacing the spaces with underscores should solve the issue.
For example:
https://api.github.com/repos/codersaur/SmartThings/contents/smartapps/InfluxDB_Logger
instead of
https://api.github.com/repos/codersaur/SmartThings/contents/smartapps/InfluxDB Logger
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.
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.
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.
My uptime never seems to changes?
> select distinct(uptime) from _stHub
name: _stHub
time distinct
---- --------
0 1690086
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"}
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.
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"}
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)
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!
Hi, can you add support to have temperature measured in Fahrenheit?
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?
using Aeon Home Energy Meter, the thing screen on the android smartthings app fails to load...
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]
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.
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.
Any plans to port this to hubitat
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?
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.
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.
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.
Many thanks,
Mark
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.
I followed the directions here - http://codersaur.com/2016/04/smartthings-data-visualisation-using-influxdb-and-grafana/
All good except for two issues
When I add a device I have to switch between attributes (temperature and contact for example) for grafana to pull in any data.
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)"
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
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).
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"}
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?
I'm only getting temperature entries without decimals in my InfluxDB.. Is there a solution to this?
Any chance you can work a version for hubitat?
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 :)
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?
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?
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!
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
Unable to set NightMode
java.text.ParseException: Unparseable date: "2017-10-17T22:30:00+01:00" @ line 2114
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!
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
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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.