My everspring st814 device type


(Larry) #1

Here is my tweaked version of the driver:

Changes:

  1. make the temp, humidity change amounts user configure able in the device (edit device to change)
    default temp change is still 2 degrees as before, default humidity is same 5 percent as before.

  2. make the wake up and reporting interval timeout user configurable. It was 5 minutes which is way to fast when these are used outdoors or in freezer and would cause battery to decay quickly. Default is 180 minutes.

  3. add icons to temp and humid display

  4. add color to humidity display and battery percentage.

  5. Make primary temp display larger.

  6. add update function so when you change settings it reconfigures and also overrides incorrect values.

  • Version 2.

Just set my second one up and temp is inaccurate so add offset temp and humidity to fix.

  • also limit temp to 1 place after the decimal. Also add more colors for temp for the lower ranges.

v3 …
add last update tile on bottom so you can at a glance make sure it is still communicating with smarthings and the time of the last update of the temp. Note: there is a new input preference that defaults to -5 (time zone offset) that** you must **set yourself in edit/device type to get accurate times.


Recommend a temperature sensor? (2017)
(Mike) #2

Nice! I have a number of these and will be testing this device type soon. The changes you listed look great!


(Mike) #3

I had a chance to get this going finally and it looks but I can’t seem to get updates any faster than every 15 minutes. I have the report timeout interval set to 3 minutes for testing but it doesn’t seem to have an impact. Any ideas?


(Larry) #4

same here it think it ignores the settings if there are not any temp changes. try putting it somewhere where it will heat up or cool down quickly and I think you will see changes… I believe that may be the minimum time or something.


(Matthew) #5

Not sure what I am doing wrong on this. I am getting batter level and that is it.

Steps to install:

  1. Added device to ST Showed up as and Moisture device
  2. Added custom device type by using code above.
    3 went to my devices and updated it to use the custom device.
    4 pulled batteries and then reinserted. Once rebooted hit config in ST app.

Here is the response I get from Live Logs when I hit the configure button:
11:11:49 PM: error java.lang.NullPointerException: Cannot invoke method toByteArray() on null object @ line 322
f4159789-22c6-4375-a95c-a8e90fb122d4 11:11:49 PM: debug Humidity adjust = null
f4159789-22c6-4375-a95c-a8e90fb122d4 11:11:49 PM: debug Temperature adjust = null
f4159789-22c6-4375-a95c-a8e90fb122d4 11:11:49 PM: debug Humidity change value = 5
f4159789-22c6-4375-a95c-a8e90fb122d4 11:11:49 PM: debug Temperature change value = null
f4159789-22c6-4375-a95c-a8e90fb122d4 11:11:49 PM: debug ST814: In configure timeout value = null

Then I keep seeing these errors in the live log for this device.

f4159789-22c6-4375-a95c-a8e90fb122d4 11:16:20 PM: error groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method java.lang.Integer#plus.
Cannot resolve which method to invoke for [null] due to overlapping prototypes between:
[class java.lang.Character]
[class java.lang.String]
[class java.lang.Number] @ line 278
f4159789-22c6-4375-a95c-a8e90fb122d4 11:16:20 PM: debug SensorMultilevelReport cmd: SensorMultilevelReport(precision: 0, scale: 0, scaledSensorValue: 38, sensorType: 5, sensorValue: [38], size: 1)}
f4159789-22c6-4375-a95c-a8e90fb122d4 11:16:20 PM: error java.lang.NullPointerException: Cannot invoke method multiply() on null object @ line 258
f4159789-22c6-4375-a95c-a8e90fb122d4 11:16:20 PM: debug SensorMultilevelReport cmd: SensorMultilevelReport(precision: 1, scale: 0, scaledSensorValue: 23.8, sensorType: 1, sensorValue: [0, 238], size: 2)}
f4159789-22c6-4375-a95c-a8e90fb122d4 11:16:20 PM: error java.lang.NullPointerException: Cannot invoke method multiply() on null object @ line 258
f4159789-22c6-4375-a95c-a8e90fb122d4 11:16:20 PM: debug SensorMultilevelReport cmd: SensorMultilevelReport(precision: 1, scale: 0, scaledSensorValue: 23.8, sensorType: 1, sensorValue: [0, 238], size: 2)}
f4159789-22c6-4375-a95c-a8e90fb122d4 11:16:20 PM: error java.lang.NullPointerException: Cannot invoke method multiply() on null object @ line 258
f4159789-22c6-4375-a95c-a8e90fb122d4 11:16:20 PM: debug SensorMultilevelReport cmd: SensorMultilevelReport(precision: 1, scale: 0, scaledSensorValue: 23.8, sensorType: 1, sensorValue: [0, 238], size: 2)}
f4159789-22c6-4375-a95c-a8e90fb122d4 11:16:20 PM: error java.lang.NullPointerException: Cannot invoke method multiply() on null object @ line 258
f4159789-22c6-4375-a95c-a8e90fb122d4 11:16:20 PM: debug SensorMultilevelReport cmd: SensorMultilevelReport(precision: 1, scale: 0, scaledSensorValue: 23.8, sensorType: 1, sensorValue: [0, 238], size: 2)}
f4159789-22c6-4375-a95c-a8e90fb122d4 11:16:20 PM: error java.lang.NullPointerException: Cannot invoke method multiply() on null object @ line 258
f4159789-22c6-4375-a95c-a8e90fb122d4 11:16:20 PM: debug SensorMultilevelReport cmd: SensorMultilevelReport(precision: 1, scale: 0, scaledSensorValue: 23.8, sensorType: 1, sensorValue: [0, 238], size: 2)}
f4159789-22c6-4375-a95c-a8e90fb122d4 11:16:20 PM: error java.lang.NullPointerException: Cannot invoke method multiply() on null object @ line 258
f4159789-22c6-4375-a95c-a8e90fb122d4 11:16:20 PM: debug SensorMultilevelReport cmd: SensorMultilevelReport(precision: 1, scale: 0, scaledSensorValue: 23.8, sensorType: 1, sensorValue: [0, 238], size: 2)}
f4159789-22c6-4375-a95c-a8e90fb122d4 11:16:20 PM: error java.lang.NullPointerException: Cannot invoke method multiply() on null object @ line 258
f4159789-22c6-4375-a95c-a8e90fb122d4 11:16:20 PM: debug SensorMultilevelReport cmd: SensorMultilevelReport(precision: 1, scale: 0, scaledSensorValue: 23.8, sensorType: 1, sensorValue: [0, 238], size: 2)}
f4159789-22c6-4375-a95c-a8e90fb122d4 11:15:25 PM: error groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method java.lang.Integer#plus.
Cannot resolve which method to invoke for [null] due to overlapping prototypes between:


(Matthew) #6

Ok got it working Had to go through and set all the default values. However I can’t set a time offset value to a -8. In the iOS app there is no way to enter a negative number. If I set it through the web and then pull up the settings on the iOS app it shows that value as invalid. So have to set it to 0.


(Matthew) #7

So something is messed up with settings at least on iOS. Every time I go into settings and set done it just starts throwing these logs:

[class java.lang.String]
[class java.lang.Number] @ line 278
f4159789-22c6-4375-a95c-a8e90fb122d4 11:31:36 PM: debug SensorMultilevelReport cmd: SensorMultilevelReport(precision: 0, scale: 0, scaledSensorValue: 84, sensorType: 5, sensorValue: [84], size: 1)}
f4159789-22c6-4375-a95c-a8e90fb122d4 11:31:35 PM: error java.lang.NullPointerException: Cannot invoke method multiply() on null object @ line 258
f4159789-22c6-4375-a95c-a8e90fb122d4 11:31:35 PM: debug SensorMultilevelReport cmd: SensorMultilevelReport(precision: 1, scale: 1, scaledSensorValue: 76.2, sensorType: 1, sensorValue: [2, 250], size: 2)}
f4159789-22c6-4375-a95c-a8e90fb122d4 11:31:00 PM: error java.lang.NullPointerException: Cannot invoke method toByteArray() on null object @ line 322
f4159789-22c6-4375-a95c-a8e90fb122d4 11:31:00 PM: debug Humidity adjust = null
f4159789-22c6-4375-a95c-a8e90fb122d4 11:31:00 PM: debug Temperature adjust = null
f4159789-22c6-4375-a95c-a8e90fb122d4 11:31:00 PM: debug Humidity change value = null
f4159789-22c6-4375-a95c-a8e90fb122d4 11:31:00 PM: debug Temperature change value = null
f4159789-22c6-4375-a95c-a8e90fb122d4 11:31:00 PM: debug ST814: In configure timeout value = null
f4159789-22c6-4375-a95c-a8e90fb122d4 11:30:56 PM: debug Humidity adjust = null
f4159789-22c6-4375-a95c-a8e90fb122d4 11:30:56 PM: debug Temperature adjust = -10
f4159789-22c6-4375-a95c-a8e90fb122d4 11:30:56 PM: debug Humidity change value = 5
f4159789-22c6-4375-a95c-a8e90fb122d4 11:30:56 PM: debug Temperature change value = 1
f4159789-22c6-4375-a95c-a8e90fb122d4 11:30:56 PM: debug ST814: In configure timeout value = 1
f4159789-22c6-4375-a95c-a8e90fb122d4 11:30:56 PM: debug Temperature Offset too low… resetting to -10
f4159789-22c6-4375-a95c-a8e90fb122d4 11:30:56 PM: debug Humidity Change Amount too low… resetting to 5
f4159789-22c6-4375-a95c-a8e90fb122d4 11:30:56 PM: debug Temperature Change Amount too low… resetting to 1
f4159789-22c6-4375-a95c-a8e90fb122d4 11:30:56 PM: debug Time Interval too low… resetting to 1
f4159789-22c6-4375-a95c-a8e90fb122d4 11:30:56 PM: debug in updated


(Larry) #8

I think it might be interpreting 0 as null try 1 and see if that fixes it. Why can your not enter negative in IOS what error do u get


(Larry) #9

ok I put a new version up… get it from the github… default values are really broken in the current system, so I default everything if they are null. Try that and let me know… however, I don’t see why inputing -8 would be broken in ios …
have you tried it without a leading 0 ie just -8.

if you cannot get it working you should be able to set it through the ide, or change the code.

also try to delete device (exclude) and start over… I have a feeling those errors are because you set the parameters in the ide, and it sets them as a string, and the system needs them to be numeric.


(Matthew) #10

Will be able to try in a bit. On iOS there is no - key I can find to even enter a negative. However when I edit it it won’t let me save anything unless i delete out the txt on the offset line. Not sure why.


(Matthew) #11

Updated… Don’t get any errors pushing config to the device now. However I still see these in the live log, and don’t get any updates.
f4159789-22c6-4375-a95c-a8e90fb122d4 8:08:13 AM: error groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method java.lang.Integer#plus.
Cannot resolve which method to invoke for [null] due to overlapping prototypes between:
[class java.lang.Character]
[class java.lang.String]
[class java.lang.Number] @ line 280
f4159789-22c6-4375-a95c-a8e90fb122d4 8:08:13 AM: debug SensorMultilevelReport cmd: SensorMultilevelReport(precision: 0, scale: 0, scaledSensorValue: 45, sensorType: 5, sensorValue: [45], size: 1)}
f4159789-22c6-4375-a95c-a8e90fb122d4 8:08:13 AM: error java.lang.NullPointerException: Cannot invoke method multiply() on null object @ line 260
f4159789-22c6-4375-a95c-a8e90fb122d4 8:08:13 AM: debug SensorMultilevelReport cmd: SensorMultilevelReport(precision: 1, scale: 0, scaledSensorValue: 20.3, sensorType: 1, sensorValue: [0, 203], size: 2)}


(Larry) #12

well that is your problem the offset cannot be blank… that is what it is complaining about… in addition they -sign is a feature of you keyboard… an di know there is one in the ios keyboard maybe you need to switch screens. without configuring it correctly it will not work


(Matthew) #13

Ok I think all the settings are going correctly, but still have some errors. Also I noticed that the keyboard on iOS doesn’t always show the +/- key at the top left corner when in ST… Not sure why, not only your device.

Here are the latest logs
[class java.lang.Character]
[class java.lang.String]
[class java.lang.Number] @ line 280
f4159789-22c6-4375-a95c-a8e90fb122d4 8:41:43 AM: debug SensorMultilevelReport cmd: SensorMultilevelReport(precision: 0, scale: 0, scaledSensorValue: 40, sensorType: 5, sensorValue: [40], size: 1)}
f4159789-22c6-4375-a95c-a8e90fb122d4 8:41:42 AM: error java.lang.NullPointerException: Cannot invoke method multiply() on null object @ line 260
f4159789-22c6-4375-a95c-a8e90fb122d4 8:41:42 AM: debug SensorMultilevelReport cmd: SensorMultilevelReport(precision: 1, scale: 0, scaledSensorValue: 24.0, sensorType: 1, sensorValue: [0, 240], size: 2)}
f4159789-22c6-4375-a95c-a8e90fb122d4 8:41:36 AM: debug Parse returned: [[name:battery, value:100, unit:%, displayed:true, isStateChange:false, linkText:ST 814, descriptionText:ST 814 battery is 100%]] for cmd=BatteryReport(batteryLevel: 100) description=zw device: 13, command: 8003, payload: 64
f4159789-22c6-4375-a95c-a8e90fb122d4 8:41:35 AM: debug Parse returned: [[descriptionText:ST 814 woke up, isStateChange:false], 8002, 8408] for cmd=WakeUpNotification() description=zw device: 13, command: 8407, payload:
f4159789-22c6-4375-a95c-a8e90fb122d4 8:41:35 AM: debug Battery status is outdated, requesting battery report
f4159789-22c6-4375-a95c-a8e90fb122d4 8:41:35 AM: debug Battery status was last checked 580.88665 minute(s) ago
f4159789-22c6-4375-a95c-a8e90fb122d4 8:41:35 AM: debug cmd.CMD=8407; result=[[descriptionText:ST 814 woke up, isStateChange:false]] - updating battery status
f4159789-22c6-4375-a95c-a8e90fb122d4 8:41:34 AM: debug Parse returned: [[isStateChange:false, displayed:false, linkText:ST 814]] for cmd=AlarmReport(alarmLevel: 1, alarmType: 2) description=zw device: 13, command: 7105, payload: 02 01
f4159789-22c6-4375-a95c-a8e90fb122d4 8:41:34 AM: info ST 814 powered up!
f4159789-22c6-4375-a95c-a8e90fb122d4 8:41:34 AM: debug AlarmReport cmd: AlarmReport(alarmLevel: 1, alarmType: 2)}
f4159789-22c6-4375-a95c-a8e90fb122d4 8:41:34 AM: debug Parse returned: [[isStateChange:false, displayed:false, linkText:ST 814]] for cmd=AlarmReport(alarmLevel: 1, alarmType: 2) description=zw device: 13, command: 7105, payload: 02 01
f4159789-22c6-4375-a95c-a8e90fb122d4 8:41:34 AM: info ST 814 powered up!
f4159789-22c6-4375-a95c-a8e90fb122d4 8:41:34 AM: debug AlarmReport cmd: AlarmReport(alarmLevel: 1, alarmType: 2)}
f4159789-22c6-4375-a95c-a8e90fb122d4 8:41:20 AM: debug Tz Offset = -5
f4159789-22c6-4375-a95c-a8e90fb122d4 8:41:20 AM: debug Humidity adjust = 0
f4159789-22c6-4375-a95c-a8e90fb122d4 8:41:20 AM: debug Temperature adjust = 0
f4159789-22c6-4375-a95c-a8e90fb122d4 8:41:20 AM: debug Humidity change value = 5
f4159789-22c6-4375-a95c-a8e90fb122d4 8:41:20 AM: debug Temperature change value = 1
f4159789-22c6-4375-a95c-a8e90fb122d4 8:41:20 AM: debug ST814: In configure timeout value = 15


(Larry) #14

ok I put another version up with more debugging. not sure why you are getting the errors something must be null it only goes into the block of code on sensortype=1

here is what it should look like…
fedd89ec-accf-4cf8-8fea-d88caee4a5d7 ‎11‎:‎58‎:‎49‎ ‎AM: debug Parse returned: [[value:1.6, unit:F, name:temperature, isStateChange:true, displayed:true, linkText:Kitchen Freezer, descriptionText:Kitchen Freezer temperature is 1.6°F]] for cmd=SensorMultilevelReport(precision: 1, scale: 1, scaledSensorValue: 1.6, sensorType: 1, sensorValue: [0, 16], size: 2) description=zw device: 32, command: 3105, payload: 01 2A 00 10

fedd89ec-accf-4cf8-8fea-d88caee4a5d7 ‎11‎:‎58‎:‎49‎ ‎AM: debug the temp = 1.6

fedd89ec-accf-4cf8-8fea-d88caee4a5d7 ‎11‎:‎58‎:‎49‎ ‎AM: debug startval = 1.6

fedd89ec-accf-4cf8-8fea-d88caee4a5d7 ‎11‎:‎58‎:‎49‎ ‎AM: debug offset = 0

fedd89ec-accf-4cf8-8fea-d88caee4a5d7 ‎11‎:‎58‎:‎49‎ ‎AM: debug scaled scaled sensor value = 1.6 scale = 1

fedd89ec-accf-4cf8-8fea-d88caee4a5d7 ‎11‎:‎58‎:‎49‎ ‎AM: debug SensorMultilevelReport cmd: SensorMultilevelReport(precision: 1, scale: 1, scaledSensorValue: 1.6, sensorType: 1, sensorValue: [0, 16], size: 2)}


(Matthew) #15

I haven’t tried your new code, but figured it out I think. If I go in and change settings on the iOS app. I have to make changes and save each setting. It seems that some of the defaults you pass in aren’t getting picked up. Not sure which ones. Just reset all the settings hit done and now everything seems to be working. If I go back in and only change one setting and apply the changes then I start getting errors again, until I go in update each field and hit done.

Let me know if you want me to test anything else, happy it is working now, and I know the work around. My guess is the problem is something with the iOS app…


(Larry) #16

must be the app. maybe you should try removing and reinstalling… because defaults only apply the first time…
once you set something it should stay set… defaults have nothing to do unless they values are null.

anyone else have the ios app . can you confirm editing and saving it is wiping out the values… if so I need to report or you should report this as a bug.


(Matthew) #17

Uninstall the custom device or the iOS app? Happy to do either. :slight_smile:


(Larry) #18

ios app and reinstall… sounds like it is screwy


(Matthew) #19

I would expect no less from ST


(Matthew) #20

Ok reinstalled iOS app, things seem to be working great now.

Thanks for the help, and thanks for the device type. Great stuff, going to make monitoring my humidor and other things awesome.

Thanks again,