json dump for Actor and Sensor added

This commit is contained in:
manuel83 2019-01-08 23:31:39 +01:00
parent 3478d06806
commit d0b751a0d4
8 changed files with 437 additions and 165 deletions

View file

@ -2,9 +2,13 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="1a245e6a-2e43-4348-8759-dc1b63a4c9c8" name="Default" comment="Lots of changes">
<change beforePath="$PROJECT_DIR$/docs_src/source/core.rst" beforeDir="false" afterPath="$PROJECT_DIR$/docs_src/source/core.rst" afterDir="false" />
<change beforePath="$PROJECT_DIR$/cbpi/api/actor.py" beforeDir="false" afterPath="$PROJECT_DIR$/cbpi/api/actor.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/cbpi/api/sensor.py" beforeDir="false" afterPath="$PROJECT_DIR$/cbpi/api/sensor.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/cbpi/extension/dummyactor/__init__.py" beforeDir="false" afterPath="$PROJECT_DIR$/cbpi/extension/dummyactor/__init__.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/cbpi/extension/dummysensor/__init__.py" beforeDir="false" afterPath="$PROJECT_DIR$/cbpi/extension/dummysensor/__init__.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/cbpi/http_endpoints/http_translation.py" beforeDir="false" afterPath="$PROJECT_DIR$/cbpi/http_endpoints/http_translation.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/cbpi/utils/encoder.py" beforeDir="false" afterPath="$PROJECT_DIR$/cbpi/utils/encoder.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docs_src/source/install.rst" beforeDir="false" afterPath="$PROJECT_DIR$/docs_src/source/install.rst" afterDir="false" />
<change beforePath="$PROJECT_DIR$/setup.py" beforeDir="false" afterPath="$PROJECT_DIR$/setup.py" afterDir="false" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" />
@ -27,7 +31,7 @@
<SUITE FILE_PATH="coverage/craftbeerpi4$pytest_for_tests_test_actor.coverage" NAME="pytest for tests.test_actor Coverage Results" MODIFIED="1546724758047" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
<SUITE FILE_PATH="coverage/craftbeerpi4$pytest_in_tests.coverage" NAME="pytest in tests Coverage Results" MODIFIED="1546728972103" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
<SUITE FILE_PATH="coverage/craftbeerpi4$test_app.coverage" NAME="test_app Coverage Results" MODIFIED="1546525009502" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/tests" />
<SUITE FILE_PATH="coverage/craftbeerpi4$run.coverage" NAME="run Coverage Results" MODIFIED="1546973018650" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
<SUITE FILE_PATH="coverage/craftbeerpi4$run.coverage" NAME="run Coverage Results" MODIFIED="1546985787615" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
<SUITE FILE_PATH="coverage/craftbeerpi4$pytest_for_test_kettle_KettleTestCase.coverage" NAME="pytest for test_kettle.KettleTestCase Coverage Results" MODIFIED="1546357864696" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
<SUITE FILE_PATH="coverage/craftbeerpi4$py_test_in_tests.coverage" NAME="py.test in tests Coverage Results" MODIFIED="1544486432317" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="" />
<SUITE FILE_PATH="coverage/craftbeerpi4$pytest_for_test_config_ConfigTestCase.coverage" NAME="pytest for test_config.ConfigTestCase Coverage Results" MODIFIED="1546212760017" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
@ -73,42 +77,87 @@
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/setup.py">
<entry file="file://$PROJECT_DIR$/cbpi/extension/dummyactor/__init__.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="45">
<caret line="3" column="22" selection-start-line="3" selection-start-column="22" selection-end-line="3" selection-end-column="22" />
<state relative-caret-position="118">
<caret line="26" column="26" selection-start-line="26" selection-start-column="26" selection-end-line="26" selection-end-column="26" />
<folding>
<element signature="e#0#14#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/docs_src/source/install.rst">
<provider selected="true" editor-type-id="restructured-text-editor" />
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/docs_src/source/index.rst">
<provider selected="true" editor-type-id="restructured-text-editor" />
</entry>
</file>
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/docs_src/source/core.rst">
<provider selected="true" editor-type-id="restructured-text-editor" />
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/config/plugin_list.txt">
<entry file="file://$PROJECT_DIR$/cbpi/utils/encoder.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="15">
<caret line="1" column="7" selection-start-line="1" selection-start-column="7" selection-end-line="1" selection-end-column="7" />
<state relative-caret-position="148">
<caret line="19" selection-start-line="18" selection-start-column="46" selection-end-line="19" />
<folding>
<element signature="e#0#28#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/cbpi/eventbus.py">
<entry file="file://$PROJECT_DIR$/cbpi/controller/sensor_controller.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="125">
<caret line="55" column="14" selection-start-line="55" selection-start-column="14" selection-end-line="55" selection-end-column="14" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/cbpi/database/model.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="117">
<caret line="23" column="6" selection-start-line="23" selection-start-column="6" selection-end-line="23" selection-end-column="6" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/cbpi/extension/dummysensor/config.yaml">
<provider selected="true" editor-type-id="text-editor" />
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/cbpi/extension/dummysensor/__init__.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="227">
<caret line="45" selection-start-line="45" selection-end-line="45" />
<folding>
<element signature="e#0#14#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="das://5067e7fe-480d-4433-bc40-f2d1c38362a2/schema/main/table/sensor">
<provider selected="true" editor-type-id="com.intellij.database.editor.DatabaseTableFileEditorProvider">
<state>
<filtering enabled="true" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/cbpi/api/sensor.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="160">
<caret line="20" selection-start-line="20" selection-end-line="20" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/cbpi/controller/actor_controller.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="189">
<caret line="43" column="45" selection-start-line="43" selection-start-column="37" selection-end-line="43" selection-end-column="45" />
<folding>
<element signature="e#0#14#0" expanded="true" />
</folding>
@ -117,45 +166,12 @@
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/cbpi/craftbeerpi.py">
<entry file="file://$PROJECT_DIR$/cbpi/api/actor.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="86">
<caret line="32" column="8" selection-start-line="32" selection-start-column="8" selection-end-line="32" selection-end-column="8" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/cbpi/controller/system_controller.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="405">
<caret line="27" selection-start-line="27" selection-end-line="27" />
<state relative-caret-position="199">
<caret line="37" column="17" selection-start-line="37" selection-start-column="8" selection-end-line="37" selection-end-column="17" />
<folding>
<element signature="e#0#15#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/cbpi/controller/translation_controller.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="45">
<caret line="3" selection-start-line="3" selection-end-line="3" />
<folding>
<element signature="e#0#14#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$USER_HOME$/cbp42/lib/python3.7/site-packages/cbpi/craftbeerpi.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="186">
<caret line="38" lean-forward="true" selection-start-line="38" selection-end-line="38" />
<folding>
<element signature="e#0#14#0" expanded="true" />
<element signature="e#0#23#0" expanded="true" />
</folding>
</state>
</provider>
@ -225,17 +241,11 @@
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/sample.py" />
<option value="$PROJECT_DIR$/cbpi/api/extension.py" />
<option value="$PROJECT_DIR$/cbpi/api/sensor.py" />
<option value="$PROJECT_DIR$/app.log" />
<option value="$PROJECT_DIR$/tests/test_config.py" />
<option value="$PROJECT_DIR$/cbpi/controller/step_controller.py" />
<option value="$PROJECT_DIR$/cbpi/controller/sensor_controller.py" />
<option value="$PROJECT_DIR$/cbpi/cli.py" />
<option value="$PROJECT_DIR$/cbpi/http_endpoints/http_sensor.py" />
<option value="$PROJECT_DIR$/tests/test_actor.py" />
<option value="$PROJECT_DIR$/cbpi/controller/actor_controller.py" />
<option value="$PROJECT_DIR$/docs_src/source/step.rst" />
<option value="$PROJECT_DIR$/docs_src/source/actor.rst" />
<option value="$PROJECT_DIR$/docs_src/source/kettle_controller.rst" />
@ -265,7 +275,6 @@
<option value="$PROJECT_DIR$/cbpi/extension/ui/react/src/recucers/translation.js" />
<option value="$APPLICATION_CONFIG_DIR$/consoles/.datagrid/cell" />
<option value="$PROJECT_DIR$/cbpi/database/model.py" />
<option value="$PROJECT_DIR$/cbpi/http_endpoints/http_translation.py" />
<option value="$PROJECT_DIR$/requirements.txt" />
<option value="$PROJECT_DIR$/.gitignore" />
<option value="$PROJECT_DIR$/config/config.yaml" />
@ -274,8 +283,15 @@
<option value="$PROJECT_DIR$/cbpi/controller/translation_controller.py" />
<option value="$PROJECT_DIR$/cbpi/craftbeerpi.py" />
<option value="$PROJECT_DIR$/setup.py" />
<option value="$PROJECT_DIR$/docs_src/source/install.rst" />
<option value="$PROJECT_DIR$/docs_src/source/core.rst" />
<option value="$PROJECT_DIR$/docs_src/source/install.rst" />
<option value="$PROJECT_DIR$/cbpi/http_endpoints/http_translation.py" />
<option value="$PROJECT_DIR$/cbpi/controller/actor_controller.py" />
<option value="$PROJECT_DIR$/cbpi/api/actor.py" />
<option value="$PROJECT_DIR$/cbpi/extension/dummyactor/__init__.py" />
<option value="$PROJECT_DIR$/cbpi/api/sensor.py" />
<option value="$PROJECT_DIR$/cbpi/extension/dummysensor/__init__.py" />
<option value="$PROJECT_DIR$/cbpi/utils/encoder.py" />
</list>
</option>
</component>
@ -301,18 +317,142 @@
<path>
<item name="craftbeerpi4" type="b2602c69:ProjectViewProjectNode" />
<item name="craftbeerpi4" type="462c0819:PsiDirectoryNode" />
<item name="dist" type="462c0819:PsiDirectoryNode" />
<item name="cbpi" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="craftbeerpi4" type="b2602c69:ProjectViewProjectNode" />
<item name="craftbeerpi4" type="462c0819:PsiDirectoryNode" />
<item name="docs_src" type="462c0819:PsiDirectoryNode" />
<item name="cbpi" type="462c0819:PsiDirectoryNode" />
<item name="api" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="craftbeerpi4" type="b2602c69:ProjectViewProjectNode" />
<item name="craftbeerpi4" type="462c0819:PsiDirectoryNode" />
<item name="docs_src" type="462c0819:PsiDirectoryNode" />
<item name="source" type="462c0819:PsiDirectoryNode" />
<item name="cbpi" type="462c0819:PsiDirectoryNode" />
<item name="api" type="462c0819:PsiDirectoryNode" />
<item name="actor.py" type="8704e2dd:PyFileNode" />
</path>
<path>
<item name="craftbeerpi4" type="b2602c69:ProjectViewProjectNode" />
<item name="craftbeerpi4" type="462c0819:PsiDirectoryNode" />
<item name="cbpi" type="462c0819:PsiDirectoryNode" />
<item name="api" type="462c0819:PsiDirectoryNode" />
<item name="actor.py" type="8704e2dd:PyFileNode" />
<item name="CBPiActor" type="dd8bbb05:PyElementNode" />
</path>
<path>
<item name="craftbeerpi4" type="b2602c69:ProjectViewProjectNode" />
<item name="craftbeerpi4" type="462c0819:PsiDirectoryNode" />
<item name="cbpi" type="462c0819:PsiDirectoryNode" />
<item name="api" type="462c0819:PsiDirectoryNode" />
<item name="sensor.py" type="8704e2dd:PyFileNode" />
</path>
<path>
<item name="craftbeerpi4" type="b2602c69:ProjectViewProjectNode" />
<item name="craftbeerpi4" type="462c0819:PsiDirectoryNode" />
<item name="cbpi" type="462c0819:PsiDirectoryNode" />
<item name="api" type="462c0819:PsiDirectoryNode" />
<item name="sensor.py" type="8704e2dd:PyFileNode" />
<item name="CBPiSensor" type="dd8bbb05:PyElementNode" />
</path>
<path>
<item name="craftbeerpi4" type="b2602c69:ProjectViewProjectNode" />
<item name="craftbeerpi4" type="462c0819:PsiDirectoryNode" />
<item name="cbpi" type="462c0819:PsiDirectoryNode" />
<item name="controller" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="craftbeerpi4" type="b2602c69:ProjectViewProjectNode" />
<item name="craftbeerpi4" type="462c0819:PsiDirectoryNode" />
<item name="cbpi" type="462c0819:PsiDirectoryNode" />
<item name="controller" type="462c0819:PsiDirectoryNode" />
<item name="actor_controller.py" type="8704e2dd:PyFileNode" />
</path>
<path>
<item name="craftbeerpi4" type="b2602c69:ProjectViewProjectNode" />
<item name="craftbeerpi4" type="462c0819:PsiDirectoryNode" />
<item name="cbpi" type="462c0819:PsiDirectoryNode" />
<item name="controller" type="462c0819:PsiDirectoryNode" />
<item name="sensor_controller.py" type="8704e2dd:PyFileNode" />
</path>
<path>
<item name="craftbeerpi4" type="b2602c69:ProjectViewProjectNode" />
<item name="craftbeerpi4" type="462c0819:PsiDirectoryNode" />
<item name="cbpi" type="462c0819:PsiDirectoryNode" />
<item name="controller" type="462c0819:PsiDirectoryNode" />
<item name="sensor_controller.py" type="8704e2dd:PyFileNode" />
<item name="SensorController" type="dd8bbb05:PyElementNode" />
</path>
<path>
<item name="craftbeerpi4" type="b2602c69:ProjectViewProjectNode" />
<item name="craftbeerpi4" type="462c0819:PsiDirectoryNode" />
<item name="cbpi" type="462c0819:PsiDirectoryNode" />
<item name="database" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="craftbeerpi4" type="b2602c69:ProjectViewProjectNode" />
<item name="craftbeerpi4" type="462c0819:PsiDirectoryNode" />
<item name="cbpi" type="462c0819:PsiDirectoryNode" />
<item name="database" type="462c0819:PsiDirectoryNode" />
<item name="model.py" type="8704e2dd:PyFileNode" />
</path>
<path>
<item name="craftbeerpi4" type="b2602c69:ProjectViewProjectNode" />
<item name="craftbeerpi4" type="462c0819:PsiDirectoryNode" />
<item name="cbpi" type="462c0819:PsiDirectoryNode" />
<item name="extension" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="craftbeerpi4" type="b2602c69:ProjectViewProjectNode" />
<item name="craftbeerpi4" type="462c0819:PsiDirectoryNode" />
<item name="cbpi" type="462c0819:PsiDirectoryNode" />
<item name="extension" type="462c0819:PsiDirectoryNode" />
<item name="dummyactor" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="craftbeerpi4" type="b2602c69:ProjectViewProjectNode" />
<item name="craftbeerpi4" type="462c0819:PsiDirectoryNode" />
<item name="cbpi" type="462c0819:PsiDirectoryNode" />
<item name="extension" type="462c0819:PsiDirectoryNode" />
<item name="dummysensor" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="craftbeerpi4" type="b2602c69:ProjectViewProjectNode" />
<item name="craftbeerpi4" type="462c0819:PsiDirectoryNode" />
<item name="cbpi" type="462c0819:PsiDirectoryNode" />
<item name="extension" type="462c0819:PsiDirectoryNode" />
<item name="dummysensor" type="462c0819:PsiDirectoryNode" />
<item name="__init__.py" type="8704e2dd:PyFileNode" />
</path>
<path>
<item name="craftbeerpi4" type="b2602c69:ProjectViewProjectNode" />
<item name="craftbeerpi4" type="462c0819:PsiDirectoryNode" />
<item name="cbpi" type="462c0819:PsiDirectoryNode" />
<item name="extension" type="462c0819:PsiDirectoryNode" />
<item name="dummysensor" type="462c0819:PsiDirectoryNode" />
<item name="__init__.py" type="8704e2dd:PyFileNode" />
<item name="CustomSensor" type="dd8bbb05:PyElementNode" />
</path>
<path>
<item name="craftbeerpi4" type="b2602c69:ProjectViewProjectNode" />
<item name="craftbeerpi4" type="462c0819:PsiDirectoryNode" />
<item name="cbpi" type="462c0819:PsiDirectoryNode" />
<item name="utils" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="craftbeerpi4" type="b2602c69:ProjectViewProjectNode" />
<item name="craftbeerpi4" type="462c0819:PsiDirectoryNode" />
<item name="cbpi" type="462c0819:PsiDirectoryNode" />
<item name="utils" type="462c0819:PsiDirectoryNode" />
<item name="encoder.py" type="8704e2dd:PyFileNode" />
</path>
<path>
<item name="craftbeerpi4" type="b2602c69:ProjectViewProjectNode" />
<item name="craftbeerpi4" type="462c0819:PsiDirectoryNode" />
<item name="cbpi" type="462c0819:PsiDirectoryNode" />
<item name="utils" type="462c0819:PsiDirectoryNode" />
<item name="encoder.py" type="8704e2dd:PyFileNode" />
<item name="ComplexEncoder" type="dd8bbb05:PyElementNode" />
</path>
</expand>
<select />
@ -330,6 +470,13 @@
<property name="settings.editor.selected.configurable" value="com.jetbrains.python.configuration.PyActiveSdkModuleConfigurable" />
</component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/docs_src/source" />
<recent name="$PROJECT_DIR$/cbpi/http_endpoints" />
<recent name="$PROJECT_DIR$/cbpi/extension/ui" />
<recent name="$PROJECT_DIR$/cbpi/ui" />
<recent name="$PROJECT_DIR$/cbpi" />
</key>
<key name="MoveFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/cbpi/extension" />
<recent name="$PROJECT_DIR$/cbpi/ui/react" />
@ -337,13 +484,6 @@
<recent name="$PROJECT_DIR$/core/http_endpoints/swagger" />
<recent name="$PROJECT_DIR$" />
</key>
<key name="CopyFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/cbpi/http_endpoints" />
<recent name="$PROJECT_DIR$/cbpi/extension/ui" />
<recent name="$PROJECT_DIR$/cbpi/ui" />
<recent name="$PROJECT_DIR$/cbpi" />
<recent name="$PROJECT_DIR$/docs_src/source" />
</key>
</component>
<component name="RunDashboard">
<option name="ruleStates">
@ -581,7 +721,7 @@
<workItem from="1546797494638" duration="14249000" />
<workItem from="1546971487719" duration="1233000" />
<workItem from="1546973098962" duration="96000" />
<workItem from="1546975321797" duration="1014000" />
<workItem from="1546975321797" duration="3567000" />
</task>
<task id="LOCAL-00001" summary="Lots of changes">
<created>1541288846149</created>
@ -633,7 +773,7 @@
</history-entry>
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="176135000" />
<option name="totallyTimeSpent" value="178688000" />
</component>
<component name="TodoView" selected-index="4">
<todo-panel id="selected-file">
@ -648,15 +788,15 @@
<frame x="0" y="23" width="1680" height="962" extended-state="0" />
<editor active="true" />
<layout>
<window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.3021978" />
<window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.3021978" />
<window_info id="Structure" order="1" weight="0.24957556" />
<window_info id="Favorites" order="2" side_tool="true" />
<window_info anchor="bottom" id="Event Log" order="0" sideWeight="0.2737931" side_tool="true" weight="0.3997555" />
<window_info anchor="bottom" id="Version Control" order="1" weight="0.32762837" />
<window_info anchor="bottom" id="Run" order="2" sideWeight="0.7262069" weight="0.47586206" />
<window_info active="true" anchor="bottom" id="Run" order="2" sideWeight="0.7262069" visible="true" weight="0.54022986" />
<window_info anchor="bottom" id="Debug" order="3" weight="0.39731053" />
<window_info anchor="bottom" id="Python Console" order="4" weight="0.32885087" />
<window_info anchor="bottom" id="Terminal" order="5" sideWeight="0.49761903" visible="true" weight="0.49080458" />
<window_info anchor="bottom" id="Terminal" order="5" sideWeight="0.49761903" weight="0.49080458" />
<window_info anchor="bottom" id="TODO" order="6" weight="0.3286945" />
<window_info anchor="bottom" id="Message" order="7" />
<window_info anchor="bottom" id="Find" order="8" weight="0.32518336" />
@ -715,18 +855,6 @@
</watches-manager>
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/cbpi/extension/ui/react/src/recucers/sensor.js" />
<entry file="file://$PROJECT_DIR$/cbpi/extension/ui/react/src/recucers/actor.js" />
<entry file="file://$PROJECT_DIR$/cbpi/extension/ui/react/src/recucers/kettle.js" />
<entry file="das://5067e7fe-480d-4433-bc40-f2d1c38362a2/schema/main/table/actor" />
<entry file="file://$PROJECT_DIR$/cbpi/extension/ui/react/src/views/hardware/SensorTable.js" />
<entry file="file://$PROJECT_DIR$/cbpi/extension/ui/react/src/views/hardware/KettleForm.js" />
<entry file="file://$PROJECT_DIR$/cbpi/extension/ui/react/src/websocket.js" />
<entry file="file://$PROJECT_DIR$/cbpi/extension/ui/react/src/common/Table.js" />
<entry file="file://$PROJECT_DIR$/cbpi/extension/ui/react/src/views/hardware/Hardware.js" />
<entry file="file://$PROJECT_DIR$/cbpi/extension/ui/react/src/views/hardware/ActorTable.js" />
<entry file="file://$PROJECT_DIR$/cbpi/extension/ui/react/src/index.js" />
<entry file="file://$PROJECT_DIR$/cbpi/extension/ui/react/src/views/hardware/ActorForm.js" />
<entry file="file://$PROJECT_DIR$/cbpi/extension/ui/react/src/common/Form.js" />
<entry file="file://$PROJECT_DIR$/samples.txt">
<provider selected="true" editor-type-id="text-editor">
@ -737,15 +865,6 @@
</entry>
<entry file="das://5067e7fe-480d-4433-bc40-f2d1c38362a2/schema/main/table/step" />
<entry file="file://$PROJECT_DIR$/cbpi/extension/ui/react/src/recucers/brewing.js" />
<entry file="file://$PROJECT_DIR$/cbpi/http_endpoints/http_sensor.py">
<provider selected="true" editor-type-id="text-editor">
<state>
<folding>
<element signature="e#0#14#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/cbpi/http_endpoints/http_dashboard.py">
<provider selected="true" editor-type-id="text-editor">
<state>
@ -777,26 +896,7 @@
</provider>
</entry>
<entry file="das://5067e7fe-480d-4433-bc40-f2d1c38362a2/schema/main/table/dashboard" />
<entry file="file://$PROJECT_DIR$/cbpi/controller/actor_controller.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="310">
<caret line="33" column="4" selection-start-line="33" selection-start-column="4" selection-end-line="34" selection-end-column="54" />
<folding>
<element signature="e#0#14#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/cbpi/extension/ui/react/src/recucers/parameter.js" />
<entry file="file://$PROJECT_DIR$/cbpi/http_endpoints/http_step.py">
<provider selected="true" editor-type-id="text-editor">
<state>
<folding>
<element signature="e#0#23#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/cbpi/http_endpoints/http_config.py">
<provider selected="true" editor-type-id="text-editor">
<state>
@ -848,22 +948,7 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/cbpi/database/model.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="339">
<caret line="162" column="87" selection-start-line="162" selection-start-column="87" selection-end-line="162" selection-end-column="87" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/cbpi/extension/ui/react/src/recucers/translation.js" />
<entry file="das://5067e7fe-480d-4433-bc40-f2d1c38362a2/schema/main/table/translation" />
<entry file="file://$PROJECT_DIR$/cbpi/http_endpoints/http_translation.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="180">
<caret line="15" column="35" selection-start-line="15" selection-start-column="35" selection-end-line="15" selection-end-column="35" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/.nojekyll">
<provider selected="true" editor-type-id="text-editor" />
</entry>
@ -927,16 +1012,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/cbpi/controller/translation_controller.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="45">
<caret line="3" selection-start-line="3" selection-end-line="3" />
<folding>
<element signature="e#0#14#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/cbpi/craftbeerpi.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="86">
@ -947,7 +1022,7 @@
<entry file="file://$USER_HOME$/cbp42/lib/python3.7/site-packages/cbpi/craftbeerpi.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="186">
<caret line="38" lean-forward="true" selection-start-line="38" selection-end-line="38" />
<caret line="38" selection-start-line="38" selection-end-line="38" />
<folding>
<element signature="e#0#14#0" expanded="true" />
</folding>
@ -961,14 +1036,155 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/docs_src/source/install.rst">
<provider selected="true" editor-type-id="restructured-text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/docs_src/source/index.rst">
<provider selected="true" editor-type-id="restructured-text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/docs_src/source/conf.py">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/docs_src/source/core.rst">
<provider selected="true" editor-type-id="restructured-text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/docs_src/source/contribute.rst">
<provider selected="true" editor-type-id="restructured-text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/docs_src/source/kettle_controller.rst">
<provider selected="true" editor-type-id="restructured-text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/docs_src/source/install.rst">
<provider selected="true" editor-type-id="restructured-text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/cbpi/controller/translation_controller.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="255">
<caret line="17" column="8" selection-start-line="17" selection-start-column="8" selection-end-line="17" selection-end-column="8" />
<folding>
<element signature="e#0#14#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/cbpi/http_endpoints/http_sensor.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="134">
<caret line="46" column="8" selection-start-line="46" selection-start-column="8" selection-end-line="63" selection-end-column="11" />
<folding>
<element signature="e#0#14#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/cbpi/http_endpoints/http_step.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="149">
<caret line="75" selection-start-line="75" selection-end-line="97" selection-end-column="11" />
<folding>
<element signature="e#0#23#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/cbpi/http_endpoints/http_translation.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="255">
<caret line="23" column="39" selection-start-line="23" selection-start-column="39" selection-end-line="23" selection-end-column="39" />
</state>
</provider>
</entry>
<entry file="das://5067e7fe-480d-4433-bc40-f2d1c38362a2/schema/main/table/translation">
<provider selected="true" editor-type-id="com.intellij.database.editor.DatabaseTableFileEditorProvider">
<state>
<filtering enabled="true" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/cbpi/utils/utils.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="255">
<caret line="17" column="41" selection-start-line="17" selection-start-column="41" selection-end-line="17" selection-end-column="41" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/cbpi/controller/actor_controller.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="189">
<caret line="43" column="45" selection-start-line="43" selection-start-column="37" selection-end-line="43" selection-end-column="45" />
<folding>
<element signature="e#0#14#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/cbpi/api/actor.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="199">
<caret line="37" column="17" selection-start-line="37" selection-start-column="8" selection-end-line="37" selection-end-column="17" />
<folding>
<element signature="e#0#23#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/cbpi/database/model.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="117">
<caret line="23" column="6" selection-start-line="23" selection-start-column="6" selection-end-line="23" selection-end-column="6" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/cbpi/extension/dummysensor/config.yaml">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="das://5067e7fe-480d-4433-bc40-f2d1c38362a2/schema/main/table/sensor">
<provider selected="true" editor-type-id="com.intellij.database.editor.DatabaseTableFileEditorProvider">
<state>
<filtering enabled="true" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/cbpi/api/sensor.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="160">
<caret line="20" selection-start-line="20" selection-end-line="20" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/cbpi/controller/sensor_controller.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="125">
<caret line="55" column="14" selection-start-line="55" selection-start-column="14" selection-end-line="55" selection-end-column="14" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/cbpi/extension/dummyactor/__init__.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="118">
<caret line="26" column="26" selection-start-line="26" selection-start-column="26" selection-end-line="26" selection-end-column="26" />
<folding>
<element signature="e#0#14#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/cbpi/extension/dummysensor/__init__.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="227">
<caret line="45" selection-start-line="45" selection-end-line="45" />
<folding>
<element signature="e#0#14#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/cbpi/utils/encoder.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="148">
<caret line="19" selection-start-line="18" selection-start-column="46" selection-end-line="19" />
<folding>
<element signature="e#0#28#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</component>
</project>

View file

@ -35,7 +35,7 @@ class CBPiActor(CBPiExtension, metaclass=ABCMeta):
'''
pass
def state(self):
def get_state(self):
'''
Return the current actor state

View file

@ -10,6 +10,7 @@ class CBPiSensor(CBPiExtension):
CBPiExtension.__init__(self, *args, **kwds)
self.logger = logging.getLogger(__file__)
self.data_logger = None
self.state = False
@ -34,5 +35,8 @@ class CBPiSensor(CBPiExtension):
async def run(self, cbpi):
self.logger.warning("Sensor Init not implemented")
def state(self):
def get_state(self):
pass
def get_value(self):
pass

View file

@ -24,6 +24,7 @@ class CustomActor(CBPiActor):
# Custom property which can be configured by the user
def init(self):
self.state = False
pass
def on(self, power=0):
@ -34,7 +35,8 @@ class CustomActor(CBPiActor):
logger.info("ACTOR %s OFF " % self.id)
self.state = False
def get_state(self):
return self.state
class GPIOActor(CBPiActor):

View file

@ -25,10 +25,14 @@ class CustomSensor(CBPiSensor):
def init(self):
super().init()
self.state = True
def get_state(self):
return self.state
def state(self):
super().state()
def get_value(self):
return self.value
def stop(self):
pass
@ -39,6 +43,7 @@ class CustomSensor(CBPiSensor):
await asyncio.sleep(self.interval)
self.log_data(10)
self.value = self.value + 1
await cbpi.bus.fire("sensor/%s" % self.id, value=self.value)

View file

@ -13,8 +13,42 @@ class TranslationHttpEndpoint():
@request_mapping(path="/missing_key", method="POST", auth_required=False)
async def missing_key(self, request):
"""
---
description: Add missing translation key
tags:
- Translation
parameters:
- in: body
name: body
description: missing key data
required: true
schema:
type: object
properties:
locale:
type: string
key:
type: string
responses:
"204":
description: successful operation
"""
data = await request.json()
await self.cbpi.translation.add_key(**data)
return web.Response(status=204)
@request_mapping(path="/", auth_required=False)
async def http_get_all(self, request):
"""
---
description: Get all translations
tags:
- Translation
responses:
"200":
description: successful operation
"""
return web.json_response(data=self.cbpi.translation.get_all())

View file

@ -1,5 +1,8 @@
from json import JSONEncoder
from cbpi.database.model import ActorModel, SensorModel
class ComplexEncoder(JSONEncoder):
def default(self, obj):
@ -7,12 +10,20 @@ class ComplexEncoder(JSONEncoder):
from cbpi.database.orm_framework import DBModel
try:
if isinstance(obj, DBModel):
return obj.__dict__
if isinstance(obj, ActorModel):
data = dict(**obj.__dict__, state=obj.instance.get_state())
del data["instance"]
return data
elif isinstance(obj, SensorModel):
data = dict(**obj.__dict__, state=obj.instance.get_state(), value=obj.instance.get_value())
del data["instance"]
return data
#elif callable(getattr(obj, "reprJSON")):
# return obj.reprJSON()
#elif isinstance(obj, ActorModel):
# return None
elif isinstance(obj, DBModel):
return None
#elif hasattr(obj, "callback"):
# return obj()
else:

View file

@ -29,7 +29,7 @@ To uninstall just remove the package via pip.
$ sudo pip uninstall cbpi
MacOS
^^^^^^^^^^^^
^^^^^^
Make sure to have Python 3 installed. For example via Homebrew. !!!Attention pip3 not just pip!!!
::