Hi @jpansarasa
In the preference section, what should I be typing into the fields to get them active? (Yes/No, True/False, etc)
Hi @jpansarasa
In the preference section, what should I be typing into the fields to get them active? (Yes/No, True/False, etc)
Disregard my previous post. I realized that it was better to make the changes through the mobile app than it was to do it through the IDE.
Thanks for the great work.
You can enter those values in the IDE if you want (although I agree it is easier to use the smart phone app)
You can use the values of true
or false
for āDisable On/Offā, āDisplay power events in the Activity log?ā, and āEnable debug logging?ā values.
For the āRespond to switch all?ā, the valid values are "Disabled", "Off Enabled", "On Enabled", "On And Off Enabled"
Any idea why I might be seeing something like this?
One of my two devices essentially sends 3 updates at the same time while the other device sends just the 1. Ends up causing my SmartApp to notify 3 times when the wash is done. Unclear if this is just a SmartThings nuance requiring a repairing or an issue with the Device Type.
Not sure but I can speculateā¦
It could be the confluence of state change in the device type along with something polling the device.
It is hard to tell since would be greater logging detail from the device type that would tell me the raw values sent to the MeterReport(ā¦) method that could help.
Is this at all helpful?
These all came in at the same instant basically. Two screenshots because we canāt expand the IDE log window.
i got one of these devices yesterday and this device type works great. thanks!
I had a double notification over the weekend.
I looked at these logs and it looks like the commands from the hub are duplicate.
Let me see if I can ignore duplicate messages but that may not be a quick fix.
Hi guys,
Iām just getting started with SmarThings programming.
I copy-pasted the latest github code into a new app I created on the IDE. After I click āSaveā I get the following error:
āgroovy.lang.MissingMethodException: No signature of method: script1437481580769299245021.metadata() is applicable for argument types: (script1437481580769299245021$_run_closure1) values: [script1437481580769299245021$_run_closure1@4b1d9c8f]
Possible solutions: getMetadata(), getState(), setState(java.lang.Object), metaClass(groovy.lang.Closure)ā
The code is copy-pasted directly from github so Iām not sure what itās complaining about.
Not sure what is going on. I just went to GitHub, cut-and-pasted the code into the ide and it worked for me. Did you copy the ārawā view of the code? (Click the ārawā button, select all, then paste into the ide).
James
Apologies. Iām very new to SmartThings development, although I am a programmer so I should have known better.
I didnāt realize the code has to be pasted into āMy Device Typesā (a new device had to be created). I thought the code would execute under āMy Appsā.
We learn something new every day. Now it works perfectly. Thank you so much for saving me all the time it would take to write the code myself
Hi, @jpansarasa. I like the looks of this device type, and Iām trying it out with the Better Laundry Monitor app.
The device type appears to be mostly working, but I canāt access the configure panel from the mobile app. When I tap it, the iOS network activity in the status bar spins, then nothing happens. I think I was able to set them from the IDE, but I am not sure if maybe theyāve not taken effect or if there is just nothing new to be logged. Iām currently running a cycle on the washer, but itās the first time Iāve done so with an energy monitor, so I donāt know what to expect.
There hasnāt been any activity in this thread for a few months, is it possible this is due to the recent SmartThings app update?
Also, I think by the time I had added the custom device type and switched my device to it, the device had already gone to inactive. From the Laundry Monitor thread, it seems like that can cause issues with it updating. Could that cause the problem with the configure panel?
To reactivate, it sounds like I just have to power the device off then back on again? Iāll give that a try when this load finishes. Will the custom device type then take care of keeping it active going forward?
I have the Aeon Labs DSC06106-ZWUS Z-Wave Smart Energy Switch. I assume thatās covered by this device type?
Thanks!
UPDATE:
Iāve answered most of my own questions, but not all. I did find that I could access the settings in the mobile app by going to āEdit Deviceā, so that helps. The Configure button still appears to do nothing. Is it supposed to bring up the same settings panel? Or is it doing something else that I donāt know about?
I did get the washerās power monitor back to active by toggling the power button once the washer had finished the load. Now Iām on my second load. Hopefully Iāll get better results out of the Better Laundry Monitor app this time! I think the device being inactive on the last run probably made it not alert.
Edit: One other question. What does the āRespond to switch all?ā setting mean? I can see the options, but Iām not really sure what āswitch allā does in the first place. Is this something to do with the power strip version of the Aeon devices, rather than my single outlet model?
I was just replying to your previous post, glad to see things are working.
If you are talking about the āConfigureā button , that updates the configuration of the device (it is a little useless since that gets called when you edit the preferences). I guess I should remove it.
I think people have used the āBetter Laundry Monitorā app with this device type. I use the app I wrote āYet Another Power Monitorā with my device type. It is essentially the same thing but I donāt have the extra bells and whistles @sudarkoff put in his app.
So there is a concept of āAll switches onā where a group of different devices all perform in unison (like synchronized swimmers). This controls the behavior when this device is added to one of those groups. I donāt think SmartThings supports this feature yet but they might when you group devices in Rooms.
Yep, thatās the button I meant! The name is a little confusing, since my mind linked it to accessing the settings, rather than simply pushing them to the device. After figuring out where the settings were, though, I was starting to figure I must be missing something about that button.
Iāve started with Better Laundry Monitor, since it seemed most appropriate. I didnāt get a notification when the washer finished the last load, but I think that because the Aeon device was inactive during that load, that the smartapp wasnāt getting the updates necessary to alert. Hopefully Iāll have more success this time around. I also hooked up another Aeon device to the dryer.
Hmm. I still seem to be having trouble with the washer. My husband told me the washer is done, but I didnāt get a notification. Checking the logs under the device in the mobile app, it doesnāt appear to be getting updates automatically. It still showed power being used when the machine was off (and itās not a fancy machine that uses any power when off). Tapping refresh on the device did update the power to 0. That was at 6:46pm and the previous log entry was at 6:35pm. There also arenāt many events in the log, despite having the report interval set to 1 minute. Any ideas?
That sounds like it might be related to the Sets functionality thatās supposed to be coming to the app, from what Iāve read. In any case, good to know!
I had a couple questions about the logging, too. What does the ādisplay power eventsā setting apply to? Both the power in W and the energy in kWh? Or just one of those? Same question for the āreport intervalā. At one point, it seemed like the dryer was updating the activity log with energy every minute, but not power.
Thanks for your help!
I ended up removing the energy monitor that was hooked up to the washer from SmartThings completely, then adding it back. That seems to have cleared up the problem with it not updating. This time, a lot less time elapsed between adding the device and changing the device type. Iām not sure if that made the difference or not.
I also tried a different monitor app. I think Better Laundry Monitor was throwing an exception at the point where it was supposed to be sending the notification, according to the debug logs. In any case, between those two changes, I was able to get notifications upon completion of both washer and dryer loads!
Iād still appreciate an answer to my question about the logs, just to better my understanding of what is going on with these energy monitors.
Also, Iām not sure, but there might be a bug in your device type. It seems that if I go into the device settings on the mobile app, then tap Done, it resets the report interval value. Unless I actually change that value before hitting done.
That controls if the changes in power or energy are displayed in the events for the device. There are some 3rd party tools that monitor the events display for changes. It is not necessary to display those events for apps to work in SmartThings.
So the device is configured to report changes when the power changes by 5 watts or 5%. This is why it may report at non-linear intervals.
I have no control over that behavior. That is the SmartThings app. I would file a bug report.
Will do, thanks. Any particular details I should tell them? Itās only that one field thatās a problem, all the others seem fine. Is it a different field type or data type than the rest?
The behavior you are describing is that the current value is not set in the control when you select Edit
on the device. If you turn on debugging in the device type and look in the developer ide at the log, you should see the values passed to the configure()
method. That will tell you if it retains a previously set value or not.