v0.10.0
This is the largest update to MudPi since the project started. Every system has been refactored and better incorporated into a more cohesive system. Many items have been organized in a new extension system to keep updates more manageable with a growing number of additions (from multiple contributors). In this update I really took a long time to think about a foundation for MudPi to sit on going forward. This would then lend to a more stable core without the need for as many breaking changes. Much of the old main file has have been refactored into core systems. With this update providing a more solid framework I can continue to work on more supporting resources and content. Previously with each major breaking change it would require time consuming revisions across multiple areas. I am excited for these changes and what it enables me to work on next. The documentation has already been updated to reflect this version.
- Complete refactor of all systems
- Created a
MudPi
class to centrally store data for all components - MudPi is now a python package and runs like standard pacakge
- Configurations
- Added
Config
class to handle configurations - Added YAML support
- Allowed any filename for configurations
- Added ability to convert JSON to YAML configs
- Added feature to create default config
- Added
- Events
- Overhauled the event system to a event manager
- Consolidated events across the system to better groupings
- Added adapters for event system to run on.
- Added
redis
adapter for redis support - Added
mqtt
adapter for mqtt support
- Added
- Core events can now run on multiple channels at once
- Changed events to be more uniform in format
- Extensions
- Added an extension system to dynamically load systems with components
- Converted all existing components into appropriate extensions
- Extensions dynamically load based on config files and install requirements as needed
- Custom extensions can load from
custom_extensions
folder
- State
- State is now handled by an internal state manager
- Now stored with better data such as timestamps
- State is backed up in
redis
and restored on restart
- Actions
- Made actions available for all components for better control
- Actions can be called via triggers or events
- Added
action
extension for to allow custom actions from configs - Components expose standard actions (i.e. toggle automatically adds 'turn_on' action)
- Sensors
- Added
sensor
extension for existing sensor logic - Migrated old sensors into new components
- Split sensors into more appropriate groupings
- Added Support for
redis
sensor - Added support for
mqtt
sensor - Sensors have a
force_update
action to trigger immediate updates.
- Added
- Controls
- Added
control
extension for existing control logic - Migrated over old controls to new components
- Added
- Camera
- Added
camera
extension for existing camera logic - Migrated over old camera to new components
- Added feature to save video recordings
- Added option to name files by date or sequentially
- Fix picamera blocks during updates
- Added
rtsp
extension with camera for RTSP IP camera support - Camera exposes
capture_image
andcapture_recoding
actions - Added options for controlling
filename
that is saved - Added options to put camera in image or recording mode
- Added options for better image control (size, quality etc)
- Added
- Triggers
- Added
trigger
extension for existing trigger logic - Migrated over old triggers into new components and interfaces
- Updated trigger groups to be an actual trigger class
- Triggers can now be solo and part of a group
- Triggers can be part of multiple groups
- Triggers now just call
actions
- Updated threshold checks for better error handling
- Thresholds now allow formatting and type casting through
type
andformat
- Add
before
,after
andbetween
trigger types for datetime comparisons - Add
sun
triggers that check time against sun data
- Added
- Automation Sequences
- Added
sequence
extension for existing sequence logic - Migrated over old sequence to new components
- Added actions for interaction instead of manually linking them to triggers
- Updated threshold checks for better error handling
- Addded option to skip a step
- Added
- Toggles
- Renamed
relays
intotoggles
for more accurate representation - Added
toggle
extension for existing relay logic - Migrated over old relays into the new toggle components
- Added option to
invert_state
on a toggle for reversed toggles - Added options
max_duration
as failsafe to cutoff long running toggles - Toggle exposes
turn_on
,turn_off
, andtoggle
actions
- Renamed
- Socket
- Added
socket
extension for the existing socket server - Migrated over the old socker server to new components
- Allow more than one socket server to be created (still 1 per port)
- Allow events to be relayed through socket server to event system
- Added
- Nodes
- Added
nanpy
extension for the existing node logic - Migrted over node controls and sensors to new components
- Created a central connection for nodes to try and reduce broken connections
- Added support for lcd displays to nodes
- Updated connection logic for nodes for better operations
- Added
- Displays
- Added
display
extension for existing displays - Migrated over displays to new components
- Added more configuration options
- Updated display loop for faster response
- Added
message_limit
to prevent clogged display queues - Added way to send message to front of queue
- Added
- Logger
- added a
log_formatted()
function for better formatting in output.
- added a
- Worker
- Worker now is just one general class, removed need for others
- Optimize workers to use new
wait
method for faster responses
- MQTT
- Added support for MQTT
- Added adapter to use MQTT for the core event bus
- Added credentials for MQTT broker connection
- NFC Tags
- Added support for NFC tags and readers
- Allow NFC tag data as
sensor
- Added support for writing to NFC tags
- Added security options for NFC tags
- NFC tags can
trigger
events
- Sun
- Added support for a sun api
- Gather sunset, sunrise data based on a location
- Trigger actions based on sun times
- Timer
- Added a timer for elapsed timed functions
- Timer can be stopped, started, reset, paused, and restarted
- Timer triggers fire an action after set
duration
- Timer
sensor
is used to track timer data
- Plus tons of other items I forgot to note (docs are updated though)