Copy disabled (too large)
Showing preview only (13,606K chars total). The displayed content is truncated. Use the JSON API for full output.
Repository: calaos/calaos_base
Branch: master
Commit: 1048d26325c7
Files: 784
Total size: 12.8 MB
Directory structure:
gitextract_4nlxqk_q/
├── .devcontainer/
│ ├── Dockerfile
│ └── devcontainer.json
├── .github/
│ ├── copilot-instructions.md
│ └── workflows/
│ ├── docker-publish-dev.yml
│ └── docker-publish.yml
├── .gitignore
├── .vscode/
│ ├── c_cpp_properties.json
│ ├── launch.json
│ ├── settings.json
│ └── tasks.json
├── AGENTS.md
├── AUTHORS
├── COPYING
├── ChangeLog
├── Dockerfile
├── INSTALL
├── Makefile.am
├── NEWS
├── README.md
├── TODO
├── autogen.sh
├── configure.ac
├── data/
│ ├── Makefile.am
│ └── debug/
│ ├── .editorconfig
│ ├── .gitattributes
│ ├── .gitignore
│ ├── Gruntfile.js
│ ├── Makefile.am
│ ├── README.md
│ ├── app/
│ │ ├── debug_websocket.html
│ │ ├── index.html
│ │ ├── scripts/
│ │ │ ├── codemirror.js
│ │ │ ├── main_v2.js
│ │ │ └── main_v3.js
│ │ └── styles/
│ │ └── main.css
│ ├── dist/
│ │ ├── Makefile.am
│ │ ├── debug_websocket.html
│ │ ├── index.html
│ │ ├── scripts/
│ │ │ ├── codemirror.js
│ │ │ ├── main_v2.js
│ │ │ ├── main_v3.js
│ │ │ └── vendor.js
│ │ └── styles/
│ │ ├── main.css
│ │ └── vendor.css
│ ├── gulpfile.js
│ └── package.json
├── doc/
│ ├── 00_overview.md
│ ├── 01_core_data_model.md
│ ├── 02_io_drivers.md
│ ├── 03_rules_engine.md
│ ├── 04_scenarios.md
│ ├── 05_audio.md
│ ├── 06_ipcam.md
│ ├── 07_remoteui.md
│ ├── 08_http_api.md
│ ├── 09_lua_scripting.md
│ ├── 10_events_notifications.md
│ ├── 11_config_persistence.md
│ ├── 12_extern_proc.md
│ ├── 13_utility_lib.md
│ ├── 14_python_extern_proc.md
│ ├── 15_mcp_server.md
│ └── README.md
├── po/
│ ├── LINGUAS
│ ├── Makevars
│ ├── POTFILES.in
│ ├── getstring.pl
│ ├── translate.php
│ └── update_translation.sh
├── py-compile
├── scripts/
│ ├── create_iodoc
│ ├── lib.sh
│ ├── linux/
│ │ ├── after_success.sh
│ │ ├── install.sh
│ │ └── script.sh
│ └── osx/
│ ├── after_success.sh
│ ├── install.sh
│ └── script.sh
├── src/
│ ├── Makefile.am
│ ├── bin/
│ │ ├── Makefile.am
│ │ ├── calaos_mcp/
│ │ │ ├── Makefile.am
│ │ │ ├── calaos_mcp
│ │ │ ├── calaos_mcp.in
│ │ │ └── python/
│ │ │ └── calaos_mcp/
│ │ │ ├── __init__.py
│ │ │ ├── __main__.py
│ │ │ ├── auth.py
│ │ │ ├── client.py
│ │ │ ├── config.py
│ │ │ ├── models.py
│ │ │ ├── safety.py
│ │ │ ├── server.py
│ │ │ └── tools/
│ │ │ ├── __init__.py
│ │ │ ├── _home.py
│ │ │ ├── audio.py
│ │ │ ├── io.py
│ │ │ ├── rooms.py
│ │ │ └── scenario.py
│ │ ├── calaos_server/
│ │ │ ├── Audio/
│ │ │ │ ├── AVRDenon.cpp
│ │ │ │ ├── AVRDenon.h
│ │ │ │ ├── AVRManager.cpp
│ │ │ │ ├── AVRManager.h
│ │ │ │ ├── AVRMarantz.cpp
│ │ │ │ ├── AVRMarantz.h
│ │ │ │ ├── AVROnkyo.cpp
│ │ │ │ ├── AVROnkyo.h
│ │ │ │ ├── AVRPioneer.cpp
│ │ │ │ ├── AVRPioneer.h
│ │ │ │ ├── AVRRose.cpp
│ │ │ │ ├── AVRRose.h
│ │ │ │ ├── AVRRoseNotifServer.cpp
│ │ │ │ ├── AVRRoseNotifServer.h
│ │ │ │ ├── AVRYamaha.cpp
│ │ │ │ ├── AVRYamaha.h
│ │ │ │ ├── AVReceiver.cpp
│ │ │ │ ├── AVReceiver.h
│ │ │ │ ├── AudioDB.cpp
│ │ │ │ ├── AudioDB.h
│ │ │ │ ├── AudioPlayer.cpp
│ │ │ │ ├── AudioPlayer.h
│ │ │ │ ├── AudioPlayerData.h
│ │ │ │ ├── ExternProcRoon_main.py
│ │ │ │ ├── RoonPlayer.cpp
│ │ │ │ ├── RoonPlayer.h
│ │ │ │ ├── Squeezebox.cpp
│ │ │ │ ├── Squeezebox.h
│ │ │ │ ├── SqueezeboxDB.cpp
│ │ │ │ ├── SqueezeboxDB.h
│ │ │ │ ├── calaos_roon.in
│ │ │ │ └── hifi_rose_API.md
│ │ │ ├── Calaos.cpp
│ │ │ ├── Calaos.h
│ │ │ ├── CalaosConfig.cpp
│ │ │ ├── CalaosConfig.h
│ │ │ ├── DataLogger.cpp
│ │ │ ├── DataLogger.h
│ │ │ ├── EventManager.cpp
│ │ │ ├── EventManager.h
│ │ │ ├── HistLogger.cpp
│ │ │ ├── HistLogger.h
│ │ │ ├── HttpClient.cpp
│ │ │ ├── HttpClient.h
│ │ │ ├── HttpCodes.h
│ │ │ ├── HttpServer.cpp
│ │ │ ├── HttpServer.h
│ │ │ ├── IO/
│ │ │ │ ├── AnalogIO.cpp
│ │ │ │ ├── AnalogIO.h
│ │ │ │ ├── ExternProc.cpp
│ │ │ │ ├── ExternProc.h
│ │ │ │ ├── Gpio/
│ │ │ │ │ ├── GpioCtrl.cpp
│ │ │ │ │ ├── GpioCtrl.h
│ │ │ │ │ ├── GpioInputSwitch.cpp
│ │ │ │ │ ├── GpioInputSwitch.h
│ │ │ │ │ ├── GpioInputSwitchLongPress.cpp
│ │ │ │ │ ├── GpioInputSwitchLongPress.h
│ │ │ │ │ ├── GpioInputSwitchTriple.cpp
│ │ │ │ │ ├── GpioInputSwitchTriple.h
│ │ │ │ │ ├── GpioOutputShutter.cpp
│ │ │ │ │ ├── GpioOutputShutter.h
│ │ │ │ │ ├── GpioOutputShutterSmart.cpp
│ │ │ │ │ ├── GpioOutputShutterSmart.h
│ │ │ │ │ ├── GpioOutputSwitch.cpp
│ │ │ │ │ └── GpioOutputSwitch.h
│ │ │ │ ├── Hue/
│ │ │ │ │ ├── HueOutputLightRGB.cpp
│ │ │ │ │ └── HueOutputLightRGB.h
│ │ │ │ ├── IODoc.cpp
│ │ │ │ ├── IODoc.h
│ │ │ │ ├── IOFactory.cpp
│ │ │ │ ├── IOFactory.h
│ │ │ │ ├── InPlageHoraire.cpp
│ │ │ │ ├── InPlageHoraire.h
│ │ │ │ ├── InputAnalog.cpp
│ │ │ │ ├── InputAnalog.h
│ │ │ │ ├── InputString.cpp
│ │ │ │ ├── InputString.h
│ │ │ │ ├── InputSwitch.cpp
│ │ │ │ ├── InputSwitch.h
│ │ │ │ ├── InputSwitchLongPress.cpp
│ │ │ │ ├── InputSwitchLongPress.h
│ │ │ │ ├── InputSwitchTriple.cpp
│ │ │ │ ├── InputSwitchTriple.h
│ │ │ │ ├── InputTemp.cpp
│ │ │ │ ├── InputTemp.h
│ │ │ │ ├── InputTime.cpp
│ │ │ │ ├── InputTime.h
│ │ │ │ ├── InputTimer.cpp
│ │ │ │ ├── InputTimer.h
│ │ │ │ ├── IntValue.cpp
│ │ │ │ ├── IntValue.h
│ │ │ │ ├── KNX/
│ │ │ │ │ ├── KNXBase.cpp
│ │ │ │ │ ├── KNXBase.h
│ │ │ │ │ ├── KNXCtrl.cpp
│ │ │ │ │ ├── KNXCtrl.h
│ │ │ │ │ ├── KNXExternProc_cli.cpp
│ │ │ │ │ ├── KNXExternProc_main.cpp
│ │ │ │ │ ├── KNXExternProc_main.h
│ │ │ │ │ ├── KNXInputAnalog.cpp
│ │ │ │ │ ├── KNXInputAnalog.h
│ │ │ │ │ ├── KNXInputSwitch.cpp
│ │ │ │ │ ├── KNXInputSwitch.h
│ │ │ │ │ ├── KNXInputSwitchLongPress.cpp
│ │ │ │ │ ├── KNXInputSwitchLongPress.h
│ │ │ │ │ ├── KNXInputSwitchTriple.cpp
│ │ │ │ │ ├── KNXInputSwitchTriple.h
│ │ │ │ │ ├── KNXInputTemp.cpp
│ │ │ │ │ ├── KNXInputTemp.h
│ │ │ │ │ ├── KNXOutputAnalog.cpp
│ │ │ │ │ ├── KNXOutputAnalog.h
│ │ │ │ │ ├── KNXOutputLight.cpp
│ │ │ │ │ ├── KNXOutputLight.h
│ │ │ │ │ ├── KNXOutputLightDimmer.cpp
│ │ │ │ │ ├── KNXOutputLightDimmer.h
│ │ │ │ │ ├── KNXOutputLightRGB.cpp
│ │ │ │ │ ├── KNXOutputLightRGB.h
│ │ │ │ │ ├── KNXOutputShutter.cpp
│ │ │ │ │ ├── KNXOutputShutter.h
│ │ │ │ │ ├── KNXOutputShutterSmart.cpp
│ │ │ │ │ └── KNXOutputShutterSmart.h
│ │ │ │ ├── LAN/
│ │ │ │ │ ├── PingInputSwitch.cpp
│ │ │ │ │ ├── PingInputSwitch.h
│ │ │ │ │ ├── WOLOutputBool.cpp
│ │ │ │ │ └── WOLOutputBool.h
│ │ │ │ ├── Mqtt/
│ │ │ │ │ ├── MqttBrokersList.h
│ │ │ │ │ ├── MqttBrokerslist.cpp
│ │ │ │ │ ├── MqttCtrl.cpp
│ │ │ │ │ ├── MqttCtrl.h
│ │ │ │ │ ├── MqttExternProc_main.cpp
│ │ │ │ │ ├── MqttInputAnalog.cpp
│ │ │ │ │ ├── MqttInputAnalog.h
│ │ │ │ │ ├── MqttInputString.cpp
│ │ │ │ │ ├── MqttInputString.h
│ │ │ │ │ ├── MqttInputSwitch.cpp
│ │ │ │ │ ├── MqttInputSwitch.h
│ │ │ │ │ ├── MqttInputTemp.cpp
│ │ │ │ │ ├── MqttInputTemp.h
│ │ │ │ │ ├── MqttOutputAnalog.cpp
│ │ │ │ │ ├── MqttOutputAnalog.h
│ │ │ │ │ ├── MqttOutputLight.cpp
│ │ │ │ │ ├── MqttOutputLight.h
│ │ │ │ │ ├── MqttOutputLightDimmer.cpp
│ │ │ │ │ ├── MqttOutputLightDimmer.h
│ │ │ │ │ ├── MqttOutputLightRGB.cpp
│ │ │ │ │ ├── MqttOutputLightRGB.h
│ │ │ │ │ ├── MqttOutputShutter.cpp
│ │ │ │ │ └── MqttOutputShutter.h
│ │ │ │ ├── MySensors/
│ │ │ │ │ ├── MySensors.cpp
│ │ │ │ │ ├── MySensors.h
│ │ │ │ │ ├── MySensorsController.cpp
│ │ │ │ │ ├── MySensorsController.h
│ │ │ │ │ ├── MySensorsControllerList.cpp
│ │ │ │ │ ├── MySensorsControllerList.h
│ │ │ │ │ ├── MySensorsInputAnalog.cpp
│ │ │ │ │ ├── MySensorsInputAnalog.h
│ │ │ │ │ ├── MySensorsInputString.cpp
│ │ │ │ │ ├── MySensorsInputString.h
│ │ │ │ │ ├── MySensorsInputSwitch.cpp
│ │ │ │ │ ├── MySensorsInputSwitch.h
│ │ │ │ │ ├── MySensorsInputSwitchLongPress.cpp
│ │ │ │ │ ├── MySensorsInputSwitchLongPress.h
│ │ │ │ │ ├── MySensorsInputSwitchTriple.cpp
│ │ │ │ │ ├── MySensorsInputSwitchTriple.h
│ │ │ │ │ ├── MySensorsInputTemp.cpp
│ │ │ │ │ ├── MySensorsInputTemp.h
│ │ │ │ │ ├── MySensorsOutputAnalog.cpp
│ │ │ │ │ ├── MySensorsOutputAnalog.h
│ │ │ │ │ ├── MySensorsOutputDimmer.cpp
│ │ │ │ │ ├── MySensorsOutputDimmer.h
│ │ │ │ │ ├── MySensorsOutputLight.cpp
│ │ │ │ │ ├── MySensorsOutputLight.h
│ │ │ │ │ ├── MySensorsOutputLightRGB.cpp
│ │ │ │ │ ├── MySensorsOutputLightRGB.h
│ │ │ │ │ ├── MySensorsOutputShutter.cpp
│ │ │ │ │ ├── MySensorsOutputShutter.h
│ │ │ │ │ ├── MySensorsOutputShutterSmart.cpp
│ │ │ │ │ ├── MySensorsOutputShutterSmart.h
│ │ │ │ │ ├── MySensorsOutputString.cpp
│ │ │ │ │ └── MySensorsOutputString.h
│ │ │ │ ├── OLA/
│ │ │ │ │ ├── OLACtrl.cpp
│ │ │ │ │ ├── OLACtrl.h
│ │ │ │ │ ├── OLAExternProc_main.cpp
│ │ │ │ │ ├── OLAOutputLightDimmer.cpp
│ │ │ │ │ ├── OLAOutputLightDimmer.h
│ │ │ │ │ ├── OLAOutputLightRGB.cpp
│ │ │ │ │ └── OLAOutputLightRGB.h
│ │ │ │ ├── OneWire/
│ │ │ │ │ ├── OWCtrl.cpp
│ │ │ │ │ ├── OWCtrl.h
│ │ │ │ │ ├── OWExternProc_main.cpp
│ │ │ │ │ ├── OWTemp.cpp
│ │ │ │ │ └── OWTemp.h
│ │ │ │ ├── OutputAnalog.cpp
│ │ │ │ ├── OutputAnalog.h
│ │ │ │ ├── OutputFake.cpp
│ │ │ │ ├── OutputFake.h
│ │ │ │ ├── OutputLight.cpp
│ │ │ │ ├── OutputLight.h
│ │ │ │ ├── OutputLightDimmer.cpp
│ │ │ │ ├── OutputLightDimmer.h
│ │ │ │ ├── OutputLightRGB.cpp
│ │ │ │ ├── OutputLightRGB.h
│ │ │ │ ├── OutputShutter.cpp
│ │ │ │ ├── OutputShutter.h
│ │ │ │ ├── OutputShutterSmart.cpp
│ │ │ │ ├── OutputShutterSmart.h
│ │ │ │ ├── OutputString.cpp
│ │ │ │ ├── OutputString.h
│ │ │ │ ├── RemoteUI/
│ │ │ │ │ ├── RemoteUI.cpp
│ │ │ │ │ ├── RemoteUI.h
│ │ │ │ │ ├── RemoteUIOutputRelay.cpp
│ │ │ │ │ └── RemoteUIOutputRelay.h
│ │ │ │ ├── Reolink/
│ │ │ │ │ ├── ExternProcReolink_main.py
│ │ │ │ │ ├── ReolinkCtrl.cpp
│ │ │ │ │ ├── ReolinkCtrl.h
│ │ │ │ │ ├── ReolinkInputSwitch.cpp
│ │ │ │ │ ├── ReolinkInputSwitch.h
│ │ │ │ │ ├── calaos_reolink
│ │ │ │ │ └── calaos_reolink.in
│ │ │ │ ├── Scenario.cpp
│ │ │ │ ├── Scenario.h
│ │ │ │ ├── Wago/
│ │ │ │ │ ├── WIAnalog.cpp
│ │ │ │ │ ├── WIAnalog.h
│ │ │ │ │ ├── WIDigitalBP.cpp
│ │ │ │ │ ├── WIDigitalBP.h
│ │ │ │ │ ├── WIDigitalLong.cpp
│ │ │ │ │ ├── WIDigitalLong.h
│ │ │ │ │ ├── WIDigitalTriple.cpp
│ │ │ │ │ ├── WIDigitalTriple.h
│ │ │ │ │ ├── WITemp.cpp
│ │ │ │ │ ├── WITemp.h
│ │ │ │ │ ├── WOAnalog.cpp
│ │ │ │ │ ├── WOAnalog.h
│ │ │ │ │ ├── WODali.cpp
│ │ │ │ │ ├── WODali.h
│ │ │ │ │ ├── WODaliRVB.cpp
│ │ │ │ │ ├── WODaliRVB.h
│ │ │ │ │ ├── WODigital.cpp
│ │ │ │ │ ├── WODigital.h
│ │ │ │ │ ├── WOVolet.cpp
│ │ │ │ │ ├── WOVolet.h
│ │ │ │ │ ├── WOVoletSmart.cpp
│ │ │ │ │ ├── WOVoletSmart.h
│ │ │ │ │ ├── WagoCtrl.cpp
│ │ │ │ │ ├── WagoCtrl.h
│ │ │ │ │ ├── WagoExternProc_main.cpp
│ │ │ │ │ ├── WagoMap.cpp
│ │ │ │ │ ├── WagoMap.h
│ │ │ │ │ └── libmbus/
│ │ │ │ │ ├── mbus.c
│ │ │ │ │ ├── mbus.h
│ │ │ │ │ ├── mbus_cmd.c
│ │ │ │ │ ├── mbus_conf.h
│ │ │ │ │ ├── mbus_rqst.c
│ │ │ │ │ └── mbus_sock.c
│ │ │ │ ├── Web/
│ │ │ │ │ ├── WebCtrl.cpp
│ │ │ │ │ ├── WebCtrl.h
│ │ │ │ │ ├── WebDocBase.cpp
│ │ │ │ │ ├── WebDocBase.h
│ │ │ │ │ ├── WebInputAnalog.cpp
│ │ │ │ │ ├── WebInputAnalog.h
│ │ │ │ │ ├── WebInputString.cpp
│ │ │ │ │ ├── WebInputString.h
│ │ │ │ │ ├── WebInputTemp.cpp
│ │ │ │ │ ├── WebInputTemp.h
│ │ │ │ │ ├── WebOutputAnalog.cpp
│ │ │ │ │ ├── WebOutputAnalog.h
│ │ │ │ │ ├── WebOutputLight.cpp
│ │ │ │ │ ├── WebOutputLight.h
│ │ │ │ │ ├── WebOutputLightRGB.cpp
│ │ │ │ │ ├── WebOutputLightRGB.h
│ │ │ │ │ ├── WebOutputString.cpp
│ │ │ │ │ └── WebOutputString.h
│ │ │ │ └── io_types.txt
│ │ │ ├── IOBase.cpp
│ │ │ ├── IOBase.h
│ │ │ ├── IPCam/
│ │ │ │ ├── Axis.cpp
│ │ │ │ ├── Axis.h
│ │ │ │ ├── Foscam.cpp
│ │ │ │ ├── Foscam.h
│ │ │ │ ├── Gadspot.cpp
│ │ │ │ ├── Gadspot.h
│ │ │ │ ├── IPCam.cpp
│ │ │ │ ├── IPCam.h
│ │ │ │ ├── Planet.cpp
│ │ │ │ ├── Planet.h
│ │ │ │ ├── StandardMjpeg.cpp
│ │ │ │ ├── StandardMjpeg.h
│ │ │ │ ├── SynoSurveillanceStation.cpp
│ │ │ │ └── SynoSurveillanceStation.h
│ │ │ ├── JsonApi.cpp
│ │ │ ├── JsonApi.h
│ │ │ ├── JsonApiHandlerHttp.cpp
│ │ │ ├── JsonApiHandlerHttp.h
│ │ │ ├── JsonApiHandlerWS.cpp
│ │ │ ├── JsonApiHandlerWS.h
│ │ │ ├── ListeRoom.cpp
│ │ │ ├── ListeRoom.h
│ │ │ ├── ListeRule.cpp
│ │ │ ├── ListeRule.h
│ │ │ ├── LuaScript/
│ │ │ │ ├── Lunar.h
│ │ │ │ ├── ScriptBindings.cpp
│ │ │ │ ├── ScriptBindings.h
│ │ │ │ ├── ScriptExec.cpp
│ │ │ │ ├── ScriptExec.h
│ │ │ │ ├── ScriptExtern_main.cpp
│ │ │ │ ├── ScriptManager.cpp
│ │ │ │ └── ScriptManager.h
│ │ │ ├── Makefile.am
│ │ │ ├── McpProxyHandler.cpp
│ │ │ ├── McpProxyHandler.h
│ │ │ ├── McpServerManager.cpp
│ │ │ ├── McpServerManager.h
│ │ │ ├── NotifManager.cpp
│ │ │ ├── NotifManager.h
│ │ │ ├── PollListenner.cpp
│ │ │ ├── PollListenner.h
│ │ │ ├── RemoteUI/
│ │ │ │ ├── AuthFailureReason.h
│ │ │ │ ├── FirmwareManifest.cpp
│ │ │ │ ├── FirmwareManifest.h
│ │ │ │ ├── HMACAuthenticator.cpp
│ │ │ │ ├── HMACAuthenticator.h
│ │ │ │ ├── OtaFirmwareManager.cpp
│ │ │ │ ├── OtaFirmwareManager.h
│ │ │ │ ├── OtaHttpHandler.cpp
│ │ │ │ ├── OtaHttpHandler.h
│ │ │ │ ├── RemoteUIManager.cpp
│ │ │ │ ├── RemoteUIManager.h
│ │ │ │ ├── RemoteUIProvisioningHandler.cpp
│ │ │ │ ├── RemoteUIProvisioningHandler.h
│ │ │ │ ├── RemoteUISecurityLimits.h
│ │ │ │ ├── RemoteUIWebSocketHandler.cpp
│ │ │ │ ├── RemoteUIWebSocketHandler.h
│ │ │ │ └── remote-ui.md
│ │ │ ├── Room.cpp
│ │ │ ├── Room.h
│ │ │ ├── Rule.cpp
│ │ │ ├── Rule.h
│ │ │ ├── Rules/
│ │ │ │ ├── Action.cpp
│ │ │ │ ├── Action.h
│ │ │ │ ├── ActionMail.cpp
│ │ │ │ ├── ActionMail.h
│ │ │ │ ├── ActionPush.cpp
│ │ │ │ ├── ActionPush.h
│ │ │ │ ├── ActionScript.cpp
│ │ │ │ ├── ActionScript.h
│ │ │ │ ├── ActionStd.cpp
│ │ │ │ ├── ActionStd.h
│ │ │ │ ├── ActionTouchscreen.cpp
│ │ │ │ ├── ActionTouchscreen.h
│ │ │ │ ├── Condition.cpp
│ │ │ │ ├── Condition.h
│ │ │ │ ├── ConditionOutput.cpp
│ │ │ │ ├── ConditionOutput.h
│ │ │ │ ├── ConditionScript.cpp
│ │ │ │ ├── ConditionScript.h
│ │ │ │ ├── ConditionStart.cpp
│ │ │ │ ├── ConditionStart.h
│ │ │ │ ├── ConditionStd.cpp
│ │ │ │ ├── ConditionStd.h
│ │ │ │ ├── RulesFactory.cpp
│ │ │ │ └── RulesFactory.h
│ │ │ ├── Scenario/
│ │ │ │ ├── AutoScenario.cpp
│ │ │ │ └── AutoScenario.h
│ │ │ ├── UDPServer.cpp
│ │ │ ├── UDPServer.h
│ │ │ ├── WebSocket.cpp
│ │ │ ├── WebSocket.h
│ │ │ ├── main.cpp
│ │ │ └── version.h
│ │ └── tools/
│ │ ├── Makefile.am
│ │ ├── calaos_config.cpp
│ │ ├── calaos_mail.cpp
│ │ ├── calaos_picture
│ │ └── wago_test.cpp
│ └── lib/
│ ├── CalaosModule.h
│ ├── Calendar.cpp
│ ├── Calendar.h
│ ├── ColorUtils.cpp
│ ├── ColorUtils.h
│ ├── ExpressionEvaluator.cpp
│ ├── ExpressionEvaluator.h
│ ├── FileUtils.cpp
│ ├── FileUtils.h
│ ├── Jansson_Addition.h
│ ├── Json_Addition.h
│ ├── Logger.cpp
│ ├── Logger.h
│ ├── Makefile.am
│ ├── NTPClock.cpp
│ ├── NTPClock.h
│ ├── Params.cpp
│ ├── Params.h
│ ├── Prefix.cpp
│ ├── Prefix.h
│ ├── SHA1.cpp
│ ├── SHA1.h
│ ├── ThreadedQueue.h
│ ├── TimeRange.cpp
│ ├── TimeRange.h
│ ├── Timer.cpp
│ ├── Timer.h
│ ├── TinyXML/
│ │ ├── AUTHORS
│ │ ├── ChangeLog
│ │ ├── NEWS
│ │ ├── README
│ │ ├── action_store.cpp
│ │ ├── action_store.h
│ │ ├── byte_stream.h
│ │ ├── configure.in
│ │ ├── htmlutil.cpp
│ │ ├── htmlutil.h
│ │ ├── lex_token.h
│ │ ├── lex_util.cpp
│ │ ├── lex_util.h
│ │ ├── main.cpp
│ │ ├── node_set.cpp
│ │ ├── node_set.h
│ │ ├── openoff.xml
│ │ ├── rss2_projnews.xml
│ │ ├── test.xml
│ │ ├── tinystr.cpp
│ │ ├── tinystr.h
│ │ ├── tinyxml.cpp
│ │ ├── tinyxml.h
│ │ ├── tinyxmlerror.cpp
│ │ ├── tinyxmlparser.cpp
│ │ ├── tinyxpath.dsp
│ │ ├── tinyxpath.sln
│ │ ├── tinyxpath.vcproj
│ │ ├── tinyxpath_conf.h
│ │ ├── tinyxpath_lib/
│ │ │ ├── tinyxpath_lib.dsp
│ │ │ └── tinyxpath_lib.vcproj
│ │ ├── tokenlist.cpp
│ │ ├── tokenlist.h
│ │ ├── xml_util.cpp
│ │ ├── xml_util.h
│ │ ├── xpath_expression.cpp
│ │ ├── xpath_expression.h
│ │ ├── xpath_processor.cpp
│ │ ├── xpath_processor.h
│ │ ├── xpath_stack.cpp
│ │ ├── xpath_stack.h
│ │ ├── xpath_static.cpp
│ │ ├── xpath_static.h
│ │ ├── xpath_stream.cpp
│ │ ├── xpath_stream.h
│ │ ├── xpath_syntax.cpp
│ │ └── xpath_syntax.h
│ ├── UrlDownloader.cpp
│ ├── UrlDownloader.h
│ ├── Utils.cpp
│ ├── Utils.h
│ ├── WebSocketFrame.cpp
│ ├── WebSocketFrame.h
│ ├── base64.cpp
│ ├── base64.h
│ ├── calaos-python/
│ │ ├── Makefile.am
│ │ ├── README.md
│ │ ├── __init__.py
│ │ ├── calaos_extern_proc/
│ │ │ ├── __init__.py
│ │ │ ├── extern_proc.py
│ │ │ ├── logger.py
│ │ │ └── message.py
│ │ └── setup.py
│ ├── exprtk/
│ │ ├── exprtk.hpp
│ │ ├── exprtk_benchmark.cpp
│ │ ├── exprtk_functional_ext_test.txt
│ │ ├── exprtk_functional_test.txt
│ │ ├── exprtk_simple_example_01.cpp
│ │ ├── exprtk_simple_example_02.cpp
│ │ ├── exprtk_simple_example_03.cpp
│ │ ├── exprtk_simple_example_04.cpp
│ │ ├── exprtk_simple_example_05.cpp
│ │ ├── exprtk_simple_example_06.cpp
│ │ ├── exprtk_simple_example_07.cpp
│ │ ├── exprtk_simple_example_08.cpp
│ │ ├── exprtk_simple_example_09.cpp
│ │ ├── exprtk_simple_example_10.cpp
│ │ ├── exprtk_simple_example_11.cpp
│ │ ├── exprtk_simple_example_12.cpp
│ │ ├── exprtk_simple_example_13.cpp
│ │ ├── exprtk_simple_example_14.cpp
│ │ ├── exprtk_simple_example_15.cpp
│ │ ├── exprtk_simple_example_16.cpp
│ │ ├── exprtk_simple_example_17.cpp
│ │ ├── exprtk_simple_example_18.cpp
│ │ ├── exprtk_simple_example_19.cpp
│ │ ├── exprtk_simple_example_20.cpp
│ │ ├── exprtk_simple_example_21.cpp
│ │ ├── exprtk_simple_example_22.cpp
│ │ ├── exprtk_simple_example_23.cpp
│ │ ├── exprtk_simple_example_24.cpp
│ │ ├── exprtk_test.cpp
│ │ ├── license.txt
│ │ └── readme.txt
│ ├── json.hpp
│ ├── libquickmail/
│ │ ├── AUTHORS
│ │ ├── COPYING
│ │ ├── ChangeLog
│ │ ├── INSTALL
│ │ ├── INSTALL.msys
│ │ ├── License.txt
│ │ ├── Makefile.am
│ │ ├── NEWS
│ │ ├── README
│ │ ├── autogen.sh
│ │ ├── config.h.in
│ │ ├── configure.ac
│ │ ├── doc/
│ │ │ └── Doxyfile
│ │ ├── doxygen_dev.cfg
│ │ ├── libquickmail.workspace
│ │ ├── libquickmail_shared.cbp
│ │ ├── libquickmail_static.cbp
│ │ ├── m4/
│ │ │ ├── libtool.m4
│ │ │ ├── ltoptions.m4
│ │ │ ├── ltsugar.m4
│ │ │ ├── ltversion.m4
│ │ │ └── lt~obsolete.m4
│ │ ├── make_release.sh
│ │ ├── man1/
│ │ │ └── quickmail.1
│ │ ├── quickmail.c
│ │ ├── quickmail.h
│ │ ├── quickmail_shared.cbp
│ │ ├── quickmail_static.cbp
│ │ ├── quickmail_static_nolib.cbp
│ │ ├── quickmailprog.c
│ │ ├── smtpsocket.c
│ │ ├── smtpsocket.h
│ │ ├── test.cbp
│ │ ├── test_libquickmail_shared.cbp
│ │ ├── test_libquickmail_static.cbp
│ │ ├── test_nocurl.cbp
│ │ └── test_quickmail.c
│ ├── libuvw.h
│ ├── llhttp/
│ │ ├── .gitignore
│ │ ├── CMakeLists.txt
│ │ ├── LICENSE
│ │ ├── LICENSE-MIT
│ │ ├── README.md
│ │ ├── common.gypi
│ │ ├── include/
│ │ │ └── llhttp.h
│ │ ├── libllhttp.pc.in
│ │ ├── llhttp.gyp
│ │ └── src/
│ │ ├── api.c
│ │ ├── http.c
│ │ └── llhttp.c
│ ├── sigc_fix_functor.h
│ ├── sole/
│ │ ├── .travis.yml
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── demo.cc
│ │ ├── sole.cpp
│ │ ├── sole.cxx
│ │ ├── sole.fwd.hpp
│ │ └── sole.hpp
│ ├── sqlite_modern_cpp/
│ │ ├── .travis.yml
│ │ ├── License.txt
│ │ ├── README.md
│ │ ├── configure.ac
│ │ ├── hdr/
│ │ │ ├── sqlite_modern_cpp/
│ │ │ │ ├── errors.h
│ │ │ │ ├── lists/
│ │ │ │ │ └── error_codes.h
│ │ │ │ ├── log.h
│ │ │ │ ├── sqlcipher.h
│ │ │ │ └── utility/
│ │ │ │ ├── function_traits.h
│ │ │ │ ├── uncaught_exceptions.h
│ │ │ │ ├── utf16_utf8.h
│ │ │ │ └── variant.h
│ │ │ └── sqlite_modern_cpp.h
│ │ ├── sqlite_modern_cpp.pc.in
│ │ └── tests/
│ │ ├── blob_example.cc
│ │ ├── boost_optional.cc
│ │ ├── error_log.cc
│ │ ├── error_log2.cc
│ │ ├── exception_dont_execute.cc
│ │ ├── exception_dont_execute_nested.cc
│ │ ├── exceptions.cc
│ │ ├── extended_exceptions.cc
│ │ ├── flags.cc
│ │ ├── functions.cc
│ │ ├── functors.cc
│ │ ├── lvalue_functor_example.cc
│ │ ├── mov_ctor.cc
│ │ ├── nullptr_uniqueptr.cc
│ │ ├── prepared_statment.cc
│ │ ├── readme_example.cc
│ │ ├── shared_connection.cc
│ │ ├── simple_examples.cc
│ │ ├── sqlcipher.cc
│ │ ├── std_optional.cc
│ │ ├── trycatchblocks.cc
│ │ └── variant.cc
│ ├── sunset.c
│ ├── sunset.h
│ ├── tcpsocket.cpp
│ ├── tcpsocket.h
│ ├── uri_parser/
│ │ ├── hef_uri_syntax.cpp
│ │ ├── hef_uri_syntax.h
│ │ └── hef_uri_syntax.txt
│ └── uvw/
│ ├── .gitignore
│ ├── .gitmodules
│ ├── .travis.yml
│ ├── AUTHORS
│ ├── CMakeLists.txt
│ ├── LICENSE
│ ├── README.md
│ ├── TODO
│ ├── appveyor.yml
│ ├── cmake/
│ │ ├── in/
│ │ │ ├── googletest.in
│ │ │ └── libuv.in
│ │ └── modules/
│ │ ├── FindGoogleTest.cmake
│ │ ├── FindLibRt.cmake
│ │ └── FindUV.cmake
│ ├── deps/
│ │ └── .gitignore
│ ├── deps.bat
│ ├── deps.sh
│ ├── docs/
│ │ ├── CMakeLists.txt
│ │ ├── LICENSE
│ │ ├── doxy.in
│ │ └── extra.dox
│ ├── src/
│ │ ├── uvw/
│ │ │ ├── async.hpp
│ │ │ ├── check.hpp
│ │ │ ├── dns.hpp
│ │ │ ├── emitter.hpp
│ │ │ ├── fs.hpp
│ │ │ ├── fs_event.hpp
│ │ │ ├── fs_poll.hpp
│ │ │ ├── handle.hpp
│ │ │ ├── idle.hpp
│ │ │ ├── lib.hpp
│ │ │ ├── loop.hpp
│ │ │ ├── pipe.hpp
│ │ │ ├── poll.hpp
│ │ │ ├── prepare.hpp
│ │ │ ├── process.hpp
│ │ │ ├── request.hpp
│ │ │ ├── resource.hpp
│ │ │ ├── signal.hpp
│ │ │ ├── stream.hpp
│ │ │ ├── tcp.hpp
│ │ │ ├── thread.hpp
│ │ │ ├── timer.hpp
│ │ │ ├── tty.hpp
│ │ │ ├── udp.hpp
│ │ │ ├── underlying_type.hpp
│ │ │ ├── util.hpp
│ │ │ └── work.hpp
│ │ └── uvw.hpp
│ ├── test/
│ │ ├── CMakeLists.txt
│ │ ├── main.cpp
│ │ ├── odr.cpp
│ │ └── uvw/
│ │ ├── async.cpp
│ │ ├── check.cpp
│ │ ├── dns.cpp
│ │ ├── emitter.cpp
│ │ ├── file_req.cpp
│ │ ├── fs_event.cpp
│ │ ├── fs_poll.cpp
│ │ ├── fs_req.cpp
│ │ ├── handle.cpp
│ │ ├── idle.cpp
│ │ ├── lib.cpp
│ │ ├── loop.cpp
│ │ ├── pipe.cpp
│ │ ├── poll.cpp
│ │ ├── prepare.cpp
│ │ ├── process.cpp
│ │ ├── request.cpp
│ │ ├── resource.cpp
│ │ ├── signal.cpp
│ │ ├── stream.cpp
│ │ ├── tcp.cpp
│ │ ├── thread.cpp
│ │ ├── timer.cpp
│ │ ├── tty.cpp
│ │ ├── udp.cpp
│ │ ├── underlying_type.cpp
│ │ ├── util.cpp
│ │ └── work.cpp
│ └── travis.sh
├── tests/
│ ├── ColorValue_test.cpp
│ ├── ExpressionEvaluator_test.cpp
│ ├── FileUtils_test.cpp
│ ├── Makefile.am
│ ├── WebSocketClient_test.cpp
│ └── websockets/
│ ├── fuzzingclient.json
│ ├── run_testsuite_client.sh
│ └── run_testsuite_server.sh
└── version
================================================
FILE CONTENTS
================================================
================================================
FILE: .devcontainer/Dockerfile
================================================
FROM debian:12-slim as dev
ARG APP_VERSION
LABEL version=$APP_VERSION
ENV HOME /opt
RUN mkdir -p $HOME /build /opt
#required packages
RUN apt-get update -qq && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
build-essential wget git curl \
libsigc++-2.0-dev libjansson-dev libcurl4-openssl-dev libluajit2-5.1-dev libsqlite3-dev \
libcurl4-openssl-dev libusb-dev libow-dev imagemagick libev-dev libusb-1.0-0-dev \
knxd knxd-dev googletest libuv1-dev libmosquitto-dev libmosquittopp-dev \
libola-dev ola \
unzip zip cmake automake autoconf libtool autopoint gettext \
tar gzip zsh vim nano sudo zstd less gnupg ripgrep gdb cgdb locales \
python3-pip python3-full iproute2 python3-colorama libgtest-dev npm
RUN pip install roonapi --break-system-packages
RUN pip install reolink-aio --break-system-packages
RUN pip install "mcp[cli]" uvicorn fastapi websockets --break-system-packages
RUN npm install -g @anthropic-ai/claude-code
#install rtk (Rust Token Killer) - https://github.com/rtk-ai/rtk
RUN curl -fsSL https://raw.githubusercontent.com/rtk-ai/rtk/refs/heads/master/install.sh | sh
ENV PATH="$HOME/.local/bin:$PATH"
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
sed -i -e 's/# fr_FR.UTF-8 UTF-8/fr_FR.UTF-8 UTF-8/' /etc/locale.gen && \
dpkg-reconfigure --frontend=noninteractive locales && \
update-locale LANG=en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
RUN echo "export EDITOR=nano \n\
export VISUAL=nano \n\
export LS_OPTIONS='--color=auto' \n\
eval "$(dircolors)" \n\
alias ls='ls $LS_OPTIONS' \n\
alias ll='ls $LS_OPTIONS -l' \n\
" >> /etc/bash.bashrc
RUN curl -fsSL https://starship.rs/install.sh | sh -s -- -y
RUN echo 'eval "$(starship init bash)"' >> /etc/bash.bashrc
#better bash history search with up/down arrows
RUN echo "\n\
## arrow up \n\
\"\e[A\":history-search-backward \n\
## arrow down \n\
\"\e[B\":history-search-forward \n\
\n\
set show-all-if-ambiguous on \n\
set completion-ignore-case on \n\
" >> /etc/inputrc
================================================
FILE: .devcontainer/devcontainer.json
================================================
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
{
"name": "Debian12 calaos-server dev container",
"build": {
"dockerfile": "Dockerfile"
},
"mounts": [
"source=extensionCache,target=/root/.vscode-server/extensions,type=volume",
"source=${localEnv:HOME}/.claude,target=/opt/.claude,type=bind,consistency=cached",
"source=${localEnv:HOME}/.agents,target=/opt/.agents,type=bind,consistency=cached",
"source=${localEnv:HOME}/.config/rtk,target=/opt/.config/rtk,type=bind,consistency=cached",
"source=${localEnv:HOME}/.claude.json,target=/opt/.claude.json,type=bind,consistency=cached"
],
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [ 5454 ],
// Configure tool-specific properties.
"customizations": {
"vscode": {
"extensions": [
"ms-vscode.cpptools-extension-pack",
"ms-vscode.makefile-tools",
"lizebang.bash-extension-pack",
"ms-vscode.cmake-tools",
"ms-python.python",
"KevinRose.vsc-python-indent",
"eamodio.gitlens",
"Anthropic.claude-code"
]
}
},
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
"remoteUser": "root",
"runArgs": ["--privileged", "--network=host"]
}
================================================
FILE: .github/copilot-instructions.md
================================================
---
applyTo: "**"
---
# Project general coding standards
## Naming Conventions
- Use camelCase for variables, functions, and methods for C++ code
- Use snake_case for variables, functions, and methods for C code
- In C always append openning { on a new line
- Use ALL_CAPS for constants in #define in C
- Use PascalCase for class names in C++
- All comments should be in English and should be clear and concise
- In if, for, while, and switch statements, single-line statements should not use braces, but multi-line statements should always use braces
- In C++ constructor implementations, put : at the end of the function declaration on the first line. Add all member initialization on a new line with the , at the end of each line.
Example:
```
MyClass::MyClass():
MyBaseClass(a, b),
member_1(3),
member_2(nullptr)
{
}
```
## Error Handling
- Always log errors with contextual information
================================================
FILE: .github/workflows/docker-publish-dev.yml
================================================
name: Build and Publish dev docker image
on:
push:
branches: [ master ]
env:
REGISTRY_IMAGE: ghcr.io/calaos/calaos_base
NAME: calaos_base
IMG_TAG: dev
jobs:
# define job to build and publish docker image
build-and-push-docker-image:
name: Build Docker image and push to repositories
# run only when code is compiling and tests are passing
runs-on: ubuntu-latest
# steps to perform in job
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Calaos Action Bump Version
id: calaos_version
uses: calaos/action-bump-version@2
with:
version_fragment: 'prerelease'
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY_IMAGE }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Github Packages
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push by digest
id: build
uses: docker/build-push-action@v4
with:
context: .
push: true
build-args: APP_VERSION=${{ steps.calaos_version.outputs.version_bumped }}
tags: |
${{ env.REGISTRY_IMAGE }}:${{ env.IMG_TAG }}
${{ env.REGISTRY_IMAGE }}:${{ steps.calaos_version.outputs.version_bumped }}
- name: Create Tag
uses: negz/create-tag@v1
with:
version: ${{ steps.calaos_version.outputs.version_bumped }}
token: ${{ secrets.ACTION_DISPATCH }}
- name: Build deb
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.ACTION_DISPATCH }}
repository: calaos/pkgdebs
event-type: build_deb
client-payload: '{ "pkgname": "calaos-server", "version": "${{ steps.calaos_version.outputs.version_bumped }}", "image_src": "${{ env.REGISTRY_IMAGE }}:${{ steps.calaos_version.outputs.version_bumped }}", "prerelease": true }'
================================================
FILE: .github/workflows/docker-publish.yml
================================================
name: Build and Publish docker image
on:
workflow_dispatch:
inputs:
vincrement:
description: 'Package version increment (major.minor.xxx)'
required: true
default: 'patch'
type: choice
options:
- major
- minor
- patch
env:
REGISTRY_IMAGE: ghcr.io/calaos/calaos_base
NAME: calaos_base
IMG_TAG: latest
jobs:
# define job to build and publish docker image
build-and-push-docker-image:
name: Build Docker image and push to repositories
# run only when code is compiling and tests are passing
runs-on: ubuntu-latest
# steps to perform in job
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Calaos Action Bump Version
id: calaos_version
uses: calaos/action-bump-version@2
with:
version_fragment: ${{ github.event.inputs.vincrement }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY_IMAGE }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Github Packages
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push by digest
id: build
uses: docker/build-push-action@v4
with:
context: .
push: true
build-args: APP_VERSION=${{ steps.calaos_version.outputs.version_bumped }}
tags: |
${{ env.REGISTRY_IMAGE }}:${{ env.IMG_TAG }}
${{ env.REGISTRY_IMAGE }}:${{ steps.calaos_version.outputs.version_bumped }}
- name: Create Tag
uses: negz/create-tag@v1
with:
version: ${{ steps.calaos_version.outputs.version_bumped }}
token: ${{ secrets.ACTION_DISPATCH }}
- name: Build deb
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.ACTION_DISPATCH }}
repository: calaos/pkgdebs
event-type: build_deb
client-payload: '{ "pkgname": "calaos-server", "version": "${{ steps.calaos_version.outputs.version_bumped }}", "image_src": "${{ env.REGISTRY_IMAGE }}:${{ steps.calaos_version.outputs.version_bumped }}", "prerelease": false }'
================================================
FILE: .gitignore
================================================
# Compiled Object files
*.slo
*.lo
*.o
# Compiled Dynamic libraries
*.so
*.dylib
# Compiled Static libraries
*.lai
*.la
*.a
*.[oa]
*~
#*
Makefile.in
Makefile
*.lo
.deps
.libs
*.la
missing
stamp-h1
aclocal.m4
ABOUT-NLS
compile
m4/*.m4
m4/libtool.m4
m4/ltoptions.m4
m4/ltsugar.m4
m4/ltversion.m4
m4/lt~obsolete.m4
autom4te.cache/
config.cache
config.cache-env
config.guess
config.h
config.log
config.status
config.sub
configure
depcomp
*.gmo
*.header
*.insert-header
install-sh
libtool
ltmain.sh
massif.out.*
calaos-*.tar.gz
calaos-*.tar.bz2
calaos-*.tar.xz
/data/theme/default/default.edj
/config.h.in
*.patch
config.rpath
*.po
Makefile.am.user
.dirstamp
*.edj
src/bin/calaos_home/calaos_home
src/bin/calaos_home/calaos_thumb
src/bin/calaos_server/calaos_server
po/ChangeLog
po/Makefile.in.in
po/Makevars.template
po/POTFILES
po/Rules-quot
po/boldquot.sed
po/calaos.pot
po/insert-header.sin
po/quot.sed
po/remove-potcdate.sin
po/stamp-po
src/bin/tools/calaos_config
src/bin/tools/wago_test
src/bin/tools/calaos_thumb
src/bin/tools/calaos_mail
src/bin/calaos_server/calaos_1wire
src/bin/calaos_server/calaos_ola
src/bin/calaos_server/calaos_wago
src/bin/calaos_server/calaos_knx
src/bin/calaos_server/calaos_script
src/bin/calaos_server/calaos_mqtt
src/bin/calaos_server/Audio/calaos_roon
calaos.config
calaos.creator*
calaos.files
calaos.includes
po/remove-potcdate.sed
Makefile.am.user*
*.swp
tests/ColorValue_test
tests/WebSocketClient_test
tests/*.log
tests/*.trs
test-driver
tests/websockets/reports/
GPATH
GRTAGS
GTAGS
_build
build
build_doc
__pycache__
CLAUDE.md
homeassitant
reolink_aio
claudedocs
================================================
FILE: .vscode/c_cpp_properties.json
================================================
{
"configurations": [
{
"name": "Linux",
"includePath": [
"${workspaceFolder}/**",
"/usr/include/sigc++-2.0",
"/usr/lib/x86_64-linux-gnu/sigc++-2.0/include",
"/usr/lib/aarch64-linux-gnu/sigc++-2.0/include",
"${workspaceFolder}/src/lib/llhttp/include",
"${workspaceFolder}/src/bin/calaos_server/RemoteUI",
],
"defines": [],
"compilerPath": "/usr/bin/gcc",
"cStandard": "c17",
"cppStandard": "gnu++17",
"intelliSenseMode": "linux-gcc-x64"
}
],
"version": 4
}
================================================
FILE: .vscode/launch.json
================================================
{
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceRoot}/_build/src/bin/calaos_server/calaos_server",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceRoot}/_build/src/bin/calaos_server",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
},
{
"name": "Python: Roon extern proc",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/src/bin/calaos_server/Audio/ExternProcRoon_main.py",
"args": [
"--socket", "/tmp/mysocket",
"--namespace", "roon",
],
},
{
"name": "Attach to Python Process",
"type": "debugpy",
"request": "attach",
"connect": {
"host": "localhost",
"port": 5678
},
"justMyCode": false
},
]
}
================================================
FILE: .vscode/settings.json
================================================
{
"files.associations": {
"*.tmpl": "go-template",
"array": "cpp",
"atomic": "cpp",
"bit": "cpp",
"*.tcc": "cpp",
"bitset": "cpp",
"cctype": "cpp",
"chrono": "cpp",
"clocale": "cpp",
"cmath": "cpp",
"compare": "cpp",
"concepts": "cpp",
"condition_variable": "cpp",
"cstdarg": "cpp",
"cstddef": "cpp",
"cstdint": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cstring": "cpp",
"ctime": "cpp",
"cwchar": "cpp",
"cwctype": "cpp",
"deque": "cpp",
"forward_list": "cpp",
"list": "cpp",
"map": "cpp",
"set": "cpp",
"string": "cpp",
"unordered_map": "cpp",
"vector": "cpp",
"exception": "cpp",
"algorithm": "cpp",
"functional": "cpp",
"iterator": "cpp",
"memory": "cpp",
"memory_resource": "cpp",
"numeric": "cpp",
"optional": "cpp",
"random": "cpp",
"ratio": "cpp",
"string_view": "cpp",
"system_error": "cpp",
"tuple": "cpp",
"type_traits": "cpp",
"utility": "cpp",
"fstream": "cpp",
"initializer_list": "cpp",
"iomanip": "cpp",
"iosfwd": "cpp",
"iostream": "cpp",
"istream": "cpp",
"limits": "cpp",
"mutex": "cpp",
"new": "cpp",
"numbers": "cpp",
"ostream": "cpp",
"semaphore": "cpp",
"sstream": "cpp",
"stdexcept": "cpp",
"stop_token": "cpp",
"streambuf": "cpp",
"thread": "cpp",
"cinttypes": "cpp",
"typeinfo": "cpp",
"valarray": "cpp",
"variant": "cpp",
"any": "cpp",
"codecvt": "cpp",
"ranges": "cpp",
"span": "cpp"
}
}
================================================
FILE: .vscode/tasks.json
================================================
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "create_build_folder",
"type": "shell",
"command": "mkdir -p _build",
"group": "build",
},
{
"label": "build",
"type": "shell",
"command": "make -j16 install",
"problemMatcher": "$gcc",
"options": {
"cwd": "${workspaceFolder}/_build"
},
"group": {
"kind": "build",
"isDefault": true
},
"dependsOn": [
"create_build_folder",
],
},
{
"label": "clean",
"type": "shell",
"command": "make clean",
"options": {
"cwd": "${workspaceFolder}/_build"
},
"group": "build",
"dependsOn": [
"create_build_folder",
],
},
{
"label": "configure (Debug)",
"type": "shell",
"command": "../configure",
"options": {
"cwd": "${workspaceFolder}/_build",
"env": {
"CFLAGS": "-g3 -ggdb -O0",
"CXXFLAGS": "-g3 -ggdb -O0"
}
},
"dependsOn": [
"create_build_folder"
],
"group": "build",
},
{
"label": "configure (Release)",
"type": "shell",
"command": "../configure",
"options": {
"cwd": "${workspaceFolder}/_build",
},
"dependsOn": [
"create_build_folder"
],
"group": "build"
},
{
"label": "Create IODoc",
"type": "shell",
"command": "./scripts/create_iodoc",
"dependsOn": [
"build"
],
"group": "build"
},
{
"label": "Run Tests",
"type": "shell",
"command": "make check",
"options": {
"cwd": "${workspaceFolder}/_build"
},
"dependsOn": [
"build"
]
}
]
}
================================================
FILE: AGENTS.md
================================================
# AGENTS.md
This file provides guidance to LLM Agents when working with code in this repository.
## Documentation
Detailed technical documentation for each subsystem is in [`doc/`](doc/README.md):
| Doc | Subsystem |
|---|---|
| [doc/00_overview.md](doc/00_overview.md) | Global architecture, startup flow, dependencies |
| [doc/01_core_data_model.md](doc/01_core_data_model.md) | IOBase, Room, ListeRoom, IOFactory, Params |
| [doc/02_io_drivers.md](doc/02_io_drivers.md) | All IO drivers: Wago, KNX, MQTT, GPIO, Hue, MySensors… |
| [doc/03_rules_engine.md](doc/03_rules_engine.md) | Rules, Conditions, Actions |
| [doc/04_scenarios.md](doc/04_scenarios.md) | AutoScenario, time ranges, timers |
| [doc/05_audio.md](doc/05_audio.md) | AudioPlayer (Squeezebox, Roon), AVReceiver (Denon, Yamaha…) |
| [doc/06_ipcam.md](doc/06_ipcam.md) | IP cameras (IPCam, Axis, Foscam, Synology…) |
| [doc/07_remoteui.md](doc/07_remoteui.md) | Embedded RemoteUI devices, WebSocket, HMAC auth, OTA |
| [doc/08_http_api.md](doc/08_http_api.md) | JSON HTTP/WebSocket API, real-time events |
| [doc/09_lua_scripting.md](doc/09_lua_scripting.md) | Lua engine, calaos:* API, script examples |
| [doc/10_events_notifications.md](doc/10_events_notifications.md) | EventManager, push notifications, email, HistLogger |
| [doc/11_config_persistence.md](doc/11_config_persistence.md) | local_config.xml, rules.xml, state cache |
| [doc/12_extern_proc.md](doc/12_extern_proc.md) | ExternProc IPC framework (C++ subprocess drivers) |
| [doc/13_utility_lib.md](doc/13_utility_lib.md) | Utils, Params, Timer, Logger, bundled libraries |
| [doc/14_python_extern_proc.md](doc/14_python_extern_proc.md) | Python drivers: calaos_extern_proc lib, Reolink, Roon |
| [doc/15_mcp_server.md](doc/15_mcp_server.md) | MCP sidecar: calaos_mcp Python process, reverse proxy, tools, auth |
---
## Project Overview
Calaos Server is a home automation daemon that controls lights, shutters, sensors, music, cameras, and more through a JSON/WebSocket API. It reads configuration from three XML files and runs an event-driven loop based on libuv.
The main binary is `calaos_server`. Several drivers run as **separate subprocesses** (C++ or Python) that communicate with the server over Unix sockets using the `ExternProc` IPC framework. Subprocess drivers: Wago, KNX, MQTT, OneWire, OLA, Reolink (Python), Roon (Python), Lua scripts.
An additional Python subprocess, `calaos_mcp`, exposes the home to LLM clients (Claude Desktop, etc.) via the **Model Context Protocol**. Unlike the ExternProc drivers it does *not* use the binary IPC framing: it runs a FastMCP/uvicorn HTTP server on a Unix domain socket and is reverse-proxied through the `/mcp` path of the main HTTP port (5454). See [doc/15_mcp_server.md](doc/15_mcp_server.md).
---
## Build Commands
```bash
# Bootstrap the build system (first time or after configure.ac changes)
./autogen.sh
# Configure and build
./configure && make
# Install
sudo make install
# Run tests (requires gtest to be installed)
make check
# Build with optional hardware support
./configure --with-owfs --with-knx --with-mqtt --with-ola
```
The project uses GNU Autotools. If dependencies are missing, check `configure.ac` for the optional `--with-*` flags.
---
## Code Architecture
### Entry Point
`src/bin/calaos_server/main.cpp` initializes the system, loads XML config, and starts the libuv event loop.
Startup sequence:
1. `Config::LoadConfigIO()` — parses `io.xml`, instantiates IOs via `IOFactory`, fills `ListeRoom`
2. `Config::LoadConfigRule()` — parses `rules.xml`, instantiates `Rule`/`Condition`/`Action` objects
3. `HttpServer::Instance(port)` — starts the HTTP/WebSocket server (`JSONAPI_PORT` = **5454** by default, overridable via the `port_api` config option)
4. `McpServerManager::Instance().start()` — spawns the `calaos_mcp` sidecar (no-op if the wrapper is not installed)
5. `ListeRule::ExecuteStartRules()` — fires rules with `ConditionStart` once
6. libuv event loop runs indefinitely
### IO System (`src/bin/calaos_server/IO/`)
Every controllable device is an `IOBase` subclass. IOs self-register via a factory macro placed at file scope in the `.cpp`:
```cpp
REGISTER_IO(WagoOutputLight)
REGISTER_IO_USERTYPE("WagoOutputLight", WODigital) // XML type name differs from class name
```
`IOFactory` reads the `type` attribute from `local_config.xml` and instantiates the matching class. Subdirectories group IOs by protocol:
| Directory | Protocol |
|---|---|
| `IO/Wago/` | Modbus TCP (Wago 750 PLCs) — ExternProc |
| `IO/KNX/` | KNX bus via knxd — ExternProc |
| `IO/Mqtt/` | MQTT — ExternProc |
| `IO/Gpio/` | Linux GPIO sysfs |
| `IO/Hue/` | Philips Hue REST API |
| `IO/LAN/` | Ping / Wake-On-LAN |
| `IO/MySensors/` | MySensors RF network |
| `IO/OLA/` | DMX512 via OLA — ExternProc |
| `IO/OneWire/` | 1-Wire via owfs — ExternProc |
| `IO/RemoteUI/` | IOs hosted on embedded RemoteUI devices |
| `IO/Reolink/` | Reolink cameras — Python ExternProc |
| `IO/Web/` | HTTP-based IOs |
### Rules Engine (`src/bin/calaos_server/Rules/`)
Each `Rule` holds a list of `Condition` objects (all must be true) and a list of `Action` objects (executed when conditions pass).
Condition types: `ConditionStd` (compare IO value), `ConditionOutput` (compare output state), `ConditionStart` (once at boot), `ConditionScript` (Lua).
Action types: `ActionStd` (set IO value), `ActionMail`, `ActionPush`, `ActionScript` (Lua), `ActionTouchscreen`.
### ExternProc IPC (`src/bin/calaos_server/IO/ExternProc.h`)
Framework for subprocess drivers. The server side uses `ExternProcServer`; subprocess drivers (C++ or Python) use `ExternProcClient`. Communication is via Unix socket with a simple binary framing (type + size + JSON payload). Python drivers use the `calaos_extern_proc` package (`src/lib/calaos-python/`).
### Event System (`src/bin/calaos_server/EventManager.cpp`)
Central pub/sub using sigc++ signals. When an IO changes state it calls `EmitSignalIO()` → `ListeRule::ExecuteRuleSignal(id)` (triggers rules) and `EventManager::create(EventIOChanged, ...)` (notifies WebSocket clients). See `doc/10_events_notifications.md`.
### HTTP / WebSocket API (`src/bin/calaos_server/HttpServer.cpp`, `JsonApi.cpp`)
Singleton `HttpServer` listens on port 5454 (`JSONAPI_PORT`). Each connection becomes a `WebSocket` which delegates to `JsonApiHandlerHttp` (single request) or `JsonApiHandlerWS` (persistent connection with real-time event push). `WebSocket::ProcessData` also sniffs the first request line: requests targeting `/mcp` are handed to `McpProxyHandler` instead (see MCP section below). See `doc/08_http_api.md`.
### MCP Sidecar (`src/bin/calaos_server/McpServerManager.{h,cpp}`, `McpProxyHandler.{h,cpp}`, `src/bin/calaos_mcp/`)
`McpServerManager` (singleton) spawns the `calaos_mcp` Python sidecar at boot via `uvw::ProcessHandle`, auto-generates the `mcp_token` and `mcp_service_token` in `local_config.xml`, and supervises it (restart with backoff, SIGTERM on shutdown). The sidecar listens on a Unix domain socket (`$CALAOS_CACHE_PATH/mcp.sock`, mode 0660). `McpProxyHandler` splices `/mcp/*` TCP connections to that socket as raw bytes, so the existing HTTPS-terminating reverse proxy (haproxy on Calaos OS) covers MCP without any extra port. The sidecar authenticates back to the JsonApi over WebSocket using `login_service` (a scope-restricted session, `serviceScope=true`) rather than admin credentials. See `doc/15_mcp_server.md`.
### RemoteUI (`src/bin/calaos_server/RemoteUI/`)
Manages embedded devices (ESP32-S3 wall panels, etc.) that connect via WebSocket with HMAC-SHA256 authentication. Handles IO state synchronization, command dispatch, and OTA firmware updates. See `doc/07_remoteui.md`.
### Audio (`src/bin/calaos_server/Audio/`)
`AudioPlayer` subclasses: `Squeezebox` (Logitech Media Server), `RoonPlayer` (Python ExternProc). AV receivers (`AVReceiver` subclasses): Denon, Marantz, Onkyo, Pioneer, Rose, Yamaha. See `doc/05_audio.md`.
### IP Cameras (`src/bin/calaos_server/IPCam/`)
`IPCam` base class with implementations for Axis, Foscam, Gadspot, Planet, StandardMjpeg, SynoSurveillanceStation. See `doc/06_ipcam.md`.
### Lua Scripting (`src/bin/calaos_server/LuaScript/`)
Scripts run in an isolated subprocess (`ScriptExtern_main.cpp` via ExternProc). `ScriptManager` sends the script text to the subprocess; `Lua_Calaos` (via Lunar) exposes `calaos:get_io()`, `calaos:set_io()`, etc. See `doc/09_lua_scripting.md`.
### Config & Persistence (`src/bin/calaos_server/CalaosConfig.h`)
`Config` singleton loads/saves `local_config.xml` (IOs) and `rules.xml` (rules). A state cache (SQLite via `sqlite_modern_cpp`) persists last known IO values across restarts. See `doc/11_config_persistence.md`.
### Common Library (`src/lib/`)
`Utils`, `Logger`, `Params` (string→string map), `Timer` (libuv-based), `ColorUtils`, `FileUtils`, `UrlDownloader` (libcurl async), `ExpressionEvaluator` (exprtk), `NTPClock`. Bundled third-party libs: nlohmann/json, TinyXML+XPath, sole (UUID), sqlite_modern_cpp, llhttp, exprtk, libquickmail, uvw. See `doc/13_utility_lib.md`.
---
## Configuration Files
| File | Constant | Content |
|---|---|---|
| `io.xml` | `IO_CONFIG` | Rooms and IO declarations (type, id, name, protocol params) |
| `rules.xml` | `RULES_CONFIG` | Automation rules (conditions + actions) |
| `local_config.xml` | `LOCAL_CONFIG` | Server settings: credentials, SMTP, InfluxDB, NTP, push tokens, misc options |
Default path: `/etc/calaos/`. Override with `--config <dir>` (sets `_configBase` and the `CALAOS_CONFIG_PATH` env var), or fall back to `~/.config/calaos/`. Cache path defaults to `~/.cache/calaos/`, overridable with `--cache <dir>`. Constants are defined in `src/lib/Utils.h`.
**Important:** the `type` attribute in `io.xml` must exactly match a registered `IOFactory` key (case-insensitive). Unknown types are silently skipped at load time.
**Config path gotchas (learned the hard way):**
- `Utils::getConfigFile(name)` honours `--config` / `CALAOS_CONFIG_PATH` (it reads `_configBase`); `Utils::getConfigPath()` does **not** — it re-derives the directory from `$HOME` every time. When you need the *active* config directory (e.g. to pass to a subprocess), use `getConfigFile("")` and strip the trailing slash, not `getConfigPath()`. `getCachePath()` does respect `--cache`.
- `local_config.xml` options are namespaced elements: `<calaos:option name="..." value="..."/>` with `xmlns:calaos="http://www.calaos.fr"`. A Python `xml.etree` parser sees the tag as `{http://www.calaos.fr}option`, so `root.iter("option")` matches nothing — match on the local name after the `}` instead.
- MCP keys in `local_config.xml`: `mcp_token` (Bearer token for MCP clients) and `mcp_service_token` (sidecar→JsonApi service login). Both are auto-generated (64 hex chars) on first boot if absent.
---
## Coding Conventions
- **C++**: camelCase for variables/functions/methods, PascalCase for classes
- **C**: snake_case for variables/functions/methods, ALL_CAPS for `#define` constants
- **Braces**: opening `{` on a new line; single-line bodies omit braces; multi-line bodies always use braces
- **Constructor initialization lists**: `:` at end of the declaration line, each initializer on its own line with `,` at the end:
```cpp
MyClass::MyClass():
MyBaseClass(a, b),
member_1(3),
member_2(nullptr)
{
}
```
- **Namespace**: all server-side business logic is in namespace `Calaos`
- **Singletons**: expose a static `Instance()` method
- **IO IDs**: unique string, format `id-<uuid4>`, generated by `get_new_id(prefix)`
- **Comments**: English only, clear and concise
- **Error handling**: always log errors with contextual information using `cErrorDom("domain") << "message"`
- **Python** (subprocess drivers): follow the same domain-based logging via `calaos_extern_proc.logger`
---
## Tests
Tests live in `tests/` and use Google Test. Built and run with `make check` (only if gtest is detected at configure time). Current coverage: `ColorValue`, `ExpressionEvaluator`, `WebSocketClient`.
---
## Key Dependencies
**Required:** `gcc > 5` (C++14), `libuv > 1.10`, `jansson > 2.5`, `libcurl > 7.20`, `luajit`, `sigc++ > 2.4`, `sqlite3`
**Optional** (enabled via `./configure --with-<name>`):
| Flag | Library | Enables |
|---|---|---|
| `--with-owfs` | owfs | 1-Wire sensors (OneWire driver) |
| `--with-knx` | knxd | KNX bus (KNX driver) |
| `--with-mqtt` | libmosquitto | MQTT broker (MQTT driver) |
| `--with-ola` | OLA | DMX512 lighting (OLA driver) |
**Python drivers** (installed separately): `reolink_aio` (Reolink), `roonapi` (Roon), `colorama` (logging)
**MCP sidecar** (enabled by default, disable with `./configure --without-mcp`): requires the Python packages `mcp` (with `mcp[cli]`), `uvicorn`, and `fastapi`. `configure` probes for them; if missing it warns and skips building the sidecar (`HAVE_PYTHON_MCP`). Install with `pip3 install "mcp[cli]" uvicorn fastapi`.
---
## Docker
A multi-stage `Dockerfile` is provided with `dev`, `builder`, and `runner` targets. Images are published to `ghcr.io/calaos/calaos_base`.
================================================
FILE: AUTHORS
================================================
Raoul Hecky <raoul.hecky@gmail.com>
Nicolas Aguirre <aguirre.nicolas@gmail.com>
================================================
FILE: COPYING
================================================
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
================================================
FILE: ChangeLog
================================================
24-05-2011 Raoul Hecky
* Ajout des conditions sur les sorties
30-06-2011 Raoul Hecky
* Correction du log des temperatures, ajout de son ID
* Correction de la valeur d'un timer au demarrage => true, permet de rester
coherent par rapport au fonctionnement des timer (etat bas pendant la duree
d'attente du timer, etat haut pendant le reste du temps).
08-29-2011 Raoul Hecky
* Ajout d'un systeme de rapport de bug automatique.
28-09-2011 Raoul Hecky
* Corrige le probleme de reconnexion aux automates en la gardant ouverte
10-11-2011
* Correction de la lecture des valeurs DALI.
* Correction d'une fuite memoire.
* Correction des logs des WIAnalog
* Correction d'un bug possible dans la gestion des requetes automate
* Correction du bug empechant le toggle sur un WODaliRVB
22-11-2011
* Correction d'un plantage dans les ActionTouchscreen.
23-11-2011
* Support du Squeezecenter 7.7.x
* Ajout d'une commande "getitembasic?" pour recuperer les items de la
playlist.
14-12-2011 Raoul Hecky
* Correction du port utilise par le squeezecenter. Le parametre "port"
disparait au profit de "port_cli" et "port_web".
27-12-2011 Raoul Hecky
* Remise a zero de la valeur d'un WIDigitalTriple apres relachement du
bouton.
* Correction de la lecture des WIDigitalBP
* Lancement des regles au demarrage apres avoir lu les entrees/sorties
16-01-2012 Raoul Hecky
* Correction d'un potentiel probleme lors de la lecture d'un
interrupteur
17-01-2012 Raoul Hecky
* L'enregistrement des variables sauvegardes se fait dans un fichier
separe (iostates.cache)
* L'enregistrement des fichiers de configuration est maintenant plus
sur, afin d'eviter une corruption.
26-01-2012 Raoul Hecky
* Release Firmware 1.1.19
01-02-2012 Raoul Hecky
* Ajout du support des Amplificateur Audio/Video Pioneer et Denon.
11-02-2012 Raoul Hecky
* Correction des valeurs de temperature negative
27-02-2012 Raoul Hecky
* Correction d'un probleme de sauvegarde de la configuration des
scenarios.
* Release Firmware 1.1.20
15-03-2012 Raoul Hecky
* Correction d'un probleme qui empechait la lecture correcte des
entrees WIDigitalBP au demarrage.
* Correction des actions "impulse up x" et "impulse down x" sur
des sorties WOVolet et WOVoletSmart
28-03-2012 Raoul Hecky
* Ajout des commandes de volume sur les AudioOutput
29-03-2012 Raoul Hecky
* Correction d'un bug possible dans la connexion reseau
* Ajout du support des Amplificateurs A/V Onkyo/Integra (eISCP)
03-04-2012 Raoul Hecky
* Ajout du support des ammplificateurs A/V Marantz
23-07-2012 Raoul Hecky
* Correction d'un bug sur la lecture des entrees KNX/STD lorsqu'on
utilise les deux avec les memes adresses.
================================================
FILE: Dockerfile
================================================
FROM debian:12-slim as dev
ENV DEBIAN_FRONTEND noninteractive
ARG APP_VERSION
LABEL version=$APP_VERSION
ENV HOME /opt
RUN mkdir -p $HOME /build /opt
#required packages
RUN apt-get update -qq && \
apt-get install -y \
build-essential wget git curl \
libsigc++-2.0-dev libjansson-dev libcurl4-openssl-dev libluajit2-5.1-dev libsqlite3-dev \
libcurl4-openssl-dev libow-dev imagemagick libev-dev \
knxd knxd-dev googletest libuv1-dev libmosquitto-dev libmosquittopp-dev \
libola-dev ola \
unzip zip cmake automake autoconf libtool autopoint gettext \
tar gzip python3 python3-pip python3-colorama libssl-dev
RUN curl -L https://github.com/calaos/calaos-web-app/archive/refs/tags/3.0.1.tar.gz --output webapp.tar.gz && \
tar xzvf webapp.tar.gz && \
mkdir -p /opt/share/calaos/app && \
mv calaos-web-app-*/dist/* /opt/share/calaos/app && \
rm -fr webapp.tar.gz calaos-web-app-*
RUN pip install roonapi --break-system-packages
RUN pip install reolink-aio --break-system-packages
RUN pip install "mcp[cli]" uvicorn fastapi websockets --break-system-packages
ENV PKG_CONFIG_PATH="/opt/lib/pkgconfig"
FROM dev as builder
RUN git clone https://github.com/calaos/calaos_base.git && \
cd calaos_base && ./autogen.sh && \
sed -i 's/^#define\s+PKG_VERSION_STR\s+"\w+"/#define PKG_VERSION_STR "'$APP_VERSION'"/g' src/bin/calaos_server/version.h && \
echo $APP_VERSION > version && \
./configure --prefix=/opt CPPFLAGS=-I/opt/include LDFLAGS=-L/opt/lib && \
make -j$(nproc) && \
make install-strip
FROM debian:12-slim as runner
RUN apt -y update && \
apt -y upgrade && \
apt-get install -yq --no-install-recommends libuv1 curl libsigc++-2.0-0v5 libjansson4 \
libluajit2-5.1-dev libsqlite3-0 libusb-1.0 imagemagick libow-3.2 libev4 unzip zip knxd \
libmosquitto1 libmosquittopp1 libowcapi-3.2 libcurl4 ola python3 python3-pip python3-colorama openssl
RUN pip install roonapi --break-system-packages
RUN pip install reolink-aio --break-system-packages
RUN pip install "mcp[cli]" uvicorn fastapi websockets --break-system-packages
# Clean up APT when done.
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /build/*
COPY --from=builder /opt/ /opt/
================================================
FILE: INSTALL
================================================
Installation Instructions
*************************
Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation,
Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved. This file is offered as-is,
without warranty of any kind.
Basic Installation
==================
Briefly, the shell commands `./configure; make; make install' should
configure, build, and install this package. The following
more-detailed instructions are generic; see the `README' file for
instructions specific to this package. Some packages provide this
`INSTALL' file but do not implement all of the features documented
below. The lack of an optional feature in a given package is not
necessarily a bug. More recommendations for GNU packages can be found
in *note Makefile Conventions: (standards)Makefile Conventions.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, and a
file `config.log' containing compiler output (useful mainly for
debugging `configure').
It can also use an optional file (typically called `config.cache'
and enabled with `--cache-file=config.cache' or simply `-C') that saves
the results of its tests to speed up reconfiguring. Caching is
disabled by default to prevent problems with accidental use of stale
cache files.
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If you are using the cache, and at
some point `config.cache' contains results you don't want to keep, you
may remove or edit it.
The file `configure.ac' (or `configure.in') is used to create
`configure' by a program called `autoconf'. You need `configure.ac' if
you want to change it or regenerate `configure' using a newer version
of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system.
Running `configure' might take a while. While running, it prints
some messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with
the package, generally using the just-built uninstalled binaries.
4. Type `make install' to install the programs and any data files and
documentation. When installing into a prefix owned by root, it is
recommended that the package be configured and built as a regular
user, and only the `make install' phase executed with root
privileges.
5. Optionally, type `make installcheck' to repeat any self-tests, but
this time using the binaries in their final installed location.
This target does not install anything. Running this target as a
regular user, particularly if the prior `make install' required
root privileges, verifies that the installation completed
correctly.
6. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
7. Often, you can also type `make uninstall' to remove the installed
files again. In practice, not all packages have tested that
uninstallation works correctly, even though it is required by the
GNU Coding Standards.
8. Some packages, particularly those that use Automake, provide `make
distcheck', which can by used by developers to test that all other
targets like `make install' and `make uninstall' work correctly.
This target is generally not run by end users.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that
the `configure' script does not know about. Run `./configure --help'
for details on some of the pertinent environment variables.
You can give `configure' initial values for configuration parameters
by setting variables in the command line or in the environment. Here
is an example:
./configure CC=c99 CFLAGS=-g LIBS=-lposix
*Note Defining Variables::, for more details.
Compiling For Multiple Architectures
====================================
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you can use GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'. This
is known as a "VPATH" build.
With a non-GNU `make', it is safer to compile the package for one
architecture at a time in the source code directory. After you have
installed the package for one architecture, use `make distclean' before
reconfiguring for another architecture.
On MacOS X 10.5 and later systems, you can create libraries and
executables that work on multiple system types--known as "fat" or
"universal" binaries--by specifying multiple `-arch' options to the
compiler but only a single `-arch' option to the preprocessor. Like
this:
./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
CPP="gcc -E" CXXCPP="g++ -E"
This is not guaranteed to produce working output in all cases, you
may have to build one architecture at a time and combine the results
using the `lipo' tool if you have problems.
Installation Names
==================
By default, `make install' installs the package's commands under
`/usr/local/bin', include files under `/usr/local/include', etc. You
can specify an installation prefix other than `/usr/local' by giving
`configure' the option `--prefix=PREFIX', where PREFIX must be an
absolute file name.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
PREFIX as the prefix for installing programs and libraries.
Documentation and other data files still use the regular prefix.
In addition, if you use an unusual directory layout you can give
options like `--bindir=DIR' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them. In general, the
default for these options is expressed in terms of `${prefix}', so that
specifying just `--prefix' will affect all of the other directory
specifications that were not explicitly provided.
The most portable way to affect installation locations is to pass the
correct locations to `configure'; however, many packages provide one or
both of the following shortcuts of passing variable assignments to the
`make install' command line to change installation locations without
having to reconfigure or recompile.
The first method involves providing an override variable for each
affected directory. For example, `make install
prefix=/alternate/directory' will choose an alternate location for all
directory configuration variables that were expressed in terms of
`${prefix}'. Any directories that were specified during `configure',
but not in terms of `${prefix}', must each be overridden at install
time for the entire installation to be relocated. The approach of
makefile variable overrides for each directory variable is required by
the GNU Coding Standards, and ideally causes no recompilation.
However, some platforms have known limitations with the semantics of
shared libraries that end up requiring recompilation when using this
method, particularly noticeable in packages that use GNU Libtool.
The second method involves providing the `DESTDIR' variable. For
example, `make install DESTDIR=/alternate/directory' will prepend
`/alternate/directory' before all installation names. The approach of
`DESTDIR' overrides is not required by the GNU Coding Standards, and
does not work on platforms that have drive letters. On the other hand,
it does better at avoiding recompilation issues, and works well even
when some directory options were not specified in terms of `${prefix}'
at `configure' time.
Optional Features
=================
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
Some packages offer the ability to configure how verbose the
execution of `make' will be. For these packages, running `./configure
--enable-silent-rules' sets the default to minimal output, which can be
overridden with `make V=1'; while running `./configure
--disable-silent-rules' sets the default to verbose, which can be
overridden with `make V=0'.
Particular systems
==================
On HP-UX, the default C compiler is not ANSI C compatible. If GNU
CC is not installed, it is recommended to use the following options in
order to use an ANSI C compiler:
./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
HP-UX `make' updates targets which have the same time stamps as
their prerequisites, which makes it generally unusable when shipped
generated files such as `configure' are involved. Use GNU `make'
instead.
On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
parse its `<wchar.h>' header file. The option `-nodtk' can be used as
a workaround. If GNU CC is not installed, it is therefore recommended
to try
./configure CC="cc"
and if that doesn't work, try
./configure CC="cc -nodtk"
On Solaris, don't put `/usr/ucb' early in your `PATH'. This
directory contains several dysfunctional programs; working variants of
these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
in your `PATH', put it _after_ `/usr/bin'.
On Haiku, software installed for all users goes in `/boot/common',
not `/usr/local'. It is recommended to use the following options:
./configure --prefix=/boot/common
Specifying the System Type
==========================
There may be some features `configure' cannot figure out
automatically, but needs to determine by the type of machine the package
will run on. Usually, assuming the package is built to be run on the
_same_ architectures, `configure' can figure that out, but if it prints
a message saying it cannot guess the machine type, give it the
`--build=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name which has the form:
CPU-COMPANY-SYSTEM
where SYSTEM can have one of these forms:
OS
KERNEL-OS
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the machine type.
If you are _building_ compiler tools for cross-compiling, you should
use the option `--target=TYPE' to select the type of system they will
produce code for.
If you want to _use_ a cross compiler, that generates code for a
platform different from the build platform, you should specify the
"host" platform (i.e., that on which the generated programs will
eventually be run) with `--host=TYPE'.
Sharing Defaults
================
If you want to set default values for `configure' scripts to share,
you can create a site shell script called `config.site' that gives
default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Defining Variables
==================
Variables not defined in a site shell script can be set in the
environment passed to `configure'. However, some packages may run
configure again during the build, and the customized values of these
variables may be lost. In order to avoid this problem, you should set
them in the `configure' command line, using `VAR=value'. For example:
./configure CC=/usr/local2/bin/gcc
causes the specified `gcc' to be used as the C compiler (unless it is
overridden in the site shell script).
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
an Autoconf limitation. Until the limitation is lifted, you can use
this workaround:
CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
`configure' Invocation
======================
`configure' recognizes the following options to control how it
operates.
`--help'
`-h'
Print a summary of all of the options to `configure', and exit.
`--help=short'
`--help=recursive'
Print a summary of the options unique to this package's
`configure', and exit. The `short' variant lists options used
only in the top level, while the `recursive' variant lists options
also present in any nested packages.
`--version'
`-V'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`--cache-file=FILE'
Enable the cache: use and save the results of the tests in FILE,
traditionally `config.cache'. FILE defaults to `/dev/null' to
disable caching.
`--config-cache'
`-C'
Alias for `--cache-file=config.cache'.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made. To
suppress all normal output, redirect it to `/dev/null' (any error
messages will still be shown).
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
`--prefix=DIR'
Use DIR as the installation prefix. *note Installation Names::
for more details, including other options available for fine-tuning
the installation locations.
`--no-create'
`-n'
Run the configure checks, but stop before creating any output
files.
`configure' also accepts some other, not widely useful, options. Run
`configure --help' for more details.
================================================
FILE: Makefile.am
================================================
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = src data tests
if HAVE_PO
SUBDIRS += po
endif
MAINTAINERCLEANFILES = \
$(PACKAGE_TARNAME)-$(PACKAGE_VERSION).tar.bz2 \
$(PACKAGE_TARNAME)-$(PACKAGE_VERSION).tar.gz \
$(PACKAGE_TARNAME)-$(PACKAGE_VERSION).tar.xz \
Makefile.in \
aclocal.m4 \
config.guess \
config.h.in \
config.h.in~ \
config.rpath \
config.sub \
configure \
depcomp \
install-sh \
ltconfig \
ltmain.sh \
m4/codeset.m4 \
m4/fcntl-o.m4 \
m4/gettext.m4* \
m4/glibc2*.m4 \
m4/iconv.m4 \
m4/intdiv0.m4 \
m4/intl.m4 \
m4/intldir.m4 \
m4/intlmacosx.m4 \
m4/intmax.m4* \
m4/inttypes-pri.m4 \
m4/inttypes.m4 \
m4/inttypes_h.m4 \
m4/isc-posix.m4 \
m4/lcmessage.m4 \
m4/lib-ld.m4* \
m4/lib-link.m4 \
m4/lib-prefix.m4* \
m4/libtool.m4 \
m4/lock.m4 \
m4/longdouble.m4* \
m4/longlong.m4* \
m4/ltoptions.m4 \
m4/ltsugar.m4 \
m4/ltversion.m4 \
m4/lt~obsolete.m4 \
m4/nls.m4 \
m4/po.m4* \
m4/printf-posix.m4* \
m4/progtest.m4 \
m4/signed.m4 \
m4/size_max.m4* \
m4/stdint_h.m4 \
m4/threadlib.m4 \
m4/uintmax_t.m4 \
m4/ulonglong.m4* \
m4/visibility.m4 \
m4/wchar_t.m4 \
m4/wint_t.m4* \
m4/xsize.m4* \
missing
if HAVE_PO
MAINTAINERCLEANFILES += \
po/Makefile.in.in \
po/Makevars.template \
po/Rules-quot \
po/boldquot.sed \
po/calaos.pot \
po/en@boldquot.header \
po/en@boldquot.po \
po/en@quot.header \
po/en@quot.po \
po/insert-header.sin \
po/quot.sed \
po/remove-potcdate.sin
endif
EXTRA_DIST = \
AUTHORS \
COPYING \
README.md \
autogen.sh \
m4/efl_compiler.m4
================================================
FILE: NEWS
================================================
================================================
FILE: README.md
================================================
[Calaos Server](http://www.calaos.fr)
===============
[](http://www.gnu.org/licenses/gpl.html)
[](https://travis-ci.org/calaos/calaos_base)
Calaos is a powerful home automation software. It features a complete set of part to automate your house from lights to shutter or even music or cameras.
This is the base package for the server.
### Dependencies
Requires:
- gcc > 5 or clang
- libuv > 1.10
- jansson > 2.5
- curl > 7.20.0
- luajit
- sigc++ > 2.4.1
- owfs (optional) [http://owfs.org/](http://owfs.org/)
- imagemagick (optional)
- OLA (optional) [https://github.com/OpenLightingProject/ola](https://github.com/OpenLightingProject/ola)
- knxd (optional) [https://github.com/knxd/knxd](https://github.com/knxd/knxd)
### How to build
```
./autogen.sh
make
sudo make install
```
Contributing
------------
Want to contribute? Great! There are many ways to contribute, come get in touch with us on #calaos or #calaos.fr on freenode.
================================================
FILE: TODO
================================================
For next 3.0.0 release:
- https://github.com/calaos/calaos_base/issues?state=open
- Translation! At least in english/french
- Update calaos_installer accordingly (there are some missing IO in calaos_installer like AVRs)
- Maybe add some versionning info in config files (io/rules xml)
Less important for next release:
- Test and finish the datalogguer
- Finish the graph visualizer/dataloguer on the web UI
- Find a way to display graphs in calaos_home
- Add InputScript/OutputScript to let user write Lua scripts to handle not supported hardware easily
- Add some example/docs for Lua scripts and maybe add nice helpers/docs directly in calaos_installer script editor
- Make calaos_installer aware of unkown IO types and handle them correctly (display a unkown type)
Also save them again to the file so the io.xml file is not corrupted
- Calaos Installer need a debugger-like to auto-correct and display mistakes in rules.xml/io.xml (if the user did some
wrong rules like loops, or using the same io at the same time in mutiple exclusive rules, ...)
The following list has no priority...
- Add some more smart heating controls/management, like an automatic rule/action to handle
all heating automatically. Like a function block where you give a temp sensor + an output contact for
heat control + some time range and all the heat control is done automatically without having to write
100+ rules.
- Maybe do the same thing for other case (light control or shutters) to remove a bit the complexity of rules programming
for newbies.
- Add support for zwave devices (see http://code.google.com/p/open-zwave/)
- Add support for Flukso (see https://www.flukso.net/)
- Add support for OpenEnergyMonitor (http://openenergymonitor.org/emon/)
- Add a way to display and record graph of temperature or other metering device
- Add support for BlyssBox products (see: https://github.com/skywodd/arduino_blyss_hack/)
- Maybe support jeenode to get metering data? (http://jeelabs.com/products/jeenode)
================================================
FILE: autogen.sh
================================================
#!/bin/sh
cd $(dirname "$0")
rm -rf autom4te.cache
rm -f aclocal.m4 ltmain.sh
set -e
#On osx:
# brew info libtool says:
# In order to prevent conflicts with Apple's own libtool we have prepended a "g"
# so, you have instead: glibtool and glibtoolize.
if glibtoolize --version > /dev/null 2>&1; then
glibtoolize
else
libtoolize
fi
autoreconf -vif
================================================
FILE: configure.ac
================================================
CALAOS_VERSION
AC_INIT([calaos],[calaos_version],[team@calaos.fr])
AC_PREREQ([2.71])
AC_CONFIG_SRCDIR([configure.ac])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([tar-ustar 1.6 dist-xz subdir-objects foreign])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AC_USE_SYSTEM_EXTENSIONS
AC_SYS_LARGEFILE
LT_PREREQ([2.2])
LT_INIT([win32-dll])
AM_GNU_GETTEXT_VERSION([0.19])
m4_ifdef([AM_GNU_GETTEXT], [
AM_GNU_GETTEXT([external])
po_makefile_in=po/Makefile.in
have_po="yes"
],[
have_po="no"
])
AC_SUBST(LTLIBINTL)
if test "x${POSUB}" = "x" ; then
have_po="no"
fi
AM_CONDITIONAL([HAVE_PO], [test "x${have_po}" = "xyes"])
### Needed information
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
### Checks for programs
AC_PROG_CXX
AC_PROG_CC
AM_PROG_CC_C_O
AX_CXX_COMPILE_STDCXX_14([noext],[mandatory])
# pkg-config
PKG_PROG_PKG_CONFIG
### Checks for libraries
requirements_calaos_common="libuv >= 1.19.0 sigc++-2.0 >= 2.4.1 jansson >= 2.5 libcurl >= 7.20.0 luajit sqlite3 openssl >= 1.1.0"
PKG_CHECK_MODULES([CALAOS_COMMON], [${requirements_calaos_common}])
AC_SUBST([requirements_calaos_common])
requirements_calaos_server="libuv >= 1.19.0 libcurl openssl >= 1.1.0"
PKG_CHECK_MODULES([CALAOS_SERVER], [${requirements_calaos_server}])
AC_SUBST([requirements_calaos_server])
CALAOS_COMMON_LIBS="${CALAOS_COMMON_LIBS} ${LUA_LIBS} ${lua_libs}"
CALAOS_COMMON_CFLAGS="${CALAOS_COMMON_CFLAGS} ${LUA_CFLAGS}"
### Checks for compiler characteristics
AC_C_BIGENDIAN
AC_C_INLINE
### Checks for linker characteristics
lt_enable_auto_import=""
case "${host_os}" in
mingw*)
lt_enable_auto_import="-Wl,--enable-auto-import"
;;
esac
AC_SUBST([lt_enable_auto_import])
EFL_CHECK_COMPILER_FLAGS([CALAOS_COMMON], [-Wall -Wextra -Wno-unused-parameter -Wshadow -Wpointer-arith -Wno-missing-field-initializers -fvisibility=hidden -fdata-sections -ffunction-sections])
### Checks for header files
AC_HEADER_ASSERT
AC_CHECK_HEADERS([unistd.h])
have_owcapi="no"
AC_CHECK_HEADERS([owcapi.h], [have_owcapi="yes"])
AM_CONDITIONAL([HAVE_OWCAPI], [test "x${have_owcapi}" = "xyes"])
if test "x${have_owcapi}" == "xyes"
then
AC_CHECK_LIB([owcapi], [OW_init],, AC_MSG_ERROR(Missing owfs library))
fi
have_libola="no"
PKG_CHECK_MODULES([LIBOLA], [libola], [have_libola="yes"], [have_libola="no"])
AM_CONDITIONAL([HAVE_LIBOLA], [test "x${have_libola}" = "xyes"])
if test "x${have_libola}" == "xyes"
then
AC_DEFINE([HAVE_LIBOLA], [1], [libola])
fi
have_libknx="no"
AC_CHECK_HEADERS([eibclient.h], [have_libknx="yes"])
AM_CONDITIONAL([HAVE_LIBKNX], [test "x${have_libknx}" = "xyes"])
if test "x${have_libknx}" == "xyes"
then
AC_CHECK_LIB([eibclient], [EIBSocketLocal],, AC_MSG_ERROR(Missing eibclient library))
AC_DEFINE([HAVE_LIBKNX], [1], [libknx])
fi
AC_CHECK_PROG(HAVE_CURLBIN, [curl], ["yes"])
if test "x${HAVE_CURLBIN}" == "xyes"
then
CURLBIN_INFO="yes"
else
CURLBIN_INFO="No, install curl binary before running calaos_server"
fi
AC_CHECK_PROG(HAVE_CONVERT, [convert], ["yes"])
if test "x${HAVE_CONVERT}" == "xyes"
then
CONVERT_INFO="yes"
else
CONVERT_INFO="No, install imagemagick convert tool"
fi
have_mosquitto="no"
AC_CHECK_HEADERS([mosquitto.h], [have_mosquitto="yes"])
AM_CONDITIONAL([HAVE_LIBMOSQUITTO], [test "x${have_mosquitto}" = "xyes"])
if test "x${have_mosquitto}" == "xyes"
then
AC_CHECK_LIB([mosquitto], [mosquitto_lib_init],, AC_MSG_ERROR(Missing mosquitto library))
AC_DEFINE([HAVE_LIBMOSQUITTO], [1], [libmosquitto])
fi
# Configure pthreads.
ACX_PTHREAD([have_pthread=yes])
#check for gtest
AC_LANG_PUSH([C++])
AC_CHECK_HEADERS([gtest/gtest.h], [have_gtest="yes"])
AM_CONDITIONAL([HAVE_GTEST], [test "x${have_gtest}" = "xyes"])
AC_LANG_POP([C++])
if test "x${have_gtest}" == "xyes"
then
GTEST_INFO="make check"
else
GTEST_INFO="install gtest to run this test"
fi
#check for autobahn test suite
AC_CHECK_PROG(HAVE_AUTOBAHN, wstest, yes)
AM_CONDITIONAL([HAVE_AUTOBAHN], [test "x${HAVE_AUTOBAHN}" = "xyes"])
if test "x${HAVE_AUTOBAHN}" == "xyes"
then
WS_INFO="make check"
else
WS_INFO="install autobahn testsuite to run this test"
fi
# Check for Python and dependencies
have_python="no"
have_python_roon="no"
have_python_reolink="no"
have_python_mcp="no"
# --without-mcp disables the MCP sidecar entirely.
AC_ARG_WITH([mcp],
AS_HELP_STRING([--without-mcp], [disable the MCP sidecar (Model Context Protocol)]),
[with_mcp=$withval],
[with_mcp=yes])
# Check for Python 3
AM_PATH_PYTHON([3], [
have_python="yes"
# Check for pip3
AC_CHECK_PROG([PYTHON_PIP], [pip3], [yes])
if test "x${PYTHON_PIP}" = "xyes"; then
# Check for roonapi
AC_MSG_CHECKING([for Python roonapi module])
if $PYTHON -c "import roonapi" 2>/dev/null; then
have_python_roon="yes"
AC_MSG_RESULT([yes])
AC_DEFINE([HAVE_PYTHON_ROON], [1], [Define if python roonapi is available])
else
AC_MSG_RESULT([no])
AC_MSG_WARN([Python roonapi module not found. Install with: pip3 install roonapi])
fi
# Check for reolink_aio
AC_MSG_CHECKING([for Python reolink_aio module])
if $PYTHON -c "import reolink_aio" 2>/dev/null; then
have_python_reolink="yes"
AC_MSG_RESULT([yes])
AC_DEFINE([HAVE_PYTHON_REOLINK], [1], [Define if python reolink_aio is available])
else
AC_MSG_RESULT([no])
AC_MSG_WARN([Python reolink_aio module not found. Install with: pip3 install reolink_aio])
fi
# Check for MCP sidecar dependencies (mcp[cli], uvicorn, fastapi).
if test "x$with_mcp" != "xno"; then
AC_MSG_CHECKING([for Python mcp + uvicorn + fastapi modules])
if $PYTHON -c "import mcp, uvicorn, fastapi" 2>/dev/null; then
have_python_mcp="yes"
AC_MSG_RESULT([yes])
AC_DEFINE([HAVE_PYTHON_MCP], [1], [Define if Python MCP sidecar deps are available])
else
AC_MSG_RESULT([no])
AC_MSG_WARN([Python MCP deps not found. Install with: pip3 install "mcp[cli]" uvicorn fastapi])
fi
fi
else
AC_MSG_WARN([pip3 not found. Install with: apt-get install python3-pip])
have_python="no"
fi
], [
AC_MSG_WARN([Python 3 not found. Python support will be disabled])
])
AM_CONDITIONAL([HAVE_PYTHON], [test "x$have_python" = "xyes"])
AM_CONDITIONAL([HAVE_PYTHON_ROON], [test "x$have_python_roon" = "xyes"])
AM_CONDITIONAL([HAVE_PYTHON_REOLINK], [test "x$have_python_reolink" = "xyes"])
AM_CONDITIONAL([HAVE_PYTHON_MCP], [test "x$have_python_mcp" = "xyes"])
AC_CONFIG_FILES([
Makefile
tests/Makefile
src/Makefile
src/lib/Makefile
src/lib/calaos-python/Makefile
src/bin/Makefile
src/bin/calaos_server/Makefile
src/bin/calaos_mcp/Makefile
src/bin/tools/Makefile
data/Makefile
data/debug/Makefile
data/debug/dist/Makefile
$po_makefile_in
src/bin/calaos_server/Audio/calaos_roon
src/bin/calaos_server/IO/Reolink/calaos_reolink
src/bin/calaos_mcp/calaos_mcp
])
AC_OUTPUT
#####################################################################
## Info
function colorOut()
{
if test "x${1}" == "xyes"
then
echo -n $(tput setaf 2)${1}$(tput sgr0)
else
echo -n $(tput setaf 1)$@$(tput sgr0)
fi
}
echo
echo
echo "------------------------------------------------------------------------"
echo "$PACKAGE $VERSION"
echo "------------------------------------------------------------------------"
echo
echo
echo "Configuration Options Summary:"
echo
echo "Compilation............................: make (or gmake)"
echo " CPPFLAGS.............................: $CPPFLAGS"
echo " CFLAGS...............................: $CFLAGS"
echo " CXXFLAGS.............................: $CXXFLAGS"
echo " LDFLAGS..............................: $LDFLAGS"
echo
echo "Test Suite:"
echo " gtest library........................: $GTEST_INFO"
echo " Autobahn Websocket test suite........: $WS_INFO"
echo
echo "Installation...........................: make install (as root if needed, with 'su' or 'sudo')"
echo " prefix...............................: $prefix"
echo
echo "Dependencies:"
echo " UrlDownloader curl support...........: $(colorOut $CURLBIN_INFO)"
echo " UrlDownloader picture resizing.......: $(colorOut $CONVERT_INFO)"
echo
echo "Hardware support:"
echo " One Wire support.....................: $(colorOut $have_owcapi)"
echo " Open Lightning Architecture support..: $(colorOut $have_libola)"
echo " Eib/KNX support (eibd or knxd).......: $(colorOut $have_libknx)"
echo " MQTT support (libmosquittopp)........: $(colorOut $have_mosquitto)"
echo
echo "Python support:........................: $(colorOut $have_python)"
echo " RoonAPI support......................: $(colorOut $have_python_roon)"
echo " Reolink support......................: $(colorOut $have_python_reolink)"
echo " MCP sidecar..........................: $(colorOut $have_python_mcp)"
echo
================================================
FILE: data/Makefile.am
================================================
SUBDIRS = debug
MAINTAINERCLEANFILES = Makefile.in
================================================
FILE: data/debug/.editorconfig
================================================
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org
root = true
[*]
# Change these settings to your own preference
indent_style = space
indent_size = 4
# We recommend you to keep these unchanged
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
trim_trailing_whitespace = false
================================================
FILE: data/debug/.gitattributes
================================================
* text=auto
================================================
FILE: data/debug/.gitignore
================================================
node_modules
.tmp
bower_components
================================================
FILE: data/debug/Gruntfile.js
================================================
================================================
FILE: data/debug/Makefile.am
================================================
SUBDIRS = dist
MAINTAINERCLEANFILES = Makefile.in
================================================
FILE: data/debug/README.md
================================================
Install dev tools
-----------------
```
npm install
gulp serve
```
Before commit, do a gulp clean + gulp build
================================================
FILE: data/debug/app/debug_websocket.html
================================================
<!doctype html>
<html class="no-js">
<head>
<meta charset="utf-8">
<title>Calaos Debug Page</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width">
<!-- build:css(.) styles/vendor.css -->
<!-- npm:css -->
<link rel="stylesheet" href="/node_modules/bootstrap/dist/css/bootstrap.css" />
<link rel="stylesheet" href="/node_modules/highlight.js/styles/base16/humanoid-light.css" />
<!-- endnpm -->
<!-- endbuild -->
<link rel="stylesheet" href="styles/main.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.7/codemirror.min.css" />
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top">
<div class="container-fluid">
<a class="navbar-brand" href="#">Calaos Debug</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNavWs" aria-controls="navbarNavWs" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNavWs">
<ul class="navbar-nav ms-auto">
<li class="nav-item">
<a class="nav-link" href="index.html">HTTP POST API</a>
</li>
<li class="nav-item active">
<a class="nav-link" href="debug_websocket.html">Websocket API</a>
</li>
</ul>
</div>
</div>
</nav>
<div class="container mt-5 pt-5">
<div>
<form name="commandform">
<h1 class="mb-4">Calaos Websocket API Debug Tool</h1>
<div class="mb-3">
<label for="urlinput" class="form-label">Url</label>
<input type="text" class="form-control" id="urlinput" placeholder="Enter Calaos websocket API URL" value="ws://127.0.0.1:5454/api">
</div>
<div class="mb-3">
<label for="username" class="form-label">Username</label>
<input type="email" class="form-control" id="username" placeholder="Enter username">
</div>
<div class="mb-3">
<label for="passwd" class="form-label">Password</label>
<input type="text" class="form-control" id="passwd" placeholder="Password">
</div>
<div class="mb-3">
<label for="message" class="form-label">Request (JSON)</label>
<select class="form-select" id="api_list"></select>
<textarea class="form-control" name="messagebody" rows="10" id="message"></textarea>
</div>
<span id="status_con" class="badge bg-danger">Disconnected</span>
<button class="btn btn-secondary" type="button" id="btconnect">Connect</button>
<button class="btn btn-secondary" type="button" id="btdisconnect">Disconnect</button>
<button class="btn btn-primary" type="button" id="btsend">Send message</button>
</form>
<div class="row mt-4">
<div class="col-md-4">
<h4>Log <span id="badge_count" class="badge bg-secondary">0</span>
<button class="btn btn-secondary btn-sm ms-2" type="button" id="btclear">Clear</button>
</h4>
<div class="log">
</div>
</div>
<div class="col-md-8 logdetail">
<h4 class="h5">Detail</h4>
<pre class="p-3 bg-light rounded"><code class="json hljs" id="answer"></code></pre>
</div>
</div>
</div>
</div>
<!-- build:js(.) scripts/vendor.js -->
<!-- npm:js -->
<script src="/node_modules/jquery/dist/jquery.js"></script>
<script src="/node_modules/bootstrap/dist/js/bootstrap.bundle.js"></script>
<!-- endnpm -->
<!-- endbuild -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/highlight.min.js"></script>
<!-- CodeMirror JS for editable JSON highlighting -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.7/codemirror.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.7/mode/javascript/javascript.min.js"></script>
<script src="scripts/codemirror.js"></script>
<script src="scripts/main_v3.js"></script>
</body>
</html>
================================================
FILE: data/debug/app/index.html
================================================
<!doctype html>
<html class="no-js">
<head>
<meta charset="utf-8">
<title>Calaos Debug Page</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width">
<!-- build:css(.) styles/vendor.css -->
<!-- npm:css -->
<link rel="stylesheet" href="/node_modules/bootstrap/dist/css/bootstrap.css" />
<link rel="stylesheet" href="/node_modules/highlight.js/styles/base16/humanoid-light.css" />
<!-- endnpm -->
<!-- endbuild -->
<link rel="stylesheet" href="styles/main.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.7/codemirror.min.css" />
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top">
<div class="container-fluid">
<a class="navbar-brand" href="#">Calaos Debug</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav ms-auto">
<li class="nav-item active"><a class="nav-link" href="index.html">HTTP POST API</a></li>
<li class="nav-item"><a class="nav-link" href="debug_websocket.html">Websocket API</a></li>
</ul>
</div>
</div>
</nav>
<div class="container mt-5 pt-5">
<div>
<form name="commandform">
<h1 class="mb-4">Calaos HTTP POST API Debug Tool</h1>
<div class="mb-3">
<label for="urlinput" class="form-label">Url</label>
<input type="text" class="form-control" id="urlinput" placeholder="Enter Calaos API URL" value="/api">
</div>
<div class="mb-3">
<label for="username" class="form-label">Username</label>
<input type="email" class="form-control" id="username" placeholder="Enter username">
</div>
<div class="mb-3">
<label for="passwd" class="form-label">Password</label>
<input type="text" class="form-control" id="passwd" placeholder="Password">
</div>
<div class="mb-3">
<label for="api_list" class="form-label">Request (JSON)</label>
<select class="form-select mb-2" id="api_list"></select>
<textarea class="form-control hljs language-json" name="messagebody" rows="10" id="message"></textarea>
</div>
<div class="mb-4">
<button class="btn btn-primary me-2" type="button" onclick="window.sendRequest('POST')">Send request</button>
<button class="btn btn-secondary" type="button" onclick="window.clearResponse()">Clear</button>
</div>
<h2 class="h4 mb-3">Command Response:</h2>
<pre class="p-3 bg-light rounded"><code class="hljs language-json" id="answer"></code></pre>
</form>
</div>
</div>
<!-- build:js(.) scripts/vendor.js -->
<!-- npm:js -->
<script src="/node_modules/jquery/dist/jquery.js"></script>
<script src="/node_modules/bootstrap/dist/js/bootstrap.bundle.js"></script>
<!-- endnpm -->
<!-- endbuild -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/highlight.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.7/codemirror.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.7/mode/javascript/javascript.min.js"></script>
<script src="scripts/codemirror.js"></script>
<script src="scripts/main_v2.js"></script>
</body>
</html>
================================================
FILE: data/debug/app/scripts/codemirror.js
================================================
'use strict';
// Initialize CodeMirror for the JSON textarea and expose it globally
window.editor = CodeMirror.fromTextArea(document.getElementById('message'), {
mode: { name: 'javascript', json: true },
lineNumbers: true,
theme: 'default',
viewportMargin: Infinity
});
// Add JSON validation indicator
const validationIndicator = document.createElement('div');
validationIndicator.id = 'json-validation';
validationIndicator.className = 'mt-2 small';
validationIndicator.style.display = 'none';
document.querySelector('#message').parentNode.appendChild(validationIndicator);
// Function to validate JSON and show status
function validateJSON() {
const content = window.editor.getValue();
const indicator = document.getElementById('json-validation');
if (content.trim() === '') {
indicator.style.display = 'none';
return;
}
try {
JSON.parse(content);
indicator.innerHTML = '';
indicator.style.display = 'block';
window.editor.getWrapperElement().style.borderColor = '';
} catch (e) {
indicator.innerHTML = '<span class="text-danger">✗ Invalid JSON: ' + e.message + '</span>';
indicator.style.display = 'block';
window.editor.getWrapperElement().style.borderColor = '#dc3545';
}
}
// Validate on content change
window.editor.on('change', function() {
clearTimeout(window.jsonValidationTimeout);
window.jsonValidationTimeout = setTimeout(validateJSON, 500);
});
// Initial validation
setTimeout(validateJSON, 100);
================================================
FILE: data/debug/app/scripts/main_v2.js
================================================
'use strict';
function sendRequest(command) {
if (window.XMLHttpRequest) {
var http = new XMLHttpRequest();
http.open(command, $('#urlinput').val(), true);
// Parse request JSON and handle errors
var messageText = (window.editor && typeof window.editor.getValue === 'function')
? window.editor.getValue()
: document.commandform.messagebody.value;
var jsonObj;
try {
jsonObj = JSON.parse(messageText);
} catch (e) {
// Display parse error in response block
$('#answer')
.text('JSON parse error: ' + e.message)
.addClass('text-danger');
return false;
}
var s = jsonObj.action;
if (s == "camera")
http.responseType = 'blob';
http.onreadystatechange = function() {
if(http.readyState === 4) {
if(http.status === 200) {
console.log("HTTP Content-Type: " + http.getResponseHeader('Content-Type'));
if (http.getResponseHeader('Content-Type') == "image/jpeg") {
$('#answer').html('<img id="campic" />');
var img = document.getElementById('campic');
var blob = http.response; // new Blob([http.response], { type: 'image/jpeg' });
img.src = window.URL.createObjectURL(blob);
img.onload = function() {
window.URL.revokeObjectURL(img.src);
}
}
else {
$('#answer').html(JSON.stringify(JSON.parse(http.responseText), null, ' '));
}
}
else {
$('#answer').html('Error ' + http.status);
}
$('pre code').each(function(i, block) {
hljs.highlightElement(block);
});
}
};
http.send(messageText);
}
return false;
}
var apiList = [
'{ }',
'{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "get_home" }',
'{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "get_state", "items": ["input_0", "output_1"], "audio_players": ["0"] }',
'{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "get_states", "id": "input_0" }',
'{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "query", "id": "input_0", "param": "input_sources" }',
'{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "get_param", "id": "input_0", "param": "name" }',
'{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "set_param", "id": "input_0", "param": "name", "value": "New name" }',
'{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "del_param", "id": "input_0", "param": "param_to_delete" }',
'{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "get_timerange", "id": "input_0" }',
'{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "set_timerange", "id": "input_0", "months": "000000000000", "ranges": [ { "day": "1", "start_hour": "12", "start_min": "0", "start_sec": "0", "start_type": "0", "start_offset": "1", "end_hour": "13", "end_min": "30", "end_sec": "0", "end_type": "0", "end_offset": "1" } ] }',
'{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "get_io", "items": ["input_0", "output_0"] }',
'{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "set_state", "id": "output_0", "value": "true" }',
'{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "autoscenario", "type": "list" }',
'{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "autoscenario", "type": "get", "id": "input_0" }',
'{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "autoscenario", "type": "create", "name": "New scenario", "visible": "true", "room_name": "Room", "room_type": "bedroom", "cycle": "true", "steps": [ { "step_pause": "61000", "step_type": "standard", "actions": [ { "id": "output_0", "action": "true"}, { "id": "output_1", "action": "set 50" } ] }, { "step_type": "end", "actions": [ { "id": "output_0", "action": "false" } ] } ] }',
'{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "autoscenario", "type": "delete", "id": "input_0" }',
'{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "autoscenario", "type": "modify", "id": "input_0", "name": "scenario modified", "visible": "true", "room_name": "Room", "room_type": "bedroom", "cycle": "true", "steps": [ { "step_pause": "61000", "step_type": "standard", "actions": [ { "id": "output_0", "action": "true"}, { "id": "output_1", "action": "set 50" } ] }, { "step_type": "end", "actions": [ { "id": "output_0", "action": "false" } ] } ] }',
'{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "autoscenario", "type": "add_schedule", "id": "input_0" }',
'{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "autoscenario", "type": "del_schedule", "id": "input_0" }',
'{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "get_playlist", "id": "output_0" }',
'{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "poll_listen", "type": "register" }',
'{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "poll_listen", "type": "unregister", "uuid": "XXX" }',
'{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "poll_listen", "type": "get", "uuid": "XXX" }',
'{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "config", "type": "get" }',
'{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "config", "type": "put", "config_files": { "io.xml": "<xml ...... >", "rules.xml": "<xml ...... >" } }',
'{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "audio_db", "audio_action": "get_stats", "id": "output_0" }',
'{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "audio", "audio_action": "get_playlist_size", "id": "output_0" }',
'{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "audio", "audio_action": "get_time", "id": "output_0" }',
'{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "audio", "audio_action": "get_playlist_item", "item": "0", "id": "output_0" }',
'{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "audio", "audio_action": "get_cover_url", "id": "output_0" }',
'{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "audio", "audio_action": "get_cover", "id": "output_0" }',
'{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "audio_db", "audio_action": "get_albums", "from": "0", "count": "1", "id": "output_0" }',
'{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "audio_db", "audio_action": "get_artists", "from": "0", "count": "1", "id": "output_0" }',
'{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "audio_db", "audio_action": "get_years", "from": "0", "count": "1", "id": "output_0" }',
'{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "audio_db", "audio_action": "get_genres", "from": "0", "count": "1", "id": "output_0" }',
'{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "audio_db", "audio_action": "get_playlists", "from": "0", "count": "1", "id": "output_0" }',
'{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "audio_db", "audio_action": "get_music_folder", "from": "0", "count": "1", "id": "output_0" }',
'{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "audio_db", "audio_action": "get_search", "from": "0", "count": "1", "id": "output_0" }',
'{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "audio_db", "audio_action": "get_radios", "from": "0", "count": "1", "id": "output_0" }',
'{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "audio_db", "audio_action": "get_radio_items", "from": "0", "count": "1", "radio_id": "0", "item_id": "1", "search": "", "id": "output_0" }',
'{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "audio_db", "audio_action": "get_artist_album", "from": "0", "count": "1", "artist_id": "0", "id": "output_0" }',
'{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "audio_db", "audio_action": "get_year_albums", "from": "0", "count": "1", "year": "0", "id": "output_0" }',
'{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "audio_db", "audio_action": "get_genre_artists", "from": "0", "count": "1", "genre": "0", "id": "output_0" }',
'{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "audio_db", "audio_action": "get_album_titles", "from": "0", "count": "1", "album_id": "0", "id": "output_0" }',
'{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "audio_db", "audio_action": "get_playlist_titles", "from": "0", "count": "1", "playlist_id": "0", "id": "output_0" }',
'{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "audio_db", "audio_action": "get_track_infos", "from": "0", "count": "1", "track_id": "0", "id": "output_0" }',
'{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "camera", "type": "get_picture", "id": "output_0" }',
'{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "get_cover", "id": "audio_id_0" }',
'{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "eventlog", "page": 0, "per_page": 100, "uuid": "<uuid for single event>" }',
'{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "event_picture", "pic_uid": "<UUID>" }'
];
$(document).ready(function() {
var i = 0;
$('#api_list').append($('<option />').val(i++).html('Custom request'));
for (var c = 1;c < apiList.length;c++) {
var s = JSON.parse(apiList[c]).action;
if (s == "poll_listen" || s == "config" || s == "autoscenario")
s = s + " " + JSON.parse(apiList[c]).type;
if (s == "audio" || s == "audio_db")
s = s + " " + JSON.parse(apiList[c]).audio_action;
$('#api_list').append($('<option />').val(i++).html(s));
}
$('#api_list').change(function() {
var j = $('#api_list option:selected').val();
var s = apiList[parseInt(j)];
if ($('#username').val() !== "") s = s.replace("USERNAME", $('#username').val());
if ($('#passwd').val() !== "") s = s.replace("PASSWORD", $('#passwd').val());
var formatted = JSON.stringify(JSON.parse(s), null, ' ');
if (window.editor && typeof window.editor.setValue === 'function') {
window.editor.setValue(formatted);
} else {
$('#message').val(formatted);
hljs.highlightElement($('#message')[0]);
}
});
// Trigger change event on page load to populate the editor with default content
$('#api_list').trigger('change');
});
window.sendRequest = sendRequest;
function clearResponse() {
$('#answer').text('').removeClass('text-danger');
}
window.clearResponse = clearResponse;
================================================
FILE: data/debug/app/scripts/main_v3.js
================================================
'use strict';
var apiList = [
'{ "msg": "" }',
'{ "msg": "login", "msg_id": "1234", "data": { "cn_user": "USERNAME", "cn_pass": "PASSWORD" } }',
'{ "msg": "get_home", "msg_id": "1234" }',
'{ "msg": "get_state", "msg_id": "1234", "data": { "items": ["input_0", "output_0"] } }',
'{ "msg": "get_states", "msg_id": "1234", "data": { "id": "input_0" } }',
'{ "msg": "query", "msg_id": "1234", "data": { "id": "input_0", "param": "input_sources" } }',
'{ "msg": "get_param", "msg_id": "1234", "data": { "id": "input_0", "param": "name" } }',
'{ "msg": "set_param", "msg_id": "1234", "data": { "id": "input_0", "param": "name", "value": "New name" } }',
'{ "msg": "del_param", "msg_id": "1234", "data": { "id": "input_0", "param": "param_to_delete" } }',
'{ "msg": "get_timerange", "msg_id": "1234", "data": { "id": "input_0" } }',
'{ "msg": "set_timerange", "msg_id": "1234", "data": { "id": "input_0", "months": "000000000000", "ranges": [ { "day": "1", "start_hour": "12", "start_min": "0", "start_sec": "0", "start_type": "0", "start_offset": "1", "end_hour": "13", "end_min": "30", "end_sec": "0", "end_type": "0", "end_offset": "1" } ] } }',
'{ "msg": "set_state", "msg_id": "1234", "data": { "id": "output_0", "value": "true" } }',
'{ "msg": "autoscenario", "msg_id": "1234", "data": { "type": "list" } }',
'{ "msg": "autoscenario", "msg_id": "1234", "data": { "type": "get", "id": "input_0" } }',
'{ "msg": "autoscenario", "msg_id": "1234", "data": { "type": "create", "name": "New scenario", "visible": "true", "room_name": "Room", "room_type": "bedroom", "cycle": "true", "steps": [ { "step_pause": "61000", "step_type": "standard", "actions": [ { "id": "output_0", "action": "true"}, { "id": "output_1", "action": "set 50" } ] }, { "step_type": "end", "actions": [ { "id": "output_0", "action": "false" } ] } ] } }',
'{ "msg": "autoscenario", "msg_id": "1234", "data": { "type": "delete", "id": "input_0" } }',
'{ "msg": "autoscenario", "msg_id": "1234", "data": { "type": "modify", "id": "input_0", "name": "scenario modified", "visible": "true", "room_name": "Room", "room_type": "bedroom", "cycle": "true", "steps": [ { "step_pause": "61000", "step_type": "standard", "actions": [ { "id": "output_0", "action": "true"}, { "id": "output_1", "action": "set 50" } ] }, { "step_type": "end", "actions": [ { "id": "output_0", "action": "false" } ] } ] } }',
'{ "msg": "autoscenario", "msg_id": "1234", "data": { "type": "add_schedule", "id": "input_0" } }',
'{ "msg": "autoscenario", "msg_id": "1234", "data": { "type": "del_schedule", "id": "input_0" } }',
'{ "msg": "get_playlist", "msg_id": "1234", "data": { "id": "output_0" } }',
'{ "msg": "get_io", "msg_id": "1234", "data": { "items": ["input_0", "output_0"] } }',
'{ "msg": "audio_db", "msg_id": "1234", "data": { "audio_action": "get_stats", "id": "output_0" } }',
'{ "msg": "audio", "msg_id": "1234", "data": { "audio_action": "get_playlist_size", "id": "output_0" } }',
'{ "msg": "audio", "msg_id": "1234", "data": { "audio_action": "get_time", "id": "output_0" } }',
'{ "msg": "audio", "msg_id": "1234", "data": { "audio_action": "get_playlist_item", "item": "0", "id": "output_0" } }',
'{ "msg": "audio", "msg_id": "1234", "data": { "audio_action": "get_cover_url", "id": "output_0" } }',
'{ "msg": "audio_db", "msg_id": "1234", "data": { "audio_action": "get_albums", "from": "0", "count": "1", "id": "output_0" } }',
'{ "msg": "audio_db", "msg_id": "1234", "data": { "audio_action": "get_artists", "from": "0", "count": "1", "id": "output_0" } }',
'{ "msg": "audio_db", "msg_id": "1234", "data": { "audio_action": "get_years", "from": "0", "count": "1", "id": "output_0" } }',
'{ "msg": "audio_db", "msg_id": "1234", "data": { "audio_action": "get_genres", "from": "0", "count": "1", "id": "output_0" } }',
'{ "msg": "audio_db", "msg_id": "1234", "data": { "audio_action": "get_playlists", "from": "0", "count": "1", "id": "output_0" } }',
'{ "msg": "audio_db", "msg_id": "1234", "data": { "audio_action": "get_music_folder", "from": "0", "count": "1", "id": "output_0" } }',
'{ "msg": "audio_db", "msg_id": "1234", "data": { "audio_action": "get_search", "from": "0", "count": "1", "id": "output_0" } }',
'{ "msg": "audio_db", "msg_id": "1234", "data": { "audio_action": "get_radios", "from": "0", "count": "1", "id": "output_0" } }',
'{ "msg": "audio_db", "msg_id": "1234", "data": { "audio_action": "get_radio_items", "from": "0", "count": "1", "radio_id": "0", "item_id": "1", "search": "", "id": "output_0" } }',
'{ "msg": "audio_db", "msg_id": "1234", "data": { "audio_action": "get_artist_album", "from": "0", "count": "1", "artist_id": "0", "id": "output_0" } }',
'{ "msg": "audio_db", "msg_id": "1234", "data": { "audio_action": "get_year_albums", "from": "0", "count": "1", "year": "0", "id": "output_0" } }',
'{ "msg": "audio_db", "msg_id": "1234", "data": { "audio_action": "get_genre_artists", "from": "0", "count": "1", "genre": "0", "id": "output_0" } }',
'{ "msg": "audio_db", "msg_id": "1234", "data": { "audio_action": "get_album_titles", "from": "0", "count": "1", "album_id": "0", "id": "output_0" } }',
'{ "msg": "audio_db", "msg_id": "1234", "data": { "audio_action": "get_playlist_titles", "from": "0", "count": "1", "playlist_id": "0", "id": "output_0" } }',
'{ "msg": "audio_db", "msg_id": "1234", "data": { "audio_action": "get_track_infos", "from": "0", "count": "1", "track_id": "0", "id": "output_0" } }',
'{ "msg": "eventlog", "msg_id": "1234", "data": { "page": 0, "per_page": 100, "uuid": "<uuid for single event>" } }'
];
function popuplateApiList() {
var i = 0;
$('#api_list').append($('<option />').val(i++).html('Custom request'));
for (var c = 1;c < apiList.length;c++) {
var s = JSON.parse(apiList[c]).msg;
if (s == "autoscenario")
s = s + " " + JSON.parse(apiList[c]).data["type"];
if (s == "audio" || s == "audio_db")
s = s + " " + JSON.parse(apiList[c]).data["audio_action"];
$('#api_list').append($('<option />').val(i++).html(s));
}
$('#api_list').change(function() {
var j = $('#api_list option:selected').val();
var s = apiList[parseInt(j)];
if ($('#username').val() != "")
s = s.replace("USERNAME", $('#username').val());
if ($('#passwd').val() != "")
s = s.replace("PASSWORD", $('#passwd').val());
var formatted = JSON.stringify(JSON.parse(s), null, ' ');
if (window.editor && typeof window.editor.setValue === 'function') {
window.editor.setValue(formatted);
} else {
$('#message').val(formatted);
}
});
$('#api_list').change();
}
var ws = new Object();
var loginfos = [];
function addLog(o, sending) {
sending = typeof sending !== 'undefined' ? sending : false;
var id = loginfos.length;
var newItem = $('<p></p>');
loginfos.push(o);
$('.log').append(newItem);
var icon = '';
var text = '';
if (o.type == 'connected') {
icon = '✔️ ';
text = 'Connected';
} else if (o.type == 'disconnected') {
icon = '✖️ ';
text = 'Disconnected';
} else if (o.type == 'error') {
icon = '⚠️ ';
text = 'Error';
} else if (o.type === 'event') {
icon = '🔔 ';
text = 'Event';
} else if (sending) {
icon = '➡️ ';
text = o.type || 'Empty "msg"';
} else {
icon = '⬅️ ';
text = o.type || 'Empty "msg"';
}
newItem.text(icon + text);
$('#badge_count').html(loginfos.length);
newItem.on('click', function () {
var data = loginfos[id];
var txt;
try {
txt = JSON.stringify(JSON.parse(data.json), null, 4);
} catch(ex) {
txt = data.json;
}
$('#answer').text(txt);
$('pre code').each(function(i, block) {
hljs.highlightElement(block);
});
});
}
function clearLog() {
loginfos = [];
$('.log').html('');
$('#badge_count').html('0');
}
$(document).ready(function() {
popuplateApiList();
$('#urlinput').val('ws://' + window.location.host + '/api');
$('#btdisconnect').on('click', function () {
ws.close();
});
$('#btsend').on('click', function () {
var m = (window.editor && typeof window.editor.getValue === 'function')
? window.editor.getValue()
: $('#message').val();
if ('readyState' in ws &&
ws.readyState == ws.OPEN) {
ws.send(m);
}
else {
console.log('sending error');
addLog({
type: 'error',
msg_id: '',
json: 'Websocket connection closed'
});
return;
}
var json = JSON.parse(m);
var id = '';
var msg = 'UNKNOWN!!';
if (json.hasOwnProperty('msg_id'))
id = json.msg_id;
if (json.hasOwnProperty('msg'))
msg = json.msg;
addLog({
type: msg,
msg_id: id,
json: m
}, true);
});
$('#btclear').on('click', function () {
clearLog();
});
$('#btconnect').on('click', function () {
ws = new WebSocket($('#urlinput').val());
ws.onopen = function(evt) {
$('#status_con').removeClass('bg-danger');
$('#status_con').addClass('bg-success');
$('#status_con').html('Connected');
addLog({
type: 'connected',
msg_id: '',
json: 'OPEN'
});
};
ws.onclose = function(evt) {
$('#status_con').removeClass('bg-success');
$('#status_con').addClass('bg-danger');
$('#status_con').html('Disconnected');
addLog({
type: 'disconnected',
msg_id: '',
json: 'CLOSED'
});
};
ws.onmessage = function(evt) {
console.log(evt.data);
var json = JSON.parse(evt.data);
var id = '';
var msg = 'UNKNOWN!!';
if (json.hasOwnProperty('msg_id'))
id = json.msg_id;
if (json.hasOwnProperty('msg'))
msg = json.msg;
addLog({
type: msg,
msg_id: id,
json: evt.data
});
};
ws.onerror = function(evt) {
$('#status_con').removeClass('bg-success');
$('#status_con').addClass('bg-danger');
$('#status_con').html('Disconnected');
addLog({
type: 'error',
msg_id: '',
json: evt.data
});
};
});
});
================================================
FILE: data/debug/app/styles/main.css
================================================
.browsehappy {
margin: 0.2em 0;
background: #ccc;
color: #000;
padding: 0.2em 0;
}
/* Space out content a bit */
body {
padding-top: 40px;
padding-bottom: 20px;
}
/* Everything but the jumbotron gets side spacing for mobile first views */
.header,
.marketing,
.footer {
padding-left: 15px;
padding-right: 15px;
}
/* Custom page header */
.header {
border-bottom: 1px solid #e5e5e5;
}
/* Make the masthead heading the same height as the navigation */
.header h3 {
margin-top: 0;
margin-bottom: 0;
line-height: 40px;
padding-bottom: 19px;
}
/* Custom page footer */
.footer {
padding-top: 19px;
color: #777;
border-top: 1px solid #e5e5e5;
}
.container-narrow > hr {
margin: 30px 0;
}
/* Main marketing message and sign up button */
.jumbotron {
text-align: center;
border-bottom: 1px solid #e5e5e5;
}
.jumbotron .btn {
font-size: 21px;
padding: 14px 24px;
}
/* Supporting marketing content */
.marketing {
margin: 40px 0;
}
.marketing p + h4 {
margin-top: 28px;
}
/* Responsive: Portrait tablets and up */
@media screen and (min-width: 768px) {
.container {
max-width: 1000px;
}
/* Remove the padding we set earlier */
.header,
.marketing,
.footer {
padding-left: 0;
padding-right: 0;
}
/* Space out the masthead */
.header {
margin-bottom: 30px;
}
/* Remove the bottom border on the jumbotron for visual effect */
.jumbotron {
border-bottom: 0;
}
}
.log {
background-color: #fff;
background-image: none;
border: 1px solid #ccc;
border-radius: 4px;
color: #555;
padding: 2px 2px;
height: 300px;
overflow-y: scroll;
border-radius: 4px;
box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
}
.log p {
word-wrap: break-word;
margin: 0;
padding: 3px 4px;
}
.log p:hover {
background-color: #f5f5f5;
cursor: pointer; cursor: hand;
}
.pselected {
background-color: #d4f8ff;
}
.logdetail {
}
================================================
FILE: data/debug/dist/Makefile.am
================================================
MAINTAINERCLEANFILES = Makefile.in
debugdir = $(pkgdatadir)/debug
debug_DATA = \
index.html \
debug_websocket.html
debugscriptsdir = $(pkgdatadir)/debug/scripts
debugscripts_DATA = \
scripts/main_v2.js \
scripts/main_v3.js \
scripts/codemirror.js \
scripts/vendor.js
debugcssdir = $(pkgdatadir)/debug/styles
debugcss_DATA = \
styles/main.css \
styles/vendor.css
EXTRA_DIST = $(debug_DATA) \
$(debugscripts_DATA) \
$(debugcss_DATA)
================================================
FILE: data/debug/dist/debug_websocket.html
================================================
<!doctype html><html class="no-js"><head><meta charset="utf-8"><title>Calaos Debug Page</title><meta name="description" content=""><meta name="viewport" content="width=device-width"><link rel="stylesheet" href="styles/vendor.css"><link rel="stylesheet" href="styles/main.css"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.7/codemirror.min.css"></head><body><nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top"><div class="container-fluid"><a class="navbar-brand" href="#">Calaos Debug</a> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNavWs" aria-controls="navbarNavWs" aria-expanded="false" aria-label="Toggle navigation"><span class="navbar-toggler-icon"></span></button><div class="collapse navbar-collapse" id="navbarNavWs"><ul class="navbar-nav ms-auto"><li class="nav-item"><a class="nav-link" href="index.html">HTTP POST API</a></li><li class="nav-item active"><a class="nav-link" href="debug_websocket.html">Websocket API</a></li></ul></div></div></nav><div class="container mt-5 pt-5"><div><form name="commandform"><h1 class="mb-4">Calaos Websocket API Debug Tool</h1><div class="mb-3"><label for="urlinput" class="form-label">Url</label> <input type="text" class="form-control" id="urlinput" placeholder="Enter Calaos websocket API URL" value="ws://127.0.0.1:5454/api"></div><div class="mb-3"><label for="username" class="form-label">Username</label> <input type="email" class="form-control" id="username" placeholder="Enter username"></div><div class="mb-3"><label for="passwd" class="form-label">Password</label> <input type="text" class="form-control" id="passwd" placeholder="Password"></div><div class="mb-3"><label for="message" class="form-label">Request (JSON)</label> <select class="form-select" id="api_list"></select> <textarea class="form-control" name="messagebody" rows="10" id="message"></textarea></div><span id="status_con" class="badge bg-danger">Disconnected</span> <button class="btn btn-secondary" type="button" id="btconnect">Connect</button> <button class="btn btn-secondary" type="button" id="btdisconnect">Disconnect</button> <button class="btn btn-primary" type="button" id="btsend">Send message</button></form><div class="row mt-4"><div class="col-md-4"><h4>Log <span id="badge_count" class="badge bg-secondary">0</span> <button class="btn btn-secondary btn-sm ms-2" type="button" id="btclear">Clear</button></h4><div class="log"></div></div><div class="col-md-8 logdetail"><h4 class="h5">Detail</h4><pre class="p-3 bg-light rounded"><code class="json hljs" id="answer"></code></pre></div></div></div></div><script src="scripts/vendor.js"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/highlight.min.js"></script><!-- CodeMirror JS for editable JSON highlighting --><script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.7/codemirror.min.js"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.7/mode/javascript/javascript.min.js"></script><script src="scripts/codemirror.js"></script><script src="scripts/main_v3.js"></script></body></html>
================================================
FILE: data/debug/dist/index.html
================================================
<!doctype html><html class="no-js"><head><meta charset="utf-8"><title>Calaos Debug Page</title><meta name="description" content=""><meta name="viewport" content="width=device-width"><link rel="stylesheet" href="styles/vendor.css"><link rel="stylesheet" href="styles/main.css"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.7/codemirror.min.css"></head><body><nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top"><div class="container-fluid"><a class="navbar-brand" href="#">Calaos Debug</a> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation"><span class="navbar-toggler-icon"></span></button><div class="collapse navbar-collapse" id="navbarNav"><ul class="navbar-nav ms-auto"><li class="nav-item active"><a class="nav-link" href="index.html">HTTP POST API</a></li><li class="nav-item"><a class="nav-link" href="debug_websocket.html">Websocket API</a></li></ul></div></div></nav><div class="container mt-5 pt-5"><div><form name="commandform"><h1 class="mb-4">Calaos HTTP POST API Debug Tool</h1><div class="mb-3"><label for="urlinput" class="form-label">Url</label> <input type="text" class="form-control" id="urlinput" placeholder="Enter Calaos API URL" value="/api"></div><div class="mb-3"><label for="username" class="form-label">Username</label> <input type="email" class="form-control" id="username" placeholder="Enter username"></div><div class="mb-3"><label for="passwd" class="form-label">Password</label> <input type="text" class="form-control" id="passwd" placeholder="Password"></div><div class="mb-3"><label for="api_list" class="form-label">Request (JSON)</label> <select class="form-select mb-2" id="api_list"></select> <textarea class="form-control hljs language-json" name="messagebody" rows="10" id="message"></textarea></div><div class="mb-4"><button class="btn btn-primary me-2" type="button" onclick="window.sendRequest('POST')">Send request</button> <button class="btn btn-secondary" type="button" onclick="window.clearResponse()">Clear</button></div><h2 class="h4 mb-3">Command Response:</h2><pre class="p-3 bg-light rounded"><code class="hljs language-json" id="answer"></code></pre></form></div></div><script src="scripts/vendor.js"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/highlight.min.js"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.7/codemirror.min.js"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.7/mode/javascript/javascript.min.js"></script><script src="scripts/codemirror.js"></script><script src="scripts/main_v2.js"></script></body></html>
================================================
FILE: data/debug/dist/scripts/codemirror.js
================================================
"use strict";window.editor=CodeMirror.fromTextArea(document.getElementById("message"),{mode:{name:"javascript",json:!0},lineNumbers:!0,theme:"default",viewportMargin:1/0});const validationIndicator=document.createElement("div");function validateJSON(){const e=window.editor.getValue(),t=document.getElementById("json-validation");if(""!==e.trim())try{JSON.parse(e),t.innerHTML="",t.style.display="block",window.editor.getWrapperElement().style.borderColor=""}catch(e){t.innerHTML='<span class="text-danger">✗ Invalid JSON: '+e.message+"</span>",t.style.display="block",window.editor.getWrapperElement().style.borderColor="#dc3545"}else t.style.display="none"}validationIndicator.id="json-validation",validationIndicator.className="mt-2 small",validationIndicator.style.display="none",document.querySelector("#message").parentNode.appendChild(validationIndicator),window.editor.on("change",function(){clearTimeout(window.jsonValidationTimeout),window.jsonValidationTimeout=setTimeout(validateJSON,500)}),setTimeout(validateJSON,100);
================================================
FILE: data/debug/dist/scripts/main_v2.js
================================================
"use strict";function sendRequest(t){if(window.XMLHttpRequest){var e=new XMLHttpRequest;e.open(t,$("#urlinput").val(),!0);var a,n=window.editor&&"function"==typeof window.editor.getValue?window.editor.getValue():document.commandform.messagebody.value;try{a=JSON.parse(n)}catch(t){return $("#answer").text("JSON parse error: "+t.message).addClass("text-danger"),!1}"camera"==a.action&&(e.responseType="blob"),e.onreadystatechange=function(){if(4===e.readyState){if(200===e.status)if(console.log("HTTP Content-Type: "+e.getResponseHeader("Content-Type")),"image/jpeg"==e.getResponseHeader("Content-Type")){$("#answer").html('<img id="campic" />');var t=document.getElementById("campic"),a=e.response;t.src=window.URL.createObjectURL(a),t.onload=function(){window.URL.revokeObjectURL(t.src)}}else $("#answer").html(JSON.stringify(JSON.parse(e.responseText),null," "));else $("#answer").html("Error "+e.status);$("pre code").each(function(t,e){hljs.highlightElement(e)})}},e.send(n)}return!1}var apiList=["{ }",'{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "get_home" }','{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "get_state", "items": ["input_0", "output_1"], "audio_players": ["0"] }','{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "get_states", "id": "input_0" }','{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "query", "id": "input_0", "param": "input_sources" }','{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "get_param", "id": "input_0", "param": "name" }','{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "set_param", "id": "input_0", "param": "name", "value": "New name" }','{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "del_param", "id": "input_0", "param": "param_to_delete" }','{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "get_timerange", "id": "input_0" }','{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "set_timerange", "id": "input_0", "months": "000000000000", "ranges": [ { "day": "1", "start_hour": "12", "start_min": "0", "start_sec": "0", "start_type": "0", "start_offset": "1", "end_hour": "13", "end_min": "30", "end_sec": "0", "end_type": "0", "end_offset": "1" } ] }','{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "get_io", "items": ["input_0", "output_0"] }','{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "set_state", "id": "output_0", "value": "true" }','{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "autoscenario", "type": "list" }','{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "autoscenario", "type": "get", "id": "input_0" }','{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "autoscenario", "type": "create", "name": "New scenario", "visible": "true", "room_name": "Room", "room_type": "bedroom", "cycle": "true", "steps": [ { "step_pause": "61000", "step_type": "standard", "actions": [ { "id": "output_0", "action": "true"}, { "id": "output_1", "action": "set 50" } ] }, { "step_type": "end", "actions": [ { "id": "output_0", "action": "false" } ] } ] }','{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "autoscenario", "type": "delete", "id": "input_0" }','{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "autoscenario", "type": "modify", "id": "input_0", "name": "scenario modified", "visible": "true", "room_name": "Room", "room_type": "bedroom", "cycle": "true", "steps": [ { "step_pause": "61000", "step_type": "standard", "actions": [ { "id": "output_0", "action": "true"}, { "id": "output_1", "action": "set 50" } ] }, { "step_type": "end", "actions": [ { "id": "output_0", "action": "false" } ] } ] }','{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "autoscenario", "type": "add_schedule", "id": "input_0" }','{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "autoscenario", "type": "del_schedule", "id": "input_0" }','{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "get_playlist", "id": "output_0" }','{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "poll_listen", "type": "register" }','{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "poll_listen", "type": "unregister", "uuid": "XXX" }','{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "poll_listen", "type": "get", "uuid": "XXX" }','{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "config", "type": "get" }','{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "config", "type": "put", "config_files": { "io.xml": "<xml ...... >", "rules.xml": "<xml ...... >" } }','{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "audio_db", "audio_action": "get_stats", "id": "output_0" }','{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "audio", "audio_action": "get_playlist_size", "id": "output_0" }','{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "audio", "audio_action": "get_time", "id": "output_0" }','{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "audio", "audio_action": "get_playlist_item", "item": "0", "id": "output_0" }','{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "audio", "audio_action": "get_cover_url", "id": "output_0" }','{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "audio", "audio_action": "get_cover", "id": "output_0" }','{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "audio_db", "audio_action": "get_albums", "from": "0", "count": "1", "id": "output_0" }','{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "audio_db", "audio_action": "get_artists", "from": "0", "count": "1", "id": "output_0" }','{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "audio_db", "audio_action": "get_years", "from": "0", "count": "1", "id": "output_0" }','{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "audio_db", "audio_action": "get_genres", "from": "0", "count": "1", "id": "output_0" }','{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "audio_db", "audio_action": "get_playlists", "from": "0", "count": "1", "id": "output_0" }','{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "audio_db", "audio_action": "get_music_folder", "from": "0", "count": "1", "id": "output_0" }','{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "audio_db", "audio_action": "get_search", "from": "0", "count": "1", "id": "output_0" }','{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "audio_db", "audio_action": "get_radios", "from": "0", "count": "1", "id": "output_0" }','{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "audio_db", "audio_action": "get_radio_items", "from": "0", "count": "1", "radio_id": "0", "item_id": "1", "search": "", "id": "output_0" }','{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "audio_db", "audio_action": "get_artist_album", "from": "0", "count": "1", "artist_id": "0", "id": "output_0" }','{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "audio_db", "audio_action": "get_year_albums", "from": "0", "count": "1", "year": "0", "id": "output_0" }','{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "audio_db", "audio_action": "get_genre_artists", "from": "0", "count": "1", "genre": "0", "id": "output_0" }','{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "audio_db", "audio_action": "get_album_titles", "from": "0", "count": "1", "album_id": "0", "id": "output_0" }','{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "audio_db", "audio_action": "get_playlist_titles", "from": "0", "count": "1", "playlist_id": "0", "id": "output_0" }','{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "audio_db", "audio_action": "get_track_infos", "from": "0", "count": "1", "track_id": "0", "id": "output_0" }','{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "camera", "type": "get_picture", "id": "output_0" }','{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "get_cover", "id": "audio_id_0" }','{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "eventlog", "page": 0, "per_page": 100, "uuid": "<uuid for single event>" }','{ "cn_user": "USERNAME", "cn_pass": "PASSWORD", "action": "event_picture", "pic_uid": "<UUID>" }'];function clearResponse(){$("#answer").text("").removeClass("text-danger")}$(document).ready(function(){var t=0;$("#api_list").append($("<option />").val(t++).html("Custom request"));for(var e=1;e<apiList.length;e++){var a=JSON.parse(apiList[e]).action;"poll_listen"!=a&&"config"!=a&&"autoscenario"!=a||(a=a+" "+JSON.parse(apiList[e]).type),"audio"!=a&&"audio_db"!=a||(a=a+" "+JSON.parse(apiList[e]).audio_action),$("#api_list").append($("<option />").val(t++).html(a))}$("#api_list").change(function(){var t=$("#api_list option:selected").val(),e=apiList[parseInt(t)];""!==$("#username").val()&&(e=e.replace("USERNAME",$("#username").val())),""!==$("#passwd").val()&&(e=e.replace("PASSWORD",$("#passwd").val()));var a=JSON.stringify(JSON.parse(e),null," ");window.editor&&"function"==typeof window.editor.setValue?window.editor.setValue(a):($("#message").val(a),hljs.highlightElement($("#message")[0]))}),$("#api_list").trigger("change")}),window.sendRequest=sendRequest,window.clearResponse=clearResponse;
================================================
FILE: data/debug/dist/scripts/main_v3.js
================================================
"use strict";var apiList=['{ "msg": "" }','{ "msg": "login", "msg_id": "1234", "data": { "cn_user": "USERNAME", "cn_pass": "PASSWORD" } }','{ "msg": "get_home", "msg_id": "1234" }','{ "msg": "get_state", "msg_id": "1234", "data": { "items": ["input_0", "output_0"] } }','{ "msg": "get_states", "msg_id": "1234", "data": { "id": "input_0" } }','{ "msg": "query", "msg_id": "1234", "data": { "id": "input_0", "param": "input_sources" } }','{ "msg": "get_param", "msg_id": "1234", "data": { "id": "input_0", "param": "name" } }','{ "msg": "set_param", "msg_id": "1234", "data": { "id": "input_0", "param": "name", "value": "New name" } }','{ "msg": "del_param", "msg_id": "1234", "data": { "id": "input_0", "param": "param_to_delete" } }','{ "msg": "get_timerange", "msg_id": "1234", "data": { "id": "input_0" } }','{ "msg": "set_timerange", "msg_id": "1234", "data": { "id": "input_0", "months": "000000000000", "ranges": [ { "day": "1", "start_hour": "12", "start_min": "0", "start_sec": "0", "start_type": "0", "start_offset": "1", "end_hour": "13", "end_min": "30", "end_sec": "0", "end_type": "0", "end_offset": "1" } ] } }','{ "msg": "set_state", "msg_id": "1234", "data": { "id": "output_0", "value": "true" } }','{ "msg": "autoscenario", "msg_id": "1234", "data": { "type": "list" } }','{ "msg": "autoscenario", "msg_id": "1234", "data": { "type": "get", "id": "input_0" } }','{ "msg": "autoscenario", "msg_id": "1234", "data": { "type": "create", "name": "New scenario", "visible": "true", "room_name": "Room", "room_type": "bedroom", "cycle": "true", "steps": [ { "step_pause": "61000", "step_type": "standard", "actions": [ { "id": "output_0", "action": "true"}, { "id": "output_1", "action": "set 50" } ] }, { "step_type": "end", "actions": [ { "id": "output_0", "action": "false" } ] } ] } }','{ "msg": "autoscenario", "msg_id": "1234", "data": { "type": "delete", "id": "input_0" } }','{ "msg": "autoscenario", "msg_id": "1234", "data": { "type": "modify", "id": "input_0", "name": "scenario modified", "visible": "true", "room_name": "Room", "room_type": "bedroom", "cycle": "true", "steps": [ { "step_pause": "61000", "step_type": "standard", "actions": [ { "id": "output_0", "action": "true"}, { "id": "output_1", "action": "set 50" } ] }, { "step_type": "end", "actions": [ { "id": "output_0", "action": "false" } ] } ] } }','{ "msg": "autoscenario", "msg_id": "1234", "data": { "type": "add_schedule", "id": "input_0" } }','{ "msg": "autoscenario", "msg_id": "1234", "data": { "type": "del_schedule", "id": "input_0" } }','{ "msg": "get_playlist", "msg_id": "1234", "data": { "id": "output_0" } }','{ "msg": "get_io", "msg_id": "1234", "data": { "items": ["input_0", "output_0"] } }','{ "msg": "audio_db", "msg_id": "1234", "data": { "audio_action": "get_stats", "id": "output_0" } }','{ "msg": "audio", "msg_id": "1234", "data": { "audio_action": "get_playlist_size", "id": "output_0" } }','{ "msg": "audio", "msg_id": "1234", "data": { "audio_action": "get_time", "id": "output_0" } }','{ "msg": "audio", "msg_id": "1234", "data": { "audio_action": "get_playlist_item", "item": "0", "id": "output_0" } }','{ "msg": "audio", "msg_id": "1234", "data": { "audio_action": "get_cover_url", "id": "output_0" } }','{ "msg": "audio_db", "msg_id": "1234", "data": { "audio_action": "get_albums", "from": "0", "count": "1", "id": "output_0" } }','{ "msg": "audio_db", "msg_id": "1234", "data": { "audio_action": "get_artists", "from": "0", "count": "1", "id": "output_0" } }','{ "msg": "audio_db", "msg_id": "1234", "data": { "audio_action": "get_years", "from": "0", "count": "1", "id": "output_0" } }','{ "msg": "audio_db", "msg_id": "1234", "data": { "audio_action": "get_genres", "from": "0", "count": "1", "id": "output_0" } }','{ "msg": "audio_db", "msg_id": "1234", "data": { "audio_action": "get_playlists", "from": "0", "count": "1", "id": "output_0" } }','{ "msg": "audio_db", "msg_id": "1234", "data": { "audio_action": "get_music_folder", "from": "0", "count": "1", "id": "output_0" } }','{ "msg": "audio_db", "msg_id": "1234", "data": { "audio_action": "get_search", "from": "0", "count": "1", "id": "output_0" } }','{ "msg": "audio_db", "msg_id": "1234", "data": { "audio_action": "get_radios", "from": "0", "count": "1", "id": "output_0" } }','{ "msg": "audio_db", "msg_id": "1234", "data": { "audio_action": "get_radio_items", "from": "0", "count": "1", "radio_id": "0", "item_id": "1", "search": "", "id": "output_0" } }','{ "msg": "audio_db", "msg_id": "1234", "data": { "audio_action": "get_artist_album", "from": "0", "count": "1", "artist_id": "0", "id": "output_0" } }','{ "msg": "audio_db", "msg_id": "1234", "data": { "audio_action": "get_year_albums", "from": "0", "count": "1", "year": "0", "id": "output_0" } }','{ "msg": "audio_db", "msg_id": "1234", "data": { "audio_action": "get_genre_artists", "from": "0", "count": "1", "genre": "0", "id": "output_0" } }','{ "msg": "audio_db", "msg_id": "1234", "data": { "audio_action": "get_album_titles", "from": "0", "count": "1", "album_id": "0", "id": "output_0" } }','{ "msg": "audio_db", "msg_id": "1234", "data": { "audio_action": "get_playlist_titles", "from": "0", "count": "1", "playlist_id": "0", "id": "output_0" } }','{ "msg": "audio_db", "msg_id": "1234", "data": { "audio_action": "get_track_infos", "from": "0", "count": "1", "track_id": "0", "id": "output_0" } }','{ "msg": "eventlog", "msg_id": "1234", "data": { "page": 0, "per_page": 100, "uuid": "<uuid for single event>" } }'];function popuplateApiList(){var t=0;$("#api_list").append($("<option />").val(t++).html("Custom request"));for(var a=1;a<apiList.length;a++){var i=JSON.parse(apiList[a]).msg;"autoscenario"==i&&(i=i+" "+JSON.parse(apiList[a]).data.type),"audio"!=i&&"audio_db"!=i||(i=i+" "+JSON.parse(apiList[a]).data.audio_action),$("#api_list").append($("<option />").val(t++).html(i))}$("#api_list").change(function(){var t=$("#api_list option:selected").val(),a=apiList[parseInt(t)];""!=$("#username").val()&&(a=a.replace("USERNAME",$("#username").val())),""!=$("#passwd").val()&&(a=a.replace("PASSWORD",$("#passwd").val()));var i=JSON.stringify(JSON.parse(a),null," ");window.editor&&"function"==typeof window.editor.setValue?window.editor.setValue(i):$("#message").val(i)}),$("#api_list").change()}var ws=new Object,loginfos=[];function addLog(t,a){a=void 0!==a&&a;var i=loginfos.length,o=$("<p></p>");loginfos.push(t),$(".log").append(o);var s="",e="";"connected"==t.type?(s="✔️ ",e="Connected"):"disconnected"==t.type?(s="✖️ ",e="Disconnected"):"error"==t.type?(s="⚠️ ",e="Error"):"event"===t.type?(s="🔔 ",e="Event"):a?(s="➡️ ",e=t.type||'Empty "msg"'):(s="⬅️ ",e=t.type||'Empty "msg"'),o.text(s+e),$("#badge_count").html(loginfos.length),o.on("click",function(){var t,a=loginfos[i];try{t=JSON.stringify(JSON.parse(a.json),null,4)}catch(i){t=a.json}$("#answer").text(t),$("pre code").each(function(t,a){hljs.highlightElement(a)})})}function clearLog(){loginfos=[],$(".log").html(""),$("#badge_count").html("0")}$(document).ready(function(){popuplateApiList(),$("#urlinput").val("ws://"+window.location.host+"/api"),$("#btdisconnect").on("click",function(){ws.close()}),$("#btsend").on("click",function(){var t=window.editor&&"function"==typeof window.editor.getValue?window.editor.getValue():$("#message").val();if(!("readyState"in ws)||ws.readyState!=ws.OPEN)return console.log("sending error"),void addLog({type:"error",msg_id:"",json:"Websocket connection closed"});ws.send(t);var a=JSON.parse(t),i="",o="UNKNOWN!!";a.hasOwnProperty("msg_id")&&(i=a.msg_id),a.hasOwnProperty("msg")&&(o=a.msg),addLog({type:o,msg_id:i,json:t},!0)}),$("#btclear").on("click",function(){clearLog()}),$("#btconnect").on("click",function(){(ws=new WebSocket($("#urlinput").val())).onopen=function(t){$("#status_con").removeClass("bg-danger"),$("#status_con").addClass("bg-success"),$("#status_con").html("Connected"),addLog({type:"connected",msg_id:"",json:"OPEN"})},ws.onclose=function(t){$("#status_con").removeClass("bg-success"),$("#status_con").addClass("bg-danger"),$("#status_con").html("Disconnected"),addLog({type:"disconnected",msg_id:"",json:"CLOSED"})},ws.onmessage=function(t){console.log(t.data);var a=JSON.parse(t.data),i="",o="UNKNOWN!!";a.hasOwnProperty("msg_id")&&(i=a.msg_id),a.hasOwnProperty("msg")&&(o=a.msg),addLog({type:o,msg_id:i,json:t.data})},ws.onerror=function(t){$("#status_con").removeClass("bg-success"),$("#status_con").addClass("bg-danger"),$("#status_con").html("Disconnected"),addLog({type:"error",msg_id:"",json:t.data})}})});
================================================
FILE: data/debug/dist/scripts/vendor.js
================================================
/*!
* jQuery JavaScript Library v3.7.1
* https://jquery.com/
*
* Copyright OpenJS Foundation and other contributors
* Released under the MIT license
* https://jquery.org/license
*
* Date: 2023-08-28T13:37Z
*/
!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){"use strict";var n=[],i=Object.getPrototypeOf,r=n.slice,o=n.flat?function(e){return n.flat.call(e)}:function(e){return n.concat.apply([],e)},s=n.push,a=n.indexOf,l={},c=l.toString,u=l.hasOwnProperty,f=u.toString,d=f.call(Object),h={},p=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},g=function(e){return null!=e&&e===e.window},m=e.document,v={type:!0,src:!0,nonce:!0,noModule:!0};function y(e,t,n){var i,r,o=(n=n||m).createElement("script");if(o.text=e,t)for(i in v)(r=t[i]||t.getAttribute&&t.getAttribute(i))&&o.setAttribute(i,r);n.head.appendChild(o).parentNode.removeChild(o)}function b(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[c.call(e)]||"object":typeof e}var _="3.7.1",w=/HTML$/i,x=function(e,t){return new x.fn.init(e,t)};function T(e){var t=!!e&&"length"in e&&e.length,n=b(e);return!p(e)&&!g(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function E(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}x.fn=x.prototype={jquery:_,constructor:x,length:0,toArray:function(){return r.call(this)},get:function(e){return null==e?r.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return x.each(this,e)},map:function(e){return this.pushStack(x.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(r.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(x.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(x.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:s,sort:n.sort,splice:n.splice},x.extend=x.fn.extend=function(){var e,t,n,i,r,o,s=arguments[0]||{},a=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[a]||{},a++),"object"==typeof s||p(s)||(s={}),a===l&&(s=this,a--);a<l;a++)if(null!=(e=arguments[a]))for(t in e)i=e[t],"__proto__"!==t&&s!==i&&(c&&i&&(x.isPlainObject(i)||(r=Array.isArray(i)))?(n=s[t],o=r&&!Array.isArray(n)?[]:r||x.isPlainObject(n)?n:{},r=!1,s[t]=x.extend(c,o,i)):void 0!==i&&(s[t]=i));return s},x.extend({expando:"jQuery"+(_+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==c.call(e))&&(!(t=i(e))||"function"==typeof(n=u.call(t,"constructor")&&t.constructor)&&f.call(n)===d)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){y(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,i=0;if(T(e))for(n=e.length;i<n&&!1!==t.call(e[i],i,e[i]);i++);else for(i in e)if(!1===t.call(e[i],i,e[i]))break;return e},text:function(e){var t,n="",i=0,r=e.nodeType;if(!r)for(;t=e[i++];)n+=x.text(t);return 1===r||11===r?e.textContent:9===r?e.documentElement.textContent:3===r||4===r?e.nodeValue:n},makeArray:function(e,t){var n=t||[];return null!=e&&(T(Object(e))?x.merge(n,"string"==typeof e?[e]:e):s.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:a.call(t,e,n)},isXMLDoc:function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!w.test(t||n&&n.nodeName||"HTML")},merge:function(e,t){for(var n=+t.length,i=0,r=e.length;i<n;i++)e[r++]=t[i];return e.length=r,e},grep:function(e,t,n){for(var i=[],r=0,o=e.length,s=!n;r<o;r++)!t(e[r],r)!==s&&i.push(e[r]);return i},map:function(e,t,n){var i,r,s=0,a=[];if(T(e))for(i=e.length;s<i;s++)null!=(r=t(e[s],s,n))&&a.push(r);else for(s in e)null!=(r=t(e[s],s,n))&&a.push(r);return o(a)},guid:1,support:h}),"function"==typeof Symbol&&(x.fn[Symbol.iterator]=n[Symbol.iterator]),x.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){l["[object "+t+"]"]=t.toLowerCase()});var C=n.pop,A=n.sort,k=n.splice,S="[\\x20\\t\\r\\n\\f]",O=new RegExp("^"+S+"+|((?:^|[^\\\\])(?:\\\\.)*)"+S+"+$","g");x.contains=function(e,t){var n=t&&t.parentNode;return e===n||!(!n||1!==n.nodeType||!(e.contains?e.contains(n):e.compareDocumentPosition&&16&e.compareDocumentPosition(n)))};var D=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function L(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e}x.escapeSelector=function(e){return(e+"").replace(D,L)};var j=m,N=s;!function(){var t,i,o,s,l,c,f,d,p,g,m=N,v=x.expando,y=0,b=0,_=ee(),w=ee(),T=ee(),D=ee(),L=function(e,t){return e===t&&(l=!0),0},P="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",$="(?:\\\\[\\da-fA-F]{1,6}"+S+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",I="\\["+S+"*("+$+")(?:"+S+"*([*^$|!~]?=)"+S+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+$+"))|)"+S+"*\\]",M=":("+$+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+I+")*)|.*)\\)|)",H=new RegExp(S+"+","g"),q=new RegExp("^"+S+"*,"+S+"*"),F=new RegExp("^"+S+"*([>+~]|"+S+")"+S+"*"),R=new RegExp(S+"|>"),W=new RegExp(M),B=new RegExp("^"+$+"$"),z={ID:new RegExp("^#("+$+")"),CLASS:new RegExp("^\\.("+$+")"),TAG:new RegExp("^("+$+"|[*])"),ATTR:new RegExp("^"+I),PSEUDO:new RegExp("^"+M),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+S+"*(even|odd|(([+-]|)(\\d*)n|)"+S+"*(?:([+-]|)"+S+"*(\\d+)|))"+S+"*\\)|)","i"),bool:new RegExp("^(?:"+P+")$","i"),needsContext:new RegExp("^"+S+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+S+"*((?:-\\d)?\\d*)"+S+"*\\)|)(?=[^-]|$)","i")},V=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,U=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Y=/[+~]/,Q=new RegExp("\\\\[\\da-fA-F]{1,6}"+S+"?|\\\\([^\\r\\n\\f])","g"),K=function(e,t){var n="0x"+e.slice(1)
gitextract_4nlxqk_q/ ├── .devcontainer/ │ ├── Dockerfile │ └── devcontainer.json ├── .github/ │ ├── copilot-instructions.md │ └── workflows/ │ ├── docker-publish-dev.yml │ └── docker-publish.yml ├── .gitignore ├── .vscode/ │ ├── c_cpp_properties.json │ ├── launch.json │ ├── settings.json │ └── tasks.json ├── AGENTS.md ├── AUTHORS ├── COPYING ├── ChangeLog ├── Dockerfile ├── INSTALL ├── Makefile.am ├── NEWS ├── README.md ├── TODO ├── autogen.sh ├── configure.ac ├── data/ │ ├── Makefile.am │ └── debug/ │ ├── .editorconfig │ ├── .gitattributes │ ├── .gitignore │ ├── Gruntfile.js │ ├── Makefile.am │ ├── README.md │ ├── app/ │ │ ├── debug_websocket.html │ │ ├── index.html │ │ ├── scripts/ │ │ │ ├── codemirror.js │ │ │ ├── main_v2.js │ │ │ └── main_v3.js │ │ └── styles/ │ │ └── main.css │ ├── dist/ │ │ ├── Makefile.am │ │ ├── debug_websocket.html │ │ ├── index.html │ │ ├── scripts/ │ │ │ ├── codemirror.js │ │ │ ├── main_v2.js │ │ │ ├── main_v3.js │ │ │ └── vendor.js │ │ └── styles/ │ │ ├── main.css │ │ └── vendor.css │ ├── gulpfile.js │ └── package.json ├── doc/ │ ├── 00_overview.md │ ├── 01_core_data_model.md │ ├── 02_io_drivers.md │ ├── 03_rules_engine.md │ ├── 04_scenarios.md │ ├── 05_audio.md │ ├── 06_ipcam.md │ ├── 07_remoteui.md │ ├── 08_http_api.md │ ├── 09_lua_scripting.md │ ├── 10_events_notifications.md │ ├── 11_config_persistence.md │ ├── 12_extern_proc.md │ ├── 13_utility_lib.md │ ├── 14_python_extern_proc.md │ ├── 15_mcp_server.md │ └── README.md ├── po/ │ ├── LINGUAS │ ├── Makevars │ ├── POTFILES.in │ ├── getstring.pl │ ├── translate.php │ └── update_translation.sh ├── py-compile ├── scripts/ │ ├── create_iodoc │ ├── lib.sh │ ├── linux/ │ │ ├── after_success.sh │ │ ├── install.sh │ │ └── script.sh │ └── osx/ │ ├── after_success.sh │ ├── install.sh │ └── script.sh ├── src/ │ ├── Makefile.am │ ├── bin/ │ │ ├── Makefile.am │ │ ├── calaos_mcp/ │ │ │ ├── Makefile.am │ │ │ ├── calaos_mcp │ │ │ ├── calaos_mcp.in │ │ │ └── python/ │ │ │ └── calaos_mcp/ │ │ │ ├── __init__.py │ │ │ ├── __main__.py │ │ │ ├── auth.py │ │ │ ├── client.py │ │ │ ├── config.py │ │ │ ├── models.py │ │ │ ├── safety.py │ │ │ ├── server.py │ │ │ └── tools/ │ │ │ ├── __init__.py │ │ │ ├── _home.py │ │ │ ├── audio.py │ │ │ ├── io.py │ │ │ ├── rooms.py │ │ │ └── scenario.py │ │ ├── calaos_server/ │ │ │ ├── Audio/ │ │ │ │ ├── AVRDenon.cpp │ │ │ │ ├── AVRDenon.h │ │ │ │ ├── AVRManager.cpp │ │ │ │ ├── AVRManager.h │ │ │ │ ├── AVRMarantz.cpp │ │ │ │ ├── AVRMarantz.h │ │ │ │ ├── AVROnkyo.cpp │ │ │ │ ├── AVROnkyo.h │ │ │ │ ├── AVRPioneer.cpp │ │ │ │ ├── AVRPioneer.h │ │ │ │ ├── AVRRose.cpp │ │ │ │ ├── AVRRose.h │ │ │ │ ├── AVRRoseNotifServer.cpp │ │ │ │ ├── AVRRoseNotifServer.h │ │ │ │ ├── AVRYamaha.cpp │ │ │ │ ├── AVRYamaha.h │ │ │ │ ├── AVReceiver.cpp │ │ │ │ ├── AVReceiver.h │ │ │ │ ├── AudioDB.cpp │ │ │ │ ├── AudioDB.h │ │ │ │ ├── AudioPlayer.cpp │ │ │ │ ├── AudioPlayer.h │ │ │ │ ├── AudioPlayerData.h │ │ │ │ ├── ExternProcRoon_main.py │ │ │ │ ├── RoonPlayer.cpp │ │ │ │ ├── RoonPlayer.h │ │ │ │ ├── Squeezebox.cpp │ │ │ │ ├── Squeezebox.h │ │ │ │ ├── SqueezeboxDB.cpp │ │ │ │ ├── SqueezeboxDB.h │ │ │ │ ├── calaos_roon.in │ │ │ │ └── hifi_rose_API.md │ │ │ ├── Calaos.cpp │ │ │ ├── Calaos.h │ │ │ ├── CalaosConfig.cpp │ │ │ ├── CalaosConfig.h │ │ │ ├── DataLogger.cpp │ │ │ ├── DataLogger.h │ │ │ ├── EventManager.cpp │ │ │ ├── EventManager.h │ │ │ ├── HistLogger.cpp │ │ │ ├── HistLogger.h │ │ │ ├── HttpClient.cpp │ │ │ ├── HttpClient.h │ │ │ ├── HttpCodes.h │ │ │ ├── HttpServer.cpp │ │ │ ├── HttpServer.h │ │ │ ├── IO/ │ │ │ │ ├── AnalogIO.cpp │ │ │ │ ├── AnalogIO.h │ │ │ │ ├── ExternProc.cpp │ │ │ │ ├── ExternProc.h │ │ │ │ ├── Gpio/ │ │ │ │ │ ├── GpioCtrl.cpp │ │ │ │ │ ├── GpioCtrl.h │ │ │ │ │ ├── GpioInputSwitch.cpp │ │ │ │ │ ├── GpioInputSwitch.h │ │ │ │ │ ├── GpioInputSwitchLongPress.cpp │ │ │ │ │ ├── GpioInputSwitchLongPress.h │ │ │ │ │ ├── GpioInputSwitchTriple.cpp │ │ │ │ │ ├── GpioInputSwitchTriple.h │ │ │ │ │ ├── GpioOutputShutter.cpp │ │ │ │ │ ├── GpioOutputShutter.h │ │ │ │ │ ├── GpioOutputShutterSmart.cpp │ │ │ │ │ ├── GpioOutputShutterSmart.h │ │ │ │ │ ├── GpioOutputSwitch.cpp │ │ │ │ │ └── GpioOutputSwitch.h │ │ │ │ ├── Hue/ │ │ │ │ │ ├── HueOutputLightRGB.cpp │ │ │ │ │ └── HueOutputLightRGB.h │ │ │ │ ├── IODoc.cpp │ │ │ │ ├── IODoc.h │ │ │ │ ├── IOFactory.cpp │ │ │ │ ├── IOFactory.h │ │ │ │ ├── InPlageHoraire.cpp │ │ │ │ ├── InPlageHoraire.h │ │ │ │ ├── InputAnalog.cpp │ │ │ │ ├── InputAnalog.h │ │ │ │ ├── InputString.cpp │ │ │ │ ├── InputString.h │ │ │ │ ├── InputSwitch.cpp │ │ │ │ ├── InputSwitch.h │ │ │ │ ├── InputSwitchLongPress.cpp │ │ │ │ ├── InputSwitchLongPress.h │ │ │ │ ├── InputSwitchTriple.cpp │ │ │ │ ├── InputSwitchTriple.h │ │ │ │ ├── InputTemp.cpp │ │ │ │ ├── InputTemp.h │ │ │ │ ├── InputTime.cpp │ │ │ │ ├── InputTime.h │ │ │ │ ├── InputTimer.cpp │ │ │ │ ├── InputTimer.h │ │ │ │ ├── IntValue.cpp │ │ │ │ ├── IntValue.h │ │ │ │ ├── KNX/ │ │ │ │ │ ├── KNXBase.cpp │ │ │ │ │ ├── KNXBase.h │ │ │ │ │ ├── KNXCtrl.cpp │ │ │ │ │ ├── KNXCtrl.h │ │ │ │ │ ├── KNXExternProc_cli.cpp │ │ │ │ │ ├── KNXExternProc_main.cpp │ │ │ │ │ ├── KNXExternProc_main.h │ │ │ │ │ ├── KNXInputAnalog.cpp │ │ │ │ │ ├── KNXInputAnalog.h │ │ │ │ │ ├── KNXInputSwitch.cpp │ │ │ │ │ ├── KNXInputSwitch.h │ │ │ │ │ ├── KNXInputSwitchLongPress.cpp │ │ │ │ │ ├── KNXInputSwitchLongPress.h │ │ │ │ │ ├── KNXInputSwitchTriple.cpp │ │ │ │ │ ├── KNXInputSwitchTriple.h │ │ │ │ │ ├── KNXInputTemp.cpp │ │ │ │ │ ├── KNXInputTemp.h │ │ │ │ │ ├── KNXOutputAnalog.cpp │ │ │ │ │ ├── KNXOutputAnalog.h │ │ │ │ │ ├── KNXOutputLight.cpp │ │ │ │ │ ├── KNXOutputLight.h │ │ │ │ │ ├── KNXOutputLightDimmer.cpp │ │ │ │ │ ├── KNXOutputLightDimmer.h │ │ │ │ │ ├── KNXOutputLightRGB.cpp │ │ │ │ │ ├── KNXOutputLightRGB.h │ │ │ │ │ ├── KNXOutputShutter.cpp │ │ │ │ │ ├── KNXOutputShutter.h │ │ │ │ │ ├── KNXOutputShutterSmart.cpp │ │ │ │ │ └── KNXOutputShutterSmart.h │ │ │ │ ├── LAN/ │ │ │ │ │ ├── PingInputSwitch.cpp │ │ │ │ │ ├── PingInputSwitch.h │ │ │ │ │ ├── WOLOutputBool.cpp │ │ │ │ │ └── WOLOutputBool.h │ │ │ │ ├── Mqtt/ │ │ │ │ │ ├── MqttBrokersList.h │ │ │ │ │ ├── MqttBrokerslist.cpp │ │ │ │ │ ├── MqttCtrl.cpp │ │ │ │ │ ├── MqttCtrl.h │ │ │ │ │ ├── MqttExternProc_main.cpp │ │ │ │ │ ├── MqttInputAnalog.cpp │ │ │ │ │ ├── MqttInputAnalog.h │ │ │ │ │ ├── MqttInputString.cpp │ │ │ │ │ ├── MqttInputString.h │ │ │ │ │ ├── MqttInputSwitch.cpp │ │ │ │ │ ├── MqttInputSwitch.h │ │ │ │ │ ├── MqttInputTemp.cpp │ │ │ │ │ ├── MqttInputTemp.h │ │ │ │ │ ├── MqttOutputAnalog.cpp │ │ │ │ │ ├── MqttOutputAnalog.h │ │ │ │ │ ├── MqttOutputLight.cpp │ │ │ │ │ ├── MqttOutputLight.h │ │ │ │ │ ├── MqttOutputLightDimmer.cpp │ │ │ │ │ ├── MqttOutputLightDimmer.h │ │ │ │ │ ├── MqttOutputLightRGB.cpp │ │ │ │ │ ├── MqttOutputLightRGB.h │ │ │ │ │ ├── MqttOutputShutter.cpp │ │ │ │ │ └── MqttOutputShutter.h │ │ │ │ ├── MySensors/ │ │ │ │ │ ├── MySensors.cpp │ │ │ │ │ ├── MySensors.h │ │ │ │ │ ├── MySensorsController.cpp │ │ │ │ │ ├── MySensorsController.h │ │ │ │ │ ├── MySensorsControllerList.cpp │ │ │ │ │ ├── MySensorsControllerList.h │ │ │ │ │ ├── MySensorsInputAnalog.cpp │ │ │ │ │ ├── MySensorsInputAnalog.h │ │ │ │ │ ├── MySensorsInputString.cpp │ │ │ │ │ ├── MySensorsInputString.h │ │ │ │ │ ├── MySensorsInputSwitch.cpp │ │ │ │ │ ├── MySensorsInputSwitch.h │ │ │ │ │ ├── MySensorsInputSwitchLongPress.cpp │ │ │ │ │ ├── MySensorsInputSwitchLongPress.h │ │ │ │ │ ├── MySensorsInputSwitchTriple.cpp │ │ │ │ │ ├── MySensorsInputSwitchTriple.h │ │ │ │ │ ├── MySensorsInputTemp.cpp │ │ │ │ │ ├── MySensorsInputTemp.h │ │ │ │ │ ├── MySensorsOutputAnalog.cpp │ │ │ │ │ ├── MySensorsOutputAnalog.h │ │ │ │ │ ├── MySensorsOutputDimmer.cpp │ │ │ │ │ ├── MySensorsOutputDimmer.h │ │ │ │ │ ├── MySensorsOutputLight.cpp │ │ │ │ │ ├── MySensorsOutputLight.h │ │ │ │ │ ├── MySensorsOutputLightRGB.cpp │ │ │ │ │ ├── MySensorsOutputLightRGB.h │ │ │ │ │ ├── MySensorsOutputShutter.cpp │ │ │ │ │ ├── MySensorsOutputShutter.h │ │ │ │ │ ├── MySensorsOutputShutterSmart.cpp │ │ │ │ │ ├── MySensorsOutputShutterSmart.h │ │ │ │ │ ├── MySensorsOutputString.cpp │ │ │ │ │ └── MySensorsOutputString.h │ │ │ │ ├── OLA/ │ │ │ │ │ ├── OLACtrl.cpp │ │ │ │ │ ├── OLACtrl.h │ │ │ │ │ ├── OLAExternProc_main.cpp │ │ │ │ │ ├── OLAOutputLightDimmer.cpp │ │ │ │ │ ├── OLAOutputLightDimmer.h │ │ │ │ │ ├── OLAOutputLightRGB.cpp │ │ │ │ │ └── OLAOutputLightRGB.h │ │ │ │ ├── OneWire/ │ │ │ │ │ ├── OWCtrl.cpp │ │ │ │ │ ├── OWCtrl.h │ │ │ │ │ ├── OWExternProc_main.cpp │ │ │ │ │ ├── OWTemp.cpp │ │ │ │ │ └── OWTemp.h │ │ │ │ ├── OutputAnalog.cpp │ │ │ │ ├── OutputAnalog.h │ │ │ │ ├── OutputFake.cpp │ │ │ │ ├── OutputFake.h │ │ │ │ ├── OutputLight.cpp │ │ │ │ ├── OutputLight.h │ │ │ │ ├── OutputLightDimmer.cpp │ │ │ │ ├── OutputLightDimmer.h │ │ │ │ ├── OutputLightRGB.cpp │ │ │ │ ├── OutputLightRGB.h │ │ │ │ ├── OutputShutter.cpp │ │ │ │ ├── OutputShutter.h │ │ │ │ ├── OutputShutterSmart.cpp │ │ │ │ ├── OutputShutterSmart.h │ │ │ │ ├── OutputString.cpp │ │ │ │ ├── OutputString.h │ │ │ │ ├── RemoteUI/ │ │ │ │ │ ├── RemoteUI.cpp │ │ │ │ │ ├── RemoteUI.h │ │ │ │ │ ├── RemoteUIOutputRelay.cpp │ │ │ │ │ └── RemoteUIOutputRelay.h │ │ │ │ ├── Reolink/ │ │ │ │ │ ├── ExternProcReolink_main.py │ │ │ │ │ ├── ReolinkCtrl.cpp │ │ │ │ │ ├── ReolinkCtrl.h │ │ │ │ │ ├── ReolinkInputSwitch.cpp │ │ │ │ │ ├── ReolinkInputSwitch.h │ │ │ │ │ ├── calaos_reolink │ │ │ │ │ └── calaos_reolink.in │ │ │ │ ├── Scenario.cpp │ │ │ │ ├── Scenario.h │ │ │ │ ├── Wago/ │ │ │ │ │ ├── WIAnalog.cpp │ │ │ │ │ ├── WIAnalog.h │ │ │ │ │ ├── WIDigitalBP.cpp │ │ │ │ │ ├── WIDigitalBP.h │ │ │ │ │ ├── WIDigitalLong.cpp │ │ │ │ │ ├── WIDigitalLong.h │ │ │ │ │ ├── WIDigitalTriple.cpp │ │ │ │ │ ├── WIDigitalTriple.h │ │ │ │ │ ├── WITemp.cpp │ │ │ │ │ ├── WITemp.h │ │ │ │ │ ├── WOAnalog.cpp │ │ │ │ │ ├── WOAnalog.h │ │ │ │ │ ├── WODali.cpp │ │ │ │ │ ├── WODali.h │ │ │ │ │ ├── WODaliRVB.cpp │ │ │ │ │ ├── WODaliRVB.h │ │ │ │ │ ├── WODigital.cpp │ │ │ │ │ ├── WODigital.h │ │ │ │ │ ├── WOVolet.cpp │ │ │ │ │ ├── WOVolet.h │ │ │ │ │ ├── WOVoletSmart.cpp │ │ │ │ │ ├── WOVoletSmart.h │ │ │ │ │ ├── WagoCtrl.cpp │ │ │ │ │ ├── WagoCtrl.h │ │ │ │ │ ├── WagoExternProc_main.cpp │ │ │ │ │ ├── WagoMap.cpp │ │ │ │ │ ├── WagoMap.h │ │ │ │ │ └── libmbus/ │ │ │ │ │ ├── mbus.c │ │ │ │ │ ├── mbus.h │ │ │ │ │ ├── mbus_cmd.c │ │ │ │ │ ├── mbus_conf.h │ │ │ │ │ ├── mbus_rqst.c │ │ │ │ │ └── mbus_sock.c │ │ │ │ ├── Web/ │ │ │ │ │ ├── WebCtrl.cpp │ │ │ │ │ ├── WebCtrl.h │ │ │ │ │ ├── WebDocBase.cpp │ │ │ │ │ ├── WebDocBase.h │ │ │ │ │ ├── WebInputAnalog.cpp │ │ │ │ │ ├── WebInputAnalog.h │ │ │ │ │ ├── WebInputString.cpp │ │ │ │ │ ├── WebInputString.h │ │ │ │ │ ├── WebInputTemp.cpp │ │ │ │ │ ├── WebInputTemp.h │ │ │ │ │ ├── WebOutputAnalog.cpp │ │ │ │ │ ├── WebOutputAnalog.h │ │ │ │ │ ├── WebOutputLight.cpp │ │ │ │ │ ├── WebOutputLight.h │ │ │ │ │ ├── WebOutputLightRGB.cpp │ │ │ │ │ ├── WebOutputLightRGB.h │ │ │ │ │ ├── WebOutputString.cpp │ │ │ │ │ └── WebOutputString.h │ │ │ │ └── io_types.txt │ │ │ ├── IOBase.cpp │ │ │ ├── IOBase.h │ │ │ ├── IPCam/ │ │ │ │ ├── Axis.cpp │ │ │ │ ├── Axis.h │ │ │ │ ├── Foscam.cpp │ │ │ │ ├── Foscam.h │ │ │ │ ├── Gadspot.cpp │ │ │ │ ├── Gadspot.h │ │ │ │ ├── IPCam.cpp │ │ │ │ ├── IPCam.h │ │ │ │ ├── Planet.cpp │ │ │ │ ├── Planet.h │ │ │ │ ├── StandardMjpeg.cpp │ │ │ │ ├── StandardMjpeg.h │ │ │ │ ├── SynoSurveillanceStation.cpp │ │ │ │ └── SynoSurveillanceStation.h │ │ │ ├── JsonApi.cpp │ │ │ ├── JsonApi.h │ │ │ ├── JsonApiHandlerHttp.cpp │ │ │ ├── JsonApiHandlerHttp.h │ │ │ ├── JsonApiHandlerWS.cpp │ │ │ ├── JsonApiHandlerWS.h │ │ │ ├── ListeRoom.cpp │ │ │ ├── ListeRoom.h │ │ │ ├── ListeRule.cpp │ │ │ ├── ListeRule.h │ │ │ ├── LuaScript/ │ │ │ │ ├── Lunar.h │ │ │ │ ├── ScriptBindings.cpp │ │ │ │ ├── ScriptBindings.h │ │ │ │ ├── ScriptExec.cpp │ │ │ │ ├── ScriptExec.h │ │ │ │ ├── ScriptExtern_main.cpp │ │ │ │ ├── ScriptManager.cpp │ │ │ │ └── ScriptManager.h │ │ │ ├── Makefile.am │ │ │ ├── McpProxyHandler.cpp │ │ │ ├── McpProxyHandler.h │ │ │ ├── McpServerManager.cpp │ │ │ ├── McpServerManager.h │ │ │ ├── NotifManager.cpp │ │ │ ├── NotifManager.h │ │ │ ├── PollListenner.cpp │ │ │ ├── PollListenner.h │ │ │ ├── RemoteUI/ │ │ │ │ ├── AuthFailureReason.h │ │ │ │ ├── FirmwareManifest.cpp │ │ │ │ ├── FirmwareManifest.h │ │ │ │ ├── HMACAuthenticator.cpp │ │ │ │ ├── HMACAuthenticator.h │ │ │ │ ├── OtaFirmwareManager.cpp │ │ │ │ ├── OtaFirmwareManager.h │ │ │ │ ├── OtaHttpHandler.cpp │ │ │ │ ├── OtaHttpHandler.h │ │ │ │ ├── RemoteUIManager.cpp │ │ │ │ ├── RemoteUIManager.h │ │ │ │ ├── RemoteUIProvisioningHandler.cpp │ │ │ │ ├── RemoteUIProvisioningHandler.h │ │ │ │ ├── RemoteUISecurityLimits.h │ │ │ │ ├── RemoteUIWebSocketHandler.cpp │ │ │ │ ├── RemoteUIWebSocketHandler.h │ │ │ │ └── remote-ui.md │ │ │ ├── Room.cpp │ │ │ ├── Room.h │ │ │ ├── Rule.cpp │ │ │ ├── Rule.h │ │ │ ├── Rules/ │ │ │ │ ├── Action.cpp │ │ │ │ ├── Action.h │ │ │ │ ├── ActionMail.cpp │ │ │ │ ├── ActionMail.h │ │ │ │ ├── ActionPush.cpp │ │ │ │ ├── ActionPush.h │ │ │ │ ├── ActionScript.cpp │ │ │ │ ├── ActionScript.h │ │ │ │ ├── ActionStd.cpp │ │ │ │ ├── ActionStd.h │ │ │ │ ├── ActionTouchscreen.cpp │ │ │ │ ├── ActionTouchscreen.h │ │ │ │ ├── Condition.cpp │ │ │ │ ├── Condition.h │ │ │ │ ├── ConditionOutput.cpp │ │ │ │ ├── ConditionOutput.h │ │ │ │ ├── ConditionScript.cpp │ │ │ │ ├── ConditionScript.h │ │ │ │ ├── ConditionStart.cpp │ │ │ │ ├── ConditionStart.h │ │ │ │ ├── ConditionStd.cpp │ │ │ │ ├── ConditionStd.h │ │ │ │ ├── RulesFactory.cpp │ │ │ │ └── RulesFactory.h │ │ │ ├── Scenario/ │ │ │ │ ├── AutoScenario.cpp │ │ │ │ └── AutoScenario.h │ │ │ ├── UDPServer.cpp │ │ │ ├── UDPServer.h │ │ │ ├── WebSocket.cpp │ │ │ ├── WebSocket.h │ │ │ ├── main.cpp │ │ │ └── version.h │ │ └── tools/ │ │ ├── Makefile.am │ │ ├── calaos_config.cpp │ │ ├── calaos_mail.cpp │ │ ├── calaos_picture │ │ └── wago_test.cpp │ └── lib/ │ ├── CalaosModule.h │ ├── Calendar.cpp │ ├── Calendar.h │ ├── ColorUtils.cpp │ ├── ColorUtils.h │ ├── ExpressionEvaluator.cpp │ ├── ExpressionEvaluator.h │ ├── FileUtils.cpp │ ├── FileUtils.h │ ├── Jansson_Addition.h │ ├── Json_Addition.h │ ├── Logger.cpp │ ├── Logger.h │ ├── Makefile.am │ ├── NTPClock.cpp │ ├── NTPClock.h │ ├── Params.cpp │ ├── Params.h │ ├── Prefix.cpp │ ├── Prefix.h │ ├── SHA1.cpp │ ├── SHA1.h │ ├── ThreadedQueue.h │ ├── TimeRange.cpp │ ├── TimeRange.h │ ├── Timer.cpp │ ├── Timer.h │ ├── TinyXML/ │ │ ├── AUTHORS │ │ ├── ChangeLog │ │ ├── NEWS │ │ ├── README │ │ ├── action_store.cpp │ │ ├── action_store.h │ │ ├── byte_stream.h │ │ ├── configure.in │ │ ├── htmlutil.cpp │ │ ├── htmlutil.h │ │ ├── lex_token.h │ │ ├── lex_util.cpp │ │ ├── lex_util.h │ │ ├── main.cpp │ │ ├── node_set.cpp │ │ ├── node_set.h │ │ ├── openoff.xml │ │ ├── rss2_projnews.xml │ │ ├── test.xml │ │ ├── tinystr.cpp │ │ ├── tinystr.h │ │ ├── tinyxml.cpp │ │ ├── tinyxml.h │ │ ├── tinyxmlerror.cpp │ │ ├── tinyxmlparser.cpp │ │ ├── tinyxpath.dsp │ │ ├── tinyxpath.sln │ │ ├── tinyxpath.vcproj │ │ ├── tinyxpath_conf.h │ │ ├── tinyxpath_lib/ │ │ │ ├── tinyxpath_lib.dsp │ │ │ └── tinyxpath_lib.vcproj │ │ ├── tokenlist.cpp │ │ ├── tokenlist.h │ │ ├── xml_util.cpp │ │ ├── xml_util.h │ │ ├── xpath_expression.cpp │ │ ├── xpath_expression.h │ │ ├── xpath_processor.cpp │ │ ├── xpath_processor.h │ │ ├── xpath_stack.cpp │ │ ├── xpath_stack.h │ │ ├── xpath_static.cpp │ │ ├── xpath_static.h │ │ ├── xpath_stream.cpp │ │ ├── xpath_stream.h │ │ ├── xpath_syntax.cpp │ │ └── xpath_syntax.h │ ├── UrlDownloader.cpp │ ├── UrlDownloader.h │ ├── Utils.cpp │ ├── Utils.h │ ├── WebSocketFrame.cpp │ ├── WebSocketFrame.h │ ├── base64.cpp │ ├── base64.h │ ├── calaos-python/ │ │ ├── Makefile.am │ │ ├── README.md │ │ ├── __init__.py │ │ ├── calaos_extern_proc/ │ │ │ ├── __init__.py │ │ │ ├── extern_proc.py │ │ │ ├── logger.py │ │ │ └── message.py │ │ └── setup.py │ ├── exprtk/ │ │ ├── exprtk.hpp │ │ ├── exprtk_benchmark.cpp │ │ ├── exprtk_functional_ext_test.txt │ │ ├── exprtk_functional_test.txt │ │ ├── exprtk_simple_example_01.cpp │ │ ├── exprtk_simple_example_02.cpp │ │ ├── exprtk_simple_example_03.cpp │ │ ├── exprtk_simple_example_04.cpp │ │ ├── exprtk_simple_example_05.cpp │ │ ├── exprtk_simple_example_06.cpp │ │ ├── exprtk_simple_example_07.cpp │ │ ├── exprtk_simple_example_08.cpp │ │ ├── exprtk_simple_example_09.cpp │ │ ├── exprtk_simple_example_10.cpp │ │ ├── exprtk_simple_example_11.cpp │ │ ├── exprtk_simple_example_12.cpp │ │ ├── exprtk_simple_example_13.cpp │ │ ├── exprtk_simple_example_14.cpp │ │ ├── exprtk_simple_example_15.cpp │ │ ├── exprtk_simple_example_16.cpp │ │ ├── exprtk_simple_example_17.cpp │ │ ├── exprtk_simple_example_18.cpp │ │ ├── exprtk_simple_example_19.cpp │ │ ├── exprtk_simple_example_20.cpp │ │ ├── exprtk_simple_example_21.cpp │ │ ├── exprtk_simple_example_22.cpp │ │ ├── exprtk_simple_example_23.cpp │ │ ├── exprtk_simple_example_24.cpp │ │ ├── exprtk_test.cpp │ │ ├── license.txt │ │ └── readme.txt │ ├── json.hpp │ ├── libquickmail/ │ │ ├── AUTHORS │ │ ├── COPYING │ │ ├── ChangeLog │ │ ├── INSTALL │ │ ├── INSTALL.msys │ │ ├── License.txt │ │ ├── Makefile.am │ │ ├── NEWS │ │ ├── README │ │ ├── autogen.sh │ │ ├── config.h.in │ │ ├── configure.ac │ │ ├── doc/ │ │ │ └── Doxyfile │ │ ├── doxygen_dev.cfg │ │ ├── libquickmail.workspace │ │ ├── libquickmail_shared.cbp │ │ ├── libquickmail_static.cbp │ │ ├── m4/ │ │ │ ├── libtool.m4 │ │ │ ├── ltoptions.m4 │ │ │ ├── ltsugar.m4 │ │ │ ├── ltversion.m4 │ │ │ └── lt~obsolete.m4 │ │ ├── make_release.sh │ │ ├── man1/ │ │ │ └── quickmail.1 │ │ ├── quickmail.c │ │ ├── quickmail.h │ │ ├── quickmail_shared.cbp │ │ ├── quickmail_static.cbp │ │ ├── quickmail_static_nolib.cbp │ │ ├── quickmailprog.c │ │ ├── smtpsocket.c │ │ ├── smtpsocket.h │ │ ├── test.cbp │ │ ├── test_libquickmail_shared.cbp │ │ ├── test_libquickmail_static.cbp │ │ ├── test_nocurl.cbp │ │ └── test_quickmail.c │ ├── libuvw.h │ ├── llhttp/ │ │ ├── .gitignore │ │ ├── CMakeLists.txt │ │ ├── LICENSE │ │ ├── LICENSE-MIT │ │ ├── README.md │ │ ├── common.gypi │ │ ├── include/ │ │ │ └── llhttp.h │ │ ├── libllhttp.pc.in │ │ ├── llhttp.gyp │ │ └── src/ │ │ ├── api.c │ │ ├── http.c │ │ └── llhttp.c │ ├── sigc_fix_functor.h │ ├── sole/ │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── demo.cc │ │ ├── sole.cpp │ │ ├── sole.cxx │ │ ├── sole.fwd.hpp │ │ └── sole.hpp │ ├── sqlite_modern_cpp/ │ │ ├── .travis.yml │ │ ├── License.txt │ │ ├── README.md │ │ ├── configure.ac │ │ ├── hdr/ │ │ │ ├── sqlite_modern_cpp/ │ │ │ │ ├── errors.h │ │ │ │ ├── lists/ │ │ │ │ │ └── error_codes.h │ │ │ │ ├── log.h │ │ │ │ ├── sqlcipher.h │ │ │ │ └── utility/ │ │ │ │ ├── function_traits.h │ │ │ │ ├── uncaught_exceptions.h │ │ │ │ ├── utf16_utf8.h │ │ │ │ └── variant.h │ │ │ └── sqlite_modern_cpp.h │ │ ├── sqlite_modern_cpp.pc.in │ │ └── tests/ │ │ ├── blob_example.cc │ │ ├── boost_optional.cc │ │ ├── error_log.cc │ │ ├── error_log2.cc │ │ ├── exception_dont_execute.cc │ │ ├── exception_dont_execute_nested.cc │ │ ├── exceptions.cc │ │ ├── extended_exceptions.cc │ │ ├── flags.cc │ │ ├── functions.cc │ │ ├── functors.cc │ │ ├── lvalue_functor_example.cc │ │ ├── mov_ctor.cc │ │ ├── nullptr_uniqueptr.cc │ │ ├── prepared_statment.cc │ │ ├── readme_example.cc │ │ ├── shared_connection.cc │ │ ├── simple_examples.cc │ │ ├── sqlcipher.cc │ │ ├── std_optional.cc │ │ ├── trycatchblocks.cc │ │ └── variant.cc │ ├── sunset.c │ ├── sunset.h │ ├── tcpsocket.cpp │ ├── tcpsocket.h │ ├── uri_parser/ │ │ ├── hef_uri_syntax.cpp │ │ ├── hef_uri_syntax.h │ │ └── hef_uri_syntax.txt │ └── uvw/ │ ├── .gitignore │ ├── .gitmodules │ ├── .travis.yml │ ├── AUTHORS │ ├── CMakeLists.txt │ ├── LICENSE │ ├── README.md │ ├── TODO │ ├── appveyor.yml │ ├── cmake/ │ │ ├── in/ │ │ │ ├── googletest.in │ │ │ └── libuv.in │ │ └── modules/ │ │ ├── FindGoogleTest.cmake │ │ ├── FindLibRt.cmake │ │ └── FindUV.cmake │ ├── deps/ │ │ └── .gitignore │ ├── deps.bat │ ├── deps.sh │ ├── docs/ │ │ ├── CMakeLists.txt │ │ ├── LICENSE │ │ ├── doxy.in │ │ └── extra.dox │ ├── src/ │ │ ├── uvw/ │ │ │ ├── async.hpp │ │ │ ├── check.hpp │ │ │ ├── dns.hpp │ │ │ ├── emitter.hpp │ │ │ ├── fs.hpp │ │ │ ├── fs_event.hpp │ │ │ ├── fs_poll.hpp │ │ │ ├── handle.hpp │ │ │ ├── idle.hpp │ │ │ ├── lib.hpp │ │ │ ├── loop.hpp │ │ │ ├── pipe.hpp │ │ │ ├── poll.hpp │ │ │ ├── prepare.hpp │ │ │ ├── process.hpp │ │ │ ├── request.hpp │ │ │ ├── resource.hpp │ │ │ ├── signal.hpp │ │ │ ├── stream.hpp │ │ │ ├── tcp.hpp │ │ │ ├── thread.hpp │ │ │ ├── timer.hpp │ │ │ ├── tty.hpp │ │ │ ├── udp.hpp │ │ │ ├── underlying_type.hpp │ │ │ ├── util.hpp │ │ │ └── work.hpp │ │ └── uvw.hpp │ ├── test/ │ │ ├── CMakeLists.txt │ │ ├── main.cpp │ │ ├── odr.cpp │ │ └── uvw/ │ │ ├── async.cpp │ │ ├── check.cpp │ │ ├── dns.cpp │ │ ├── emitter.cpp │ │ ├── file_req.cpp │ │ ├── fs_event.cpp │ │ ├── fs_poll.cpp │ │ ├── fs_req.cpp │ │ ├── handle.cpp │ │ ├── idle.cpp │ │ ├── lib.cpp │ │ ├── loop.cpp │ │ ├── pipe.cpp │ │ ├── poll.cpp │ │ ├── prepare.cpp │ │ ├── process.cpp │ │ ├── request.cpp │ │ ├── resource.cpp │ │ ├── signal.cpp │ │ ├── stream.cpp │ │ ├── tcp.cpp │ │ ├── thread.cpp │ │ ├── timer.cpp │ │ ├── tty.cpp │ │ ├── udp.cpp │ │ ├── underlying_type.cpp │ │ ├── util.cpp │ │ └── work.cpp │ └── travis.sh ├── tests/ │ ├── ColorValue_test.cpp │ ├── ExpressionEvaluator_test.cpp │ ├── FileUtils_test.cpp │ ├── Makefile.am │ ├── WebSocketClient_test.cpp │ └── websockets/ │ ├── fuzzingclient.json │ ├── run_testsuite_client.sh │ └── run_testsuite_server.sh └── version
Copy disabled (too large)
Condensed preview — 784 files, each showing path, character count, and a content snippet. Download the .json file for the full structured content (13,920K chars).
[
{
"path": ".devcontainer/Dockerfile",
"chars": 2126,
"preview": "FROM debian:12-slim as dev\n\nARG APP_VERSION\nLABEL version=$APP_VERSION\n\nENV HOME /opt\nRUN mkdir -p $HOME /build /opt\n\n#r..."
},
{
"path": ".devcontainer/devcontainer.json",
"chars": 1387,
"preview": "// For format details, see https://aka.ms/devcontainer.json. For config options, see the\n{\n\t\"name\": \"Debian12 calaos-ser..."
},
{
"path": ".github/copilot-instructions.md",
"chars": 906,
"preview": "---\napplyTo: \"**\"\n---\n# Project general coding standards\n\n## Naming Conventions\n- Use camelCase for variables, functions..."
},
{
"path": ".github/workflows/docker-publish-dev.yml",
"chars": 2217,
"preview": "name: Build and Publish dev docker image\n\non:\n push:\n branches: [ master ]\n\nenv:\n REGISTRY_IMAGE: ghcr.io/calao..."
},
{
"path": ".github/workflows/docker-publish.yml",
"chars": 2475,
"preview": "name: Build and Publish docker image\n\non:\n workflow_dispatch:\n inputs:\n vincrement:\n description: 'Packa..."
},
{
"path": ".gitignore",
"chars": 1607,
"preview": "# Compiled Object files\n*.slo\n*.lo\n*.o\n\n# Compiled Dynamic libraries\n*.so\n*.dylib\n\n# Compiled Static libraries\n*.lai\n*.l..."
},
{
"path": ".vscode/c_cpp_properties.json",
"chars": 676,
"preview": "{\n \"configurations\": [\n {\n \"name\": \"Linux\",\n \"includePath\": [\n \"${workspa..."
},
{
"path": ".vscode/launch.json",
"chars": 1291,
"preview": "{\n \"version\": \"0.2.0\",\n \"configurations\": [\n\n {\n \"name\": \"(gdb) Launch\",\n \"type\": \"cp..."
},
{
"path": ".vscode/settings.json",
"chars": 1883,
"preview": "{\n \"files.associations\": {\n \"*.tmpl\": \"go-template\",\n \"array\": \"cpp\",\n \"atomic\": \"cpp\",..."
},
{
"path": ".vscode/tasks.json",
"chars": 2401,
"preview": "{\n // See https://go.microsoft.com/fwlink/?LinkId=733558\n // for the documentation about the tasks.json format..."
},
{
"path": "AGENTS.md",
"chars": 13127,
"preview": "# AGENTS.md\n\nThis file provides guidance to LLM Agents when working with code in this repository.\n\n## Documentation\n\nDet..."
},
{
"path": "AUTHORS",
"chars": 80,
"preview": "Raoul Hecky <raoul.hecky@gmail.com>\nNicolas Aguirre <aguirre.nicolas@gmail.com>\n"
},
{
"path": "COPYING",
"chars": 35147,
"preview": " GNU GENERAL PUBLIC LICENSE\n Version 3, 29 June 2007\n\n Copyright (C) 2007 Free..."
},
{
"path": "ChangeLog",
"chars": 2786,
"preview": "24-05-2011 Raoul Hecky\n\n\t\t* Ajout des conditions sur les sorties\n\n30-06-2011 Raoul Hecky\n\n\t\t* Correction du log des te..."
},
{
"path": "Dockerfile",
"chars": 2285,
"preview": "\nFROM debian:12-slim as dev\nENV DEBIAN_FRONTEND noninteractive\n\nARG APP_VERSION\nLABEL version=$APP_VERSION\n\nENV HOME /op..."
},
{
"path": "INSTALL",
"chars": 15749,
"preview": "Installation Instructions\n*************************\n\nCopyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundat..."
},
{
"path": "Makefile.am",
"chars": 1454,
"preview": "ACLOCAL_AMFLAGS = -I m4\n\nSUBDIRS = src data tests\n\nif HAVE_PO\n\nSUBDIRS += po\n\nendif\n\nMAINTAINERCLEANFILES = \\\n$(PACKAGE_..."
},
{
"path": "NEWS",
"chars": 0,
"preview": ""
},
{
"path": "README.md",
"chars": 1093,
"preview": "[Calaos Server](http://www.calaos.fr)\n===============\n\n[\n\nrm -rf autom4te.cache\nrm -f aclocal.m4 ltmain.sh\n\nset -e\n\n#On osx:\n# brew info libtool sa..."
},
{
"path": "configure.ac",
"chars": 9021,
"preview": "\nCALAOS_VERSION\nAC_INIT([calaos],[calaos_version],[team@calaos.fr])\nAC_PREREQ([2.71])\nAC_CONFIG_SRCDIR([configure.ac])\nA..."
},
{
"path": "data/Makefile.am",
"chars": 52,
"preview": "SUBDIRS = debug\n\nMAINTAINERCLEANFILES = Makefile.in\n"
},
{
"path": "data/debug/.editorconfig",
"chars": 415,
"preview": "# EditorConfig helps developers define and maintain consistent\n# coding styles between different editors and IDEs\n# edit..."
},
{
"path": "data/debug/.gitattributes",
"chars": 11,
"preview": "* text=auto"
},
{
"path": "data/debug/.gitignore",
"chars": 35,
"preview": "node_modules\n.tmp\nbower_components\n"
},
{
"path": "data/debug/Gruntfile.js",
"chars": 0,
"preview": ""
},
{
"path": "data/debug/Makefile.am",
"chars": 51,
"preview": "SUBDIRS = dist\n\nMAINTAINERCLEANFILES = Makefile.in\n"
},
{
"path": "data/debug/README.md",
"chars": 111,
"preview": "Install dev tools\n-----------------\n```\nnpm install\ngulp serve\n```\nBefore commit, do a gulp clean + gulp build\n"
},
{
"path": "data/debug/app/debug_websocket.html",
"chars": 4317,
"preview": "<!doctype html>\n<html class=\"no-js\">\n <head>\n <meta charset=\"utf-8\">\n <title>Calaos Debug Page</title>\n <meta..."
},
{
"path": "data/debug/app/index.html",
"chars": 3735,
"preview": "<!doctype html>\n<html class=\"no-js\">\n <head>\n <meta charset=\"utf-8\">\n <title>Calaos Debug Page</title>\n <meta..."
},
{
"path": "data/debug/app/scripts/codemirror.js",
"chars": 1543,
"preview": "'use strict';\n\n// Initialize CodeMirror for the JSON textarea and expose it globally\nwindow.editor = CodeMirror.fromText..."
},
{
"path": "data/debug/app/scripts/main_v2.js",
"chars": 10898,
"preview": "'use strict';\n\nfunction sendRequest(command) {\n if (window.XMLHttpRequest) {\n var http = new XMLHttpRequest();..."
},
{
"path": "data/debug/app/scripts/main_v3.js",
"chars": 10922,
"preview": "'use strict';\n\nvar apiList = [\n '{ \"msg\": \"\" }',\n '{ \"msg\": \"login\", \"msg_id\": \"1234\", \"data\": { \"cn_user\": \"USERN..."
},
{
"path": "data/debug/app/styles/main.css",
"chars": 2031,
"preview": ".browsehappy {\n margin: 0.2em 0;\n background: #ccc;\n color: #000;\n padding: 0.2em 0;\n}\n\n/* Space out content a bit *..."
},
{
"path": "data/debug/dist/Makefile.am",
"chars": 476,
"preview": "\nMAINTAINERCLEANFILES = Makefile.in\n\ndebugdir = $(pkgdatadir)/debug\ndebug_DATA = \\\n\t\t\t index.html \\\n\t\t\t debug_websocket...."
},
{
"path": "data/debug/dist/debug_websocket.html",
"chars": 3150,
"preview": "<!doctype html><html class=\"no-js\"><head><meta charset=\"utf-8\"><title>Calaos Debug Page</title><meta name=\"description\"..."
},
{
"path": "data/debug/dist/index.html",
"chars": 2754,
"preview": "<!doctype html><html class=\"no-js\"><head><meta charset=\"utf-8\"><title>Calaos Debug Page</title><meta name=\"description\"..."
},
{
"path": "data/debug/dist/scripts/codemirror.js",
"chars": 1032,
"preview": "\"use strict\";window.editor=CodeMirror.fromTextArea(document.getElementById(\"message\"),{mode:{name:\"javascript\",json:!0},..."
},
{
"path": "data/debug/dist/scripts/main_v2.js",
"chars": 9138,
"preview": "\"use strict\";function sendRequest(t){if(window.XMLHttpRequest){var e=new XMLHttpRequest;e.open(t,$(\"#urlinput\").val(),!0..."
},
{
"path": "data/debug/dist/scripts/main_v3.js",
"chars": 8511,
"preview": "\"use strict\";var apiList=['{ \"msg\": \"\" }','{ \"msg\": \"login\", \"msg_id\": \"1234\", \"data\": { \"cn_user\": \"USERNAME\", \"cn_pass..."
},
{
"path": "data/debug/dist/scripts/vendor.js",
"chars": 167610,
"preview": "/*!\n * jQuery JavaScript Library v3.7.1\n * https://jquery.com/\n *\n * Copyright OpenJS Foundation and other contributors..."
},
{
"path": "data/debug/dist/styles/main.css",
"chars": 1168,
"preview": ".browsehappy{margin:.2em 0;background:#ccc;color:#000;padding:.2em 0}body{padding-top:40px;padding-bottom:20px}.footer,...."
},
{
"path": "data/debug/dist/styles/vendor.css",
"chars": 232970,
"preview": "@charset \"UTF-8\";/*!\n * Bootstrap v5.3.7 (https://getbootstrap.com/)\n * Copyright 2011-2025 The Bootstrap Authors\n * Li..."
},
{
"path": "data/debug/gulpfile.js",
"chars": 1744,
"preview": "var gulp = require('gulp');\nvar clean = require('gulp-clean');\nvar cleanCSS = require('gulp-clean-css');\nvar htmlmin = r..."
},
{
"path": "data/debug/package.json",
"chars": 470,
"preview": "{\n \"name\": \"debug-www\",\n \"devDependencies\": {\n \"browser-sync\": \"^3.0.4\",\n \"gulp\": \"^5.0.1\",\n \"gulp-clean\": \"^..."
},
{
"path": "doc/00_overview.md",
"chars": 4754,
"preview": "# Calaos Base — Vue d'ensemble de l'architecture\n\n## Qu'est-ce que Calaos ?\n\nCalaos est un serveur de domotique open-sou..."
},
{
"path": "doc/01_core_data_model.md",
"chars": 5980,
"preview": "# Core Data Model — IOBase, Room, ListeRoom, IOFactory\n\n## Vue d'ensemble\n\nLe modèle de données central organise les ent..."
},
{
"path": "doc/02_io_drivers.md",
"chars": 9608,
"preview": "# IO Drivers — Protocoles et types d'IOs\n\n## Architecture commune\n\nTous les drivers héritent de `IOBase`. Ils s'enregist..."
},
{
"path": "doc/03_rules_engine.md",
"chars": 6276,
"preview": "# Rules Engine — Règles, Conditions, Actions\n\n## Vue d'ensemble\n\nLe moteur de règles est le cœur de l'automatisation Cal..."
},
{
"path": "doc/04_scenarios.md",
"chars": 4343,
"preview": "# Scénarios — AutoScenario et Plages Horaires\n\n## Vue d'ensemble\n\nLes scénarios Calaos sont des séquences d'actions prog..."
},
{
"path": "doc/05_audio.md",
"chars": 5315,
"preview": "# Audio — Lecteurs et Amplis AV\n\n## Vue d'ensemble\n\nLe sous-système audio gère deux types de périphériques :\n1. **AudioP..."
},
{
"path": "doc/06_ipcam.md",
"chars": 2038,
"preview": "# IP Cameras — IPCam\n\n## Vue d'ensemble\n\nLe sous-système de caméras IP gère les flux vidéo et les PTZ (Pan-Tilt-Zoom). L..."
},
{
"path": "doc/07_remoteui.md",
"chars": 5674,
"preview": "# RemoteUI — Appareils embarqués connectés\n\n## Vue d'ensemble\n\nLe sous-système RemoteUI permet à des appareils embarqués..."
},
{
"path": "doc/08_http_api.md",
"chars": 8442,
"preview": "# HTTP / WebSocket API — JsonApi\n\n## Vue d'ensemble\n\nLe serveur expose une **API JSON** sur HTTP et WebSocket (port par..."
},
{
"path": "doc/09_lua_scripting.md",
"chars": 3644,
"preview": "# Lua Scripting — Moteur de scripts\n\n## Vue d'ensemble\n\nCalaos intègre un moteur de scripts **LuaJIT** permettant d'écri..."
},
{
"path": "doc/10_events_notifications.md",
"chars": 4205,
"preview": "# Events & Notifications — EventManager, Push, E-mail\n\n## Vue d'ensemble\n\nDeux mécanismes de communication sortante :\n1...."
},
{
"path": "doc/11_config_persistence.md",
"chars": 5611,
"preview": "# Configuration & Persistence\n\n## Vue d'ensemble\n\nLa configuration Calaos est persistée dans trois fichiers XML :\n- `io...."
},
{
"path": "doc/12_extern_proc.md",
"chars": 5518,
"preview": "# ExternProc — Framework de sous-processus IPC\n\n## Vue d'ensemble\n\n`ExternProc` est un framework léger d'IPC (Inter-Proc..."
},
{
"path": "doc/13_utility_lib.md",
"chars": 6222,
"preview": "# Utility Library — Bibliothèque utilitaire\n\n## Vue d'ensemble\n\nLe dossier `src/lib/` contient les utilitaires partagés..."
},
{
"path": "doc/14_python_extern_proc.md",
"chars": 8526,
"preview": "# Drivers Python — calaos_extern_proc\n\n## Vue d'ensemble\n\nCertains drivers ExternProc sont écrits en **Python 3** plutôt..."
},
{
"path": "doc/15_mcp_server.md",
"chars": 13538,
"preview": "# Serveur MCP — calaos_mcp\n\n## Vue d'ensemble\n\n`calaos_mcp` est un **sidecar Python** qui expose l'installation domotiqu..."
},
{
"path": "doc/README.md",
"chars": 1697,
"preview": "# Documentation Calaos Base — Index\n\nDocumentation technique du projet `calaos_base` pour agents LLM.\n\n## Fichiers\n\n| Fi..."
},
{
"path": "po/LINGUAS",
"chars": 87,
"preview": "# Please keep this list sorted alphabetically\nen@boldquot\nen@quot\nde\nes\nfr\nhi\nnb\npl\nru\n"
},
{
"path": "po/Makevars",
"chars": 1811,
"preview": "# Makefile variables for PO directory in any package using GNU gettext.\n\n# Usually the message domain is the same as the..."
},
{
"path": "po/POTFILES.in",
"chars": 20981,
"preview": "./src/bin/calaos_server/Audio/AudioDB.cpp\n./src/bin/calaos_server/Audio/AudioDB.h\n./src/bin/calaos_server/Audio/AudioPla..."
},
{
"path": "po/getstring.pl",
"chars": 1450,
"preview": "#!/usr/bin/perl -w \nuse strict;\nuse warnings;\n\nmy $hackcheck = 0;\nmy @mids;\nmy @mstr;\n\n\n# by default pass calaos.pot for..."
},
{
"path": "po/translate.php",
"chars": 4000,
"preview": "<?php\n\n/**\n * Google Translate PHP class\n *\n * @author Levan Velijanashvili <me@stichoza.com>\n * @link http:..."
},
{
"path": "po/update_translation.sh",
"chars": 2522,
"preview": "#!/bin/bash\n\nset -e # Stop on error\n\n# Colors for display\nRED='\\033[0;31m'\nGREEN='\\033[0;32m'\nYELLOW='\\033[1;33m'\nNC='\\..."
},
{
"path": "py-compile",
"chars": 5234,
"preview": "#!/bin/sh\n# py-compile - Compile a Python program\n\nscriptversion=2021-02-27.01; # UTC\n\n# Copyright (C) 2000-2021 Free So..."
},
{
"path": "scripts/create_iodoc",
"chars": 881,
"preview": "#!/bin/bash\n\n# This script creates the iodoc.json file from the calaos_server.\n\n#get the path where the script is locate..."
},
{
"path": "scripts/lib.sh",
"chars": 1147,
"preview": "#!/bin/bash\n\nset -e\n\nexport PROJECT_NAME=calaos_base\nexport TRAVIS_BUILD_DIR=$(pwd)\nexport BUILD_TAG=$(git tag --points-..."
},
{
"path": "scripts/linux/after_success.sh",
"chars": 111,
"preview": "#!/bin/bash\nset -ev\n\nSCRIPTDIR=$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\nsource $SCRIPTDIR/../lib.sh\n\n\n"
},
{
"path": "scripts/linux/install.sh",
"chars": 263,
"preview": "#!/bin/bash\n\nset -ev\n\nSCRIPTDIR=$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\nsource $SCRIPTDIR/../lib.sh\n\n#Start ou..."
},
{
"path": "scripts/linux/script.sh",
"chars": 163,
"preview": "#!/bin/bash\nset -ev\n\nSCRIPTDIR=$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\nsource $SCRIPTDIR/../lib.sh\n\ndocker exe..."
},
{
"path": "scripts/osx/after_success.sh",
"chars": 111,
"preview": "#!/bin/bash\nset -ev\n\nSCRIPTDIR=$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\nsource $SCRIPTDIR/../lib.sh\n\n\n"
},
{
"path": "scripts/osx/install.sh",
"chars": 635,
"preview": "#!/bin/bash\n\nset -ev\n\nSCRIPTDIR=$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\nsource $SCRIPTDIR/../lib.sh\n\n#install..."
},
{
"path": "scripts/osx/script.sh",
"chars": 391,
"preview": "#!/bin/bash\nset -ev\n\nSCRIPTDIR=$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\nsource $SCRIPTDIR/../lib.sh\n\npushd $TRA..."
},
{
"path": "src/Makefile.am",
"chars": 54,
"preview": "SUBDIRS = lib bin\n\nMAINTAINERCLEANFILES = Makefile.in\n"
},
{
"path": "src/bin/Makefile.am",
"chars": 77,
"preview": "SUBDIRS = calaos_server calaos_mcp tools\n\nMAINTAINERCLEANFILES = Makefile.in\n"
},
{
"path": "src/bin/calaos_mcp/Makefile.am",
"chars": 1011,
"preview": "MAINTAINERCLEANFILES = Makefile.in\n\n# Install locations for the Python package.\ncalaosmcpdir = $(prefix)/lib/calao..."
},
{
"path": "src/bin/calaos_mcp/calaos_mcp",
"chars": 254,
"preview": "#!/bin/bash\n# Wrapper script for the calaos_mcp Python sidecar.\n# Generated from calaos_mcp.in by configure.\nCALAOS_PREF..."
},
{
"path": "src/bin/calaos_mcp/calaos_mcp.in",
"chars": 246,
"preview": "#!/bin/bash\n# Wrapper script for the calaos_mcp Python sidecar.\n# Generated from calaos_mcp.in by configure.\nCALAOS_PREF..."
},
{
"path": "src/bin/calaos_mcp/python/calaos_mcp/__init__.py",
"chars": 230,
"preview": "\"\"\"Calaos MCP sidecar package.\n\nExposes the Calaos home automation API via the Model Context Protocol so that\nLLM client..."
},
{
"path": "src/bin/calaos_mcp/python/calaos_mcp/__main__.py",
"chars": 3169,
"preview": "\"\"\"Entry point for the calaos_mcp sidecar.\n\nListens on a Unix domain socket whose path is given via the\nCALAOS_MCP_SOCKE..."
},
{
"path": "src/bin/calaos_mcp/python/calaos_mcp/auth.py",
"chars": 3836,
"preview": "\"\"\"Bearer token authentication middleware (S7, S11).\n\nValidates Authorization: Bearer <token> using constant-time compar..."
},
{
"path": "src/bin/calaos_mcp/python/calaos_mcp/client.py",
"chars": 4963,
"preview": "\"\"\"Persistent WebSocket client to calaos_server JsonApi.\n\nAuthenticates via login_service (S2 — service-scoped account,..."
},
{
"path": "src/bin/calaos_mcp/python/calaos_mcp/config.py",
"chars": 3279,
"preview": "\"\"\"Configuration for the calaos_mcp sidecar.\n\nReads secrets from local_config.xml (S1 — never from environment variables..."
},
{
"path": "src/bin/calaos_mcp/python/calaos_mcp/models.py",
"chars": 707,
"preview": "\"\"\"Pydantic models for Calaos IO, Room, and Scenario objects.\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import..."
},
{
"path": "src/bin/calaos_mcp/python/calaos_mcp/safety.py",
"chars": 898,
"preview": "\"\"\"Anti-prompt-injection sanitisation (S3).\n\nStrips control characters and ANSI escape sequences from strings returned\nt..."
},
{
"path": "src/bin/calaos_mcp/python/calaos_mcp/server.py",
"chars": 8011,
"preview": "\"\"\"FastMCP application for the calaos_mcp sidecar.\n\nExposes the Calaos home-automation API via the Model Context Protoco..."
},
{
"path": "src/bin/calaos_mcp/python/calaos_mcp/tools/__init__.py",
"chars": 44,
"preview": "\"\"\"MCP tools for Calaos home automation.\"\"\"\n"
},
{
"path": "src/bin/calaos_mcp/python/calaos_mcp/tools/_home.py",
"chars": 1960,
"preview": "\"\"\"Shared helpers for traversing the get_home response.\n\nThe calaos_server get_home action returns:\n\n {\n \"home\":..."
},
{
"path": "src/bin/calaos_mcp/python/calaos_mcp/tools/audio.py",
"chars": 814,
"preview": "\"\"\"MCP tools: audio_control.\"\"\"\n\nfrom __future__ import annotations\n\n_ALLOWED_ACTIONS = frozenset({\n \"play\", \"pause\",..."
},
{
"path": "src/bin/calaos_mcp/python/calaos_mcp/tools/io.py",
"chars": 4584,
"preview": "\"\"\"MCP tools: list_ios, find_io, get_io_state, set_io_state.\"\"\"\n\nfrom __future__ import annotations\n\nimport re\n\nfrom cal..."
},
{
"path": "src/bin/calaos_mcp/python/calaos_mcp/tools/rooms.py",
"chars": 1903,
"preview": "\"\"\"MCP tools: list_rooms and get_room.\"\"\"\n\nfrom __future__ import annotations\n\nfrom calaos_mcp import safety\nfrom calaos..."
},
{
"path": "src/bin/calaos_mcp/python/calaos_mcp/tools/scenario.py",
"chars": 1486,
"preview": "\"\"\"MCP tools: list_scenarios and run_scenario.\"\"\"\n\nfrom __future__ import annotations\n\nfrom calaos_mcp import safety\nfro..."
},
{
"path": "src/bin/calaos_server/Audio/AVRDenon.cpp",
"chars": 9888,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/Audio/AVRDenon.h",
"chars": 1629,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/Audio/AVRManager.cpp",
"chars": 2840,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/Audio/AVRManager.h",
"chars": 1410,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/Audio/AVRMarantz.cpp",
"chars": 10283,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/Audio/AVRMarantz.h",
"chars": 1641,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/Audio/AVROnkyo.cpp",
"chars": 11878,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/Audio/AVROnkyo.h",
"chars": 1801,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/Audio/AVRPioneer.cpp",
"chars": 13921,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/Audio/AVRPioneer.h",
"chars": 1647,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/Audio/AVRRose.cpp",
"chars": 12787,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/Audio/AVRRose.h",
"chars": 2740,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/Audio/AVRRoseNotifServer.cpp",
"chars": 8287,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/Audio/AVRRoseNotifServer.h",
"chars": 2236,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/Audio/AVRYamaha.cpp",
"chars": 11276,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/Audio/AVRYamaha.h",
"chars": 1635,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/Audio/AVReceiver.cpp",
"chars": 10115,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/Audio/AVReceiver.h",
"chars": 5342,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/Audio/AudioDB.cpp",
"chars": 1125,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/Audio/AudioDB.h",
"chars": 3724,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/Audio/AudioPlayer.cpp",
"chars": 5762,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/Audio/AudioPlayer.h",
"chars": 5323,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/Audio/AudioPlayerData.h",
"chars": 2879,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/Audio/ExternProcRoon_main.py",
"chars": 8401,
"preview": "#!/bin/env python3\n\nfrom calaos_extern_proc import cDebugDom, cInfoDom, cErrorDom, cCriticalDom, cWarningDom, configure_..."
},
{
"path": "src/bin/calaos_server/Audio/RoonPlayer.cpp",
"chars": 13950,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/Audio/RoonPlayer.h",
"chars": 7239,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/Audio/Squeezebox.cpp",
"chars": 45473,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/Audio/Squeezebox.h",
"chars": 9649,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/Audio/SqueezeboxDB.cpp",
"chars": 33733,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/Audio/SqueezeboxDB.h",
"chars": 5915,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/Audio/calaos_roon.in",
"chars": 402,
"preview": "#!/bin/bash\nCALAOS_PREFIX=@prefix@\nexport PYTHONPATH=$CALAOS_PREFIX/lib/python:$PYTHONPATH\nexec python3 $CALAOS_PREFIX/l..."
},
{
"path": "src/bin/calaos_server/Audio/hifi_rose_API.md",
"chars": 27162,
"preview": "# Rose RS520 — Full API Reference\n\nReverse-engineered from Rose Connect 5.9.16 (Electron) + Wireshark capture.\n\n---\n\n##..."
},
{
"path": "src/bin/calaos_server/Calaos.cpp",
"chars": 2405,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/Calaos.h",
"chars": 1852,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/CalaosConfig.cpp",
"chars": 9830,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/CalaosConfig.h",
"chars": 1968,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/DataLogger.cpp",
"chars": 7585,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/DataLogger.h",
"chars": 1716,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/EventManager.cpp",
"chars": 5834,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/EventManager.h",
"chars": 3378,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/HistLogger.cpp",
"chars": 15829,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/HistLogger.h",
"chars": 2868,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/HttpClient.cpp",
"chars": 20090,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/HttpClient.h",
"chars": 4311,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/HttpCodes.h",
"chars": 2712,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/HttpServer.cpp",
"chars": 3514,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/HttpServer.h",
"chars": 1685,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/IO/AnalogIO.cpp",
"chars": 3253,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/IO/AnalogIO.h",
"chars": 1192,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/IO/ExternProc.cpp",
"chars": 14878,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/IO/ExternProc.h",
"chars": 4549,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/IO/Gpio/GpioCtrl.cpp",
"chars": 5372,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/IO/Gpio/GpioCtrl.h",
"chars": 2043,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/IO/Gpio/GpioInputSwitch.cpp",
"chars": 2427,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/IO/Gpio/GpioInputSwitch.h",
"chars": 1353,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/IO/Gpio/GpioInputSwitchLongPress.cpp",
"chars": 2380,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/IO/Gpio/GpioInputSwitchLongPress.h",
"chars": 1416,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/IO/Gpio/GpioInputSwitchTriple.cpp",
"chars": 2383,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/IO/Gpio/GpioInputSwitchTriple.h",
"chars": 1395,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/IO/Gpio/GpioOutputShutter.cpp",
"chars": 3048,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/IO/Gpio/GpioOutputShutter.h",
"chars": 1405,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/IO/Gpio/GpioOutputShutterSmart.cpp",
"chars": 3078,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/IO/Gpio/GpioOutputShutterSmart.h",
"chars": 1440,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/IO/Gpio/GpioOutputSwitch.cpp",
"chars": 2100,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/IO/Gpio/GpioOutputSwitch.h",
"chars": 1340,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/IO/Hue/HueOutputLightRGB.cpp",
"chars": 5976,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/IO/Hue/HueOutputLightRGB.h",
"chars": 1595,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/IO/IODoc.cpp",
"chars": 8606,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/IO/IODoc.h",
"chars": 2914,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/IO/IOFactory.cpp",
"chars": 3264,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/IO/IOFactory.h",
"chars": 2370,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/IO/InPlageHoraire.cpp",
"chars": 13541,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/IO/InPlageHoraire.h",
"chars": 3507,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/IO/InputAnalog.cpp",
"chars": 6360,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/IO/InputAnalog.h",
"chars": 1695,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/IO/InputString.cpp",
"chars": 2050,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/IO/InputString.h",
"chars": 1412,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/IO/InputSwitch.cpp",
"chars": 3404,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/IO/InputSwitch.h",
"chars": 1573,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/IO/InputSwitchLongPress.cpp",
"chars": 2953,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/IO/InputSwitchLongPress.h",
"chars": 1564,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/IO/InputSwitchTriple.cpp",
"chars": 3103,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/IO/InputSwitchTriple.h",
"chars": 1786,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/IO/InputTemp.cpp",
"chars": 1411,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/IO/InputTemp.h",
"chars": 1264,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/IO/InputTime.cpp",
"chars": 4079,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/IO/InputTime.h",
"chars": 1504,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/IO/InputTimer.cpp",
"chars": 5646,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/IO/InputTimer.h",
"chars": 1592,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/IO/IntValue.cpp",
"chars": 13492,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/IO/IntValue.h",
"chars": 2123,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/IO/KNX/KNXBase.cpp",
"chars": 2142,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/IO/KNX/KNXBase.h",
"chars": 1349,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/IO/KNX/KNXCtrl.cpp",
"chars": 8259,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/IO/KNX/KNXCtrl.h",
"chars": 3084,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/IO/KNX/KNXExternProc_cli.cpp",
"chars": 14721,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/IO/KNX/KNXExternProc_main.cpp",
"chars": 9371,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/IO/KNX/KNXExternProc_main.h",
"chars": 2938,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/IO/KNX/KNXInputAnalog.cpp",
"chars": 2287,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/IO/KNX/KNXInputAnalog.h",
"chars": 1316,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/IO/KNX/KNXInputSwitch.cpp",
"chars": 2101,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/IO/KNX/KNXInputSwitch.h",
"chars": 1316,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
},
{
"path": "src/bin/calaos_server/IO/KNX/KNXInputSwitchLongPress.cpp",
"chars": 2161,
"preview": "/******************************************************************************\n ** Copyright (c) 2006-2025, Calaos. Al..."
}
]
// ... and 584 more files (download for full content)
About this extraction
This page contains the full source code of the calaos/calaos_base GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 784 files (12.8 MB), approximately 3.4M tokens. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.