Skip to content

Very lightweight daemon to publish figures to a MQTT broker (1wire data as temperatures, ISP real time consumption, UPS figures, meteo forecast, ...), check subscribted topics and alerts if out of range or missing. Custom decision scripts can be created in Lua.

License

destroyedlolo/Marcel

Repository files navigation

Marcel

Marcel is a lightweight versatile MQTT data publisher.

Focusing smart home automation (but not only), its optional modules publish :

  • 1-wire probes environmental figures
  • weather forecast
  • UPS figures
  • external MQTT events
  • and many more

Can raise some notifications, manage alerting and controle some devices.

Lua user scripts can be used to build simple automation, and/or, to validate incomming value.

Thanks to its open and powerful module's API, it's easy to add new functionalities.

Build from source.md contains technical information if you want to compile directly from its source code.

Dependancies

As the communication is based on MQTT messages, you obviously need a ... broker : I personally use Mosquitto.

Global dependancy

Install PAHO library for C ( https://eclipse.org/paho/clients/c/ )

Modules related runtime dependancies

Lua (mod_Lua)

If you want to had user's functions : https://www.lua.org/

1-wire (mod_1wire)

Recent linux kernel has better than nothing and limited 1-wire support. I strongly suggest to use OWFS instead.

OpenWeatherMap (mod_OpenWeatherMap)

You need to provide your own license key to query weather forecast, it's free for hobbyists usages.
Have a look on : https://openweathermap.org/

In addition json-c and libcurl are needed.

Launch options :

Marcel knows the following options :

  • -h : online help
  • -v : verbose output
  • -f : loads as configuration file. The default one is /usr/local/etc/Marcel.conf
  • -t : test configuration file and exit

Logging

As of version 6.05, Marcel publishes its loggings to following topics :

  • %MarcelID%/Log/Fatal : Failures causing Marcel to stop or major functionality loss
  • %MarcelID%/Log/Error : something went wrong but it didn't impacted Marcel's health
  • %MarcelID%/Log/Warning : something you must be aware of
  • %MarcelID%/Log/Information : Startup steps and running informations
  • %MarcelID%/Log : Trace information (incoming messages, decisions, etc ..)

As of version 7.07, following topics have been added (if mod_alert enabled) :

  • %MarcelID%/Log/Error : send raising alerts as well (same as Marcel's own errors)
  • %MarcelID%/Log/Corrected : send corrected alerts
  • %MarcelID%/AlertsCounter : amount of active alerts

Status change

Section

As of 8.3, Marcel reports sections status changes to topic
%MarcelID%/Change/


and the playload contains 2 fields:

  • Enabled(1) or Disabled (0)
  • face technical error

As example if Marcel/Change/Info is published with

1,0

means, Info section is Enabled and doesn't face any error.

Named Notification (only if mod_alert is loaded)

As of 8.3, Marcel reports Named Notification status changes to topic
%MarcelID%/NamedNotificationChange/


and the playload contains 1 field:

  • Enabled(1) or Disabled (0)

As example if Marcel/NamedNotificationChange/p is published with

1

means, p named notification is Enabled.

Modules

Modules containes the documentation of each modules.
Having a look in Modules/Marcel is a must read about global directives.

Side note

The name is a tribute to my late rabbit that passed away some days before I did started this project : he stayed at home as keeper. RIP.

About

Very lightweight daemon to publish figures to a MQTT broker (1wire data as temperatures, ISP real time consumption, UPS figures, meteo forecast, ...), check subscribted topics and alerts if out of range or missing. Custom decision scripts can be created in Lua.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published