Comments (11)
hmm, I just enabled NTP on my neohub (in fact I port forwarded NTP requests to my local NTP server on my router). But I guess if you don't want NTP that would be fine...
from heatmiser-for-home-assistant.
What I should have added is that enabling NTP seems to be temporary - it corrects the clock at the time the call is made, but the clock drifts from that point onwards. So I find that I need to call NTP_ON
every so often (maybe weekly) to keep it in check.
Oh, and {"NTP_ON": 0}
activates NTP, rather than disabling it.
So it's not that I don't want NTP, it seems that this is the method necessary to keep NTP working.
from heatmiser-for-home-assistant.
So it's not that I don't want NTP, it seems that this is the method necessary to keep NTP working.
Hmm, interesting.... My experience was that time is not drifting away when NTP is enabled. If it happens on some hardware then something like this might make sense.
Maybe it's worth asking heatmiser support? They seem to be quite helpful.
from heatmiser-for-home-assistant.
That's a good suggestion - I'll drop them a note. I've started looking more closely at this. I find that my stats are losing something in the order of 10 seconds per day. An inspection of READ_DCB
confirms that NTP has stopped after a time (I'm not sure how long it takes).
For example after two or three days:
$ date && python3 ./test-stat.py
Sat 21 Nov 17:04:35 AEDT 2020
json_request: {'READ_DCB': 100}
json_response: {..., "DSTAUTO":false,"DSTON":false, ..., "NTP":"Stopped", ..., "TIME":"17:04:07","TIMEZONE":10.0,"TIMEZONESTR":"", ...}
Then I run update DST and activate NTP, and it comes good:
date && python3 ./test-stat.py
Sat 21 Nov 17:05:22 AEDT 2020
json_request: {'MANUAL_DST': 1}
json_response: {"result":"Updated time"}
json_request: {'NTP_ON': 0}
json_response: {"result":"ntp client started"}
json_request: {'READ_DCB': 100}
json_response: {..., "DSTAUTO":false,"DSTON":true, ... ,"NTP":"Running", ... ,"TIME":"17:05:04","TIMEZONE":10.0,"TIMEZONESTR":"", ...}
But a few days later, I will find NTP not running and the clocks starting to drift again.
Anyway, I'll come back if / when I get a response.
from heatmiser-for-home-assistant.
Maybe something was setting the time in the meantime?
Messing up with time (e.g. with SET_TIME
call) sets NTP into "Stopped" state
from heatmiser-for-home-assistant.
On this occasion, you're probably right - I had been stuffing around a bit, so it's likely that the most recent thing I did was set the time manually in the app. I'll keep an eye on it over the next couple of days. NTP is still running today, and there hasn't been any clock drift. Trick here will be to catch what causes NTP to stop running (apart from me interfering).
from heatmiser-for-home-assistant.
Coming back to this, I think I've got a better idea of what's going on now. First some observations:
- If I touch nothing, NTP runs reliably - at least it has done for the last 2-3 weeks
- Any modification to time in the Heatmiser Neo app causes NTP to stop
- There is no way to restart NTP from the app
- The app provides no method to set / clear daylight savings
- It's possible to set / clear DST through the API and not break NTP
So for geographies with daylight savings, I think we need something in the integration to help manage daylight savings, as there is no way for an ordinary user to do this without breaking NTP (other than sending commands through the API).
My suggestion is to offer a custom service in the integration to set / clear daylight saving as a custom HA service. The HA user could then create an automation to set / clear DST using the custom service in the Heatmiser integration, triggered at the appropriate time.
If we wanted to go a bit further, we could also:
- Offer a custom service to set timezone (GMT offset) - anyone living outside the three app supported timezones is out of luck
- Offer a custom service to start NTP
A better option for the second point might be to routinely start NTP as a hidden API call as part of the DST / timezone custom integration services - just in case the user has messed up NTP by setting the time through the Heatmiser app.
Interested in your thoughts.
from heatmiser-for-home-assistant.
Adding custom service sounds reasonable.
It seems that some other integrations also do that: https://github.com/home-assistant/core/blob/dev/homeassistant/components/ecobee/climate.py#L263
from heatmiser-for-home-assistant.
Nice one - that's a perfect example.
from heatmiser-for-home-assistant.
An ability to set the time would be awesome.
Whenever the thermostat loses connection to the hub, or the hub loses power, the time on the thermostat seems to reset to GST.
Not helpful when I'm in NZ on DST.
Only way to reset it is to go into the app, set the clock to GST (as it still shows NZ in there), wait a few minutes and set it back to NZ again.
from heatmiser-for-home-assistant.
While this is not yet in the MindrustUK code, I used the following workaround. Added it here because it might be usefull for others.
in configuration.yaml
add:
shell_command: !include shell_commands.yaml
in shell_commands.yaml
add:
neohub_sync_time: echo -e '{"NTP_ON":0}\x00\r' | nc 192.168.88.204 4242
in automations.yaml
add:
- id: '1692600497550'
alias: NeoHub Sync Time
description: ''
trigger:
- platform: time_pattern
hours: '00'
minutes: '00'
seconds: '00'
condition: []
action:
- service: shell_command.neohub_sync_time
data: {}
response_variable: neohub_sync_time_response
mode: single
Have not yet found a way to reset DST time zone back to NZ (am in New Zealand as well). For now, it seems to stick to its NZ value and not fall back to GST.
from heatmiser-for-home-assistant.
Related Issues (20)
- pros and cons of this integration versus adding as homekit device HOT 2
- Feature: Add specific device type for HeatMiser Wireless Air Sensors HOT 10
- repeated very offten update_coordinator.py:168 HOT 7
- HomeKit discovery for Heatmiser neoHub (Bridge) - disable or remove option HOT 1
- Unable to connect to Neo Hub HOT 5
- Neo Hub, Neostat and NeoUltra - can't see temperatures HOT 21
- Integration stopped working in 2023.5.0 HOT 6
- Feature: Add support for auto discovery of Heatmiser NeoHub 2 devices HOT 1
- Upgrade to HA 2023.5.2 causes Heatmiser integration issue HOT 2
- Bug: Changes in Neohubapi v1.1 breaks addon for some users. HOT 28
- Thank you HOT 5
- NeoHubConnectionError HOT 8
- Bug in config_flow: Regression from Commit 02c1ae1 HOT 1
- Feature Request: Add support for websockets (Token based authentication). HOT 2
- Accessing thermostat temperatures HOT 2
- Feature: Add support for Door/window Contact HOT 9
- Feature Request: Holiday Mode HOT 3
- Bug: Offline devices are added as the incorrect device type. HOT 2
- Bug: Climate state set to "Off" when using Hold feature. HOT 7
- Bug: '24:00' does not match format '%H:%M' HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from heatmiser-for-home-assistant.