Pip Oomen
Pip Oomen
Could this be related to _Enable polling for updates_? I have been experiencing the same issue and it has been driving me nuts while trying to integrate the Mill Gen...
> Now, why would I want the _enable polling for updates_ setting on? I'm assume just turning it off will lead to some sort of negative implications? I have been...
> * usage statistics might be effected This is definitely an issue now 😞
This seems to be a caching issue, ie. [cached_request](https://github.com/Danielhiversen/pymill/blob/master/mill/__init__.py#L159) is returning stale data for `lastMetrics`.
@Danielhiversen Nope. It seems like the API from Mill is _eventual consistent_ and that the request that retrieves the new state for the heater that got its temperature adjusted is...
Solution might be to use `deviceSettings.desired`, instead of `lastMetrics`
``` diff --git a/mill/__init__.py b/mill/__init__.py index c7567b8..4ba7965 100644 --- a/mill/__init__.py +++ b/mill/__init__.py @@ -507,11 +507,12 @@ class Heater(MillDevice): """Post init.""" if self.data: last_metrics = self.data.get("lastMetrics", {}) + device_settings_desired = self.data.get("deviceSettings",...
Danielhiversen/pymill#84
It looks like the Python pulumi program has a similar issue (ie. property naming, and camelcase/underscore mismatch): ``` Exception: invoke of talos:machine/getConfiguration:getConfiguration failed: invocation of talos:machine/getConfiguration:getConfiguration returned an error: [AttributeName("machine_secrets").AttributeName("certs").AttributeName("k8s_serviceaccount")]...
Python program: ``` import pulumiverse_talos as talos this_secrets = talos.machine.Secrets("thisSecrets") this_configuration = talos.machine.get_configuration_output( cluster_name="example-cluster", machine_type="controlplane", cluster_endpoint="https://cluster.local:6443", machine_secrets=this_secrets.machine_secrets, ) ``` Results in: ``` Exception: invoke of talos:machine/getConfiguration:getConfiguration failed: invocation of talos:machine/getConfiguration:getConfiguration...