Skip to content

Releases: kevinkk525/pysmartnode

Version 6.1.2 Bugfixes, Climate, NTP with daylight savings, Bell

01 Sep 10:23
Compare
Choose a tag to compare

Changes

  • [BELL] 2 different modules, one for usage with interrupts, the other for polling using uasyncio. They are interchangeable. Support for detecting an AC signal when bell is ringing.
  • [NTPTIME] Support for daylight savings (summer/winter time). Note: time may be wrong for a few hours on the day of the time change.
  • [SENSORS] Support for publishing readings as retained
  • [TOOLS] support 1M esp8266 module, remove deprecated files
  • [CLIMATE] support using one target_temp with tolerance instead of temp_high and temp_low
  • sys_vars: fix DEVICE_NAME being only used on unix port

Next major release

The next major release will have full support for the pyboard D.

Release files

ESP8266

Attached is a compiled firmware for esp8266 with heap increased by 6kB and Micropython 1.12 daily updates. One firmware for 4MB modules and one for 1MB modules like the sonoff devices.

ESP32

No firmware file but the precompiled .mpy files that can be directly uploaded to the esp. Either by "rshell rsync/cp -r" or using an ftp server.
The .py files are not recommended to upload directly as compiling on the device takes some time and a lot of RAM.

Version 6.1.1 Uasyncio V3 and multiple enhancements

14 Aug 07:53
Compare
Choose a tag to compare

Changes

  • [UASYNCIO] Support the new uasyncio version
  • [TIME] fix timezone offset if it changes the current day number
  • [ADC] supports read_u16(), supports calibration values (U=adc/resolution*calibration_v_max+calibration_offset). This also allows the usage of ATTEN on ESP32 as well as custom adc->voltage conversion e.g. when using a voltage divider.
  • [HCSR04] update to work more reliable, bugfixes, support setting reading iterations and use average of readings
  • [ECMeter] first working version, support setting reading iterations and use average of readings
  • [DS18] catch onewire error, set value to None on error so other components don't rely on an old sensor reading
  • [SENSORS] Extended API to pass **kwargs to base class, so base class constructor can be extended without needing to modify every component constructor
  • [SENSORS] improved error logging in loop to include stacktrace, fixed inconsitency with docs: timestamp only set after successful sensor reading (not None), allow setting a unique name for a sensor instead of always generating the name, support home-assistant sensor option "expire_after" for all sensor using the standard discovery type
  • [COMPONENTS] only list constructor kwargs that are used by the current subclass, everything else is covered by "**kwargs", fix random.random not always available anymore, add "expire_after" option to sensors, fix delete discovery option, add option to not publish a value if reading failed (by returnin False), fix discovery message for binary_sensors, remove icon from binary sensor discovery message (maybe falsely removed by homeassistant?)
  • [CONFIG] Configuration of components now relies on kwargs. Providing args trough a config dictionary (e.g. remote configuration) is not supported anymore (but was never advised anyway).
  • [MQTT] concurrent operations with timeouts now possible, fix for esp8266 with native not working anymore
  • [BELL]: drop timer because it worked unreliable on esp8266, change component to inherit from ComponentSensor, add option to read pin state multiple times to ensure that it works with AC signals.
  • Basic support for Pyboard D added (Pins probably won't work yet when initialized by pin name using remote configuration. Creating objects in code directly will work.)
  • Support for loboris fork dropped because it won't get any updates and probably doesn't support the new uasyncio

Next major release

The next major release will have full support for the pyboard D.

Release files

ESP8266

Attached is a compiled firmware for esp8266 with heap increased by 6kB and Micropython 1.12 daily updates.

ESP32

No firmware file but the precompiled .mpy files that can be directly uploaded to the esp. Either by "rshell rsync/cp -r" or using an ftp server.
The .py files are not recommended to upload directly as compiling on the device takes some time and a lot of RAM.

Version 6.1.0 BETA - new uasyncio v3.0 support

09 Apr 13:13
Compare
Choose a tag to compare

This is the first release that supports the new uasyncio v3.0 that got merged into micropython recently (you need a daily build of micropython to use it).
It is only tested on the esp32 yet, so only .mpy files for the usage on esp32 are available.

Notable other changes:

  • [ADC] supports read_u16(), supports calibration values (U=adc/resolution*calibration_v_max+calibration_offset). This also allows the usage of ATTEN on ESP32 as well as custom adc->voltage conversion e.g. when using a voltage divider.
  • [HCSR04] update to work more reliable, bugfixes, support setting reading iterations and use average of readings
  • [ECMeter] first working version, support setting reading iterations and use average of readings
  • [DS18] catch onewire error, set value to None on error so other components don't rely on an old sensor reading
  • [SENSORS] Extended API to pass **kwargs to base class, so base class constructor can be extended without needing to modify every component constructor
  • [SENSORS] improved error logging in loop to include stacktrace, fixed inconsitency with docs: timestamp only set after successful sensor reading (not None), allow setting a unique name for a sensor instead of always generating the name, support home-assistant sensor option "expire_after" for all sensor using the standard discovery type
  • [COMPONENTS] only list constructor kwargs that are used by the current subclass, everything else is covered by "**kwargs"
  • [CONFIG] Configuration of components now relies on kwargs. Providing args trough a config dictionary (e.g. remote configuration) is not supported anymore (but was never advised anyway).
  • [MQTT] timeout implementation split into different module, concurrent operations with timeouts now possible

Version 6.0.2 Base switch Component independent of wifi

04 Mar 07:30
f34d63e
Compare
Choose a tag to compare

Changes

  • [Switch] Base Switch Component is now independent of wifi state so a broken wifi connection doesn't result in a delay of 10s for a consecutive switch activation

Next major release

The next major release will have support for the upcoming version of uasyncio which will hopefully get merged soon.

Release files

ESP8266

Attached is a compiled firmware for esp8266 with heap increased by 6kB, built with littleFS as standard filesystem (erase filesystem before flash) giving another 4kB more RAM.
Micropython 1.12 current github.

ESP32

No firmware file but the precompiled .mpy files that can be directly uploaded to the esp. Either by "rshell rsync/cp -r" or using an ftp server.
The .py files are not recommended to upload directly as you would need to strip them of hints first (see README) and compiling on the device takes some time and a lot of RAM.

Version 6.0.1 - bugfix release

20 Feb 22:08
c1f158f
Compare
Choose a tag to compare

Changes

  • [MQTT] Fix unsubscribe race condition
  • smaller bugfixes

Release files

ESP8266

Attached is a compiled firmware for esp8266 with heap increased by 6kB, built with littleFS as standard filesystem (erase filesystem before flash) giving another 4kB more RAM.
Micropython 1.12 current github.

ESP32

No firmware file but the precompiled .mpy files that can be directly uploaded to the esp. Either by "rshell rsync/cp -r" or using an ftp server.
The .py files are not recommended to upload directly as you would need to strip them of hints first (see README) and compiling on the device takes some time and a lot of RAM.

Version 6.0.0 major rework of Components and new Sensor Component

07 Nov 11:06
4b88ec0
Compare
Choose a tag to compare

Changes

  • [easyGPIO] topics now use "easyGPIO" to not make them not collide with module "switches.GPIO"
  • [remoteSensors] use remote sensors as if they were locally connected
  • [remoteSwitch] use a remote switch as if it was locally connected
  • [COMPONENTS] extended API significantly, updated to new/changed MQTT features, added cleanup method
  • [SENSOR COMPONENT] major base class for a unified sensor API and features to make usage and development easier
  • [Sensors] updated all sensors to use the new SENSOR COMPONENT. Some sensors therefore experience breaking changes in configuration, default topics and behaviour.
  • [DS18] rewritten for new sensor API
  • [HEATER] removed deprecated component
  • [CLIMATE] added new Climate component which is compatible to homeassistant MQTT Climate
  • [CONFIG] removed option to load components from .json files, use components.py instead
  • [STATS] Major update, publishing many device stats as hass json_attributes and RSSI as main value instead of "online/offline" which is now done directly in mqtt as availability topic. Published values: (last_boot, uptime, pysmartnode version, micropython firmware version, RAM free, RSSI, MQTT Downtime, MQTT Reconnects, Asyncio waitq used size)
  • [MQTT] Improvements, Subscriptions done by mqtt not by components, Subscribing uses subscription chain and can be called non-blocking synchronously, added easy way to restore a device state from a state topic of a subscribed command_topic, prevention of uasyncio queue overflows when receiving too many messages
  • [LOGGING] Extended asyncLog() method with kwargs "timeout" and "await_connection" just like mqtt.publish
  • [LOGGING] Now works similar to print expecting multiple args instead of one message string. Optimizes RAM usage (especially with local_only logging).
  • [TOOLS] updated esp8266 build scripts, script to strip variable type hints as those are not yet supported by micropython
  • [CONFIG] config.py update, made configuration easier and smaller by freezing standard values in ROM and custom configs in config.py will just overwrite those.

Release files

ESP8266

Attached is a compiled firmware for esp8266 with heap increased by 6kB, built with littleFS as standard filesystem (erase filesystem before flash) giving another 4kB more RAM.
Micropython 1.12 release.

ESP32

No firmware file but the precompiled .mpy files that can be directly uploaded to the esp. Either by "rshell rsync/cp -r" or using an ftp server.
The .py files are not recommended to upload directly as you would need to strip them of hints first (see README) and compiling on the device takes some time and a lot of RAM.

Sources

The file "pysmartnode600_sources.zip" contains all source files including the github submodules.
The automatically generated source files from github don't include github submodules.

Version 5.0.0 with Homeassistant MQTT discovery and unix port support

07 Jul 06:19
f853efb
Compare
Choose a tag to compare
  • [MQTT] Integrated Homeassistant mqtt discovery feature
  • [COMPONENTS] Completely changed the way components are integrated to support homeassistant mqtt discovery. Every component now has to use a common base component class. This is a major change breaking compatibility with previous pysmartnode/components versions and often component configurations.
  • [COMPONENTS, MQTT] Mqtt subscriptions are not callback based anymore but component based. But within a component they are callback based.
  • [COMPONENTS] Updated most components accordingly. Some topics and configurations have changed, check your configs! Not updated components were moved to _dev as they need more looking at.
  • [Templates] Updated templates.
  • [RAM] component is now part of a basic system component.
  • [DS18] Component completely rewritten. It is now fully separated into a controller and a unit object. The controller has control over the onewire bus and reads all configured units. (Having other onewire devices on the same bus should be possible. No common onewire controller integrated at the moment). The DS18 unit object supports homeassistant discovery and therefore every DS18 unit connected to the controller has to be configured, unless auto-discovery is enabled on the controller, which will just create an object for each found sensor (this however makes using these in other components impossible and only serves to publish read temperatures).
  • [UNIX] Added support for unix port of Micropython! (Most sensors won't be available as it doesn't have a gpio interface, working on an interface for the Pi). But you can execute system commands and e.g. use the rf433 raspberry-remote library
  • [STATS] component now also publishes the wifi signal strength.

This time the .zip also includes all submodules.

Version 4.1.1

25 Apr 14:01
83d111a
Compare
Choose a tag to compare
  • [HCSR04] Added module to measure distance
  • [WaterSensor] Simple water sensor using 2 wires
  • Small fixes in ArduinoControl

Version 4.1.0

08 Apr 20:09
5bdcdf7
Compare
Choose a tag to compare
  • Dropped official support of ESP32_Loboris_Fork because of lack of updates (no commit since 7 months). No code has been removed and modules are even updated to support it so could still mostly work on that fork, I just won't test it on that platform myself.
  • Support for mainline ESP32 as all important bugs are finally fixed now
  • [ecMeter] added module to measure EC with a simple cable
  • [ds18] multiple bugfixes and improvements. Support for instanciating a single DS18 unit
  • [ADC] updated to support ESP32 mainline. New interface and subclass logic to support custom ADC classes using external ADCs (like the Arduino)
  • [Amux] improvements, supports Arduino ADCs & Pins -> possible to connect an AnalogMultiplexer to an Arduino and control remotely
  • [ArduinoControl] Added library to control an Arduino by communication by 1-wire protocol

Version 4.0.7

07 Mar 08:01
4380bc2
Compare
Choose a tag to compare
  • [mqtt] changed API from async def publish(self, topic, msg, retain=False, qos=0) to def publish(self, topic, msg, qos=0, retain=False)
  • [mqtt] added experimental support for a not yet published proxy for mqtt (micropython_iot_generic + micropyhton_iot)
  • [moisture] changed name and small improvements