Issues on training model "_classcond"

Hey! I was trying to play with threeseqdel_classcond (or threeseqabs_classcond) however two problems came out.

preprocessing the directory into a .npz is not possible, i.g.

python data/qd.py /the/output/dir/cat threeseqdel_classcond

raises errors
Traceback (most recent call last):
  File "/mnt/lustre/bethge/bkr863/chirodiff_test/data/qd.py", line 281, in <module>
    dummy_sample = ds[0]
  File "/mnt/lustre/bethge/bkr863/chirodiff_test/data/qd.py", line 140, in __getitem__
    return self.represent(self.get_sketch(i))
  File "/mnt/lustre/bethge/bkr863/chirodiff_test/data/qd.py", line 201, in represent
    label = torch.tensor(sketch.label, dtype=torch.int64)
TypeError: an integer is required (got type NoneType)

If i skip this step as suggested in README.md, and start the training. In the config.yml, I changed repr into threeseqdel_classcond. And for example, under the /the/output/dir/ I have two folders, cat and dog,  seperately including some sketches, and therefore I setup num_classes: typing.Optional[int] = 2 in config.yml , as suggesed in  ln 74 in main.py, and therefor I have root_dir in config.yml to be /the/output/dir/, and naturally the error becomes

SOMEPATH/pytorch_lightning/utilities/data.py:103: UserWarning: Total length of `CombinedLoader` across ranks is zero. Please make sure this was your intention.
  rank_zero_warn(
`Trainer.fit` stopped: No training batches.

I guess this could be easily fixed if you could remind some special settings/path selections specifically for the class condition?
Many thanks!

It's been a while I haven't touched this code. But I see what you are doing wrong in point 1. In case of class conditional, you have to have multiple class folders and you should point to the root folder, i.e. do this
python data/qd.py /the/output/dir/ threeseqdel_classcond
~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^~~~~~~~~~~~

.. and make sure you have class folders under them which contain sketches of respective class
/the/output/dir/cat
/the/output/dir/dog
/the/output/dir/whatever

This creates the sketch.label property where the error is coming from. Maybe the readme isn't super clear about the class conditional part.
I never saw the second error but I wouldn't recommend doing the second way. The first way will work if everything is done right.

Thank you for your last message. It totally worked!
Now I am training with the threeseqabs_classcond, 7 categories, each 50000 sketches. But the following question rises.
Traceback (most recent call last):
  File "SOMEPATH/chirodiff_test/main.py", line 944, in <module>
    cli = LightningCLI(
  File "SOMEPATH/conda_envs/cdiffnew/lib/python3.10/site-packages/pytorch_lightning/cli.py", line 359, in __init__
    self._run_subcommand(self.subcommand)
  File "SOMEPATH/conda_envs/cdiffnew/lib/python3.10/site-packages/pytorch_lightning/cli.py", line 650, in _run_subcommand
    fn(**fn_kwargs)
  File "SOMEPATH/conda_envs/cdiffnew/lib/python3.10/site-packages/pytorch_lightning/trainer/trainer.py", line 532, in fit
    call._call_and_handle_interrupt(
  File "SOMEPATH/conda_envs/cdiffnew/lib/python3.10/site-packages/pytorch_lightning/trainer/call.py", line 43, in _call_and_handle_interrupt
    return trainer_fn(*args, **kwargs)
  File "SOMEPATH/conda_envs/cdiffnew/lib/python3.10/site-packages/pytorch_lightning/trainer/trainer.py", line 571, in _fit_impl
    self._run(model, ckpt_path=ckpt_path)
  File "SOMEPATH/conda_envs/cdiffnew/lib/python3.10/site-packages/pytorch_lightning/trainer/trainer.py", line 980, in _run
    results = self._run_stage()
  File "SOMEPATH/conda_envs/cdiffnew/lib/python3.10/site-packages/pytorch_lightning/trainer/trainer.py", line 1023, in _run_stage
    self.fit_loop.run()
  File "SOMEPATH/conda_envs/cdiffnew/lib/python3.10/site-packages/pytorch_lightning/loops/fit_loop.py", line 202, in run
    self.advance()
  File "SOMEPATH/conda_envs/cdiffnew/lib/python3.10/site-packages/pytorch_lightning/loops/fit_loop.py", line 355, in advance
    self.epoch_loop.run(self._data_fetcher)
  File "SOMEPATH/conda_envs/cdiffnew/lib/python3.10/site-packages/pytorch_lightning/loops/training_epoch_loop.py", line 133, in run
    self.advance(data_fetcher)
  File "SOMEPATH/conda_envs/cdiffnew/lib/python3.10/site-packages/pytorch_lightning/loops/training_epoch_loop.py", line 190, in advance
    batch = next(data_fetcher)
  File "SOMEPATH/conda_envs/cdiffnew/lib/python3.10/site-packages/pytorch_lightning/loops/fetchers.py", line 126, in __next__
    batch = super().__next__()
  File "SOMEPATH/conda_envs/cdiffnew/lib/python3.10/site-packages/pytorch_lightning/loops/fetchers.py", line 58, in __next__
    batch = next(iterator)
  File "SOMEPATH/conda_envs/cdiffnew/lib/python3.10/site-packages/pytorch_lightning/utilities/combined_loader.py", line 285, in __next__
    out = next(self._iterator)
  File "SOMEPATH/conda_envs/cdiffnew/lib/python3.10/site-packages/pytorch_lightning/utilities/combined_loader.py", line 65, in __next__
    out[i] = next(self.iterators[i])
  File "SOMEPATH/conda_envs/cdiffnew/lib/python3.10/site-packages/torch/utils/data/dataloader.py", line 633, in __next__
    data = self._next_data()
 File "SOMEPATH/conda_envs/cdiffnew/lib/python3.10/site-packages/torch/utils/data/dataloader.py", line 1345, in _next_data
    return self._process_data(data)
  File "SOMEPATH/conda_envs/cdiffnew/lib/python3.10/site-packages/torch/utils/data/dataloader.py", line 1371, in _process_data
    data.reraise()
  File "SOMEPATH/conda_envs/cdiffnew/lib/python3.10/site-packages/torch/_utils.py", line 644, in reraise
    raise exception
IndexError: Caught IndexError in DataLoader worker process 1.
Original Traceback (most recent call last):
  File "/mnt/qb/work/bethge/bkr863/conda_envs/cdiffnew/lib/python3.10/site-packages/torch/utils/data/_utils/worker.py", line 308, in _worker_loop
    data = fetcher.fetch(index)
  File "/mnt/qb/work/bethge/bkr863/conda_envs/cdiffnew/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py", line 51, in fetch
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/mnt/qb/work/bethge/bkr863/conda_envs/cdiffnew/lib/python3.10/site-packages/torch/utils/data/_utils/fetch.py", line 51, in <listcomp>
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/mnt/qb/work/bethge/bkr863/conda_envs/cdiffnew/lib/python3.10/site-packages/torch/utils/data/dataset.py", line 298, in __getitem__
    return self.dataset[self.indices[idx]]
  File "/mnt/qb/work/bethge/bkr863/chirodiff_test/data/qd.py", line 130, in __getitem__
    return tuple(
  File "/mnt/qb/work/bethge/bkr863/chirodiff_test/data/qd.py", line 131, in <genexpr>
    torch.from_numpy(self.data[attr][i]) for attr in self.attrs
IndexError: index 348354 is out of bounds for axis 0 with size 348084


Add units to meta file

See https://github.com/DiamondLightSource/ADOdin/issues/22

[x] Requires https://github.com/odin-detector/odin-data/pull/351. Merge this first then we need to unpin here

To test:

Run test_file_write
Open the created file and confirm that unit attributes are provided on the datasets in the issue

Pin removed now https://github.com/odin-detector/odin-data/pull/351 merged

There are some datasets missing units (e.g. frame time, wavelength), but I guess you have added all the ones you need?

Yh, I added everything I needed and a few of the more obvious ones. I didn't go through and check every field though, I'm happy to go back and do frame time and wavelength for completeness

I think having just a few of them missing could be confusing, so we should add them all now that you have done most of them.

Ok, I have added some more, I think that's all of them now. For future reference I used https://media.dectris.com/NeXus_Groups_API_1.3.pdf to work out the units when I was unsure.


Event types do not exist in the Window interface

TypeScript Version:  2.7.0-dev.201xxxxx
Code
npm install typescript jsdom @types/jsdom

// example.ts

import { JSDOM } from 'jsdom';

let dom = new JSDOM(`
    <!DOCTYPE html>
    <html>
        <head>
            <title>Test DOM</title>
        </head>
        <body>
            <input type="button" id="button" />
        </body>
    </html>
`);
let window = dom.window;
let elem = window.document.getElementById('button');
elem.onclick = (ev: MouseEvent) => {
    console.log(`Button clicked, typeArg: ${ev.type}`);
}
let event: MouseEvent = new window.MouseEvent('someTypeArg');
elem.onclick(event);

Expected behavior:
TypeScript compiles, running node example.js outputs the following to console, then exits:
Button clicked, typeArg: someTypeArg

Actual behavior:
TypeScript fails to compile with the following error:
example.ts(19,36): error TS2339: Property 'MouseEvent' does not exist on type DOMWindow

@types/jsdom defines the DOMWindow interface as:
export interface DOMWindow extends Window { eval(script: string): void; }

The Window interface it extends is the one defined by TypeScript. That interface is missing definitions for the Event types, although these Event types are declared outside the Window interface. In web browsers, the Event types exist both globally and on the window object. TypeScript currently handles the former but not the latter.
jsdom does in fact implement the Event types on the dom.window object. You can modify the code above to compile and behave as expected by extending the DOMWindow interface, adding the MouseEvent type to it, and casting the dom.window object to this newly defined interface:
import { JSDOM, DOMWindow } from 'jsdom';

interface WindowWithMouseEvent extends DOMWindow {
    MouseEvent: {
        prototype: MouseEvent;
        new(typeArg: string, eventInitDict?: MouseEventInit): MouseEvent;
    }
}

let dom = new JSDOM(`
    <!DOCTYPE html>
    <html>
        <head>
            <title>Test DOM</title>
        </head>
        <body>
            <input type="button" id="button" />
        </body>
    </html>
`);
let window = dom.window as WindowWithMouseEvent;
let elem = window.document.getElementById('button');
elem.onclick = (ev: MouseEvent) => {
    console.log(`Button clicked, typeArg: ${ev.type}`);
}
let event: MouseEvent = new window.MouseEvent('someTypeArg');
elem.onclick(event);

I've spoken to the maintainer of @types/jsdom (see this issue) and they suggested raising an issue with your team instead. I agree, seeing as Event types exist on the window object in web browsers.

Just FYI, a simpler workaround is to write
declare global {
  interface Window {
    MouseEvent: typeof MouseEvent;
  }
}

If you'd like, I can submit a PR for this

To model the spec/runtime behavior correctly, window should be an alias to global. In other words all declarations that are visible in the global namespace, should be accessible through window. This applies to things like JSON, Math, HTMLElement, URLSearchParams, and MouseEvent.
We have chosen a while back to not expose these types on Window. We have added ones thought to the interface, but i am afraid there is not really a clear pattern/principal here.
See https://github.com/Microsoft/TypeScript/issues/18756 for related discussion.
I think we should revisit the original issue of making Window the global polluter and be honest to the spec. I think https://github.com/Microsoft/TypeScript/issues/14052 is a prerequisite here, but there could be other proposals too.
I have created https://github.com/Microsoft/TypeScript/issues/19816 to track general issue.

Thanks for the follow-up. I'll leave this up to your team's discretion and see about adding the workaround to @types/jsdom


Not able to initialize form using redux immutable state

This is how I am attaching state value to props.

And then decorating form with reduxForm.

Here I can see INITIALIZE getting dispatched, but form is not getting rendered.

Here form is not getting rendered with initial values but onSubmit callback have initial values.

Since v5.3.3 the props are given to the onSubmit handler, maybe you could use this to inject the initial values into values before submitting them?
https://github.com/erikras/redux-form/releases/tag/v5.3.3

@peteruithoven I am able to get initial values while submitting form,but not getting rendered in form.

Ah alright. What happens when you switch around the two wrappers / higher order functions (connect and reduxForm)?

I have the same issue. I pass an "initialValues" object to my form together with "enableReinitialize".
Component gets mounted, triggers an api call to load data and I can see in DevTools that "redux-form/INITIALIZE" gets called afterwards and the state in "form -> formname -> values / initial" is populated.
Submitting the form uses those values but they are never rendered.
I use a custom Field component to use react-bootstrap:
const InputTextRedux = (props) => {
  return (
    <div>
      <FormGroup
        className={props.groupClassName ? props.groupClassName : ''}
        name={props.name ? props.name : ''}
      >
        <ControlLabel
          className={props.labelClassName ? props.labelClassName : ''}
        >
          {props.label ? props.label : 'Text'}
        </ControlLabel>
        <InputGroup
          className={props.wrapperClassName ? props.wrapperClassName : ''}
        >
          <InputGroup.Addon className="input-group-addon">
            <i className={props.icon ? props.icon : 'fa fa-pencil'} />
          </InputGroup.Addon>
          <FormControl
            disabled={props.disabled ? true : false}
            id={props.id ? props.id : props.name}
            onChange={(event) => {
              props.input.onChange(event.target.value);
            }}
            placeholder={props.placeholder ? props.placeholder : ''}
            type={props.type ? props.type : 'text'}
            value={props.input.value}
          />
          <FormControl.Feedback />
        </InputGroup>
      </FormGroup>
    </div>
  );
};

I'm also having the same issue, using immutable. I'm passing the values down using props though.
const initialValues = {
    name: 'Hello world',
};

<ReduxForm initialValues={initialValues} />

redux-form/INITIALIZE

But nothing gets rendered

Looking at the props passed to my form component I noticed:
props {
    ....
    initialValues: {
        __altered: false,
        _root: {
            entries: [
                [
                    'id',
                    '123456'
                ],
                [
                    'filename',
                    'test.txt'
                ]
            ]
        },
        size: 2
    },
    ....
}

If I name one of the form fields 'size' or '__altered' they recieve and render initialValues of '2' and 'false' respectively. It seems as if redux-form is looking at the wrong 'level' of the initialValues object. It should be taking values from "initialValues._root.entries" (hope that makes sense).

@ppascher
I have the same behavior

@ppascher @erikras I have the same issue

Any update on this ? Im facing the same issue.
Values in store get completely messed up after I edit some field.
First render, fields are empty but store shows correct values:

Submitting like this sends the correct values from initial.
After entering "New name" in the name field.

_root has the same structure as @ppascher showed.
Submitting sends that structure.

Thanks @crazymunky. I was also importing the wrong reducer and switching + adding .toJS() to my submit functions solved my problem.

Did you get the initialValues working?

Both options are not working.

Finally got it to work (but with a props warning) using import { reducer as formReducer } from 'redux-form/immutable'; in the combineReducer({...}) file and using import { Field, reduxForm } from 'redux-form/immutable'; in my container.
But I had to use a trick too, in my container's reducer, I have my const initialState = fromJS({ info: false, loading: false, error: false });.
If I have info: fromJS({}) to initialize my substate that will contain all the fields data after fetching from api, the initialize action of redux-form is never triggered, but if I do info: false in the initialState of the reducer, I have the React warning Warning: Failed prop type: Invalid prop `initialValues` of type `boolean` supplied to `Form(Profile)`, expected `object`. But the values are well initialized from Redux-form and can be edited.

The problem to me is that my reducer didn't use redux-form/immutable
Pls double check it if you are using immutableJS.
Got stuck for half a day because of this...
I switched to use the formReducer from redux-form/immutable, but when I then submit a value I get the following errors (I added the .toJS() to the values object that I receive in the handleSubmit function):
ExceptionsManager.js:62 One of the sources for assign has an enumerable key on the prototype chain. This is an edge case that we do not support. This error is a performance optimization and not spec compliant.handleException
@ ExceptionsManager.js:62handleError
@ InitializeJavaScriptAppEngine.js:120reportFatalError
@ error-guard.js:30guard
@ MessageQueue.js:47callFunctionReturnFlushedQueue
@ MessageQueue.js:104onmessage
@ debuggerWorker.js:44
ExceptionsManager.js:82
Unhandled JS Exception: One of the sources for assign has an enumerable key on the prototype chain. This is an edge case that we do not support. This error is a performance optimization and not spec compliant.reactConsoleError @ ExceptionsManager.js:82console.error @ YellowBox.js:61logIfNoNativeHook @ RCTLog.js:38__callFunction @ MessageQueue.js:234(anonymous function) @ MessageQueue.js:105guard @ MessageQueue.js:45callFunctionReturnFlushedQueue @ MessageQueue.js:104onmessage @ debuggerWorker.js:44
ExceptionsManager.js:82 Warning: performUpdateIfNecessary: Unexpected batch number (current 29, pending 27)

I can dismiss the errors and continue but that's not really an option. Anyone any clue?
I'm not using Object.assign anywhere in my own code because I'm working with Immutability...
Kind regards,

There was a regression introduced in 6.0.3 around Immutable.js and React Native, which was fixed in 6.4.2 - have you tried upgrading to 6.4.2 or higher?
I have also added a complete example on React Native, redux-form and immutable.js right here.
I also wrote an in-depth article about the subject here

I'm also having trouble setting the initialValues for a Form using connect and Immutable.js .  Looks like there may be an issue with the way that the ConnectedField retrieves the initialState and value for a Field.  See these lines in the source:
https://github.com/erikras/redux-form/blob/4514088e771111013ece24cedd534f66807332fe/src/ConnectedField.js#L210
const initialState = getIn(formState, initial.${name})
https://github.com/erikras/redux-form/blob/4514088e771111013ece24cedd534f66807332fe/src/ConnectedField.js#L212
const value = getIn(formState, values.${name})
Changing them to the following appears to fix the issue:
...
const value = getIn(formState.values, name)```

The issue appears to be the dynamic behaviour of `getIn` as defined here: https://github.com/erikras/redux-form/blob/4514088e771111013ece24cedd534f66807332fe/src/structure/immutable/index.js#L15

In this case, `getIn` is reverting to `plainGetIn` because `formState` is not recognized as an `Iterable`.

I also had this issue.  Solution was to import { reducer as formReducer } from 'redux-form/immutable' , previously I was importing the reducer from redux-form

@marcpeters2 thanks for that comment! Same issue for me, not importing the reducer correctly from redux-form/immutable.

i had the same issue, redux-form/immutable was the solution as stated before. I believe a warning should be fired if there is some inconsistency when using a mixture between immutable and mutable stuff.

Because this issue saw almost no activity for a few months, I'm closing it.

@maxtechera Have been wasted my afternoon trying to figure out why. Thanks for saving my night

@marcpeters2, Pal you've salved my day with this comment here. Very thanks!!!!

@marcpeters2 thanks brooo, working

But after importing from redux-form/immutable I am getting

Module not found: Can't resolve 'immutable' in 'D:\gift_savvy_client\node_modules\redux-form\lib\structure\immutable'


tf.contrib.metrics.streaming_auc evaluation exception

I used tf.contrib.metrics.streaming_auc to evaluate DNN rank model,
auc,  opts = tf.contrib.metrics.streaming_auc(logits, labels)

logits are my predicted results, labels are true labels, they have format:
Tensor("Sigmoid:0", shape=(100, 1), dtype=float32)
Tensor("labels_placeholder:0", shape=(100, ?), dtype=float32)

Errors as following:
Traceback (most recent call last):
  File "/Users/nali/Workspace/tensorflow_example/search_click/MLP.py", line 200, in <module>
    dnn.run(training_data=[x, y], epochs=10)
  File "/Users/nali/Workspace/tensorflow_example/search_click/MLP.py", line 135, in run
    feed_dict={self.x: x[samples], self.y: y[samples]})
  File "/usr/local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 372, in run
    run_metadata_ptr)
  File "/usr/local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 636, in _run
    feed_dict_string, options, run_metadata)
  File "/usr/local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 708, in _do_run
    target_list, options, run_metadata)
  File "/usr/local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 728, in _do_call
    raise type(e)(node_def, op, message)
tensorflow.python.framework.errors.FailedPreconditionError: Attempting to use uninitialized value auc/true_positives
     [[Node: auc/true_positives/read = Identity[T=DT_FLOAT, _class=["loc:@auc/true_positives"], _device="/job:localhost/replica:0/task:0/cpu:0"](auc/true_positives)]]
Caused by op u'auc/true_positives/read', defined at:
  File "/Users/nali/Workspace/tensorflow_example/search_click/MLP.py", line 200, in <module>
    dnn.run(training_data=[x, y], epochs=10)
  File "/Users/nali/Workspace/tensorflow_example/search_click/MLP.py", line 126, in run
    cross_entropy, accuracy, logits = self.training()
  File "/Users/nali/Workspace/tensorflow_example/search_click/MLP.py", line 100, in training
    accuracy = self.evaluation(logits, self.y)
  File "/Users/nali/Workspace/tensorflow_example/search_click/MLP.py", line 146, in evaluation
    auc, opt = tf.contrib.metrics.streaming_auc(logits, labels)
  File "/usr/local/lib/python2.7/site-packages/tensorflow/contrib/metrics/python/ops/metric_ops.py", line 718, in streaming_auc
    predictions, labels, thresholds, ignore_mask)
  File "/usr/local/lib/python2.7/site-packages/tensorflow/contrib/metrics/python/ops/metric_ops.py", line 600, in _tp_fn_tn_fp
    true_positives = _create_local('true_positives', shape=[num_thresholds])
  File "/usr/local/lib/python2.7/site-packages/tensorflow/contrib/metrics/python/ops/metric_ops.py", line 75, in _create_local
    collections=collections)
  File "/usr/local/lib/python2.7/site-packages/tensorflow/python/ops/variables.py", line 211, in __init__
    dtype=dtype)
  File "/usr/local/lib/python2.7/site-packages/tensorflow/python/ops/variables.py", line 319, in _init_from_args
    self._snapshot = array_ops.identity(self._variable, name="read")
  File "/usr/local/lib/python2.7/site-packages/tensorflow/python/ops/gen_array_ops.py", line 831, in identity
    result = _op_def_lib.apply_op("Identity", input=input, name=name)
  File "/usr/local/lib/python2.7/site-packages/tensorflow/python/ops/op_def_library.py", line 704, in apply_op
    op_def=op_def)
  File "/usr/local/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 2260, in create_op
    original_op=self._default_original_op, op_def=op_def)
  File "/usr/local/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 1230, in __init__
    self._traceback = _extract_stack()

Thanks in advance.

This looks like you failed to initialize some of the variables in your model?
It seems like the uninitialized variable is a LOCAL_VARIABLE created here
I think this requires you to call tf.initialize_all_variables() and tf.initialize_local_variables()   (see #1045)

@prb12 is correct, you have to call tf.initialize_local_variables(), since local variables are not part of all variables. Yes, we know how silly that sounds, and we're working on it.
If you use an Estimator, the initialization should be taken care of for you.

@martinwicke So what exactly is the fix for this?  Do i call tf.initialize_local_variables() before calling auc,  opts = tf.contrib.metrics.streaming_auc(logits, labels)?

You have to call tf.initialize_local_variables().eval() once before you start calling streaming_auc. Every time you call initialize_local_variables().eval() it will reset your auc.

Python is telling me Operation object has no attribute eval for
tf.initialize_local_variables().eval()

sorry, .run()

K.get_session().run(tf.initialize_local_variables().run())
Gives me
builtins.ValueError: Cannot execute operation using run(): No default session is registered. Use with sess.as_default(): or pass an explicit session to run(session=sess)

I don't know what K.get_session() does, but have you tried making and
passing a session (or using a with statement) as suggested?

You may try the following hack:

Define a callback which runs keras.backend.get_session().run(tf.initialize_local_variables()) on each epoch begin.:
class ResetLocalVariables(keras.callbacks.Callback):
     def on_epoch_begin(self, logs={}):
         keras.backend.get_session().run(tf.initialize_local_variables())

Add it to your loss function:
 model.fit(..., callbacks=[.... , ResetLocalVariables()], ...)

thanks.  Can someone close?

@marimarimarimari I dont think this will work because update_op does the accumalation step and there's no way to get that into the metrics function in keras because y_pred and y_true are not given to you before execution.

I hope it helps.


sqlx PG connector

Codecov Report

Merging #214 (0bc4810) into main (24ccc3f) will decrease coverage by 0.52%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main     #214      +/-   ##
==========================================
- Coverage   23.62%   23.10%   -0.53%
==========================================
  Files          13       14       +1
  Lines        1731     1770      +39
==========================================
  Hits          409      409
- Misses       1286     1325      +39
  Partials       36       36

Impacted Files
Coverage Δ

client/blockchain.go
0.00% <0.00%> (ø)

client/postgres.go
0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 24ccc3f...0bc4810. Read the comment docs.


"Shelly type mismatch: SNDM-0013US"

Still getting this error when set for Shelly Wall Dimmer.  I have a Shelly Wall Dimmer Plus.  Can this be added to Type 2 devices and have it work?

@kskenyon was a type in last fix ... sorry

That error is gone now but I can’t get it to accept any commands.  What is the proper syntax for the json packet for the Wall Dimmer Plus?
Kevin

On Oct 25, 2023, at 5:53 PM, Karl-Heinz Wind @.***> wrote:
Closed #131 https://github.com/windkh/node-red-contrib-shelly/issues/131 as completed via c0f47af https://github.com/windkh/node-red-contrib-shelly/commit/c0f47afa487ed0dd581b86d2af4b0a7859e9888b.
—
Reply to this email directly, view it on GitHub https://github.com/windkh/node-red-contrib-shelly/issues/131#event-10772705937, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF4WTTALYJM2G4P6Y56ICULYBGC63AVCNFSM6AAAAAA6P6ZBA6VHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJQG43TENZQGU4TGNY.
You are receiving this because you authored the thread.

Should it be light:0 and not light0?
Kevin

On Oct 25, 2023, at 8:33 PM, Kevin Kenyon @.***> wrote:
That error is gone now but I can’t get it to accept any commands.  What is the proper syntax for the json packet for the Wall Dimmer Plus?
Kevin

On Oct 25, 2023, at 5:53 PM, Karl-Heinz Wind @.***> wrote:
Closed #131 https://github.com/windkh/node-red-contrib-shelly/issues/131 as completed via c0f47af https://github.com/windkh/node-red-contrib-shelly/commit/c0f47afa487ed0dd581b86d2af4b0a7859e9888b.
—
Reply to this email directly, view it on GitHub https://github.com/windkh/node-red-contrib-shelly/issues/131#event-10772705937, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF4WTTALYJM2G4P6Y56ICULYBGC63AVCNFSM6AAAAAA6P6ZBA6VHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJQG43TENZQGU4TGNY.
You are receiving this because you authored the thread.

@kskenyon
I do not have such a dimmer here for testing, but I would read the documentation here
https://shelly-api-docs.shelly.cloud/gen2/Devices/ShellyPlusWallDimmer
and then adapt the switchplus example and replace the relevant parts:
Switch.Set --> Light.Set and then add brightness. According to the documentation on and brightness is required.
If that works, then I would try to add the additional property transition_duration.
Here is the original function block from
https://github.com/windkh/node-red-contrib-shelly/blob/master/examples/switchplus.json
msg.payload = {
method: "Switch.Set",
parameters : {
id : 0,
on : true,
toggle_after : 2 // optional flip back time in seconds
}
};
return msg;

OK, I got this much working.  Dim and toggle don’t seem to work with this setup.  Might be related to the unique innards in the Wall Plus Dimmer.
Kevin
[
{
"id": "fbb7147cdbe00d15",
"type": "tab",
"label": "Shelly",
"disabled": false,
"info": "",
"env": []
},
{
"id": "5389b09ce6d34f01",
"type": "debug",
"z": "fbb7147cdbe00d15",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"x": 850,
"y": 80,
"wires": []
},
{
"id": "aeb4c2cae80da838",
"type": "function",
"z": "fbb7147cdbe00d15",
"name": "on",
"func": "msg.payload = {\n    method: "Light.Set",\n    parameters: {\n        id: 0,\n        on: true,\n        timer: 0\n        // toggle_after: 2 // optional flip back time in seconds\n    }\n};\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 290,
"y": 100,
"wires": [
[
"7fabbd56f1f22d2d"
]
]
},
{
"id": "cb63debaf7f8cc7a",
"type": "function",
"z": "fbb7147cdbe00d15",
"name": "off",
"func": "msg.payload = {\n    method: "Light.Set",\n    parameters: {\n        id: 0,\n        on: false,\n        timer: 0\n        // toggle_after: 2 // optional flip back time in seconds\n    }\n};\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 290,
"y": 140,
"wires": [
[
"7fabbd56f1f22d2d"
]
]
},
{
"id": "a2c586bfef493ba4",
"type": "inject",
"z": "fbb7147cdbe00d15",
"name": "Turn On",
"props": [
{
"p": "payload",
"v": "",
"vt": "date"
},
{
"p": "topic",
"v": "",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 130,
"y": 100,
"wires": [
[
"aeb4c2cae80da838"
]
]
},
{
"id": "aa0ecc89becb52b6",
"type": "inject",
"z": "fbb7147cdbe00d15",
"name": "Turn Off",
"props": [
{
"p": "payload",
"v": "",
"vt": "date"
},
{
"p": "topic",
"v": "",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 130,
"y": 140,
"wires": [
[
"cb63debaf7f8cc7a"
]
]
},
{
"id": "2cf86b714691d6aa",
"type": "inject",
"z": "fbb7147cdbe00d15",
"name": "Poll Status",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "str",
"x": 140,
"y": 60,
"wires": [
[
"7fabbd56f1f22d2d"
]
]
},
{
"id": "3340ffcb8fc86c54",
"type": "function",
"z": "fbb7147cdbe00d15",
"name": "toggle",
"func": "msg.payload = {\n    method: "Light.Set",\n    parameters: {\n        id: 0,\n        brightness: 100,\n        toggle_after: 2 // optional flip back time in seconds\n    }\n};\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 290,
"y": 180,
"wires": [
[
"7fabbd56f1f22d2d"
]
]
},
{
"id": "0ea0fceb5bc1b8f8",
"type": "inject",
"z": "fbb7147cdbe00d15",
"name": "Toggle",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 130,
"y": 180,
"wires": [
[
"3340ffcb8fc86c54"
]
]
},
{
"id": "e2e90ad3b39f30fb",
"type": "function",
"z": "fbb7147cdbe00d15",
"name": "brightness 100%",
"func": "msg.payload = {\n    method: "Light.Set",\n    parameters: {\n        id: 0,\n        brightness: 100\n        // toggle_after: 2 // optional flip back time in seconds\n    }\n};\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 330,
"y": 220,
"wires": [
[
"7fabbd56f1f22d2d"
]
]
},
{
"id": "5cd3246ee54df257",
"type": "inject",
"z": "fbb7147cdbe00d15",
"name": "Brightness",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 140,
"y": 220,
"wires": [
[
"e2e90ad3b39f30fb"
]
]
},
{
"id": "bbfe7de807db8d9d",
"type": "function",
"z": "fbb7147cdbe00d15",
"name": "brightness 25%",
"func": "msg.payload = {\n    method: "Light.Set",\n    parameters: {\n        id: 0,\n        brightness: 25\n        // toggle_after: 2 // optional flip back time in seconds\n    }\n};\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 320,
"y": 260,
"wires": [
[
"7fabbd56f1f22d2d"
]
]
},
{
"id": "c3dabccd82633861",
"type": "inject",
"z": "fbb7147cdbe00d15",
"name": "Brightness",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 140,
"y": 260,
"wires": [
[
"bbfe7de807db8d9d"
]
]
},
{
"id": "784a23f5f04fe49d",
"type": "function",
"z": "fbb7147cdbe00d15",
"name": "turn on & set brightness 60%",
"func": "msg.payload = {\n    method: "Light.Set",\n    parameters: {\n        id: 0,\n        on: true,\n        brightness: 60\n        // toggle_after: 2 // optional flip back time in seconds\n    }\n};\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 360,
"y": 300,
"wires": [
[
"7fabbd56f1f22d2d"
]
]
},
{
"id": "84b0058013cd5e99",
"type": "inject",
"z": "fbb7147cdbe00d15",
"name": "Combined",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 140,
"y": 300,
"wires": [
[
"784a23f5f04fe49d"
]
]
},
{
"id": "cde543a45872eba4",
"type": "function",
"z": "fbb7147cdbe00d15",
"name": "on 2s",
"func": "msg.payload = {\n    method: "Light.Set",\n    parameters: {\n        id: 0,\n        on: true,\n        brightness: 100,\n        toggle_after: 2 // optional flip back time in seconds\n    }\n};\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 290,
"y": 340,
"wires": [
[
"7fabbd56f1f22d2d"
]
]
},
{
"id": "f23c3049caf67f07",
"type": "inject",
"z": "fbb7147cdbe00d15",
"name": "Turn On",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 130,
"y": 340,
"wires": [
[
"cde543a45872eba4"
]
]
},
{
"id": "7fabbd56f1f22d2d",
"type": "shelly-gen2",
"z": "fbb7147cdbe00d15",
"hostname": "<IP_ADDRESS>",
"description": "",
"mode": "polling",
"server": "",
"outputmode": "event",
"uploadretryinterval": 5000,
"pollinginterval": 5000,
"pollstatus": false,
"getstatusoncommand": true,
"devicetype": "Dimmer",
"outputs": 1,
"x": 640,
"y": 80,
"wires": [
[
"5389b09ce6d34f01"
]
]
}
]

On Oct 26, 2023, at 1:41 AM, Karl-Heinz Wind @.***> wrote:
@kskenyon https://github.com/kskenyon
I do not have such a dimmer here for testing, but I would read the documentation here
https://shelly-api-docs.shelly.cloud/gen2/Devices/ShellyPlusWallDimmer
and then adapt the switchplus example and replace the relevant parts:
Switch.Set --> Light.Set and then add brightness. According to the documentation on and brightness is required.
If that works, then I would try to add the additional property transition_duration.
Here is the original function block from
https://github.com/windkh/node-red-contrib-shelly/blob/master/examples/switchplus.json
msg.payload = {
method: "Switch.Set",
parameters : {
id : 0,
on : true,
toggle_after : 2 // optional flip back time in seconds
}
};
return msg;
—
Reply to this email directly, view it on GitHub https://github.com/windkh/node-red-contrib-shelly/issues/131#issuecomment-1780449196, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF4WTTEEDNYI23SJTP7W4PTYBHZYZAVCNFSM6AAAAAA6P6ZBA6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBQGQ2DSMJZGY.
You are receiving this because you were mentioned.

Light.Toggle does work without any parameters other than “id"

On Oct 26, 2023, at 1:35 PM, Kevin Kenyon @.***> wrote:
OK, I got this much working.  Dim and toggle don’t seem to work with this setup.  Might be related to the unique innards in the Wall Plus Dimmer.
Kevin
[
{
"id": "fbb7147cdbe00d15",
"type": "tab",
"label": "Shelly",
"disabled": false,
"info": "",
"env": []
},
{
"id": "5389b09ce6d34f01",
"type": "debug",
"z": "fbb7147cdbe00d15",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"x": 850,
"y": 80,
"wires": []
},
{
"id": "aeb4c2cae80da838",
"type": "function",
"z": "fbb7147cdbe00d15",
"name": "on",
"func": "msg.payload = {\n    method: "Light.Set",\n    parameters: {\n        id: 0,\n        on: true,\n        timer: 0\n        // toggle_after: 2 // optional flip back time in seconds\n    }\n};\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 290,
"y": 100,
"wires": [
[
"7fabbd56f1f22d2d"
]
]
},
{
"id": "cb63debaf7f8cc7a",
"type": "function",
"z": "fbb7147cdbe00d15",
"name": "off",
"func": "msg.payload = {\n    method: "Light.Set",\n    parameters: {\n        id: 0,\n        on: false,\n        timer: 0\n        // toggle_after: 2 // optional flip back time in seconds\n    }\n};\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 290,
"y": 140,
"wires": [
[
"7fabbd56f1f22d2d"
]
]
},
{
"id": "a2c586bfef493ba4",
"type": "inject",
"z": "fbb7147cdbe00d15",
"name": "Turn On",
"props": [
{
"p": "payload",
"v": "",
"vt": "date"
},
{
"p": "topic",
"v": "",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 130,
"y": 100,
"wires": [
[
"aeb4c2cae80da838"
]
]
},
{
"id": "aa0ecc89becb52b6",
"type": "inject",
"z": "fbb7147cdbe00d15",
"name": "Turn Off",
"props": [
{
"p": "payload",
"v": "",
"vt": "date"
},
{
"p": "topic",
"v": "",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 130,
"y": 140,
"wires": [
[
"cb63debaf7f8cc7a"
]
]
},
{
"id": "2cf86b714691d6aa",
"type": "inject",
"z": "fbb7147cdbe00d15",
"name": "Poll Status",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "str",
"x": 140,
"y": 60,
"wires": [
[
"7fabbd56f1f22d2d"
]
]
},
{
"id": "3340ffcb8fc86c54",
"type": "function",
"z": "fbb7147cdbe00d15",
"name": "toggle",
"func": "msg.payload = {\n    method: "Light.Set",\n    parameters: {\n        id: 0,\n        brightness: 100,\n        toggle_after: 2 // optional flip back time in seconds\n    }\n};\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 290,
"y": 180,
"wires": [
[
"7fabbd56f1f22d2d"
]
]
},
{
"id": "0ea0fceb5bc1b8f8",
"type": "inject",
"z": "fbb7147cdbe00d15",
"name": "Toggle",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 130,
"y": 180,
"wires": [
[
"3340ffcb8fc86c54"
]
]
},
{
"id": "e2e90ad3b39f30fb",
"type": "function",
"z": "fbb7147cdbe00d15",
"name": "brightness 100%",
"func": "msg.payload = {\n    method: "Light.Set",\n    parameters: {\n        id: 0,\n        brightness: 100\n        // toggle_after: 2 // optional flip back time in seconds\n    }\n};\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 330,
"y": 220,
"wires": [
[
"7fabbd56f1f22d2d"
]
]
},
{
"id": "5cd3246ee54df257",
"type": "inject",
"z": "fbb7147cdbe00d15",
"name": "Brightness",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 140,
"y": 220,
"wires": [
[
"e2e90ad3b39f30fb"
]
]
},
{
"id": "bbfe7de807db8d9d",
"type": "function",
"z": "fbb7147cdbe00d15",
"name": "brightness 25%",
"func": "msg.payload = {\n    method: "Light.Set",\n    parameters: {\n        id: 0,\n        brightness: 25\n        // toggle_after: 2 // optional flip back time in seconds\n    }\n};\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 320,
"y": 260,
"wires": [
[
"7fabbd56f1f22d2d"
]
]
},
{
"id": "c3dabccd82633861",
"type": "inject",
"z": "fbb7147cdbe00d15",
"name": "Brightness",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 140,
"y": 260,
"wires": [
[
"bbfe7de807db8d9d"
]
]
},
{
"id": "784a23f5f04fe49d",
"type": "function",
"z": "fbb7147cdbe00d15",
"name": "turn on & set brightness 60%",
"func": "msg.payload = {\n    method: "Light.Set",\n    parameters: {\n        id: 0,\n        on: true,\n        brightness: 60\n        // toggle_after: 2 // optional flip back time in seconds\n    }\n};\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 360,
"y": 300,
"wires": [
[
"7fabbd56f1f22d2d"
]
]
},
{
"id": "84b0058013cd5e99",
"type": "inject",
"z": "fbb7147cdbe00d15",
"name": "Combined",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 140,
"y": 300,
"wires": [
[
"784a23f5f04fe49d"
]
]
},
{
"id": "cde543a45872eba4",
"type": "function",
"z": "fbb7147cdbe00d15",
"name": "on 2s",
"func": "msg.payload = {\n    method: "Light.Set",\n    parameters: {\n        id: 0,\n        on: true,\n        brightness: 100,\n        toggle_after: 2 // optional flip back time in seconds\n    }\n};\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 290,
"y": 340,
"wires": [
[
"7fabbd56f1f22d2d"
]
]
},
{
"id": "f23c3049caf67f07",
"type": "inject",
"z": "fbb7147cdbe00d15",
"name": "Turn On",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 130,
"y": 340,
"wires": [
[
"cde543a45872eba4"
]
]
},
{
"id": "7fabbd56f1f22d2d",
"type": "shelly-gen2",
"z": "fbb7147cdbe00d15",
"hostname": "<IP_ADDRESS>",
"description": "",
"mode": "polling",
"server": "",
"outputmode": "event",
"uploadretryinterval": 5000,
"pollinginterval": 5000,
"pollstatus": false,
"getstatusoncommand": true,
"devicetype": "Dimmer",
"outputs": 1,
"x": 640,
"y": 80,
"wires": [
[
"5389b09ce6d34f01"
]
]
}
]

On Oct 26, 2023, at 1:41 AM, Karl-Heinz Wind @.***> wrote:
@kskenyon https://github.com/kskenyon
I do not have such a dimmer here for testing, but I would read the documentation here
https://shelly-api-docs.shelly.cloud/gen2/Devices/ShellyPlusWallDimmer
and then adapt the switchplus example and replace the relevant parts:
Switch.Set --> Light.Set and then add brightness. According to the documentation on and brightness is required.
If that works, then I would try to add the additional property transition_duration.
Here is the original function block from
https://github.com/windkh/node-red-contrib-shelly/blob/master/examples/switchplus.json
msg.payload = {
method: "Switch.Set",
parameters : {
id : 0,
on : true,
toggle_after : 2 // optional flip back time in seconds
}
};
return msg;
—
Reply to this email directly, view it on GitHub https://github.com/windkh/node-red-contrib-shelly/issues/131#issuecomment-1780449196, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF4WTTEEDNYI23SJTP7W4PTYBHZYZAVCNFSM6AAAAAA6P6ZBA6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBQGQ2DSMJZGY.
You are receiving this because you were mentioned.

What is the response if it does not work?

No response.  It doesn’t recognize dim commands.  Just brightness setting.  I guess it could be done in a function with some code.

On Oct 26, 2023, at 2:35 PM, Karl-Heinz Wind @.***> wrote:
What is the response if it does not work?
—
Reply to this email directly, view it on GitHub https://github.com/windkh/node-red-contrib-shelly/issues/131#issuecomment-1781655645, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF4WTTGLJMEQC36D25QSZ4DYBKUOTAVCNFSM6AAAAAA6P6ZBA6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBRGY2TKNRUGU.
You are receiving this because you were mentioned.

I think the dimmer control has it’s own chip and it can’t be accessed directly for some reason.  Out of my pay grade.

On Oct 26, 2023, at 2:36 PM, Kevin Kenyon @.***> wrote:
No response.  It doesn’t recognize dim commands.  Just brightness setting.  I guess it could be done in a function with some code.

On Oct 26, 2023, at 2:35 PM, Karl-Heinz Wind @.***> wrote:
What is the response if it does not work?
—
Reply to this email directly, view it on GitHub https://github.com/windkh/node-red-contrib-shelly/issues/131#issuecomment-1781655645, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF4WTTGLJMEQC36D25QSZ4DYBKUOTAVCNFSM6AAAAAA6P6ZBA6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBRGY2TKNRUGU.
You are receiving this because you were mentioned.

Hm I think that should not be a problem... give me a few minutes

Please try that and let me know: what is a dim command?
According to the api documentation you have
Light.Toggle
Light.SetConfig
Light.GetConfig
Light.Set
Light.GetStatus
The only thing you can do is setting the transition_duration to have a "dim" effect
[{"id":"5389b09ce6d34f01","type":"debug","z":"fbb7147cdbe00d15","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":850,"y":80,"wires":[]},{"id":"aeb4c2cae80da838","type":"function","z":"fbb7147cdbe00d15","name":"on","func":"msg.payload = {\n    method: "Light.Set",\n    parameters: {\n        id: 0,\n        on: true,\n    }\n};\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":290,"y":100,"wires":[["7fabbd56f1f22d2d"]]},{"id":"cb63debaf7f8cc7a","type":"function","z":"fbb7147cdbe00d15","name":"off","func":"msg.payload = {\n    method: "Light.Set",\n    parameters: {\n        id: 0,\n        on: false,\n    }\n};\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":290,"y":140,"wires":[["7fabbd56f1f22d2d"]]},{"id":"a2c586bfef493ba4","type":"inject","z":"fbb7147cdbe00d15","name":"Turn On","props":[{"p":"payload","v":"","vt":"date"},{"p":"topic","v":"","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":130,"y":100,"wires":[["aeb4c2cae80da838"]]},{"id":"aa0ecc89becb52b6","type":"inject","z":"fbb7147cdbe00d15","name":"Turn Off","props":[{"p":"payload","v":"","vt":"date"},{"p":"topic","v":"","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":130,"y":140,"wires":[["cb63debaf7f8cc7a"]]},{"id":"2cf86b714691d6aa","type":"inject","z":"fbb7147cdbe00d15","name":"Poll Status","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"str","x":140,"y":60,"wires":[["7fabbd56f1f22d2d"]]},{"id":"3340ffcb8fc86c54","type":"function","z":"fbb7147cdbe00d15","name":"toggle","func":"msg.payload = {\n    method: "Light.Toggle",\n    parameters: {\n        id: 0,\n    }\n};\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":290,"y":180,"wires":[["7fabbd56f1f22d2d"]]},{"id":"0ea0fceb5bc1b8f8","type":"inject","z":"fbb7147cdbe00d15","name":"Toggle","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":130,"y":180,"wires":[["3340ffcb8fc86c54"]]},{"id":"e2e90ad3b39f30fb","type":"function","z":"fbb7147cdbe00d15","name":"brightness 100%","func":"msg.payload = {\n    method: "Light.Set",\n    parameters: {\n        id: 0,\n        brightness: 100,\n        transition_duration : 1, // 1 second\n        // toggle_after : 1 <-- do not flip back\n    }\n};\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":330,"y":220,"wires":[["7fabbd56f1f22d2d"]]},{"id":"5cd3246ee54df257","type":"inject","z":"fbb7147cdbe00d15","name":"Brightness","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":140,"y":220,"wires":[["e2e90ad3b39f30fb"]]},{"id":"bbfe7de807db8d9d","type":"function","z":"fbb7147cdbe00d15","name":"brightness 25%","func":"msg.payload = {\n    method: "Light.Set",\n    parameters: {\n        id: 0,\n        brightness: 25,\n        transition_duration: 1, // 1 second\n        // toggle_after : 1 <-- do not flip back \n        }\n};\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":320,"y":260,"wires":[["7fabbd56f1f22d2d"]]},{"id":"c3dabccd82633861","type":"inject","z":"fbb7147cdbe00d15","name":"Brightness","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":140,"y":260,"wires":[["bbfe7de807db8d9d"]]},{"id":"784a23f5f04fe49d","type":"function","z":"fbb7147cdbe00d15","name":"turn on & set brightness 60%","func":"msg.payload = {\n    method: "Light.Set",\n    parameters: {\n        id: 0,\n        on: true,\n        brightness: 60,\n        // toggle_after: 2 // optional flip back time in seconds\n    }\n};\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":360,"y":300,"wires":[["7fabbd56f1f22d2d"]]},{"id":"84b0058013cd5e99","type":"inject","z":"fbb7147cdbe00d15","name":"Combined","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":140,"y":300,"wires":[["784a23f5f04fe49d"]]},{"id":"cde543a45872eba4","type":"function","z":"fbb7147cdbe00d15","name":"on 2s","func":"msg.payload = {\n    method: "Light.Set",\n    parameters: {\n        id: 0,\n        on: true,\n        brightness: 100,\n        toggle_after: 2 // optional flip back time in seconds\n    }\n};\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":290,"y":340,"wires":[["7fabbd56f1f22d2d"]]},{"id":"f23c3049caf67f07","type":"inject","z":"fbb7147cdbe00d15","name":"Turn On","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":130,"y":340,"wires":[["cde543a45872eba4"]]},{"id":"7fabbd56f1f22d2d","type":"shelly-gen2","z":"fbb7147cdbe00d15","hostname":"<IP_ADDRESS>","description":"","mode":"polling","server":"","outputmode":"event","uploadretryinterval":5000,"pollinginterval":5000,"pollstatus":false,"getstatusoncommand":true,"devicetype":"Dimmer","outputs":1,"x":640,"y":80,"wires":[["5389b09ce6d34f01"]]}]

ah one thing. The doc says
"At least one of the on and brightness parameters is required."
You can try to remove the on : true and only set brightness to your desired level

Working OK now. Any limitations are with the device itself.  Thanks. KevinFatfingered from my iPhoneOn Nov 14, 2023, at 4:09 PM, Karl-Heinz Wind @.***> wrote:
@kskenyon can i close this issue or is there still something to solve/discuss/...?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

ok perfect


Error with msvcr120_clr0400.dll

Screentogif stopped working today with some error of msvcr120_clr0400.dll

I suppose that's the problem with your .net framework. Have you reinstalled it?

I just installed 4.7 i had 4.6 and still get the error.
Probably its something on my PC because it was working fine yesterday


chore: add coverage report to main branch

Description
So that we can see the report in the project's dashboard: https://app.codecov.io/gh/openfga/openfga
References

n/a
Review Checklist

[ ] I have added documentation for new/changed functionality in this PR or in openfga.dev
[ ] The correct base branch is being used, if not main

Codecov Report

:exclamation: No coverage uploaded for pull request base (main@45dfe1d). Click here to learn what that means.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main      #13   +/-   ##
=======================================
  Coverage        ?   53.38%
=======================================
  Files           ?       25
  Lines           ?     2465
  Branches        ?        0
=======================================
  Hits            ?     1316
  Misses          ?     1053
  Partials        ?       96

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 45dfe1d...b235040. Read the comment docs.


remove unused dependencies

"dependencies" currently contains "babel-preset-env" and "babelify"
afaik, they are used only during build, and thus can be moved into devDependency, and not clutter the client's tree.

Did you mean to report this for a different package? This package doesn't rely (directly or indirectly) on babel-preset-env or babelify: http://npm.anvaka.com/#/view/2d/json-rpc-engine

Closing due to lack of response, but happy to reconsider.


Improve and refactor Build Flow

Improving the process of creating artifacts and deploying them.
Today we have the option to separate the building of the handlers' artifacts and loading them to the gateway.
The artifacts that can be generated in two different formats - JSON or Code Files
So when developers use a CDN (like GraphQL Hive) to load and store these artifacts, the process is:

Build artifacts
Upload
Use it in the configuration

With these configurations, Mesh doesn’t build artifacts again on the gateway.
All this is great but currently these types of configurations are different for each handler:

For GraphQL handler, they should give introspection

For JSON Schema/OpenAPI/RAML, you provide a bundle and it doesn’t matter which handler you use since they are all the same since bundle already has all the configuration

No option for gRPC

No option for Postgres, etc..

[ ] Consider a common option like artifactsPath instead of the specific options above

Also now that we have that separation, we could also:

[ ] Split handler implementations to reduce the runtime code into (1. Validation 2. Artifacts generation 3. Execution)

Now we have guides for Hive and different SDL-based approaches in OpenAPI handler etc.


Users/mmediset/pm changes

Reviewed the UI and strings with PM

Hi @murali89, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!

 If you're full-time, we DON'T require a Contribution License Agreement. If you are a vendor, please DO sign the electronic Contribution License Agreement. It will take 2 minutes and there's no faxing! https://cla.microsoft.com.

TTYL, MSBOT;


Chore: Introduce publish package pipeline #CCM-8

based on release publishing

@OndraM Updated work flow to trigger it localy with yarn release, than check it and push. After that publish pipeline will be running by gh actions.

It looks nice 👍
Could you also please document the release workflow into README? Maybe add new "Create new release" section as part of Development and contributing section.

Should I use CONTRIBUTING.md instead (https://docs.github.com/en/communities/setting-up-your-project-for-healthy-contributions/setting-guidelines-for-repository-contributors)? And add that part from readme to it as well?

Should I use CONTRIBUTING.md instead (https://docs.github.com/en/communities/setting-up-your-project-for-healthy-contributions/setting-guidelines-for-repository-contributors)? And add that part from readme to it as well?

I would now not bother with CONTRIBUTING.md for this project - we don't expect much external contributions... For now I think just short mention in readme would be enough. We can split it eventually later, if the readme become too long... (also this could be done in different PR, to not further extend scope of this one).


Regression with PowerShell Write-Progress

Windows Terminal version
1.14.1963.0
Windows build number
10.0.22000.795
Other Software
PowerShell 7.2.5
Steps to reproduce
Using PowerShell 7.2.5, run the following command
0..100 | %{ Write-Progress "$_%" -Percent ($_); sleep -ms 10 }

Expected Behavior
Progress bar should be rendered in full
See this video captured in version 1.13

Actual Behavior
The progress bar is not properly rendered
See this video captured in version 1.14

/dup #13229


fix: rename and fetch_data progress report

Hi @ok-nick, any problems left?

This fix looks weird but it works well.
Cloud Filter will copy remote files(or directories) to local automatically. However, renamed will not be invoked after rename so we can not remove the src from the remote.

Ah, so when the target isn't in scope and the source is, it will invoke SyncFilter::delete rather than SyncFilter::rename?
If that's the case, I wonder if it'd be better to replace the source_in_scope/target_in_scope fns with a single enum to make it more clear. Something like: RenameAction::MoveInsideFromOutside + RenameAction::MoveInsideFromInside.

It will not inoke SyncFilter::delete in this case.

How is the file removed from the remote then, if not invoked by SyncFilter::delete? I also don't understand how SyncFilter::renamed plays a role here?
Also, we should keep the existing functionality for moving a file from outside the sync filter to inside the sync filter rather than keeping it as CloudErrorKind::NotSupported here.

I pushed a branch named update-deps to update all the dependencies, let me know if it works for you: https://github.com/ok-nick/wincs/tree/update-deps

I think I can't fix this problem, thanks for your reviews


Allow a specific node_modules/{foo,bar,baz,quux} to be included by the scriptPreprocessor function.

The browserify-handbook recommends symlinking something like <rootDir>/src/foo via <rootDir>/node_modules/foo to avoid clumsy relative paths.
Doing this however breaks babel-jest because the scriptPreprocessor will ignore any path that included "node_modules" by default.
This PR adds an environment variable, BABEL_JEST_PROCESS_MODULES, which is a JSON string such as:
 BABEL_JEST_PROCESS_MODULES="[\"foo\", \"bar\", \"baz\", \"quux\"]"

so that babel preprocessing will still be applied against files matching those module paths, i.e., <rootDir>/node_modules/{foo,bar,baz,quux}/*

I think the #39 is the better approach to this actually.

Dang, I just ran into this today with my babel project.  The issue is different than just browserify practices though.  We are also using Flow type. Which because of how it currently works, requires you to symlink node_modules.

Reconciled this PR with current master.  Any chance it can go in?

Fixed util.canCompile goof & updated docs.

@kittens -- Is there any alternative approach you would prefer to this one so that babel-jest has some support for symlinks to ../src within the node_modules folder?
I tried to base this off of the way you had dealt with alternate stages in earlier versions of babel-jest but I'm open to reworking my approach if the current one doesn't work for you.

@kittens Pinging you on this.

index.js is so small that I'm tempted to say just fork babel-jest or copy and paste it into your project. I'm not sure if there's a place for this sort of feature.

Fair enough -- I've been using my fork for the moment.  The only time this comes up is specifically when using symlinks from node_modules to somewhere in the src proper.
I could go either way, I guess.

Closing this but I'm considering to add an option for this in the future.

Fair enough, there is probably a nicer way to do it as well.  Thanks guys!


(PUP-2402) Add sshkey acceptance tests

Add basic acceptance tests for sshkey type. This adds acceptance
tests for create, query, modify, and destroy.

Specs have been added for the ssh_key provider in 59050ddcba.


react-native-awesome-button breaks RN because of package.json dependency on RN

I've just tried installing react-native-awesome-button from npm and it breaks RN (v0.47.x) because it references react-native in the Package.json file.
This is the same reason as this issue:
https://github.com/facebook/react-native/issues/14302
The version of the package.json file commited by @saas-plat on Mar 5 which fixes this issue hasn't been published to npm.  Is this update going to be published?

Bump on this please.

Issue exist for now

I fixed this issue in my pull-request. You can use npm i git+https://github.com/jurahalas/react-native-awesome-button -- save or open https://github.com/jurahalas/react-native-awesome-button

This problem should be fixed by now it has broken my current project :(

Hi, @larsvinter, are you planing to keep maintaining this lib?


Add vscode command to search for views by name

Any thoughts on this one? I find this really handy since there isn't an easy way to search for views built in currently. There are some hard coded for some of the side bars but if you install any extensions you have to map them yourself. This lets you find anything.


Updated json correction from MUO-POG

From January 30th, the processors applying the muon scale factors in Ultra Legacy analyses are reporting the following error when trying to access the json correction file from /cvmfs:
FileNotFoundError: [Errno 2] No such file or directory: '/cvmfs/cms.cern.ch/rsync/cms-nanoAOD/jsonpog-integration/POG/MUO/2018_UL/muon_Z.json.gz'

By listing the corresponding folder, we find the following files:
(pocket-coffea) mmarcheg@t3ui02:/cvmfs/cms.cern.ch/rsync/cms-nanoAOD/jsonpog-integration/POG/MUO/2018_UL $ ll
total 147
-rw-r--r-- 1 cvmfs cvmfs  30683 Jan 30 05:05 muon_HighPt.json.gz
-rw-r--r-- 1 cvmfs cvmfs 119369 Jan 30 05:05 muon_Z_v2.json.gz

suggesting that the central MUO-POG files have been updated on 30.01.2024 at 5:05 am and that the correct version of the file is now muon_Z_v2.json.gz.
By listing the folders for the other data-taking years we find the following:
(pocket-coffea) mmarcheg@t3ui02:/cvmfs/cms.cern.ch/rsync/cms-nanoAOD/jsonpog-integration/POG/MUO $ ll 20*UL
2016postVFP_UL:
total 146
-rw-r--r-- 1 cvmfs cvmfs  29954 Jan 30 05:05 muon_HighPt.json.gz
-rw-r--r-- 1 cvmfs cvmfs 119237 Jan 30 05:05 muon_Z_v2.json.gz

2016preVFP_UL:
total 146
-rw-r--r-- 1 cvmfs cvmfs  29689 Jan 30 05:05 muon_HighPt.json.gz
-rw-r--r-- 1 cvmfs cvmfs 119255 Jan 30 05:05 muon_Z_v2.json.gz

2017_UL:
total 147
-rw-r--r-- 1 cvmfs cvmfs  30167 Jan 30 05:05 muon_HighPt.json.gz
-rw-r--r-- 1 cvmfs cvmfs 119301 Jan 30 05:05 muon_Z_v2.json.gz

suggesting that the correction files of all the data-taking years have been updated.
The straightforward fix is to update the paths of the muon SF file in the defaults of pocket_coffea, but in the future a feature raising a warning in case of updated files from the json POG files could be implemented, such that the user is aware of changes in the correction files.

This sounds like a bad practice from POG or jsonpog-intergation team. Files on CVMFS should never be changed. New version of the files should be uploaded when something is updated.

Exactly, and this is the case also for the files of other POGs, that have been updated on 30.01.2024 at 5:05 am.
We noticed it just because the files from the MUO-POG have changed path. I think it's something we should keep an eye on since the user could run the same analysis with different scale factors without noticing, just because a new version of corrections have been uploaded on /cvmfs.

The default muon SF for Ultra Legacy datasets have been updated: https://github.com/PocketCoffea/PocketCoffea/commit/8220cfbfd960140e06d2a86d28206a207e0a9645


Traffic Shaper [dynamic pipe/queue] add buckets option

Now our help text has improved (https://github.com/opnsense/core/pull/2293), but some of the configuration issues likely still exists due to installs trying to setup more then 256 flows on single rule, which is set globally in "net.inet.ip.dummynet.hash_size".
A per pipe/queue setting could be practical in these cases.

for reference, the original ipfw doc section
 buckets hash-table-size
	   Specifies the size of the hash table	used for storing the various
	   queues.  Default value is 64	controlled by the sysctl(8) variable
	   net.inet.ip.dummynet.hash_size, allowed range is 16 to 65536.


Being able to delete existing pictures from "Edit your profile"

You're able to upload multiple pictures, but not removing them.

This was fixed in https://github.com/solid/contacts-pane/pull/3


A possible cause of duplicated case objects bug

Hi @novakov-alexey,
I think I have pinpointed a major cause of the scala.MatchError: None (of class scala.None$) bug, it actually touches all case objects by having several instances of what should be singleton. Other users have experienced this bug and may be related to #148, #106.
Another manifestation on a common Scala case object is on Nil:
java.util.NoSuchElementException: head of empty list
	at scala.collection.immutable.Nil$.head(List.scala:469)
	at scala.collection.immutable.Nil$.head(List.scala:466)

The problem appears only when we are removing flink-scala_2.12-*.jar from the Flink distribution (lib/flink-scala_2.12-*.jar) as Flink recommends it (ie: https://flink.apache.org/2022/02/22/scala-free-in-one-fifteen/). The reason is this jar contains a lot of custom Kryo serializers to handle Scala gracefully, notably FlinkScalaKryoInstantiator which use Chill and allows Kryo to handle singleton objects and other Scala specificities.
Now, the question is: why Kryo continues to be involved in serialization despite the fact we shouldn't use it anymore thanks to flink-scala-api "no silent fallback to Kryo" feature?
Because of this constructor: org.apache.flink.api.common.state.ValueStateDescriptor.ValueStateDescriptor(java.lang.String, java.lang.Class<T>), same for MapStateDescriptor, etc.

It is absolutely not documented these constructors with a Class param is the door wide open to Kryo. And flink-scala-api can do nothing about it because it's not part of Scala API.
At least it should be documented in Migration section to switch from *StateDescription constructors with Class to TypeInformation param. I hope it can prevent weeks of headaches (in my case) to other users!
Thanks!

To give more details, I discovered the root cause of my duplicated case object problem by logging a stacktrace in the body of one of my case object:
java.lang.Exception: this exception is logged at TotalCount init
	at com.xxx.aggregations.AggregationFunction$TotalCount$.<init>(AggregationFunction.scala:96)
	at com.xxx.aggregations.AggregationFunction$TotalCount$ConstructorAccess.newInstance(Unknown Source)
	at com.esotericsoftware.kryo.Kryo$DefaultInstantiatorStrategy$1.newInstance(Kryo.java:1193)
	at com.esotericsoftware.kryo.Kryo.newInstance(Kryo.java:1061)
	at com.esotericsoftware.kryo.serializers.FieldSerializer.createCopy(FieldSerializer.java:620)
	at com.esotericsoftware.kryo.serializers.FieldSerializer.copy(FieldSerializer.java:624)
	at com.esotericsoftware.kryo.Kryo.copy(Kryo.java:862)
	at com.esotericsoftware.kryo.serializers.UnsafeCacheFields$UnsafeObjectField.copy(UnsafeCacheFields.java:297)
	at com.esotericsoftware.kryo.serializers.FieldSerializer.copy(FieldSerializer.java:634)
	at com.esotericsoftware.kryo.Kryo.copy(Kryo.java:862)
	at com.esotericsoftware.kryo.serializers.UnsafeCacheFields$UnsafeObjectField.copy(UnsafeCacheFields.java:297)
	at com.esotericsoftware.kryo.serializers.FieldSerializer.copy(FieldSerializer.java:634)
	at com.esotericsoftware.kryo.Kryo.copy(Kryo.java:862)
	at com.esotericsoftware.kryo.serializers.DefaultArraySerializers$ObjectArraySerializer.copy(DefaultArraySerializers.java:390)
	at com.esotericsoftware.kryo.serializers.DefaultArraySerializers$ObjectArraySerializer.copy(DefaultArraySerializers.java:289)
	at com.esotericsoftware.kryo.Kryo.copy(Kryo.java:862)
	at com.esotericsoftware.kryo.serializers.UnsafeCacheFields$UnsafeObjectField.copy(UnsafeCacheFields.java:297)
	at com.esotericsoftware.kryo.serializers.FieldSerializer.copy(FieldSerializer.java:634)
	at com.esotericsoftware.kryo.Kryo.copy(Kryo.java:862)
	at com.esotericsoftware.kryo.serializers.UnsafeCacheFields$UnsafeObjectField.copy(UnsafeCacheFields.java:297)
	at com.esotericsoftware.kryo.serializers.FieldSerializer.copy(FieldSerializer.java:634)
	at com.esotericsoftware.kryo.Kryo.copy(Kryo.java:862)
	at org.apache.flink.api.java.typeutils.runtime.kryo.KryoSerializer.copy(KryoSerializer.java:298)
	at org.apache.flink.api.common.typeutils.base.MapSerializer.copy(MapSerializer.java:112)
	at org.apache.flink.runtime.state.HeapBroadcastState.<init>(HeapBroadcastState.java:70)
	at org.apache.flink.runtime.state.HeapBroadcastState.deepCopy(HeapBroadcastState.java:88)
	at org.apache.flink.runtime.state.HeapBroadcastState.deepCopy(HeapBroadcastState.java:41)
	at org.apache.flink.runtime.state.DefaultOperatorStateBackendSnapshotStrategy.syncPrepareResources(DefaultOperatorStateBackendSnapshotStrategy.java:96)
	at org.apache.flink.runtime.state.DefaultOperatorStateBackendSnapshotStrategy.syncPrepareResources(DefaultOperatorStateBackendSnapshotStrategy.java:40)
	at org.apache.flink.runtime.state.SnapshotStrategyRunner.snapshot(SnapshotStrategyRunner.java:77)
	at org.apache.flink.runtime.state.DefaultOperatorStateBackend.snapshot(DefaultOperatorStateBackend.java:230)
	at org.apache.flink.streaming.api.operators.StreamOperatorStateHandler.snapshotState(StreamOperatorStateHandler.java:242)
	at org.apache.flink.streaming.api.operators.StreamOperatorStateHandler.snapshotState(StreamOperatorStateHandler.java:185)
	at org.apache.flink.streaming.api.operators.AbstractStreamOperator.snapshotState(AbstractStreamOperator.java:348)
	at org.apache.flink.streaming.runtime.tasks.RegularOperatorChain.checkpointStreamOperator(RegularOperatorChain.java:228)
	at org.apache.flink.streaming.runtime.tasks.RegularOperatorChain.buildOperatorSnapshotFutures(RegularOperatorChain.java:213)
	at org.apache.flink.streaming.runtime.tasks.RegularOperatorChain.snapshotState(RegularOperatorChain.java:192)
	at org.apache.flink.streaming.runtime.tasks.SubtaskCheckpointCoordinatorImpl.takeSnapshotSync(SubtaskCheckpointCoordinatorImpl.java:720)
	at org.apache.flink.streaming.runtime.tasks.SubtaskCheckpointCoordinatorImpl.checkpointState(SubtaskCheckpointCoordinatorImpl.java:352)
	at org.apache.flink.streaming.runtime.tasks.StreamTask.lambda$performCheckpoint$16(StreamTask.java:1369)
	at org.apache.flink.streaming.runtime.tasks.StreamTaskActionExecutor$1.runThrowing(StreamTaskActionExecutor.java:50)
	at org.apache.flink.streaming.runtime.tasks.StreamTask.performCheckpoint(StreamTask.java:1357)
	at org.apache.flink.streaming.runtime.tasks.StreamTask.triggerCheckpointOnBarrier(StreamTask.java:1314)
	at org.apache.flink.streaming.runtime.io.checkpointing.CheckpointBarrierHandler.notifyCheckpoint(CheckpointBarrierHandler.java:147)
	at org.apache.flink.streaming.runtime.io.checkpointing.CheckpointBarrierTracker.triggerCheckpointOnAligned(CheckpointBarrierTracker.java:301)
	at org.apache.flink.streaming.runtime.io.checkpointing.CheckpointBarrierTracker.processBarrier(CheckpointBarrierTracker.java:141)
	at org.apache.flink.streaming.runtime.io.checkpointing.CheckpointedInputGate.handleEvent(CheckpointedInputGate.java:181)
	at org.apache.flink.streaming.runtime.io.checkpointing.CheckpointedInputGate.pollNext(CheckpointedInputGate.java:159)
	at org.apache.flink.streaming.runtime.io.AbstractStreamTaskNetworkInput.emitNext(AbstractStreamTaskNetworkInput.java:122)
	at org.apache.flink.streaming.runtime.io.StreamOneInputProcessor.processInput(StreamOneInputProcessor.java:65)
	at org.apache.flink.streaming.runtime.io.StreamMultipleInputProcessor.processInput(StreamMultipleInputProcessor.java:85)
	at org.apache.flink.streaming.runtime.tasks.StreamTask.processInput(StreamTask.java:579)
	at org.apache.flink.streaming.runtime.tasks.mailbox.MailboxProcessor.runMailboxLoop(MailboxProcessor.java:231)
	at org.apache.flink.streaming.runtime.tasks.StreamTask.runMailboxLoop(StreamTask.java:909)
	at org.apache.flink.streaming.runtime.tasks.StreamTask.invoke(StreamTask.java:858)
	at org.apache.flink.runtime.taskmanager.Task.runWithSystemExitMonitoring(Task.java:958)
	at org.apache.flink.runtime.taskmanager.Task.restoreAndInvoke(Task.java:937)
	at org.apache.flink.runtime.taskmanager.Task.doRun(Task.java:751)
	at org.apache.flink.runtime.taskmanager.Task.run(Task.java:566)
	at java.base/java.lang.Thread.run(Thread.java:829)

I was surprised to see Kryo was involved in state serialization and was happily instantiating my case object when writing checkpoints.
It was due to usage of:
  val BroadcastStateDescriptor: MapStateDescriptor[Long, ApiMessage] =
    new MapStateDescriptor("received-apiMessages", classOf[Long], classOf[ApiMessage])

instead of:
  val BroadcastStateDescriptor: MapStateDescriptor[Long, ApiMessage] =
    new MapStateDescriptor("received-apiMessages",
      implicitly[TypeInformation[Long]],
      implicitly[TypeInformation[ApiMessage]])

For years, me and my colleagues didn't know Kryo was used for state serialization because of these constructors with Class params, this information should be widely shared!
Also note that we are using a HashMapStateBackend, this behavior may be different with other state backends.

Hi @arnor2000
Thanks a lot for digging into it deeper. This is really good finding. I think this will also help other users of Scala API, indeed.
As I understood the confusion comes when flink-scala_2.12-*.jar is removed from a Flink job, but user code still uses Java API constructors which may lead to Kryo usage, like in case of ValueStateDescriptor(...).
Although, you have correctly highlighted that it promises to not fallback silently to Kryo, it can still happen even for Scala data classes when user code uses Java-oriented constructors.
I see the following actions to improve the situation:

Try to prevent Kryo usage even from Java-oriented constructors. Not sure if it feasible at all. Perhaps some Java Reflection needs to be used already in runtime to report some meaningful error message.
Alternatively, update README to say that this library does not handle Kryo usage when user code uses Java-oriented constructors like the one you mentioned.

What do you think?

Exactly!
In our case it was an unintended usage of Kryo, but I suppose duplication of case objects will also occur with explicit usage of Kryo with TypeInformation.of(classOf[Option[String]], it can be really error-prone. It's worth to add a warning of Kryo usage in case of flink-scala_2.12-*.jar removal.
There is several borderline usage of Kryo in examples like in FraudDetector: TypeInformation.of(classOf[Alert]) and TypeInformation.of(classOf[KeyedFraudState]). If these case classes were using an Option somewhere, any None value will be candidate for duplication.
About the actions you propose, the first one is the best but seems hard to achieve. I was thinking to extends *StateDescriptor with our own *ScalaStateDescriptor to hide constructors with Class params, but the only place to enforce it with current Scala API is org.apache.flinkx.api.DataStream#broadcast(broadcastStateDescriptors: MapScalaStateDescriptor[_, _]*). Efficiently enforce it would require to provide our own RuntimeContext so it looks like to be a burden. Or maybe registering a special TypeInfoFactory on Product using org.apache.flink.api.java.typeutils.TypeExtractor.registerFactory as "Java-oriented" StateDescriptor constructors are using it, but I don't know the implications...
Clearly document the consequences of removing flink-scala_2.12-*.jar on Kryo could be a good first step for sure.

This library never claimed that it can prevent usage of Kryo if user code does not use it's serlializers via:
import org.apache.flinkx.api.serializers._
// and then
implicitly[TypeInformation[Long]]

Agree?
This is the example when a user does not use proper Scala serializers:
new MapStateDescriptor("received-apiMessages", classOf[Long], classOf[ApiMessage])

MapStateDescriptor is Java class, not Scala class.
So what you are saying is a user will be confused, because README says there is no silent fallback to Kryo, but actually there is. Since user opted-out from using proper serialisers, so now he is on its own. This is a user fault.
Of course we can say that this library could do better or its documentation could be better. So first we need to clarify this moment in docs.
Secondly, we need to describe the issue with "duplication of case objects" and why it happens.
Thirdly, we could try to improve library code to intercept case object serialization and then either fail-fast (3.1) or turn entire seralization process to use proper serializers (3.2). I am not sure if this 3rd point is doable including its options 3.1 and 3.2.


Fix empty object when adding runtimeCaching custom plugins with workbox-webpack-plugin

R: @jeffposnick @philipwalton
Fixes #1597
As discussed on the issue, I've used this library by Yeoman instead of JSON.stringify because it doesn't handle functions, resulting in an empty object when adding custom plugins with workbox-webpack-plugin. Also, I've made some changes and now I'm using a regex based on this one to remove comments once the object is parsed as a string.
Also added some test cases.

I signed it!

Coverage increased (+0.006%) to 86.538% when pulling 35d5c7491bc0bd2f23e71e0600f14cc3c96b2a55 on tsirlucas:master into 096e44897e9c348f85bb51927c1113de4e339897 on GoogleChrome:master.

Hey @jeffposnick just got back to this and got some cases that the parse regex wouldn't work correctly like when parsing a function with url strings into it. I'm working on it and will make a push to the branch ASAP.


version, verify rosa-client: Support --debug

Allow inspecting how rosa version and verify rosa-client check available versions.

Opened https://issues.redhat.com/browse/OCM-5185, hope that makes CI happy.
cc @AlexVulaj probably this should be delayed until #1570, to check how it interacts with it.

[ ] Will it add a large HTML dump to every command with --debug?  That could be annoying.

/lgtm


Logging of tuning data size in timeseries predictor incorrectly logs train data size [BUG]

Line 715 in timeseries/predictor.py:
        logger.info(f"Provided tuning_data has {self._get_dataset_stats(train_data)}")

Should be:
        logger.info(f"Provided tuning_data has {self._get_dataset_stats(***tuning_data***)}")

It seems a small thing, but I when I was looking at the logs I was really unsure if it is a logging issue, or my train data is then actually wrongly used for tuning...

Nice catch, thanks! I've submitted a PR to fix this #4299.


[Question]How can I set multi data with one upload like import JSON?

Example, I want to save some data like:
ID
|---Name
|---Age
|---Sex
Normally, I will need 3 times to set that info with Firebase.setString(...) or Firebase.set...
Have any way to set all info in once with JsonObject or something like that?

@tackelua
Yes you should be able to do call Firebase.set or Firebase.push with a JsonObject.
See https://github.com/bblanchon/ArduinoJson#encoding--generating for how to create your own JsonObject using ArduinoJson.
JsonObject& obj = jsonBuffer.createObject();
obj["bar"] = "meh";
obj["hop"] = 42;

Thank you
I did.

Related #338


Fix node-haste when an empty providesModuleNodeModules field is given

This is the default in Jest and started breaking the Jest 0.9.0 release when 2.6.0 was tagged. Going forward, Jest should probably use ~ instead, although no one is really to blame here – this was just unfortunate :)
Originally found here: https://github.com/facebook/jest/issues/771

LGTM.
This is almost exactly the same fix that I worked up when you said there was an issue :)

Alright, tagged 2.6.1. Thanks for the quick support, @skevy, that was awesome :)


Chinese error messages sometimes do not take effect in the production environment

Hello, I have been using the Chinese error message very well, multiple projects at the same time. Recently, it was found that a project suddenly could not use Chinese. I don't know the reason. After the repacking, the problem still existed.
version: "vee-validate": "^2.0.6",
"vue": "^2.5.2",
code:

This is normal in a development environment：

It is abnormal in a production environment：

The production environment of other projects that have been put online is normal
I am very anxious, I do not know when this problem will appear again, looking forward to your reply

I found out why，in node-modules,NPM command download version is 2.0.6,CNPM command download version is 2.1.3.The CNPM command used in the production environment。The two versions of the library code differ, and the vee-validate version upgrade does not work with the older version API

@zhangxuexia Glad, you figured it out, I wasn't really sure about the causes of this issue. Thanks for following up with an explanation.


Responsive settings not working?

I'm not sure responsive setting is working properly.
Here is my code:
var carouselSettings = {
    arrows: false,
    dots: true,
    infinite: true,
    speed: 500,
    slidesToShow: 1,
    slidesToScroll: 1,
    swipeToSlide: true,
    centerMode: true,
    centerPadding: "15px",
    autoPlay: false,
    adaptiveHeight: true,
    responsive: [
      {
        breakpoint: 768, settings: "unslick",
      },
    ],
  };

  return (

      {title()}

        <Slider {...carouselSettings}>
          {comparisonSummaries}
        </Slider>

  );

What I'm expecting to happen is when the browser window gets to 768 or above the layout will fallback to default styles from the CSS and have elements such as the dots etc to disappear.
Can't see that I'm doing anything wrong according to the documentation.
Anyone have any ideas?
Thanks

I'm having the same issue... any luck finding a solution?
tnx

Same here. Any solution found for this?

Ok, so after finding some time to re-visit this I  have kind of got it where I needed it to be.
So in your breakpoint objects the integer you set is effectivley a max-width media query, so anything you specify will be applied until you reach that value, so only set what you want to happen everywhere in the default settings and set everything else in each breakpoint object.
Hope this helps @lizlove @PachiSystems
Here is my code as it stands at the moment and it roughly there:
var carouselSettings = {
  speed: 500,
  centerMode: true,
  centerPadding: "15px",
  autoPlay: false,
  responsive: [
    {
      breakpoint: 768,
      settings: {
        dots: true,
        arrows: true,
        infinite: true,
        slidesToScroll: 1,
        swipeToSlide: true,
      }
    },
    {
      breakpoint: 992,
      settings: 'unslick',
    }
  ]
};

This doesn't work if you are trying to update slides to show etc.... needs to be reopened

i also had the same issue, turns out  i just had to restart the dev server (npm run dev) . sometimes all you have to do is restart, lol.

i also had the same issue, turns out i just had to restart the dev server (npm run dev) . sometimes all you have to do is restart, lol.

lol, this worked


Only inject netrc to trusted clone plugins

... else you have to use secrets
TODOs:

create a list of trusted clone plugins, ...
match
...

asap this is implemented, I think we can make our pipeline non-gated again :)

Uh nice i wanted it to head into that direction - just overlooked it atm

not a bad idea...

haha we hit the rate limit :laughing:


Upgrade jest

Hey, I just made a Pull Request!
Request came in issue #22475

This needs a changeset to get shipped.

Done!

So the goal here was to enable a feature that a minor bump opens up for right? I was under the impression first that it

I thought so too but the very latest is 29.7 so it is a minor bump.


manually create the IAM user with least-privilege permissions instead of AdministratorAccess

https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#grant-least-privilege
What I need to do is just applying these "Actions" right?
https://github.com/harryzcy/mailbox/blob/607523208b2bbc1d261426afd15ecbea58c673ad/serverless.yml.example#L18-L54

Not really. This project is using serverless, which then will call CloudFormation to deploy everything.
The permission above is for actual Lambda functions, not for deployment process itself. The actual required permission are anything related to CloudFormation, and those that deploy things to Lambda, DynamoDB, API Gateway, etc.
https://docs.aws.amazon.com/prescriptive-guidance/latest/least-privilege-cloudformation/introduction.html

@hellodword Can you try adding permission to S3 bucket as documented here: https://docs.aws.amazon.com/ses/latest/dg/receiving-email-permissions.html. Probably I should update README about this.

BTW, the quick-start.sh is out of date, I followed the template yml to generate this, should I open a new issue about more detailed docs?

I think I'll document that serverless.yml.example is the source of truth. The script is kind of hard to maintain, and I might just remove it in the future. I feel copying over example should be simpler.

Can you please share some logs from CloudWatch? Go to Log Groups -> /aws/lambda/<function-name>. There should have one log group per Lambda function. Those from /aws/lambda/*-emailsList would be useful.

The listed emails can not be "read" after clicking in the browser.

Do you mean emails still show as "not read"?

Meanwhile, the cli will get 500 without error details:

Yeah the error message needs improvements, both for cli and web.

Interesting... By the way, did you use double click? The UI logic is double click opens the email, and single click selects it.
If it's still not working, do you see any errors in browser console, and can you check the networking page in the console, if a request gets sent to web/emails/<id>. Thanks

@hellodword Hi, just following up here. Are the issues solved? If there's no additional issues, I'm planning to close it.

Thanks. Feel free to open a new issue if there are other problems.


Sample code needs to be updated

Sandcastle example: https://sandcastle.cesium.com/index.html#c=dVJdb9swDPwrRF7iAKmc9NH5QIegw4oFWIFk3YuBQZboWJgiCRLtJB363yfbMbBmq590JI93pJmm8D0gCK2cU+YATnODAchCQI2CVIP6ApWSCI57CmBLoArhoG2BEGpfcoEsN7lpuIdG4Qk9rMDgCTYYVH1kL10sGYsObqwhrgz68RR+5wbiR+h9DD1720QZnw1E4ZET/rBey31fkkxy8zZZDGoVN1Lfyu0iDc3ORVuPDRr60hclvTUmeKSGtseVzQLSk3E1fYrDWpOUtekekGBLn/QuWzmnxC+UzzaoLr+6TsuCQIOszQ65nsrcFbZqAKqE5OpRYhlXIJP3HSeTYSPCmmA1Mm0PtzVdq7e4hulHA+8vDtn28fP+52b7tPnaMkbT0TLQReO67/+gjs56gtrrhLGU8Bh/O2FIizqKEROh29AyHUhLqRpQcpWPJB5tPoIusRq/3ikj8ZzB/Ww2W8AwcAa8iAPUhAuoUB0qyuazmTsv4KQkVdl9D3yXgXkHCktkjxl0gPBMd8JqG6/hVCnC8XqZRg/vrNwcVHQlNA8hZspa6516xXz0H5q2XMZL/9ag1/zSllTz9bYPMsaWaYT/sshaXXD/V8c/
Browser: all
Operating System: all

https://sandcastle.cesium.com/index.html#c=dVJdb9swDPwrRF7iAKmc9NH5QIegw4oFWIFk3YuBQZboWJgiCRLtJB363yfbMbBmq590JI93pJmm8D0gCK2cU+YATnODAchCQI2CVIP6ApWSCI57CmBLoArhoG2BEGpfcoEsN7lpuIdG4Qk9rMDgCTYYVH1kL10sGYsObqwhrgz68RR+5wbiR+h9DD1720QZnw1E4ZET/rBey31fkkxy8zZZDGoVN1Lfyu0iDc3ORVuPDRr60hclvTUmeKSGtseVzQLSk3E1fYrDWpOUtekekGBLn/QuWzmnxC+UzzaoLr+6TsuCQIOszQ65nsrcFbZqAKqE5OpRYhlXIJP3HSeTYSPCmmA1Mm0PtzVdq7e4hulHA+8vDtn28fP+52b7tPnaMkbT0TLQReO67/+gjs56gtrrhLGU8Bh/O2FIizqKEROh29AyHUhLqRpQcpWPJB5tPoIusRq/3ikj8ZzB/Ww2W8AwcAa8iAPUhAuoUB0qyuazmTsv4KQkVdl9D3yXgXkHCktkjxl0gPBMd8JqG6/hVCnC8XqZRg/vrNwcVHQlNA8hZspa6516xXz0H5q2XMZL/9ag1/zSllTz9bYPMsaWaYT/sshaXXD/V8c/
Sample code needs to be updated

Thanks for the report, @danchaotaiyang!
Where are you finding this sample code? I can see some problematic examples on this page:
https://cesium.com/platform/cesium-ion/content/cesium-world-terrain/
But let us know if there are other places that need to be fixed.

Thanks for the report, @danchaotaiyang!
Where are you finding this sample code? I can see some problematic examples on this page: https://cesium.com/platform/cesium-ion/content/cesium-world-terrain/ But let us know if there are other places that need to be fixed.

https://cesium.com/learn/cesiumjs-learn/cesiumjs-camera/
The second and fourth "OPEN IN SANDCASTLE"


--runtime flag output runtime's name

let's --runtime is friendly useful
use runtime name replace ext file name .

There's one thing that has to be fixed as well, https://github.com/fnproject/cli/blob/6627438abb21eccf1e534e0f4b477fac09ffb046/init.go#L36, for python specifically, there are 3 runtimes: python, python2.7, python3.6

I change python boilerplate, just use print("hello,world"), it's can be deploy python/python3.6 runtime


Fix typo in content disposition config key

Quite sure this should be content_disposition, right?
Might break already existing implementations, but I was working on Azure Storage related stuff today and it bothered me a lot :)

This is a sub split, please direct PRs to the main repository.