-
Notifications
You must be signed in to change notification settings - Fork 339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Settings - Time #1530
Comments
@flatsiedatsie , I think gateway is not the right owner for this issue. The controller(MySController-rs) is the one currently responds to time request from sensors. |
I believe #1113 is the best way of solving the time problem but I agree that there are benefits to being able to manually adjust the gateway's time |
@hobinjk I thought about is some more, and setting the time would definitely be important because in my opinion it should be possible to use the gateway without any internet connection. For the product I'm developing around the Mozilla Gateway this will be the default mode. |
there's a display of date/time when keying in "date" in the pi. Just not in the gateway software. Mine is about 6 min slow. A way to view time or set time would be nice. |
I'm running into this again as well. The MySensors adapter uses a library that has a built in feature to tell the nodes in the network the time. it simply sends the Unix time from the Pi to the nodes. I use this, for example, for an alarm clock. It requests the time from the controller. As the Pi is on UTC, this means my alarm clock displays a time that is two hours behind the actual time. I could try to hack/modify the library to override it with a shifted time somehow. But even then this would require the WebThings Gateway to tell the adapter what the user's actual timezone/time difference is. |
Unix time is per definition UTC.
But which user? As I understand it an addon is installed per system not per user. |
@tim-hellhake You're right, I meant to say a timestamp in Unix format. "As I understand it an addon is installed per system not per user." Great! A system has a physical location, and that is always in a timezone. Setting a system time is a great place to start. |
There are probably a number of ways to deal with this. One way is to run raspi-config and set the timezone. Then when you ask for the localtime it will give you the proper local time. We should probably make setting the timezone part of the first-time setup. |
"One way is to run raspi-config and set the timezone." The problem is that, at least currently, the logs don't work properly anymore if the system is not on UTC. // Here's a link to the issue. |
Then maybe we should fix that ;-) |
I really ran into this issue while creating the Voco add-on. One of it's features is that it allows users to say things like "set an alarm for 8 o'clock". Currently the add-on has to deal with 3 different times:
It's.. a lot of operations, which could be avoided if the WebThings Gateway could be relied on to have the actual local time of the user. More importantly, it's fragile. The problem is that when the user says "set an alarm for 8 o'clock", Snips will internally deduce when the next 8 o' clock is based on the internal clock. This leads to weird situation. E.g. imagine that the user's is in Paris at 20:15 and they say "set an alarm for 8 o'clock". For them 20h has passed, and the next 8 o'clock will be in the morning. But Snips, which is operating in London time, will return "20h" as the desired time, since according to it the next "8 o'clock" is just 45 minutes away. There are a few solutions:
Ideally, a user sets their local time/zone in the Gateway UI. |
References WebThingsIO#1113 References WebThingsIO#1523 References WebThingsIO#1530 References WebThingsIO#2123
References WebThingsIO#1523 References WebThingsIO#1530 Fixes WebThingsIO#1113 Fixes WebThingsIO#2123
References WebThingsIO#1523 References WebThingsIO#1530 Fixes WebThingsIO#1113 Fixes WebThingsIO#2123
Setting the country, timezone, and language are fully implemented, but the unit settings will require some additional effort to plumb through the whole UI. References WebThingsIO#1523 Fixes WebThingsIO#808 Fixes WebThingsIO#1113 Fixes WebThingsIO#1530 Fixes WebThingsIO#2123
Setting the country, timezone, and language are fully implemented, but the unit settings will require some additional effort to plumb through the whole UI. References WebThingsIO#1523 Fixes WebThingsIO#808 Fixes WebThingsIO#1113 Fixes WebThingsIO#1530 Fixes WebThingsIO#2123
As far as I can tell from the new code, it allows a user to set the time zone, but not the actual time? So the system is still dependent on a third party service for that? Which means the system is still regularly "phoning home" to some unknown party? |
It is only "phoning home" in the sense that it is pulling the current time periodically via NTP from the NTP pool. NTP request packets don't have anything sensitive in them. Our reasoning for still using NTP versus having the user manually set the clock is discussed here. However, the user can still use the gateway completely offline, which means NTP wouldn't be used. In that case, they'd have to handle the clock on their own. |
They do. Your IP address is considered personal data. On top of that, privacy invasion isn't just about the content of the packet. It's just as much about observing behavioural patterns. Nothing is free. Is Mozilla paying the NTP server pool? Do you have a subscription to it? If not, it means they are making money some other way. From what I can tell, anyone can add their server to the NTP pool, meaning you can't be sure who is getting the ping from your system. It might be Facebook, Google, etc. On top of that, any intermediary server along the route could find out that this IP address requested the time. A whole string of servers is informed that my IP address is connected to the internet, and that I just booted up a system. "this household has a lot of servers / reboots them a lot" -> insert derived or inferred algorithmic conclusion here. In the data economy, any signal is useful. If there is data, it will be fed into algorithms that derive and infer new data from it. The best way to protect privacy and enhance security is to not emanate any signal in the first place.
That's a false choice. You could support both? Ive already been in situations where if would have been very useful to have an option like "click here to synchronise the clock with the browser time". Users may be off grid when a reboot happens. Imagine the gateway being used on boats, trucks, camping in the wilderness, etc. Trade exhibits where you have to pay extra for an internet connection, etc. It cost $300 at Dutch Design Week, for example, which we didn't want to pay to show off a system that we were presenting as being able to work without an internet connection. But this meant that every morning (exhibits must be powered off at night) someone with SSH knowledge had to be at the exhibit to log in and set the correct time. Visitors could then ask "hey Snips, what time is it" without getting an incorrect value. If there has been a UI for this, people with less technological skills could have taken care of this issue. https://resources.infosecinstitute.com/network-time-protocol-ntp-threats-countermeasures/ |
It seems the gateway currently supplies the wrong time (if I understand correctly).
There is no option in the UX for setting the time / clock.
I don't know if setting a location / timezone would be a better / enough of a solution.
The issue of Europe stepping away from summer/wintertime is also coming in the median future.
See also:
#1113
#1428
The text was updated successfully, but these errors were encountered: