BobRak / OpenHAB-Smartthings

53 stars 54 forks source link

Zooz Power Switch ZEN15 #80

Closed b0rnwr0ng closed 4 years ago

b0rnwr0ng commented 5 years ago

I can't get this to work for the life of me. At one point it was showing power level in the log but mostly device handler error types. Got a bunch of other stock samsung items to work without issue. Not sure what else to look for or what kind of other info is needed.

Items file: Switch ST_Dehumidifier_Switch "Dehumidifer [%s Watts]" <energy> { channel="smartthings:switch:Home:ST_Dehumidifier_Switch:switch" } Number ST_Dehumidifier_Power "Dehumidifer Power [%.2f] Watts" <power> { channel="smartthings:powerMeter:Home:ST_Dehumidifier_Power:power" } Number ST_Dehumidifier_Energy "Dehumidifer Energy [%.2f] kWh" <energy> { channel="smartthings:energyMeter:Home:ST_Dehumidifier_Energy:energy" } Number ST_Dehumidifier_Temp "Dehumidifer Temp [%.0f]" <temperature> { channel="smartthings:temperatureMeasurement:Home:ST_Dehumidifier_Temp:temperature" }

BobRak commented 5 years ago

@b0rnwr0ng Just to make sure I understand: You have other items working in openHAB but not this Dehumidifier. Is that right? Are the working items in your items file but you have not included it in your message (opposed to being discovered by the PaperUi)?

Questions:

  1. Can you control this Dehumidifier through the Smartthings Classic app on your phone?
  2. What messages are you seeing in the OpenHab log when you control the Dehumidifier with your Smartthings app? You should see the json message sent by the hub. Please send me relevant log messages.
  3. Why does the first one have an icon of energy opposed to switch
b0rnwr0ng commented 5 years ago

Thanks in advance for your assistance!

I'm seeing different things now but I feel like I messed with it a lot and something may have gotten messed up along the way. I started first with this device but was unsuccessful and moved on and got several other devices and switches/dimmers working without any problems other than some typeos and silly stuff as most of the time I'm configuring everything via ssh from my phone. It's unfortunately the only way I get to work on it for the most part, lol.

Can you control this Dehumidifier through the Smartthings Classic app on your phone?

Yes, I can control from the classic app and seeing all the info.

Why does the first one have an icon of energy opposed to switch

I do a lot of cut and paste from my phone, so I messed that up but corrected.

What messages are you seeing in the OpenHab log when you control the Dehumidifier with your Smartthings app? You should see the json message sent by the hub. Please send me relevant log messages.

not sure I'm seeing anything as I don't want to switch it off, just want to see the wattage and information it provides.

but here's everything I think: 2019-07-10 20:45:46.063 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler SmartthingsThingHandler of thing smartthings:powerMeter:Home:ST_Dehumidifier_PowerSt tried updating channel power although the handler was already disposed. 2019-07-10 20:45:46.068 [DEBUG] [ings.handler.SmartthingsThingHandler] - Smartthings updated State for channel: smartthings:powerMeter:Home:ST_Dehumidifier_PowerSt:power to 3.687 2019-07-10 20:45:46.072 [DEBUG] [ings.handler.SmartthingsThingHandler] - State timing data, Request time until data received and processed 0, Hub processing time: 22 2019-07-10 20:46:16.331 [DEBUG] [rtthings.internal.SmartthingsServlet] - Smartthings servlet service() called with: <smartthingshubIP>: POST /smartthings/state 2019-07-10 20:46:16.336 [DEBUG] [rtthings.internal.SmartthingsServlet] - Smartthing servlet function requested: state with Method: POST 2019-07-10 20:46:16.341 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler SmartthingsThingHandler of thing smartthings:powerMeter:Home:ST_Dehumidifier_PowerSt tried updating channel power although the handler was already disposed. 2019-07-10 20:46:16.346 [DEBUG] [ings.handler.SmartthingsThingHandler] - Smartthings updated State for channel: smartthings:powerMeter:Home:ST_Dehumidifier_PowerSt:power to 3.717 2019-07-10 20:46:16.349 [DEBUG] [ings.handler.SmartthingsThingHandler] - State timing data, Request time until data received and processed 0, Hub processing time: 21 2019-07-10 20:46:46.056 [DEBUG] [rtthings.internal.SmartthingsServlet] - Smartthings servlet service() called with: <smartthingshubIP>: POST /smartthings/state 2019-07-10 20:46:46.059 [DEBUG] [rtthings.internal.SmartthingsServlet] - Smartthing servlet function requested: state with Method: POST 2019-07-10 20:46:46.066 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler SmartthingsThingHandler of thing smartthings:powerMeter:Home:ST_Dehumidifier_PowerSt tried updating channel power although the handler was already disposed. 2019-07-10 20:46:46.068 [DEBUG] [ings.handler.SmartthingsThingHandler] - Smartthings updated State for channel: smartthings:powerMeter:Home:ST_Dehumidifier_PowerSt:power to 3.79 2019-07-10 20:46:46.071 [DEBUG] [ings.handler.SmartthingsThingHandler] - State timing data, Request time until data received and processed 0, Hub processing time: 24 2019-07-10 20:47:16.062 [DEBUG] [rtthings.internal.SmartthingsServlet] - Smartthings servlet service() called with: <smartthingshubIP>: POST /smartthings/state 2019-07-10 20:47:16.066 [DEBUG] [rtthings.internal.SmartthingsServlet] - Smartthing servlet function requested: state with Method: POST 2019-07-10 20:47:16.074 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler SmartthingsThingHandler of thing smartthings:powerMeter:Home:ST_Dehumidifier_PowerSt tried updating channel power although the handler was already disposed. 2019-07-10 20:47:16.078 [DEBUG] [ings.handler.SmartthingsThingHandler] - Smartthings updated State for channel: smartthings:powerMeter:Home:ST_Dehumidifier_PowerSt:power to 3.809 2019-07-10 20:47:16.082 [DEBUG] [ings.handler.SmartthingsThingHandler] - State timing data, Request time until data received and processed 0, Hub processing time: 24 things: Thing switch ST_Dehumidifier_Switch [ smartthingsName="Dehumidifier" ] Thing powerMeter ST_Dehumidifier_Power [ smartthingsName="Dehumidifier" ] Thing energyMeter ST_Dehumidifier_Energy [ smartthingsName="Dehumidifier" ] Thing temperatureMeasurement ST_Dehumidifier_Temp [ smartthingsName="Dehumidifier" ] items: Switch ST_Dehumidifier_Switch "Dehumidifer [%s]" <switch> { channel="smartthings:switch:Home:ST_Dehumidifier_Switch:switch" } Number ST_Dehumidifier_Power "Dehumidifer Power [%.2f] Watts" <power> { channel="smartthings:powerMeter:Home:ST_Dehumidifier_Power:power" } Number ST_Dehumidifier_Energy "Dehumidifer Energy [%.2f] kWh" <energy> { channel="smartthings:energyMeter:Home:ST_Dehumidifier_Energy:energy" } Number ST_Dehumidifier_Temp "Dehumidifer Temp [%.0f]" <temperature> { channel="smartthings:temperatureMeasurement:Home:ST_Dehumidifier_Temp:temperature" } sitemap: Text item=ST_Dehumidifier_Power label="Dehumidifer" { Text item=ST_Dehumidifier_Power Text item=ST_Dehumidifier_Energy Text item=ST_Dehumidifier_Temp } image

On a side note, at one point I had ST_Dehumidier_PowerSt as a String, just to see if it would return the info, but I no longer have that anywhere.

b0rnwr0ng commented 5 years ago

So this morning trying to track down the PowerSt which I couldn't. I wound up running discovery in PaperUI, then reatarted the binding in openhab console with bundle:restart org.openhab.org.smartthings and this got me the power meter to show in OH.

b0rnwr0ng commented 5 years ago

So upon some more investigation, it appears smartthings shows wattage, which is pulling now, but the energyMeter not showing I wonder if thats just calculated rather than provided. I think the ST IDE may have threw me off for what it can capture.

switch: on energy: 0.744 kWh power: 3.647 W checkInterval: 1920

Im not sure where I was seeing Temperature, but apparently not supported here!

b0rnwr0ng commented 5 years ago

so I'm not sure what exactly happened, but the energy meter just started working out of nowhere. I'm not entirely sure if it had something to do with me adding a rrd4j.persist file or not.

BobRak commented 5 years ago

I've had other people report that all of the sudden things started working and they had not made any changes. Of course, I have no way of knowing why or what may have happened.

Is everything working now? Is so please let me know and close this issue, BTW I'm going to be out of town for the next couple of days,

b0rnwr0ng commented 5 years ago

It appears so. Nothing in debug logs that I can see.

I do notice some random things were the IDE shows device handlers but either no events or not being captured. I can only assume they aren't supported features via smartthings. I will look around a bit more and create new issue if need be.

Thanks for your help and creating the binding!