[shelly] Improved documentation, support for UNI, 1L, Color Bulb (#9508)

* This PR merges the 2.5 code base with new features, a bunch of bug fixes
and improved documentation. Parts of the code has been re-factored and
vaious issues are fixed/optimized along the way.

Signed-off-by: Markus Michels <markus7017@gmail.com>

* Minor fixed, support for Shelly Color Bulb, Shelly Motion

Signed-off-by: Markus Michels <markus7017@gmail.com>

* Review changes applied

Signed-off-by: Markus Michels <markus7017@gmail.com>

* review change applied

Signed-off-by: Markus Michels <markus7017@gmail.com>

* review changes

Signed-off-by: Markus Michels <markus7017@gmail.com>

* Review changes

Signed-off-by: Markus Michels <markus7017@gmail.com>

* review changes

Signed-off-by: Markus Michels <markus7017@gmail.com>

* README updated

Signed-off-by: Markus Michels <markus7017@gmail.com>

* review change

Signed-off-by: Markus Michels <markus7017@gmail.com>

* review change

Signed-off-by: Markus Michels <markus7017@gmail.com>
This commit is contained in:
Markus Michels
2021-02-03 22:25:19 +01:00
committed by GitHub
parent bc5ffb26e2
commit c4a3b1e6ba
40 changed files with 1939 additions and 1048 deletions

View File

@@ -2,7 +2,7 @@
This section provides information for advanced use cases.
## Additiona Resources
## Additional Resources
There are additional resources available providing more information on Shelly devices and how to integrate those into openHAB:
@@ -29,18 +29,33 @@ However, if this doesn't work (sometimes there are issues) you could use the [Sh
There are 3 options available to perform the upgrade
- The Shelly App usually detects when a new version becomes available and offers to do the upgrade within the UI (Web or App)
- Alterco provides the [Shelly Firmware Archive Link Generator](http://archive.shelly-faq.de).
This can be used to generate the upgrade link, which could be easily used to perform the upgrade on the cli-level having an Internet connection on that terminal (Shelly device doesn't require an Internet access).
### Using Shelly Web UI or Smartphone App
The Apps usually detect when a new version becomes available and offers to do the upgrade to the latest release or beta version.
### Trigger device update
The [Shelly Firmware Archive Link Generator](http://archive.shelly-faq.de) is provided by the community (not official, but works like charm).
This can be used to generate the update link, which could be easily used to perform the upgrade on the cli-level having an Internet connection on that terminal (Shelly device doesn't require an Internet access).
You specify the device's IP and device model SHSW-25 and the page will generate you the link for the firmware download using the OTA of the device.
Then you run "curl -s [-u user:password] &gt;generated link&gt;" from the terminal.
Then you run
```
curl -s [-u user:password] <generated link>
```
from the command line.
This should show a JSON result, make sure that it shows "status:updating".
Wait 15sec and access the device's Web UI, go to Settings:Firmware Upgrade and make sure than the new version was installed successful.
- Manual download and installation of the firmware
Manually pick the download link from the [Shelly Firmware Repository](https://api.shelly.cloud/files/firmware) and get the release or beta link.
Once you downloaded the file you need to copy it to an http server.
Open the following url http://&lt;shelly ip&gt;/ota?url=http://&lt;web server&gt;/&lt;path&gt;/&lt;zip-file&gt;
Again, make sure that the file is downloaded and installed properly.
### Manual download and installation of the firmware
- Manually pick the download link from the [Shelly Firmware Repository](https://api.shelly.cloud/files/firmware) and get the release or beta link.
- Once you downloaded the file you need to copy it to an http server.
- Open the following url http://&lt;shelly ip&gt;/ota?url=http://&lt;web server&gt;/&lt;path&gt;/&lt;zip-file&gt;
- Again, make sure that the file is downloaded and installed properly.
## Trouble Shooting
@@ -86,10 +101,23 @@ Use a list of items to reduce logging.
`Please note:` Once events are filtered they are not show anymore in the logfile, you cant find them later.
The configuration format of openHAB 3 is in xml format.
- openHAB 2.5.x
A configuration is added as a new section to `openhab2-userdata/etc/org.ops4j.pax.logging.cfg`
```
# custom filtering rules
log4j2.appender.event.filter.uselessevents.type = RegexFilter
log4j2.appender.event.filter.uselessevents.regex = .*(heartBeat|LastUpdate|lastUpdate|LetzteAktualisierung|Uptime|Laufzeit|ZuletztGesehen).*
log4j2.appender.event.filter.uselessevents.onMatch = DENY
log4j2.appender.event.filter.uselessevents.onMisMatch = NEUTRAL
```
- openHAB 3.0
The configuration format of openHAB 3.0 is in xml format.
- Open the file `userdata/etc/log4j2.xml`
- Search for tag 'RollingFile'
- and add a tag `<RegexFilter>...</RegExFilter>`
- Search for tag RollingFile
- and add a tag `<RegexF,ilter>...</RegExFilter>`
The attribute `regex` of this tag defines the regular expression, `onMatch="DENY"` the the logger to discard those lines