embyt / enocean-mqtt

Receives messages from an enOcean serial interface (USB) and provides selected messages to an MQTT broker.
GNU General Public License v3.0
42 stars 21 forks source link

add timezone + remove default config file #15

Closed m4dm4rtig4n closed 4 years ago

m4dm4rtig4n commented 4 years ago

I have add timezone.

I remove default config file to load directly good config file. When i set ENTRYPOINT with "/enoceanmqtt-default.conf /config/enoceanmqtt.conf" my file /config/enoceanmqtt.conf not loaded.

romor commented 4 years ago

Thanks a lot for the improvements!

I think it is a good idea to change the default mqtt_keepalive if you had problems with it. Still I do not know why the setting zero works for me, but obviously not everyone.

I am not sure about the two other changes:

  1. Why did you remove the default config? It should provide a safe fall-back value, which probably fit for most users. If this is done correctly (with the comma separator, to be fixed) I think this should be kept.

  2. I am no expert in using Docker but I think the timezone shall not be set in a generic library Dockerfile as it will not fit for all users ("Europe/Paris")?

m4dm4rtig4n commented 4 years ago

Why did you remove the default config? It should provide a safe fall-back value, which probably fit for most users. If this is done correctly (with the comma separator, to be fixed) I think this should be kept.

=> In my case, only the default file was loaded not the following (i don't know why). And all users will be required to have the own conf file to add their modules. You might as well load a single file with your default configuration and people will adapt it with their values.

I am no expert in using Docker but I think the timezone shall not be set in a generic library Dockerfile as it will not fit for all users ("Europe/Paris")?

=> I have set "Europe/Paris", because is it's my timezone :D But i think to set default timezone to GMT 0 ?

romor commented 4 years ago

=> In my case, only the default file was loaded not the following (i don't know why).

I guess this was related to the missing comma that you fixed with commit f5b596f9b.

=> I have set "Europe/Paris", because is it's my timezone :D But i think to set default timezone to GMT 0 ?

What happens if you do not add your change? I assume that GMT is the default anyway?

m4dm4rtig4n commented 4 years ago

What happens if you do not add your change? I assume that GMT is the default anyway?

yes, but you lose the opportunity to do so :/

romor commented 4 years ago

Thanks again for your contribution. I added the relevant parts with commit e1ecbc0 and 6a365e9b.