[APP][Pro&Cloud] Shelly

@Phuturist No, not at the moment. Feel free to add a feature request to Github but I have more important changes to work on right now.

It looks like I made it work. I add both relays with a custom icon then I removed the second relay channel and re-added that with an other icon. If I disable auto app update it seems to stay like that.

That might give you seperate icons but will cause issues with updating the state of the device of the second channel where the first channel is removed. If you do not control the device from outside Homey (like flipping a switch manually) you will not notice this, otherwise the device might be out of sync from time to time.

This post contains all information about the v3.x release of my app.

What about v1.x?

This version is not being updated anymore as it’s too much work to keep maintaining two versions of my app. I’m aware that the functionality for the action events isnt working anymore. If you depend on this functionality keep reading. There might be other stuff not working anymore as well.

Version 3.x

Version 3.x is a major release containing a lot of changes and improvements, see the changelog below. Most notable changes are refactoring for SDK3 and the replacement of the polling mechanism by a coap listener (which should bring faster device updates and less network traffic). Because of the refactoring to SDK3 this version requires Homey firmware 5.x which is currently still in the experimential channel. Unfortuntely it’s taking Athom forever to stabilize.

If you are not on Homey firmware 5.x but you want to use the new features added in 3.x you can upgrade at your own risk, or wait for Athom to release it to the stable channel. Once you are on firmware 5.x you can install the release from the test channel in the app store: Shelly App for Homey | Homey

Just be aware, once you have installed the 3.0.0 release it’s not adviced to go back to the 1.x version as there are too many breaking changes between these releases.

v3.0.18 - 2021-xx-xx

  • Refactored the app to use SDK3 (requires Homey firmware 5.x) and homeycompose to make it futureproof
  • Refactored the app and replaced the polling mechanism for a CoAP listener. Everything related to polling has been removed. This will greatly reduce network traffic and should result in faster updates of the devices in Homey when the state of a device is changed, for instance when a door/window sensor is triggered
  • Improved the way the triggercard for “Action event” works. It now uses CoAP for communication as well, this means this release will remove all HTTP callbacks from the Shelly devices if Homey detects a Shelly device that is using them.
  • Impoved the action event triggercard itself has as well, you can now select the device and action which should trigger the flow instead of having to use tokens. This might require updating your flows to keep it working though.
  • Added support for the Shelly Uni
  • Added support for the Shelly 1L
  • Added support for the new Shelly Bulb RGBW, pair it as Shelly Bulb
  • Added support for Shelly Motion although it might need to be paired manually for now
  • Added a mechanism that will update the device IP address if it detects a paired Shelly that has been added under a different IP address than it’s currently available in the network. Useful for people that have not assigned static IP addresses to their devices.
  • Added trigger flowcard for when an overpowered event takes places for the devices Plug, Plug-s, 1PM/L, 2, 25, Dimmer, 3EM, EM, RGBW2Color and RGBW2White
  • Added condition flowcard for checking if there is a new firmware available
  • Added action flowcard for updating the firmware
  • Added action flowcard for the Shelly 2(.5) Roller Shutter allowing you to change the roller shutter back to a previously saved state
  • Added action events for the Shelly RGBW2 Color and RGBW2 White.
  • Added alarm capabilities and a generic triggercard called “Input state changed” for all Shelly devices which support the SW terminal and/or external input. This was already available for the Shelly Dimmer but I refactored this to make it generic. If you are using the custom trigger or condition cards for the inputs of the Shelly Dimmer you will have to update your flows to make this work.
  • Made the trigger cards for the optional temperature sensors of the Shelly 1 and Shelly 2 more generic to support the Shelly Uni as well. This will require you to update any flows using these trigger cards.
  • Updated the effect card for the Shelly RGBW2 Color allowing you to stop an effect.
  • Removed voltage for battery powered devices as it’s not available under the CoAP protocol
  • Removed or replaced the meter power in wmin for the default meter power in Wh for all devices where applicable
  • Removed the power usage and consumption from the second device of the Shelly 2 Relay as this device does not measures these values per relay individually. If you use the values from the second device in your flows update the flows to use the values from the first device.
  • Removed the relay capability from the second and third device of a Shelly 3EM as there is only one relay for this device. If you use the relay from the second or third device in your flows please update the flows to use the values from the first device.
  • Replaced the custom “meter power consumed” capability for the Shelly EM and Shelly 3EM with the default “meter power” capability. If you are using the triggercard for consumed power you will have to update your flows.
  • Fixed an issue with the action tag for the Shelly i3 not showing which channel triggered the action.
  • Fixed an issue with the tilt trigger card of the Shelly DW2 sensor
  • Fixed an issue with dimming in color and white mode for the Shelly Bulb
  • Fixed an issue with setting the temperature in white mode for the Shelly Bulb
  • Fixed an issue with manual pairing of Shelly 2.5 Relay and Roller Shutter
  • Various minor code improvements which should improve overall performance
4 Likes

Installed, going to test ( my wife loves me :wink:)

1 Like

Hi Phutorist, Will have a look on monday when I return to the office. Have a nice weekend and thanks again for all your the work you are putting in to this.

Installed and testing. One remark. Im finally able to use shelly 3EM within power by hour app. There is however one mistake in shelly app. Shelly is reporting consumption in watthours and this number is displayed in app, but in app/device its in kwh - number need to be divided by 1000.

Are you sure about this? According to the documentation the Shelly 3EM reports the usage in Wh.

Yes, thats correct, but in Homey is this value assigned to kwh see screenshot. Consumption in Shelly clod app is 720kwh

I have removed my first Shelly 1PM devices (2 of them) and re-added them, but now there is no rapportage of anything. Last value ‘unknown’ for all four sensors (power, power, temp and state of sw terminal). I am a little bit hesitant to remove and add the others.

Ok, I’ll fix that. It’s unrelated to this update though, it’s been off for all meter_power capabilities. Strange no one has not reported that before.

Can you send me diagnostics report. After that, try and reboot the app to see if that helps.

1 Like

636ed52f-85cb-4381-b455-e1da337faa25

As requested, the ID, will restart the app now.

Restart of the app didn’t solve.

There doesn’t seem to be any interaction with the shelly device at all. Turning off and on with the physical button doesn’t reflect any change in the homey. Turning off with the shelly native app doesn’t get reflected in homey either. Turning it off and on in homey doesn’t do anything with the actual shelly device.

I’ve double checked, but it is using the correct IP (couldn’t have been the issue since it got auto discovered).

These issue has been fixed with release 3.0.1 which is now available in the test channel in the app store: Shelly App for Homey | Homey

Please re-install and continu testing.

1 Like

Yes, there is connectivity again. Turning off and on works. The left power meter isn’t showing anything though. It stays at 0W. The right power (in kWh) reports nicely. State of SW terminal stays empty too, don’t know what it is though.

edit:
Restarting the app solves it a tiny bit. Turning it off now shows 18.21 W. I’m getting the impression it only updates after a app restart.

edit2:
I can confirm, it only updates the W at app restart. If I turn it off and restart the app it reports 0W. Turning it on doesn’t change the W. But after app restart with the light on it turns directly to 18W. Turning it off again doesn’t change the 18 W until I restart the app.

Created another ID for you to check: ae25c1ab-f6a4-4750-9cb0-5b010655ad74

edit3:
Absolutely love the way the Action Event now works! Great job!

Wow, that was super fast. One more remark. Aldo returned energy should be fixed :wink:. Before it was in Wh, now its in kWh but value is in Wh.

Yes, I updated the returned energy to kWh as well. The value will probably update correctly on 3.0.1 when it actually gets updated with a new value (when the sun shines tomorrow?). If not, let me know.

Restarting the app will fix this for you. I’ll try and implement some extra code to prevent this from happening as I know what’s going on.

Restarting doesn’t solve it, it only shows the actual value at restart. After that it doesn’t update until the next app restart.

Do you know how to run the app from the command line using the homey app run command as explained in this tutorial: [HOW TO] CLI install method

I have created a debug version from the app that should spit out more information on the command line when running the app. You can find it here: https://github.com/jghaanstra/cloud.shelly/tree/debug

1 Like

I’ll do that tomorrow! Thx

Just noticed this, there is no need to remove and re-add devices unless it’s specifically mentioned in the changelog for your type of device.

Right, did the debug build. I’m getting the following a lot, notice the “but no Shelly devices have been added to Homey yet”. All Shelly devices have been added and all are working well. Maybe this message is just fine, but just don’t know.

2020-10-10 08:05:59 [log] [ShellyApp] energyCounter0 changed from 891681 to 891753 for device 00D478 but no Shelly devices have been added to Homey yet.
2020-10-10 08:05:59 [log] [ShellyApp] deviceTemperature changed from 49.4 to 49.51 for device B92F94 but no Shelly devices have been added to Homey yet.
2020-10-10 08:06:00 [log] [ShellyApp] power0 changed from 91.71 to 101.63 for device 00D478 but no Shelly devices have been added to Homey yet.
2020-10-10 08:06:00 [log] [ShellyApp] power0 changed from 18.87 to 18.79 for device E5AF28 but no Shelly devices have been added to Homey yet.
2020-10-10 08:06:00 [log] [ShellyApp] energyCounter0 changed from 89626 to 89643 for device E5AF28 but no Shelly devices have been added to Homey yet.
2020-10-10 08:06:00 [log] [ShellyApp] deviceTemperature changed from 29.29 to 29.41 for device E5AF28 but no Shelly devices have been added to Homey yet.
2020-10-10 08:06:00 [log] [ShellyApp] deviceTemperature changed from 26.25 to 26.31 for device B907AF but no Shelly devices have been added to Homey yet.

Now what I see is the following. My washing machine, I haven’t come to re-adding it yet (isn’t necessary I know :wink: ). As you can see, the power0 of this device is working.

The two devices i’ve removed and readded don’t report power, except for when the app gets restarted. So there is a difference between the existing ones and the devices i’ve removed and readded.

The log however shows the power change (this is the device I’ve readded yesterday, of which is the screenshot below too):

2020-10-10 08:17:00 [log] [ShellyApp] power0 changed from 18.33 to 18.3 for device E5AF28 but no Shelly devices have been added to Homey yet.

It just doesn’t get reflected in the app.

Different question, is there a way to filter this log in live state? Or should I just copy paste and see if I can get the Shelly device where I think there is an issue?

And there is another thing of which I don’t know if it is intentional. The 1PM’s have State of SW terminal but it stays empty:

As where my dimmer2 has the following, which makes more sense:

The latter reports W, even though it is turned off. It should be reporting 0, or at least close to it if it counts it’s own W. And after restart of the app, it’s gone again. It reports 0W. Turning it on, doesn’t show the W, so same issue as with the 1PM’s i’ve readded. This one however is an existing one which I haven’t readded.