OpenGarage › Forums › OpenGarage Firmware › Time in Log file invalid when using Static IP
- This topic has 12 replies, 8 voices, and was last updated 5 years, 4 months ago by Ray.
-
AuthorPosts
-
February 12, 2019 at 6:03 pm #1429
andrewsciParticipantIt seems that when I set the OG with a static ip address, the time in the log becomes invalid. I think I first noticed this in 1.0.9 and it’s still there in 1.1.0
It works fine using DHCP.
Just an FYI.
Thanks, a
February 15, 2019 at 2:38 pm #1431
RayKeymasterOK, I will check. I don’t think it should have anything to do with static ip vs. DHCP — the only reason for time being invalid would be NTP time sync fails.
By the way, even with DHCP, you can still set a fixed IP, by going to your router’s configuration page, and set a DHCP reservation for the device (basically binding a fixed IP to its MAC address). This is effectively static IP, but managed using the router.
February 19, 2019 at 3:51 pm #1434
andrewsciParticipantThanks, Ray. That is, in fact, how I created the new static ip. I only noticed it because in trying to reset the device, the default is DHCP and suddenly the time was right in the log. I then set a static ip address and the time stamps were all wrong. Initially I did not use DHCP because I use a different sub-net to isolate all my IOT devices, JIFC. I’d like to go back to that policy, so please let me know if you find the problem. Again, thanks.
March 29, 2019 at 9:11 pm #1522
apopParticipantI noticed the same thing after setting a static IP. Not a big deal for me since I’m using Home Assistant and that’s my source of truth for logging, but I still decided to manage my IP reservation through the router to remedy this.
April 18, 2019 at 8:53 am #1568
binnyukParticipantI found the same issue.
On top of this, it also seems if the date/time is wrong, blynk doesn’t see the board online. As soon as you use DHCP and date/time is correct, blynk says the board is online.
May 20, 2019 at 7:10 am #1640
insight3flParticipantI am having the same problem. I am running old firmware, but since I added static IP the date and time is wrong… it says January 1 1970!
June 17, 2019 at 9:46 am #1697
kentaylorParticipantCould this be a DNS issue? – DHCP will supply the DNS, but there is nowhere on the static IP page to insert one
I worked around this by doing a DHCP static mapping and it came good
- This reply was modified 5 years, 5 months ago by kentaylor.
June 20, 2019 at 3:55 pm #1709
RayKeymasterYes, this is most likely a DNS issue — the current firmware 1.1.0 does not accommodate custom DNS. I’m already working on firmware 1.1.1 which will allow custom DNS and should fix this issue. In the meantime, as suggested earlier in the thread, you can use your router’s DHCP reservation feature to bind a fixed IP address to the controller — there is no need to set static IP on OpenGarage, instead, leave it in DHCP but use your router to set a fixed IP to it.
June 22, 2019 at 6:56 am #1716
AndyCParticipantI noticed the same thing and modified the firmware to allow specifying the DNS value for a static configuration.
I’ve attached an updated firmware which is working well for me if anyone wants to try. Ray, I’ve attached the source if interested.- This reply was modified 5 years, 5 months ago by AndyC.
- This reply was modified 5 years, 5 months ago by AndyC.
Attachments:
You must be logged in to view attached files.June 27, 2019 at 12:18 pm #1727
RayKeymasterThanks, yes I did pretty much make the same changes and that indeed fixed the issue. I haven’t got around time to push the code out yet but should be able to do so this weekend. Thanks.
June 30, 2019 at 2:28 pm #1736
RayKeymasterA new firmware (1.1.1) has been committed to github (it’s in dev-1.1.1 branch, not yet merged with master). You can download and try the compiled firmware 1.1.1:
https://github.com/OpenGarage/OpenGarage-Firmware/tree/dev-1.1.1/CompiledIt added DNS parameter which should fix the NTP time sync issue when using static IP. It also includes another option to disable alarm when opening door (thus alarm is only effective when closing the door, per request from another thread).
July 2, 2019 at 1:24 pm #1746
jagosParticipantHow about also adding a field for NTP IP address that is settable independent of static or DHCP? My router acts as an NTP server and I might point the OG to that. May be too late for 1.1.1 but maybe in future?
ETA: Are the new fields also added to the http API for reading and setting?
- This reply was modified 5 years, 4 months ago by jagos.
July 5, 2019 at 4:09 pm #1755
RayKeymasterSure, adding another field for NTP is pretty straightforward.
I haven’t had time to update the API document. The added option name is ‘dns1’:
https://github.com/OpenGarage/OpenGarage-Firmware/blob/dev-1.1.1/OpenGarage/defines.h#L148
the reason it’s called dns1 is that the ESP8266 library can accept 3 DNS servers, so in the firmware we left dns1 as user-configurable, and the other two default DNS server IPs. The format of this parameter is the same as other similar parameters (i.e. dvip and gwip). -
AuthorPosts
- You must be logged in to reply to this topic.
OpenGarage › Forums › OpenGarage Firmware › Time in Log file invalid when using Static IP