Giter Site home page Giter Site logo

calaos / calaos_base Goto Github PK

View Code? Open in Web Editor NEW
159.0 159.0 37.0 11.95 MB

Calaos server

Home Page: https://calaos.fr

License: GNU General Public License v3.0

Shell 0.18% JavaScript 0.69% HTML 0.22% CSS 0.05% Perl 0.03% PHP 0.09% C++ 84.14% C 12.08% Python 0.04% Makefile 0.92% M4 1.07% CMake 0.34% Batchfile 0.03% Roff 0.05% Dockerfile 0.08%
c-plus-plus calaos-server domotic home-automation wago

calaos_base's People

Contributors

clementleger avatar fbu31 avatar fragxpl avatar kamibo avatar lovo63 avatar lvaudoit avatar naguirre avatar raoulh avatar sanbeam avatar vtorri avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

calaos_base's Issues

Wago input actual values aren't loaded at calaosd startup

After startup, all Wago digital inputs are considered false into calaosd, whatever their actual state.
If an initially true input value switches for the first time to false, it is not reported and none of the relevant rules is triggered.
As a conclusion a Wago digital input value in calaosd isn't reliable until it has become true once since last calaosd startup.

Add blinking command to all light IO

For now, impulse action is only available for the "light" output type.
We need to add the same command (simple impulse, impulse with pattern) to all true/false IO like "light_dimmer", "light_rgb", "var_bool".
Maybe also for "analog_out"?

Rename Light into Switch in IO Output

All output must use the name Switch instead of the current name Light for outputs, sometimes on/off outputs are not a light, it's the case for example for heating system.

Add On-Off Solenoid valve variable

Today, for heating, it's only possible to use "light variable" for On-Off solenoid valve.
By click on existing scenario "turn off all lights", the system turn off too the solenoid valves...
A other symbol could be created too.

Add load/save api command

Load and save config files from JSON api. Add that once the json api will be in calaos_server. It allows calaos_installer to load/save config files directly from calaos_server and calaos_server can reload immediatly without restarting.

libvmime absent in wheezy

The Debian build dependencies contain libvmime-dev, however this package doesn't exist in Wheezy (it existed in Squeeze and is still in Sid, but it is absent from Jessie too)...

vmime is used in SendMail.cpp and in JsonApiClient.cpp.

Is there a solution for Wheezy ?

Remove log4cpp

Remove log4cpp and use eina_log instead.
log4cpp adds another dependency wich can be removed by using the standard mechanisms present in EFL.

Making error (ubuntu) with latest version of 04.16

make all-recursive
make[1]:
Entering directory /home/maison/calaos_base' Making all in src make[2]: Entering directory/home/maison/calaos_base/src'
Making all in lib
make[3]:
Entering directory /home/maison/calaos_base/src/lib' make[3]: Nothing to be done forall'.
make[3]: Leaving directory /home/maison/calaos_base/src/lib' Making all in bin make[3]: Entering directory/home/maison/calaos_base/src/bin'
Making all in calaos_server
make[4]: Entering directory /home/maison/calaos_base/src/bin/calaos_server' CXX main.o CXX IO/InputTime.o IO/InputTime.cpp:29:1: error: call of overloaded ‘Registrar(const char [10], <lambda(Params&)>)’ is ambiguous IO/InputTime.cpp:29:1: note: candidates are: In file included from ./ListeRoom.h:39:0, from ./ListeRule.h:31, from IO/InputTime.cpp:23: ./IO/IOFactory.h:39:5: note: Calaos::Registrar::Registrar(std::string,std::function<Calaos::IPCam*(Params&)>) ./IO/IOFactory.h:38:5: note: Calaos::Registrar::Registrar(std::string,std::function<Calaos::AudioPlayer(Params&)>) ./IO/IOFactory.h:37:5: note: Calaos::Registrar::Registrar(std::string,std::function<Calaos::Output*(Params&)>) ./IO/IOFactory.h:36:5: note: Calaos::Registrar::Registrar(std::string, std::function<Calaos::Input*(Params&)>) make[4]: *** [IO/InputTime.o] Error 1 make[4]: Leaving directory/home/maison/calaos_base/src/bin/calaos_server'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory /home/maison/calaos_base/src/bin' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory/home/maison/calaos_base/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/maison/calaos_base'
make: *** [all] Error 2

Add style param to input/output

Add a parameter to IO called "style". It can then be used to display IO differently from their kind like:
style="gauge" can display value in gauge style
style="default"

WebInputAnalog not updating

when using WebInputAnalog as an input with

        <calaos:input coeff_a="0" coeff_b="1" file_type="json" frequency="100000" id="input_69" max="10000" min="-10000" name="pluie 1" path="rain/1h" step="1" type="WebInputAnalog" unit="mm / 1h" url="http://api.openweathermap.org/data/2.5/weather?q=paris"/> 

the input is not updating, only after a server restart it picks up the new values

the strange thing is

        <calaos:input file_type="json" gui_type="analog_in" id="input_63" name="prises" path="watt" period="10000" type="WebInputAnalog" url="http://10.0.0.2/currentcostdata_30.txt" visible="true"/>

is working

Compilation error in calaos_home : commit of 05.11.2014

Compilation error:

views/ActivityWebView.cpp: In member function ‘void ActivityWebView::buttonCallback(void_, Evas_Object_, std::string, std::string)’:
views/ActivityWebView.cpp:220:69: error: ‘elm_web_url_get’ was not declared in this scope
elm_web_uri_get(web));
^
views/ActivityWebView.cpp:224:41: error: ‘elm_web_url_get’ was not declared in this scope
string url = elm_web_uri_get(web);

Some error messages on calaos home

Some error messages, but calaos home works correctly:

for example:

ERR<2230>:elementary elm_button.c:341 elm_button_add() could not add 0x9f5d8f8 as sub object of 0x9f5d4d8

Compilation Bug in ActivityWebView.o / Calaos Base

Here in after the error, for the newest version posted on 07.03 at 7:00pm :
'elm_web_url_set’ was not declared in this scope'

make[3]: Entering directory /home/maison/calaos_base/src/bin/calaos_home' CXX views/ActivityWebView.o views/ActivityWebView.cpp: In member function ‘void ActivityWebView::buttonCallback(void*, Evas_Object*, std::string, std::string)’: views/ActivityWebView.cpp:198:69: error: ‘elm_web_url_get’ was not declared in this scope views/ActivityWebView.cpp:202:41: error: ‘elm_web_url_get’ was not declared in this scope views/ActivityWebView.cpp: In member function ‘void ActivityWebView::goToCallback(std::string)’: views/ActivityWebView.cpp:228:37: error: ‘elm_web_url_set’ was not declared in this scope make[3]: *** [views/ActivityWebView.o] Error 1 make[3]: Leaving directory/home/maison/calaos_base/src/bin/calaos_home'
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory /home/maison/calaos_base/src/bin' make[1]: *** [install-recursive] Error 1 make[1]: Leaving directory/home/maison/calaos_base/src'
make: *** [install-recursive] Error 1

Enhance the datalogger with json api

Remove the cgi binary, and merge it with the JSON api in calaos_server (this depends on the inclusion of the json api into calaos_server). Once it is done displaying graphs on calaos_web/webapp would be easy

Only calaos_server need r/w access to datalogger.eet with that solution

Add PIN code to lock IO

A nice feature to have could be to be able to lock a specific IO with a PIN code. It allows for example to lock a input or output and a specific keyboard would be displayed when trying to modify the variable. It could be used in alarms or to lock critical parts of the configuration (heating control that can only be changed by parents and not childrens...)

Implementation details:

  • add a parameter to an IO, locked="true"
  • when this is found you need to send the PIN code with the action command to actually execute it.
  • the PIN code is stored in local_config.xml
  • maybe having different PIN code to create "groups". It allows to have different kind of access rights. lock_group="parents", lock_group="children"
  • In the GUIs we need to implement a dialpad to enter the code easily.
  • the dialpad can also be used to unlock the screen when it's suspended

Screensaver not working

Hello,

In calaos_home, the screensaver does not work.

  • in the configuration screen, the checkbox is checked
  • in the main screen menu, "auto: off" is specified
  • when I uncheck the checkbox in the configuration screen, I quit and I get back there, the checkbox is checked again
  • in "calaos_config list", I get "dpms_enable: false"
  • when configuring manually, it works : it seems the problem is with the configuration screen

(with the meleg-20140305 image)

missing Custom command possibility for squeezeboxes

As a lot of exotic commands (like for example favorites playlist play item_id:X ) are not available from calaos, we could circumvent this limitation by adding a CMD custom option like the one in the av receivers section

calaos_home SEG FAULT

SEGV observed when trying to add multiple second note widget.

Steps to reproduce.

while(1)
{
Main Screen -> Add New Widget ->Notes
}

gdb trace is as follows.

INF<29379>:evas_main lib/evas/canvas/evas_events.c:1306 _canvas_event_feed_mouse_up() ButtonEvent:up time=2085669269 x=512 y=292 button=1 downs=1
ERR<29379>:eo lib/eo/eo_ptr_indirection.x:275 _eo_obj_pointer_get() obj_id (nil) is not pointing to a valid object. Maybe it has already been freed.

Program received signal SIGSEGV, Segmentation fault.
_elm_list_item_unfocused (it=0xbad040) at elm_list.c:1025
1025 if (!sd->focused_item ||
(gdb) bt
#0 _elm_list_item_unfocused (it=0xbad040) at elm_list.c:1025
#1 0x00007ffff7aa3fe1 in _item_focus_set_hook (it=0xc99970, focused=10 '\n') at elm_list.c:1700
#2 0x00007ffff7aa29f3 in _mouse_up_cb (data=0xc99970, evas=0xa, o=0x7ffff49269e0 <_IO_stdfile_2_lock>, o@entry=0x8000018120001a4b, event_info=0x7fffffffd6c0) at elm_list.c:1464
#3 0x00007ffff75f29f3 in _eo_evas_object_cb (data=0xbea9f0, eo_obj=0x8000018120001a4b, desc=, event_info=0x7fffffffd6c0) at lib/evas/canvas/evas_callbacks.c:130
#4 0x00007ffff3f26e98 in _ev_cb_call (obj_id=0x8000018120001a4b, class_data=0xd7c020, list=) at lib/eo/eo_base_class.c:690
#5 0x00007ffff3f219e3 in _eo_op_internal (p_list=0x7fffffffd448, op=16, op_type=EO_OP_TYPE_REGULAR, cur_klass=0x885f30, eo_ptr=0xd7bfe0, line=302, file=0x7ffff76ff518 "lib/evas/canvas/evas_callbacks.c") at lib/eo/eo.c:306
#6 _eo_dov_internal (p_list=0x7fffffffd448, op_type=EO_OP_TYPE_REGULAR, klass=0x885f30, obj=0xd7bfe0, line=302, file=0x7ffff76ff518 "lib/evas/canvas/evas_callbacks.c") at lib/eo/eo.c:338
#7 _eo_obj_dov_internal (p_list=0x7fffffffd448, obj=0xd7bfe0, line=302, file=0x7ffff76ff518 "lib/evas/canvas/evas_callbacks.c") at lib/eo/eo.c:359
#8 eo_do_internal (file=file@entry=0x7ffff76ff518 "lib/evas/canvas/evas_callbacks.c", line=line@entry=302, obj_id=obj_id@entry=0x8000018120001a4b) at lib/eo/eo.c:396
#9 0x00007ffff75f2fd7 in evas_object_event_callback_call (eo_obj=0x8000018120001a4b, obj=0xd7c050, type=EVAS_CALLBACK_MOUSE_UP, event_info=0x7fffffffd6c0, event_id=19501) at lib/evas/canvas/evas_callbacks.c:302
#10 0x00007ffff75f30a0 in evas_object_event_callback_call (eo_obj=, obj=0xd6e6c0, type=EVAS_CALLBACK_MOUSE_UP, event_info=0x7fffffffd6c0, event_id=19501) at lib/evas/canvas/evas_callbacks.c:322
#11 0x00007ffff75fd81d in _canvas_event_feed_mouse_up (eo_e=, _pd=, list=) at lib/evas/canvas/evas_events.c:1361
#12 0x00007ffff3f219e3 in _eo_op_internal (p_list=0x7fffffffd798, op=402, op_type=EO_OP_TYPE_REGULAR, cur_klass=0x866b50, eo_ptr=0x874310, line=1292, file=0x7ffff76ffc6a "lib/evas/canvas/evas_events.c") at lib/eo/eo.c:306
#13 _eo_dov_internal (p_list=0x7fffffffd798, op_type=EO_OP_TYPE_REGULAR, klass=0x866b50, obj=0x874310, line=1292, file=0x7ffff76ffc6a "lib/evas/canvas/evas_events.c") at lib/eo/eo.c:338
#14 _eo_obj_dov_internal (p_list=0x7fffffffd798, obj=0x874310, line=1292, file=0x7ffff76ffc6a "lib/evas/canvas/evas_events.c") at lib/eo/eo.c:359
#15 eo_do_internal (file=file@entry=0x7ffff76ffc6a "lib/evas/canvas/evas_events.c", line=line@entry=1292, obj_id=) at lib/eo/eo.c:396
#16 0x00007ffff75fc703 in evas_event_feed_mouse_up (eo_e=, b=, flags=flags@entry=EVAS_BUTTON_NONE, timestamp=, data=data@entry=0x0) at lib/evas/canvas/evas_events.c:1292
#17 0x00007ffff1f0a2d4 in _ecore_event_evas_mouse_button (e=0xd8ab00, press=ECORE_UP, faked=) at lib/ecore_input_evas/ecore_input_evas.c:375
#18 0x00007ffff65f1a57 in _ecore_call_handler_cb (event=, type=, data=, func=) at lib/ecore/ecore_private.h:359
#19 _ecore_event_call () at lib/ecore/ecore_events.c:562
#20 0x00007ffff65f8a35 in _ecore_main_loop_iterate_internal (once_only=once_only@entry=0) at lib/ecore/ecore_main.c:2039
#21 0x00007ffff65f8d47 in ecore_main_loop_begin () at lib/ecore/ecore_main.c:1042
#22 0x000000000040ff30 in main (argc=1, argv=0x7fffffffdd08) at main.cpp:92

Add detection of gcc 4.8

In configure.ac add detection of gcc to be at least 4.8. It does not compile with a lower gcc version because of the use of C++11

Add a way to set an I/O to forced operation

Sometimes something connected to an output is out of order.
In the same time, this output can be controlled by many scenarios or rules.
It is then very painful to adjust every scenario/rule to remove the use this output. And back afterwards.
Therefore the need of a way to set an I/O to forced operation (on or off for a digital output).
Actual example : broken shutter.

i18n

Translation! At least in english/french
As a lot of strings are directly assigned in edje, we first need to separate text from edje to set it in C++ code.
Few images are also rasterized with text, it has to be extracted to be set inside the C++ code.

Rewrite a flickr widget

Get the flickr widget back on calaos_home desktop. (it was using flick_curl, and this is not a dependency of calaos_base anymore, a new solution should be found)

Add support for EMS

We need to work on getting audio support to EMS with an API, and then add that to calaos...

Configuration pannel

Finish calaos_home configuration pannel, it's actually an empty menu and need to be filled.

versioning configuration

Configuration (local_config.xml, io.xml, rules.xml) doesn't contain version. It could be interesting to add such feature in each files, and keep a trace of each version to be able to come back to a working copy, if something wrong happen.

Finish the network code in calaos_home

calaos_home network's code is not finished. It does not reconnect to the server if the server restarts. And the reload mechanism is not implemented. There is also some problems when calaos_home is started before calaos_server

impulse command doesn't work with DMX

when using impulse command on a dmx light, the light turns on but never blink nor turns off on any given pattern

DBG<8176>:calaos_rule Rule.cpp:67 bool Calaos::Rule::Execute()() Rule(Couloirs,Detecteur salon test): Trying execution...
DBG<8176>:calaos_rule.condition.standard Rules/ConditionStd.cpp:182 virtual bool Calaos::ConditionStd::Evaluate()() Ok
INF<8176>:calaos_rule Rule.cpp:75 bool Calaos::Rule::Execute()() Rule(Couloirs,Detecteur salon test): Starting execution (1 actions)
INF<8176>:calaos_output IO/OutputLightDimmer.cpp:65 virtual bool Calaos::OutputLightDimmer::set_value(std::string)() output_9: got action, impulse 2000 1000 3000
INF<8176>:calaos_output IO/OutputLightDimmer.cpp:321 void Calaos::OutputLightDimmer::impulse_extended(std::string)() output_9: got extended impulse action, parsing blinking pattern...
DBG<8176>:calaos_output IO/OutputLightDimmer.cpp:344 void Calaos::OutputLightDimmer::impulse_extended(std::string)() output_9: Add blink step True for 2000ms
DBG<8176>:calaos_output IO/OutputLightDimmer.cpp:344 void Calaos::OutputLightDimmer::impulse_extended(std::string)() output_9: Add blink step False for 1000ms
DBG<8176>:calaos_output IO/OutputLightDimmer.cpp:344 void Calaos::OutputLightDimmer::impulse_extended(std::string)() output_9: Add blink step True for 3000ms
INF<8176>:calaos_output IO/OutputLightDimmer.cpp:65 virtual bool Calaos::OutputLightDimmer::set_value(std::string)() output_9: got action, on
DBG<8176>:calaos_output Output.cpp:43 virtual void Calaos::Output::EmitSignalOutput()() output_9
DBG<8176>:calaos_rule ListeRule.cpp:119 virtual void Calaos::ListeRule::ExecuteRuleSignal(std::string)() Mutex locked, execute rule later for input output_9
DBG<8176>:calaos_ipc IPC.cpp:97 void IPC::SendEvent(std::string, std::string, void*)() (events , output output_9 state%3A100) : 3 events waiting.
DBG<8176>:calaos_output Output.cpp:43 virtual void Calaos::Output::EmitSignalOutput()() output_9
DBG<8176>:calaos_rule ListeRule.cpp:119 virtual void Calaos::ListeRule::ExecuteRuleSignal(std::string)() Mutex locked, execute rule later for input output_9
DBG<8176>:calaos_ipc IPC.cpp:97 void IPC::SendEvent(std::string, std::string, void*)() (events , output output_9 state%3A100) : 4 events waiting.
DBG<8176>:calaos_rule.action.standard Rules/ActionStd.cpp:143 virtual bool Calaos::ActionStd::Execute()() Ok
INF<8176>:calaos_rule Rule.cpp:81 bool Calaos::Rule::Execute()() Rule(Couloirs,Detecteur salon test): Execution done.

Source X doesn't work on yamaha AVreceivers

The source X command designed to change sources on the receivers doesn't work, nothing happends when sending it

INF<8176>:calaos_rule Rule.cpp:75 bool Calaos::Rule::Execute()() Rule(Couloirs,Detecteur salon test): Starting execution (2 actions)
INF<8176>:calaos_output Audio/AVReceiver.cpp:368 virtual bool Calaos::IOAVReceiver::set_value(std::string)() amp_0 got action, source 1
DBG<8176>:calaos_rule.action.standard Rules/ActionStd.cpp:143 virtual bool Calaos::ActionStd::Execute()() Ok

we can circumvent the problem using the custom command with the syntaxe

custom @MAIN:INP=AV1 or @MAIN:INP=HDMI1 etc...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.