comp.lang.ada
 help / color / mirror / Atom feed
* ANN: MAX! home automation v1.9
@ 2017-04-19 16:30 Dmitry A. Kazakov
  2017-06-16 14:35 ` lyttlec
  0 siblings, 1 reply; 7+ messages in thread
From: Dmitry A. Kazakov @ 2017-04-19 16:30 UTC (permalink / raw)


The software is an Ada GUI application to control wireless radiator 
thermostats produced under brands MAX! and ELV.

    http://www.dmitry-kazakov.de/ada/max_home_automation.htm

Changes to the previous version:

- MQTT on WebSocket support added;
- The MQTT server's topic names have the leading '/' removed because 
some MQTT clients reported having troubles with names starting with '/';
- When controlled over HTTP or MQTT the target temperature can be 
specified to be airing, comfort, and eco according to the thermostat 
settings;
- The thermostat address can be omitted when in control commands over 
HTTP or MQTT. In this case the command applies to all thermostats;
- HTTP access control (CORS) support added;
- HTTP server JSONP support added.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: ANN: MAX! home automation v1.9
  2017-04-19 16:30 ANN: MAX! home automation v1.9 Dmitry A. Kazakov
@ 2017-06-16 14:35 ` lyttlec
  2017-06-16 19:54   ` Dmitry A. Kazakov
  0 siblings, 1 reply; 7+ messages in thread
From: lyttlec @ 2017-06-16 14:35 UTC (permalink / raw)


On 04/19/2017 12:30 PM, Dmitry A. Kazakov wrote:
> The software is an Ada GUI application to control wireless radiator
> thermostats produced under brands MAX! and ELV.
> 
>    http://www.dmitry-kazakov.de/ada/max_home_automation.htm
> 
> Changes to the previous version:
> 
> - MQTT on WebSocket support added;
> - The MQTT server's topic names have the leading '/' removed because
> some MQTT clients reported having troubles with names starting with '/';
> - When controlled over HTTP or MQTT the target temperature can be
> specified to be airing, comfort, and eco according to the thermostat
> settings;
> - The thermostat address can be omitted when in control commands over
> HTTP or MQTT. In this case the command applies to all thermostats;
> - HTTP access control (CORS) support added;
> - HTTP server JSONP support added.
> 
Hi,
I'm just getting back into Ada. In order to get some experience with
gnat-gps, I tried to build max_home_automation. This gives an error
"apq.ads not found" for apq_keys.ads.  What am I missing?
Thanks


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: ANN: MAX! home automation v1.9
  2017-06-16 14:35 ` lyttlec
@ 2017-06-16 19:54   ` Dmitry A. Kazakov
  2017-06-16 21:22     ` lyttlec
  0 siblings, 1 reply; 7+ messages in thread
From: Dmitry A. Kazakov @ 2017-06-16 19:54 UTC (permalink / raw)


On 2017-06-16 16:35, lyttlec wrote:
> On 04/19/2017 12:30 PM, Dmitry A. Kazakov wrote:
>> The software is an Ada GUI application to control wireless radiator
>> thermostats produced under brands MAX! and ELV.
>>
>>     http://www.dmitry-kazakov.de/ada/max_home_automation.htm
>>
>> Changes to the previous version:
>>
>> - MQTT on WebSocket support added;
>> - The MQTT server's topic names have the leading '/' removed because
>> some MQTT clients reported having troubles with names starting with '/';
>> - When controlled over HTTP or MQTT the target temperature can be
>> specified to be airing, comfort, and eco according to the thermostat
>> settings;
>> - The thermostat address can be omitted when in control commands over
>> HTTP or MQTT. In this case the command applies to all thermostats;
>> - HTTP access control (CORS) support added;
>> - HTTP server JSONP support added.
>>
> I'm just getting back into Ada. In order to get some experience with
> gnat-gps, I tried to build max_home_automation. This gives an error
> "apq.ads not found" for apq_keys.ads.  What am I missing?

You should use the GPR project file (max_home_automation.gpr). APQ is 
referenced in some source files irrelevant to this project. It seems 
that you just compile every source file in there. That will not work.

Also you should set project scenario variables to match your target. 
Then there must be GtkAda + GTK3 developing installed. Additionally 
under Linux, unixODBC developing package must be installed.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: ANN: MAX! home automation v1.9
  2017-06-16 19:54   ` Dmitry A. Kazakov
@ 2017-06-16 21:22     ` lyttlec
  2017-06-17  8:12       ` Dmitry A. Kazakov
  0 siblings, 1 reply; 7+ messages in thread
From: lyttlec @ 2017-06-16 21:22 UTC (permalink / raw)


On 06/16/2017 03:54 PM, Dmitry A. Kazakov wrote:
> On 2017-06-16 16:35, lyttlec wrote:
>> On 04/19/2017 12:30 PM, Dmitry A. Kazakov wrote:
>>> The software is an Ada GUI application to control wireless radiator
>>> thermostats produced under brands MAX! and ELV.
>>>
>>>     http://www.dmitry-kazakov.de/ada/max_home_automation.htm
>>>
>>> Changes to the previous version:
>>>
>>> - MQTT on WebSocket support added;
>>> - The MQTT server's topic names have the leading '/' removed because
>>> some MQTT clients reported having troubles with names starting with '/';
>>> - When controlled over HTTP or MQTT the target temperature can be
>>> specified to be airing, comfort, and eco according to the thermostat
>>> settings;
>>> - The thermostat address can be omitted when in control commands over
>>> HTTP or MQTT. In this case the command applies to all thermostats;
>>> - HTTP access control (CORS) support added;
>>> - HTTP server JSONP support added.
>>>
>> I'm just getting back into Ada. In order to get some experience with
>> gnat-gps, I tried to build max_home_automation. This gives an error
>> "apq.ads not found" for apq_keys.ads.  What am I missing?
> 
> You should use the GPR project file (max_home_automation.gpr). APQ is
> referenced in some source files irrelevant to this project. It seems
> that you just compile every source file in there. That will not work.
> 
> Also you should set project scenario variables to match your target.
> Then there must be GtkAda + GTK3 developing installed. Additionally
> under Linux, unixODBC developing package must be installed.
> 
Thanks for the reply.
I have unixodbc, unixodbc-dev, unixodbc-bin installed.
I also have libgtk-3-dev, libgtkada3.14, libgtkada3.14-dev,
libgnatcoll-gtk3.17
I started the project with :
   gnat-gps max_home_automation.gpr &
and then selected
   Build->Project->Build All
Under the Scenario tab, the list is empty. The target is the laptop used
for the build: amd 64-bit Ubuntu 17.04
I do have the environment variable ADA_INCLUDE_PATH set to the paths to
the max source and to /usr/share/ada/adainclude/gtkada

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: ANN: MAX! home automation v1.9
  2017-06-16 21:22     ` lyttlec
@ 2017-06-17  8:12       ` Dmitry A. Kazakov
  2017-06-17 12:10         ` lyttlec
  0 siblings, 1 reply; 7+ messages in thread
From: Dmitry A. Kazakov @ 2017-06-17  8:12 UTC (permalink / raw)


On 2017-06-16 23:22, lyttlec wrote:

> I have unixodbc, unixodbc-dev, unixodbc-bin installed.
> I also have libgtk-3-dev, libgtkada3.14, libgtkada3.14-dev,
> libgnatcoll-gtk3.17
> I started the project with :
>     gnat-gps max_home_automation.gpr &
> and then selected
>     Build->Project->Build All
> Under the Scenario tab, the list is empty. The target is the laptop used
> for the build: amd 64-bit Ubuntu 17.04
> I do have the environment variable ADA_INCLUDE_PATH set to the paths to
> the max source and to /usr/share/ada/adainclude/gtkada

OK. Regarding gnat-gps I cannot tell for sure. AFAIK, only an outdated 
version is available.

Nevertheless, I found a few glitches to take care of:

1. In max_home_automation.gpr remove all directories in the file paths 
given in "with" clauses. The header of the file must be this:
--------------------------------------------------------
with "components-connections_server-elv_max_cube.gpr";
with "components-connections_server-mqtt.gpr";
with "components-connections_server-http_server.gpr";
with "components-connections_server-secure.gpr";
with "components-connections_server-smtp.gpr";
with "components-odbc.gpr";
with "components-sqlite.gpr";
with "components-gtk.gpr";
with "aicwl.gpr";

project Max_Home_Automation is
--------------------------------------------------------

2. In gtkada_contributions.gpr at the end you see this:

    package Linker is
       case Development is
          when "Debug" =>
             for Default_Switches ("ada") use 
Gtkada.Linker'Default_Switches ("ada") &
                                              "-g" &
                                              "-lgio-2.0" &
                                              "-mwindows";
          when "Release" =>
             for Default_Switches ("ada") use 
Gtkada.Linker'Default_Switches ("ada") &
                                              "-O2" &
                                              "-lgio-2.0" &
                                              "-mwindows";
       end case;
    end Linker;

Replace both "-mwindows" with "-ldl"

Now the command to build using grpbuild should be:

 > gprbuild max_home_automation.gpr -Xodbc=unixODBC 
-XAtomic_Access=Pragma-atomic -Xarch=x86_64

The important scenario variables here:

odbc = unixODBC
    (you have Linux ODBC driver)

Atomic_Access = Pragma-atomic
    (you have pragma Atomic working with 64-bit objects)

arch = x86_64
    (you have 64-bit machine)

These would the choices for GPS too. The issue #1 should not let you 
have project loaded correctly. The issue #2 prevents binding and linking it.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: ANN: MAX! home automation v1.9
  2017-06-17  8:12       ` Dmitry A. Kazakov
@ 2017-06-17 12:10         ` lyttlec
  2017-06-17 13:25           ` Dmitry A. Kazakov
  0 siblings, 1 reply; 7+ messages in thread
From: lyttlec @ 2017-06-17 12:10 UTC (permalink / raw)


On 06/17/2017 04:12 AM, Dmitry A. Kazakov wrote:
> On 2017-06-16 23:22, lyttlec wrote:
> 
>> I have unixodbc, unixodbc-dev, unixodbc-bin installed.
>> I also have libgtk-3-dev, libgtkada3.14, libgtkada3.14-dev,
>> libgnatcoll-gtk3.17
>> I started the project with :
>>     gnat-gps max_home_automation.gpr &
>> and then selected
>>     Build->Project->Build All
>> Under the Scenario tab, the list is empty. The target is the laptop used
>> for the build: amd 64-bit Ubuntu 17.04
>> I do have the environment variable ADA_INCLUDE_PATH set to the paths to
>> the max source and to /usr/share/ada/adainclude/gtkada
> 
> OK. Regarding gnat-gps I cannot tell for sure. AFAIK, only an outdated
> version is available.
> 
> Nevertheless, I found a few glitches to take care of:
> 
> 1. In max_home_automation.gpr remove all directories in the file paths
> given in "with" clauses. The header of the file must be this:
> --------------------------------------------------------
> with "components-connections_server-elv_max_cube.gpr";
> with "components-connections_server-mqtt.gpr";
> with "components-connections_server-http_server.gpr";
> with "components-connections_server-secure.gpr";
> with "components-connections_server-smtp.gpr";
> with "components-odbc.gpr";
> with "components-sqlite.gpr";
> with "components-gtk.gpr";
> with "aicwl.gpr";
> 
> project Max_Home_Automation is
> --------------------------------------------------------
> 
> 2. In gtkada_contributions.gpr at the end you see this:
> 
>    package Linker is
>       case Development is
>          when "Debug" =>
>             for Default_Switches ("ada") use
> Gtkada.Linker'Default_Switches ("ada") &
>                                              "-g" &
>                                              "-lgio-2.0" &
>                                              "-mwindows";
>          when "Release" =>
>             for Default_Switches ("ada") use
> Gtkada.Linker'Default_Switches ("ada") &
>                                              "-O2" &
>                                              "-lgio-2.0" &
>                                              "-mwindows";
>       end case;
>    end Linker;
> 
> Replace both "-mwindows" with "-ldl"
> 
> Now the command to build using grpbuild should be:
> 
>> gprbuild max_home_automation.gpr -Xodbc=unixODBC
> -XAtomic_Access=Pragma-atomic -Xarch=x86_64
> 
> The important scenario variables here:
> 
> odbc = unixODBC
>    (you have Linux ODBC driver)
> 
> Atomic_Access = Pragma-atomic
>    (you have pragma Atomic working with 64-bit objects)
> 
> arch = x86_64
>    (you have 64-bit machine)
> 
> These would the choices for GPS too. The issue #1 should not let you
> have project loaded correctly. The issue #2 prevents binding and linking
> it.
> 
Thanks!

I got the command line to build after changing "-mwindows" to "-ldl".
-mwindows is not a valid option on my installation, and the -ldl is
needed to get rid of the "missing DSO" error.

It looks like the version of gnat-gps in Ubuntu is not good. I'm going
try a manual build from current sources and see what happens.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: ANN: MAX! home automation v1.9
  2017-06-17 12:10         ` lyttlec
@ 2017-06-17 13:25           ` Dmitry A. Kazakov
  0 siblings, 0 replies; 7+ messages in thread
From: Dmitry A. Kazakov @ 2017-06-17 13:25 UTC (permalink / raw)


On 2017-06-17 14:10, lyttlec wrote:

> I got the command line to build after changing "-mwindows" to "-ldl".
> -mwindows is not a valid option on my installation, and the -ldl is
> needed to get rid of the "missing DSO" error.

Yes, mwindows is needed under Windows and dl (dynamic loader) is 
required by SQLite under Linux.

There is no way I know to detect the OS inside the gpr project. For 
binary packages I generate gpr files from scratch.

> It looks like the version of gnat-gps in Ubuntu is not good.

You could try to install GPS from GNAT GPL 2017 and then use it with the 
Ubuntu's GNAT FSF.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-06-17 13:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-19 16:30 ANN: MAX! home automation v1.9 Dmitry A. Kazakov
2017-06-16 14:35 ` lyttlec
2017-06-16 19:54   ` Dmitry A. Kazakov
2017-06-16 21:22     ` lyttlec
2017-06-17  8:12       ` Dmitry A. Kazakov
2017-06-17 12:10         ` lyttlec
2017-06-17 13:25           ` Dmitry A. Kazakov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox