Page 1 of 1

Change Hardware .cpp file

Posted: Friday 02 December 2022 9:03
by JeroNeo
Hello,

I am trying to add changes to a .cpp file in the hardware dir
but i cannot get this to work.
I have Debian 11 and compiled Domoticz (V2022.2 (build 14784)) according to this guide: https://www.domoticz.com/wiki/Build_Dom ... rom_source
I open up lets say /dev-domoticz/hardware/SatelIntegra.cpp and change some log lines and saved them. then preform:
$ sudo make
i see that the file i have edited is changed and being added

after that i preform:
$ ./domoticz
but do not see my changes i have added at the log line.
I think i am missing a step.

Best regards,
Jero

Re: Change Hardware .cpp file

Posted: Friday 02 December 2022 10:28
by waltervl
First, I never build domoticz myself so perhaps I am saying something stupid....

Do you start ./domoticz in the /dev-domoticz (build)folder or in the /domoticz (installed) folder? It should be in de dev-domoticz folder i suppose.
Is the domoticz executable modified in the folder you have manualy started domoticz?

Re: Change Hardware .cpp file

Posted: Friday 02 December 2022 12:11
by JeroNeo
started it from dev-domoticz and also i need to start it manually

Re: Change Hardware .cpp file

Posted: Friday 02 December 2022 17:24
by ferrosk
JeroNeo wrote: Friday 02 December 2022 9:03 after that i preform:
$ ./domoticz
but do not see my changes i have added at the log line.
I think i am missing a step.
It should work like that. When you start re-built domoticz, in startup logs, do you see "-modified" flag added in "Build Hash:" message? It indicates that you really started domoticz built from modified source files, in example:

2022-12-02 17:03:06.906 Status: Domoticz V2022.2 (build 14789) (c)2012-2022 GizMoCuz
2022-12-02 17:03:06.906 Status: Build Hash: e51770e85-modified, Date: 2022-12-02 09:15:37

Re: Change Hardware .cpp file

Posted: Monday 05 December 2022 8:46
by JeroNeo
ferrosk wrote: Friday 02 December 2022 17:24
JeroNeo wrote: Friday 02 December 2022 9:03 after that i preform:
$ ./domoticz
but do not see my changes i have added at the log line.
I think i am missing a step.
It should work like that. When you start re-built domoticz, in startup logs, do you see "-modified" flag added in "Build Hash:" message? It indicates that you really started domoticz built from modified source files, in example:

2022-12-02 17:03:06.906 Status: Domoticz V2022.2 (build 14789) (c)2012-2022 GizMoCuz
2022-12-02 17:03:06.906 Status: Build Hash: e51770e85-modified, Date: 2022-12-02 09:15:37
there is the issue, i am getting:

2022-12-05 08:15:56.161 Status: Domoticz V2022.2 (build 14784) (c)2012-2022 GizMoCuz
2022-12-05 08:15:56.161 Status: Build Hash: e04d1d3e2, Date: 2022-11-29 07:53:03
2022-12-05 08:15:56.161 Status: Startup Path: /home/domoticz/dev-domoticz/

Without -modified. i have restarted the server and did the steps again it does not change to modified.

Re: Change Hardware .cpp file

Posted: Monday 05 December 2022 8:52
by gizmocuz
I don't think you need to issue any 'sudo' command when building
Please note that the executable could be build inside the 'bin' folder

Re: Change Hardware .cpp file

Posted: Monday 05 December 2022 11:35
by JeroNeo
gizmocuz wrote: Monday 05 December 2022 8:52 I don't think you need to issue any 'sudo' command when building
Please note that the executable could be build inside the 'bin' folder
Thank you for pointing out the "bin" folder.
this does the trick.
i can now see and test my changes. and they are working.