Releases

Posted on
Sun Mar 08, 2020 12:19 pm
aaronlionsheep offline
Posts: 61
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: 61
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: 61
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: 61
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: 61
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: 61
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: 16214
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: 61
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.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest