Releases

Posted on
Sun Mar 08, 2020 12:19 pm
aaronlionsheep offline
Posts: 260
Joined: Feb 24, 2019
Location: Virginia, USA

Releases

I have released version 0.0.4 which will be the first released beta. While in beta, please use the release page on my GitHub to download the latest versions https://github.com/AaronLionsheep/ShellyMQTT/releases

Pleas review the Wiki for instructions on setting up devices and getting started: https://github.com/AaronLionsheep/ShellyMQTT/wiki

NOTE: The MQTT Connector plugin is required! Please ensure you have it installed, if not please download it! (http://www.indigodomo.com/pluginstore/211/)

Please let me know if you have any issues or questions.

Posted on
Sun Mar 08, 2020 5:24 pm
aaronlionsheep offline
Posts: 260
Joined: Feb 24, 2019
Location: Virginia, USA

Re: Releases

Beta version 0.0.5 has been published to the releases page that addresses issues identified in beta 0.0.4
https://github.com/AaronLionsheep/ShellyMQTT/releases/tag/0.0.5

Posted on
Fri Mar 13, 2020 9:11 am
aaronlionsheep offline
Posts: 260
Joined: Feb 24, 2019
Location: Virginia, USA

Re: Releases

Beta version 0.0.6 has been released. The changes are outlined in the page linked below.

Please note that this breaks Dimmers, Bulbs, and the temperature add-on devices that were previously created. Please delete these devices before upgrading to 0.0.6

I do not plan on making a significant breaking change that requires removal of devices in the future.

https://github.com/AaronLionsheep/Shell ... /tag/0.0.6

Posted on
Tue Mar 17, 2020 4:40 pm
aaronlionsheep offline
Posts: 260
Joined: Feb 24, 2019
Location: Virginia, USA

Re: Releases

Public beta 0.0.7 has been released! Please read the detailed changes in the link below.

Notable changes are:
    - Support for the Shelly EM and Shelly 3EM
    - Configurable decimal precision for sensor devices
    - Configurable offsets for sensor devices

It is now possible to "calibrate" some sensors that may be way off and at least get the values close to accurate.

https://github.com/AaronLionsheep/Shell ... /tag/0.0.7

Posted on
Tue Apr 21, 2020 8:21 am
aaronlionsheep offline
Posts: 260
Joined: Feb 24, 2019
Location: Virginia, USA

Re: Releases

I have recently released a series of smaller versions, so the latest version is currently 0.0.12 (https://github.com/AaronLionsheep/ShellyMQTT/releases). There is no need to update the plugin through each version. You should be able to upgrade from version 0.0.7 directly to 0.0.12

Changes in 0.0.8
- Devices report when their reported firmware has changed. This indicates that a firmware update has been successfully performed instead of simply seeing the device go offline and come back online.
- The plugin keeps track of new devices that you have not added, but that are announcing themselves. This can help when adding a new device because some device info will already be available.

Changes in 0.0.9
- Support for the Shelly 4Pro (needs physical validation)

Changes in 0.0.10
- Support for Shelly RGBW2 (needs physical validation) with both "Color" and "White" modes. These are two separate devices (color version and white version) because each mode requires a different physical setup.
- Fixes a bug that resulted in color changes not being picked up for the Shelly Bulb into Indigo

Changes in 0.0.11
- Devices can now be individually muted to suppress info and debug logging. All devices will always report errors and warning regardless, but you can specify that a device shouldn't log info and debug messages

Changes in 0.0.12
- Shelly devices can be displayed in a table to get an overview all devices and their information. This table is displayed in the log and can be run from the plugin menu using "Print Shelly Devices Overview"
- The "Discover Shellies" action has been updated to provide more feedback when the plugin has not detected any Shelly devices yet (usually right after a plugin restart)

Print Shelly Devices Overview Example:
Code: Select all
   ShellyMQTT                      Shelly devices connected to ActiveMQ (11)
   ShellyMQTT                         +-------------------------------------------+-----------------+-------------------------------------------+-------------------------------------------+------------------+-------------------------------------+
   ShellyMQTT                         | Name                                      |   IP Address    | MQTT Address                              |                Host Device                | Update Available |          Current Firmware           |   
   ShellyMQTT                         +-------------------------------------------+-----------------+-------------------------------------------+-------------------------------------------+------------------+-------------------------------------+
   ShellyMQTT                       1 | Aaron's Bedroom Lamp                      |  192.168.1.111  | shellies/ShellyBulbDuo-D0CF67             |                    N/A                    |        No        |   20200320-123338/v1.6.2@514044b4   | 1
   ShellyMQTT                       2 | Air Compressor Purge                      |  192.168.2.20   | shellies/shelly1-B8F69F                   |                    N/A                    |        No        |  20200206-083100/v1.5.10@e6a4205e   | 2
   ShellyMQTT                       3 | Landscape Lighting                        |  192.168.2.19   | shellies/shelly1pm-B98153                 |                    N/A                    |        No        |   20200312-124223/v1.6.1@112262fd   | 3
   ShellyMQTT                       4 | Landscape Lighting Outdoor Temperature    |  192.168.2.19   |                                           |             Landscape Lighting            |                  |                                     | 4
   ShellyMQTT                       5 | Refrigerator Probe                        |  192.168.1.91   | shellies/shellyht-E0100C                  |                    N/A                    |        Yes       |   20190821-095211/v1.5.2@4148d2b7   | 5
   ShellyMQTT                       6 | Window Candle                             |  192.168.2.18   | shellies/shelly1pm-B9825D                 |                    N/A                    |        No        |  20200206-083604/v1.5.10@e6a4205e   | 6
   ShellyMQTT                       7 | Workshop Lights                           |  192.168.2.10   | shellies/shellyswitch25-76D77A            |                    N/A                    |        No        |  20200206-083126/v1.5.10@e6a4205e   | 7
   ShellyMQTT                         +-------------------------------------------+-----------------+-------------------------------------------+-------------------------------------------+------------------+-------------------------------------+

This has helped identify: the refrigerator probe (Shelly HT) needs to be updated and a few devices are connected to the wrong WiFi network.

Future Plans
0.0.12 is the last 0.0.x release as I feel the plugin has reached a point that it supports most Shelly devices and has a decent amount of "helping" utilities. Barring any critical bugs that would necessitate 0.0.13, 0.1.0 is the next planned version and will be published to the plugin store. Right now, 0.1.0 has no new features, but is meant to improve stability. I am implementing unit-testing, which might be overkill for an Indigo plugin, but it is a good way to find bugs, prevent old bugs from being reintroduced, and allow for confidence when changing a core component. The design of this plugin has meant that almost all devices rely on "base" device implementations, so changing these base devices could break other devices without the developer (me at the moment) realizing it. Every code push to GitHub is run against these tests, so any future contributors can have their code validated too.

Posted on
Wed May 20, 2020 5:01 pm
aaronlionsheep offline
Posts: 260
Joined: Feb 24, 2019
Location: Virginia, USA

Re: Releases

I have just released version 0.1.0 which is the first version in the plugin store! (https://www.indigodomo.com/pluginstore/236/)

Here is an overview of the changes from 0.0.12 to 0.1.0

Added
  • Ability to create a device based on an already discovered device
  • Shelly Detached Switch Add-on device to represent the state of the switch
  • Devices are commanded to announce their information more frequently to capture up-to-date information

Fixed
  • Missing energy state data for some devices
  • Shelly Dimmer/SL previously ignored inputs from the switch
  • Devices could be logged with an incorrect name until the plugin was restarted
  • Action menu wording
  • Shelly EM Meter not responding to status request commands
  • Devices properly handle receiving invalid data
  • Shelly RGBW2 failed to handle power values of 0
  • Shelly RGBW2 in white mode was supplied with an invalid command topic

A large, but silent, addition has been unit tests. There are almost 500 individual tests that are run which validate each device's functionality. Writing these test actually caught more bugs that I was expecting, so it has already paid off. These tests should allow for changes to be made with confidence that device support has not been broken or incorrectly modified.

EDIT: Huge thanks to Clive for testing almost each change I made, providing input and feedback, and for validating the Shelly 1, Shelly 1PM, Shelly Dimmer, and Shelly Door/Window. Also thanks goes to Colly for requesting, testing, and validating the Shelly EM.
Last edited by aaronlionsheep on Wed May 20, 2020 5:29 pm, edited 1 time in total.
Reason: Corrected grammar and included a thank-you to Clive and Colly.

Posted on
Thu May 21, 2020 8:58 am
jay (support) offline
Site Admin
User avatar
Posts: 18199
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Releases

aaronlionsheep wrote:
A large, but silent, addition has been unit tests. There are almost 500 individual tests that are run which validate each device's functionality. Writing these test actually caught more bugs that I was expecting, so it has already paid off. These tests should allow for changes to be made with confidence that device support has not been broken or incorrectly modified..


Nice. Are you using pytest? I'm using it for something now, though I'm writing tests in the unittest.TestCase style (it runs those as well). PyCharm has nice test support (unittest, pytest, Nosetests, etc), including automatic diffs of string output (very nice to see when expected JSON output isn't right).

I'm thinking about how we might integrate pytest into the plugin framework to enable direct plugin testing. Not straight-forward given how our IndigoPluginHost process works, but it may be doable.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Thu May 21, 2020 9:17 am
aaronlionsheep offline
Posts: 260
Joined: Feb 24, 2019
Location: Virginia, USA

Re: Releases

jay (support) wrote:
aaronlionsheep wrote:
A large, but silent, addition has been unit tests. There are almost 500 individual tests that are run which validate each device's functionality. Writing these test actually caught more bugs that I was expecting, so it has already paid off. These tests should allow for changes to be made with confidence that device support has not been broken or incorrectly modified..


Nice. Are you using pytest? I'm using it for something now, though I'm writing tests in the unittest.TestCase style (it runs those as well). PyCharm has nice test support (unittest, pytest, Nosetests, etc), including automatic diffs of string output (very nice to see when expected JSON output isn't right).

I'm thinking about how we might integrate pytest into the plugin framework to enable direct plugin testing. Not straight-forward given how our IndigoPluginHost process works, but it may be doable.


Thanks, I used the Python UnitTest class with Twisted Trial. I made use of the Mock and Patch functions to test some of the behaviors that seemed un-testable. It allows for things like checking that a method was called with certain parameters, replacing a function with one defined by a test, and some other neat things.

I ended up writing multiple classes just to mock the behavior of Indigo. I made mocks of the Device class so that I could test that a device has set states with the correct UI value, reads/writes plugin properties, and responds to actions. I think it would be great to have a testing framework available to plugins, especially since almost all plugins are open source with community contributors.

Here is an example of some things I was able to test:
Code: Select all
    def test_setTemperature_custom(self):
        self.device.pluginProps['units'] = "C->F"
        self.device.pluginProps['offset'] = "1.2345"
        self.device.pluginProps['decimals'] = 3
        self.shelly.setTemperature(100, state="temp", unitsProps="units", decimalsProps="decimals", offsetProps="offset")
        self.assertEqual(213.2345, self.device.states['temp'])
        self.assertEqual("213.234 °F", self.device.states_meta['temp']['uiValue'])
        self.assertEquals(3, self.device.states_meta['temp']['decimalPlaces'])

I set some pluginProps for an indigo device instance and then force one of my plugin classes to update the temperature value. I can then test that the state has a precise raw value, the display value is properly formatted, and there are the correct number of decimals.

Posted on
Sun Feb 14, 2021 1:55 pm
aaronlionsheep offline
Posts: 260
Joined: Feb 24, 2019
Location: Virginia, USA

Re: Releases

Long time, no updates here (kinda). I have not kept up with publishing the releases from GitHub to the plugin store, but there have been some updates. The latest version on the plugin store is v0.2.0 and I have just released v0.3.0 (with some in between). I will give a summary of the major changes in the recent versions just in case anyone is still running an older version of the plugin and decides to update. There is full documentation for each release here on GitHub.

0.2.0
Some UI changes with the biggest including being able to use an existing device as a "template" during the device creation process.

0.2.1
More UI changes and enhanced the data available to power monitoring devices when they report an overpower event.

Breaking Change: The Shelly Door/Window device definition is updated from a "custom" device to a "sensor" device. No changes are visible in the interface, but triggers may need to be updated as the status state is no longer available. The change should be automatic, but unexpected behavior can be fixed by changing the device type to another type (for example, the Shelly Flood) and then changing back to the Shelly Door Window.

0.2.2
Adds support for the Shelly i3 and adds new events for input events. You are able to trigger on the different button press combinations from an Indigo Trigger.

0.2.3
Adds more events for low battery detection and adds support for the Shelly Button1. The Shelly Door/Window device was updated to include the Shelly Door/Window2 device.

0.2.4
Device discovery now works correctly for first-time users. Logging messages are in a unified format and the user can choose which level of logging they would like to see in the plugin configuration. Known bug with triggers - v0.3.0 is recommended

Breaking Change: ShellyMQTT no longer adds topic subscriptions to the MQTTConnector Broker devices. This reduces the number of individual topics that are being subscribed. After updating, ensure that there is a topic subscription for "shellies/#" in your broker devices as you may need to add this manually before incoming messages can be processed by ShellyMQTT.

0.2.5
Bug fixes revolving around creating devices based on other devices. Removes unsupported event types from Shelly relay devices where complex button presses are not supported by Shelly. Known bug with triggers - v0.3.0 is recommended

0.3.0
Adds support for the Shelly Gas and cleans up some logging bugs for RGBW2 devices and relay devices.


Updating
There should be no need to update to each version sequentially - you should be able to update to v0.3.0 from any previous version as long as you make note and take appropriate action for any of the breaking changes described above.

Please let me know if you encounter any issues on the latest version. I am planning to get support added for the Shelly Uni and the Shelly Motion (when Shelly publishes the API).

Posted on
Wed Mar 17, 2021 6:47 pm
Espressomatic offline
Posts: 73
Joined: Dec 30, 2018

Re: Releases

Good stuff. Haven't updated to the latest version, but the plugin has been working great with my three installed Shelly1 switches - 2 for lamps and 1 to control a gaming PC via a momentary output (auto off).

Really looking forward to the Uni support as I'd like to tie one into my doorbell and also replace the Shelly1 that's controlling the PC (with Shelly 1 there's no way to tell if the PC is on/off besides the state of the virtual switch I'm using in Homekit to control it.

Posted on
Wed Mar 17, 2021 6:56 pm
aaronlionsheep offline
Posts: 260
Joined: Feb 24, 2019
Location: Virginia, USA

Re: Releases

Espressomatic wrote:
Good stuff. Haven't updated to the latest version, but the plugin has been working great with my three installed Shelly1 switches - 2 for lamps and 1 to control a gaming PC via a momentary output (auto off).

Really looking forward to the Uni support as I'd like to tie one into my doorbell and also replace the Shelly1 that's controlling the PC (with Shelly 1 there's no way to tell if the PC is on/off besides the state of the virtual switch I'm using in Homekit to control it.


I'm glad to hear your experience has been good so far. I don't have the version published on the Indigo plugin store yet, but the Uni is supported starting with 0.4.0 (only on GitHub right now).

0.4.2 is currently the latest and allows the Uni device to report the ADC voltage into Indigo. I will be adding these versions to the Plugin Store over the next few days, but they are available on GitHub if you'd like to get your hands on them sooner.

Posted on
Thu Mar 18, 2021 7:16 am
Espressomatic offline
Posts: 73
Joined: Dec 30, 2018

Re: Releases

I saw that last night after installing 0.3.0, very nice.

Using the Cynical Behaviors plugin with its virtual "Garage Door" to achieve the control I mentioned earlier of my PC's power and status. The Uni support will be the last piece of that and will tell the virtual device the component is ON only when it's truly on.

Kids/family don't know the details behind the scenes, but they absolutely love just telling Siri to "play games" or "watch TV" and have everything just work.

Posted on
Thu Mar 18, 2021 7:21 am
aaronlionsheep offline
Posts: 260
Joined: Feb 24, 2019
Location: Virginia, USA

Re: Releases

Espressomatic wrote:
Using the Cynical Behaviors plugin with its virtual "Garage Door" to achieve the control I mentioned earlier of my PC's power and status. The Uni support will be the last piece of that and will tell the virtual device the component is ON only when it's truly on.


The Shelly 1/1PM is commonly used for this very purpose since it has the ability to control a high-power output and a digital input. Plus, you can add a temperature/humidity sensor and monitor the garage conditions.

I'm interested to hear how you end up using the Uni in some other projects. I haven't experimented with it yet, but I've been thinking about using one in my coffee pot.

Posted on
Thu Mar 18, 2021 5:26 pm
Espressomatic offline
Posts: 73
Joined: Dec 30, 2018

Re: Releases

I'm currently powering a Shelly1 from 12vDC and using its output as a momentary dry contact. When the Shelly is turned on, it shorts the power pins of the motherboard and disconnects after 1 second. Exactly the same as pressing the power button on the front of the computer. This simple solution brings with it a significant drawback for integration into Home Automation flows/scenes - because turning on the switch is a toggle operation as the output is momentary (stateless), so there's no way to tell if the PC is in an ON or OFF state at any given time.

I got around this in Homekit using Homebridge and a Dummy device which acts like a stateful switch. The Dummy device is used to represent the PC and the Shelly is now only an admin-level switch that doesn't appear in any rooms or ever called directly. Instead I only use the Dummy device that I've also preconfigured two automations for. When it goes ON, trigger the Shelly. When it goes OFF, trigger the Shelly.

This works well, but leaves one significant drawback. The state of the dummy device is only affected by calls to it from Homekit - there's no way for Homekit to otherwise know if the PC is actually on - like if I were to press the power button on it manually. So there's always the possibility that this, or some other factor can cause the PC's state to be out of sync with its dummy device in Homekit.

My solution is to use the Uni with a simple NO relay (Uni doesn't do dry contact on its own). This way I can trigger the PC's power pins the same way I'm doing with the Shelly1, plus I can use the Uni's voltage sensing inputs to detect the PC's power state - I'll be taking input from the power LED pins (just because that way easy and I was already working on that header connector for the power switch).

The plan was to create the automation logic to roll everything into one virtual device in Homekit, but after some plugin browsing yesterday, I found and verified that Cynical Behavior for Indigo saves me a bunch of effort and has the added benefit that the virtual device is one layer lower, within Indigo and not just Homekit. It combines multiple devices to work as one. In this case its Garage Door option, which uses a Switch device for operation and a Sensor device for state. Now even if I were to use the physical power button on the computer, the sensor on Uni will, via the plugin, set the state of my virtual PC device in Indigo to ON.

That's the plan anyway. :)

The other use, for a second Uni is inside my Doorbell Chime. I have a video doorbell that doesn't support Homekit and for which there are no plugins. There's no way right now for me to know when its button is pressed besides its own software on my phone. The Uni will be powered by the 24v in the chime and will sense, with a simple reed switch, the magnetic field generated when the chime is activated. Then I can use that to trigger some other function, including making my Homepods sound a doorbell chime, turning on other cameras, whatever.

Posted on
Mon Mar 22, 2021 5:52 pm
agame offline
Posts: 514
Joined: Jul 13, 2017
Location: Melbourne, Australia

Re: Releases

sounds very nifty.

just in case you hadn't stumbled across it, the Network Devices plugin is another option for determining status of a PC (and lots of other things). The winRemote plugin, might also work for those with less developed soldering skills.

Who is online

Users browsing this forum: No registered users and 1 guest