openhsorg / openhs

OpenHS - core modules
0 stars 0 forks source link

Sensor/actuator assignment to site items in Admin page #36

Open fmikulu opened 7 years ago

fmikulu commented 7 years ago

We need to enhance Admin page mapped now to http://localhost:7070/openhs to visualize and edit content of xml file specified by ${HOME}/openhs/site/Site.properties:

xmlFileName = site/ohs_site_mqtt.xml

It would be nice to have at least a visualization for quick check what's wrong. Next step would be to edit the file.

fmikulu commented 7 years ago

Bundles providing sensors/actuators has to offer an interface to get addressing. Ask @fmikulu for cooperation.

karelvalach commented 7 years ago

something

fmikulu commented 7 years ago

We have configuration files at https://github.com/openhsorg/openhs/tree/master/modules/org.openhs.core.cfg/openhs This directory shall be copied to ${HOME} where it's referenced from running openhs application The main trunk is openhs.properties. It defines configuration files for bundles to be started and properties delivered to their activate() methods. The directories dummy and IqrfJson configure running instances of sensors/actuators within files ...Mapping.json The instances are related to things at *.../site/.xml**, e.g:

<thing devicePath="DummyService/dummy/1/Thermometer" name="Outside" sitePath="floors/Floor1/rooms/Room0/sensors/SensorOut" type="TemperatureSensor">

It represents mapping of sensor

    {
      "Addr": 1,
      "Type": "Thermometer",
      "Period": 9000,
      "Max": 30.0,
      "Min": -30.0,
      "Step": 1.0,
      "Init": 15.0
    }

to sensor name presented at GUI: "floors/Floor1/rooms/Room0/sensors/SensorOut"

We need simple GUI app just to edit the files and their relations. Please @openhsorg comment. Maybe existing admin page is the starting point? http://localhost:7070/openhs

MichalValny commented 7 years ago

First version: http://localhost:7070/admin

ohsadmin