Modernize exporter-toolkit flag parsing

Use modern method of parsing listener address(es) and TLS config file, provided by prometheus/exporter-toolkit.
Refs: #148
Note that this introduces a breaking change.
The following flags:
      --telemetry.address=":9117"
                           Address on which to expose metrics.
      --web.config=""      Path to config yaml file that can enable TLS or authentication.

will change to:
      --web.listen-address=:9117 ...
                                 Addresses on which to expose metrics and web interface. Repeatable for multiple addresses.
      --web.config.file=""       [EXPERIMENTAL] Path to configuration file that can enable TLS or authentication.

Additionally, the systemd socket flag will be offered (on Linux):
      --[no-]web.systemd-socket  Use systemd socket activation listeners instead of port listeners (Linux only).

@Lusitaniae do you have any thoughts on this change?

in node exporter looks like the toolkit can load the flags directly
https://github.com/prometheus/node_exporter/commit/440a132c389dddd405b44d2d5e47157d1159e4d0#diff-7907251477470326df65250bf7fa699e0756ce5d6282e27b34c112132a7ef6b5R162
Also seems we can use it to generate the landing page too
https://github.com/prometheus/node_exporter/pull/2622/files
Maybe need more work here?

@Lusitaniae I'm not sure what you mean by "load the flags directly" or the node_exporter code differs to what I've proposed - other than the toolkitFlags var being global in this PR, simply because that's where all your other flag vars are.
The landing page functionality in exporter-toolkit is new, and was not available when I opened this PR. Personally, I would recommend keeping that for a separate PR.

Sounds fair
I'll leave it to @blkperl

This LGTM

Many thanks
Merged and released in https://github.com/Lusitaniae/apache_exporter/releases/tag/v1.0.0
if you'd like to test


energy as commodity

Description of the issue
From #998, #891, #1022: We need a relation between energies and commodities

I just saw, that I had already in #891 the idea of giving electrical energy the commodity role.

However, has role is only applicable to independent continuants (a relation between an independent continuant (the bearer) and a role, in which the role specifically depends on the bearer for its existence). good is a material entity and thus an independent continuant, while electrical energy is a quality which is a specifically dependent continuant.

We can solve this, if we do not give electrical energy the commodity role but energy amount value (or a subclass of this, something like electrical energy amount value or electrical energy quantity value).

Ideas of solution
Proposal (1)  electrical energy : 'has role' some 'commodity role'
Proposal (2)   energy amount value: 'has role' some 'commodity role'
Workflow checklist

[ ] I discussed the issue with someone else than me before working on a solution
[ ] I already read the latest version of the workflow for this repository
[ ] The goal of this ontology is clear to me

I am aware that

[ ] every entry in the ontology should have a definition
[ ] classes should arise from concepts rather than from words

With proposal (1) I see the problem, that energy is a quality and therefore cannot bear a role, see quote above.
With proposal (2), I see the problem that a quantity value is the right thing to bear the role either, but the "entity in reality" it is about.

To add a bearer to energies which are classified as quality, we added the general class axioms
'material entity' and ('bearer of' some 'xxx energy') subclass of 'has disposition' some 'energy carrier disposition'
Could such a construct be helpful here aswell? Something like:
'material entity' and ('bearer of' some 'electrical energy') subclass of 'has role' some 'commodity role' ?
@jannahastings
@l-emele

Hmmm. I think it would work but would perhaps not be true. It's not e.g. the cables that carry the electrical energy that are the commodities, it's the energy itself, isn't it?

Yes, that's right. Thank you @jannahastings
But the other proposals don't seem satisfying either. Do you see any other options?

I prefer extending the domain to independent continuant or energy. This or energy part expresses nicely that energy is somewhat special.

Conclusion from OEO DEV meeting 35: Extend to independent continuant or energy, so this is ready for implementation.


[Feature Request] Not natural affix drop confing

A config option to set the not naturally spawned mobs affix drop rate.

This can be achieved in 8.0.0+ via one of the many json systems (augmentations, modifiers, etc)


Signal inheritance fix for zmq.devices.ProcessProxy.

Problem Statement
zmq.devices.ProcessProxy won't react to SIGTERM (Process.terminate() or even manually do it from commandline). SIGKILL does work. Actual example from hang.
$ sudo netstat -antpl | grep 555
tcp        0      0 <IP_ADDRESS>:5555          <IP_ADDRESS>:*               LISTEN      11437/python3
tcp        0      0 <IP_ADDRESS>:5556          <IP_ADDRESS>:*               LISTEN      11438/python3
tcp        0      0 <IP_ADDRESS>:5557          <IP_ADDRESS>:*               LISTEN      11437/python3
tcp        0      0 <IP_ADDRESS>:5558          <IP_ADDRESS>:*               LISTEN      11438/python3
$ kill -SIGTERM 11437
$ kill -SIGTERM 11438
$ sudo netstat -antpl | grep 555
tcp        0      0 <IP_ADDRESS>:5555          <IP_ADDRESS>:*               LISTEN      11437/python3
tcp        0      0 <IP_ADDRESS>:5556          <IP_ADDRESS>:*               LISTEN      11438/python3
tcp        0      0 <IP_ADDRESS>:5557          <IP_ADDRESS>:*               LISTEN      11437/python3
tcp        0      0 <IP_ADDRESS>:5558          <IP_ADDRESS>:*               LISTEN      11438/python3

Example code
The code running (simplified here) is:
import zmq
import zmq.devices

p = zmq.devices.ProcessProxy(zmq.ROUTER, zmq.DEALER)
p.bind_in('tcp://<IP_ADDRESS>:5558')
p.bind_out('tcp://<IP_ADDRESS>:5556')
p.setsockopt_in(zmq.LINGER, 0)
p.setsockopt_out(zmq.LINGER, 0)
p.start()

q = zmq.devices.ProcessProxy(zmq.XSUB, zmq.XPUB)
q.bind_in('tcp://<IP_ADDRESS>:5555')
q.bind_out('tcp://<IP_ADDRESS>:5557')
q.setsockopt_in(zmq.LINGER, 0)
q.setsockopt_out(zmq.LINGER, 0)
q.start()

# Send SIGTERM
p.launcher.terminate()
q.launcher.terminate()

# Here it waits indefinitely when ran in unittests but works when run as separate script
p.join()
q.join()

But this simplified version seems to work. If I comment out the code for ProxyDevice from my unittests and then run it separately where it doesn't get setUp() and tearDown() then I am unable to reproduce the error this way.
Environment
libzmq-4.1.4
pyzmq-15.3.0
Python-3.5.2 (default, Oct 14 2016, 12:54:53)
[GCC 6.2.1 20160916 (Red Hat 6.2.1-2)]

Solution
It turns out the signal handling in the application (used for proper socket and context cleanup before quitting) was getting inherited with the ProxyDevice which made it impossible to stop it.
Fix is to make the call to start() with default signal handlers:
old_sigterm_action = signal.signal(signal.SIGTERM, signal.SIG_DFL)
old_sigint_action = signal.signal(signal.SIGINT, signal.SIG_DFL)
p.start()
q.start()
signal.signal(signal.SIGTERM, old_sigterm_action)
signal.signal(signal.SIGINT, old_sigint_action)

Proposal
Update pyzmq library to make zmq.devices.ProcessProxy always react to SIGTERM and SIGINT,
What do you guys think?

I think it's important that the user be able to set the signal handling, which this seems to prevent. This also makes it impossible for a process group with ProcessDevices to disable interrupts, because the subprocesses inherit signals sent to the parent, so sending SIGINT to a process which has explicitly disabled SIGINT will stay up, but all of its devices will shut down.
I think following the standard behavior of inheriting the parent process environment makes the most sense, and cases where the context should differ can do so, as you've shown here.
Alternately, restoring the default handlers could make sense, but if we do so we must also detach it from the current process group, so that it doesn't receive its parent's signal handlers.

The ProcessDevice is a stand-alone fully working program "black box" that assumes SIGTERM and SIGINT have a certain behavior, as there is no other way to kill it. The user should not be able to change the signal handling for ProcessDevice so it's able to finalize it properly. If the user overrides the signals then there is absolutely no way to bring it down save for SIGKILL.
A side-bug of this is leaving open orphaned processes if your main script dies when signals are over-ridden which results in bind() errors when you restart your program. That is why detaching from current process group is also not good.

It is important to allow users to make signaling choices. It is perfectly reasonable to have a parent process capture SIGINT for patterns such as 'confirm exit', etc. If the ProcessDevice unconditionally exits when the parent receives SIGINT, this would be very bad. Right now, users can implement this by setting signal handlers prior to fork. As far as I can tell, this PR would make this pattern impossible. The parent being able to capture SIGINT and prevent it from propagating to the child is not a bug.

I understand the issue you are talking about. I wrote the following mini-test to illustrate all the possible combinations.
What you are saying is that Test Case 1a should be FAIL. But in my opinion it's better to receive an Exception (feedback) than to have a silently running ProcessDevice de-attached to anything that keeps your ports reserved as in Test Case 2a. That is hard(er) to troubleshoot than just getting the nice exception.
But you do have a point with the fact that in 1a type of scenarios, one might need a controlled stop where the Proxy is the last one going down (and not right away) to allow for all messages to be sent around. I'll have a look at your idea to detach it from the process group.

Test Case
main
ProcessDevice
Results
Pass/Fail

1a CTRL+C pressed
SIG_IGN
SIG_DFL
ProcessDevice dies with KeyboardInterrupt; main keeps running until end
PASS

1b CTRL+C not pressed
SIG_IGN
SIG_DFL
ProcessDevice and main keep running until end
PASS

2a CTRL+C pressed
SIG_DFL
SIG_IGN
main quits abruptly but ProcessDevice keeps running in background
FAIL

2b CTRL+C not pressed
SIG_DFL
SIG_IGN
main never finishes as it hangs on join()
FAIL

import zmq
import zmq.devices
import time
import signal

# Test Cases
# 1 - main process: SIG_IGN, ProcessDevice: SIG_DFL
#       a - press CTRL+C while sleep()'ing
#       b - wait for script to finish
# 2 - main process: SIG_DFL, ProcessDevice: SIG_IGN
#       a - press CTRL+C while sleep()'ing
#       b - wait for script to finish
# 3 - main process: SIG_IGN, ProcessDevice: SIG_IGN (obvious)
# 4 - main process: SIG_DFL, ProcessDevice: SIG_DFL (obvious)
test_case = 2

p = zmq.devices.ProcessProxy(zmq.ROUTER, zmq.DEALER)
p.bind_in('tcp://<IP_ADDRESS>:5558')
p.bind_out('tcp://<IP_ADDRESS>:5556')
p.setsockopt_in(zmq.LINGER, 0)
p.setsockopt_out(zmq.LINGER, 0)

if test_case in [2, 3]:
    signal.signal(signal.SIGTERM, signal.SIG_IGN)
    signal.signal(signal.SIGINT, signal.SIG_IGN)
p.start() # ProcessDevices inherits signal handler at creation time

# Main process ignores
if test_case in [1, 3]:
    signal.signal(signal.SIGTERM, signal.SIG_IGN)
    signal.signal(signal.SIGINT, signal.SIG_IGN)
else:
    signal.signal(signal.SIGTERM, signal.SIG_DFL)
    signal.signal(signal.SIGINT, signal.SIG_DFL)
time.sleep(60)

p.launcher.terminate()
p.join()
print('done')

Thanks for the test case!

What you are saying is that Test Case 1a should be FAIL

Yes, I would consider that a failure to do the intended/expected action. It's not hypothetical, either; it's something that I rely upon on a regular basis. It is important that users be able to prevent SIGINT to the parent from halting the child, ideally in the simple, standard way that works for all subprocesses spawned from Python. Taking away valid user choices is something I prefer to avoid.
This PR does reduce the negative consequences of certain non-default choices (i.e. registering signal handlers without including proper cleanup code in the parent), but it makes important, valid use cases unavailable.

The point with user choice is very valid. With SIG_IGN (or other inherited signal handler assuming a controlled stop scenario), the are not so many choices, albeit ugly one has full control in the main script to really only send the kill signal to the ProcesDevice really at the very end.
os.kill(p.launcher.pid, signal.SIGKILL)
instead of
p.terminate()


Thread cancellation in POSIX

Is your feature request related to a problem? Please describe.
pthread_create wraps xTaskCreate to create a thread, but currently there is no way to terminate a thread from the outside, i.e.: nothing wraps vTaskDelete to cancel a specific thread (pthread_exit only kills a thread from the inside).
Describe the solution you would like.
Implement int pthread_cancel(pthread_t tid);
Additional context
Part of the code can be copied from pthread_join.

Hello,
This is an excellent feedback, thank you! After discussing internally I confirm that we intend to implement it. I cannot give you an ETA as of now but I added it as an action item.
Hugues


2.0.2 stuck removing persistent volumes

Running on Ubuntu 18.04, upgraded from 2.0.0. Deleted two persistent volumes, it's been stuck on removing them for a day now. They were set as 5GB each and were never used so no data stored to them.
Is there a recommended manual approach to deleting them?

I previously had some pods which had volume claims, and even though I deleted the pods, and the claims where no longer showing up that is what was preventing the persistent volumes from deleting. I installed kubectl and manually deleted the claims first, and the persistent volumes then immediately were automatically deleted.
But I shouldn't have had to do this manually :(


4/1愚人節 金坷垃

4/1全面金坷垃化
剩下換頁不能連續播放的問題

I love this plan XDDD
Happy to see it going to production

+1, going to merge


Sorting by Date

Sorting by date needs to be checked for directory where files have been modified in different months.

Resolved V0.45.1.


Updated phpdocs, test methods added, fixed codestyle.

It would be awesome if code style will be PSR-2 ^).

I hear ya...it was a timing issue. I just rolled with what I was already set up for.


Make progress bar optional

E.g. via --no-progress option.

Why would you want to disable it?

Sure that’s a valid point


I can no longer see outline of my .graphql files

Actual Behavior
I don't know what I did wrong but all of sudden I can no longer see the outline which is very useful because my schema has 1000+ lines in it.
No symbols found in schema.graphql.
I tried uninstalling and re-installing the extension to no avail.
Any ideas? Thank you.
Expected Behavior
See the outline
Specifications

GraphQL for VSCode Extension Version: v0.3.13
VSCode Version: 1.52.1
OS Name: MacOS
OS Version: 10.15.3

This is still happening for me:
GraphQL Extension - v0.8.19
VsCode: 1.83.1


param-names: Add support for unused _ name

What is the purpose of this pull request?

[-] Documentation update
[-] Bug fix
[-] New rule
[x] Changes an existing rule
[-] Add autofixing to a rule
[-] Other, please explain:

What changes did you make? (Give an overview)
I added the support for _ prefixed names in promise param names. This is a convention for unused parameters.
Part of #206

I just ran into the same situation, any luck to merge?

@xjamundx Any blocker on this one ?

I'm into it

@xjamundx I just updated the doc, let me know if there is anything else :)

Ironically it looks like your code is failing a lint rule

Yes, I used GitHub's UI to make this change, so I could not run the lint ... It just seems to be about line length ...
I could take care of this, but that means that I should set up the project locally ... Maybe you could lint --fix it ?

Yeah I'll pull it down and fix this and get it merged later

Published as +<EMAIL_ADDRESS>

@xjamundx Thank you :)


add extra logging when runner fails to TestUsability

a recent change made bubblewrap the default when running melange build natively on mac, as a result builds fail to start...
2023/05/13 11:29:15 error during command execution: unable to run container

This change adds a warning when the check fails and offers the user help of how to fix.  For example now I need to run melange build --runner docker

hmm, we should fix it.  bubblewrap shouldn't ever be the default on mac

You're right it shouldn't. I'll fix that.
I originally had an auto detect in there, removed it for some reason lost in the mists of time. Will get it back.


compile with missing type definition

I'm getting below compile error in atom.
Cannot find module 'jsonp'
I think I'm getting that because I'm missing the type definition file and atom-typescript doesn't compile because of this error. But if I use typescript cli watch command it does compile it even with these errors.
is it possible to compile it with missing type definition file just like typescript cli?
my tsconfig.json file
{
    "compilerOptions": {
        "emitDecoratorMetadata": true,
        "experimentalDecorators": true,
        "outDir": "tmp",
        "target": "es5",
        "module": "system",
        "moduleResolution": "node",
        "removeComments": false,
        "sourceMap": true,
        "noEmit": true
    },
    "filesGlob": [
        "./**/*.ts",
        "./typescript/**/*.ts",
        "./typescript/**/*.tsx",
        "./typescript/**/*.d.ts",
        "!./node_modules/**/*.ts"
    ],
    "exclude": [
        "node_modules",
        "jspm_packages"
    ],
    "files": [
        "./jquery.d.ts",
<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>        "./lib/display-gifs.ts",
        "./lib/extract-gifs.ts",
        "./lib/main.ts",
        "./lib/reddit-api.ts",
        "./typings/angularjs/angular.d.ts",
        "./typings/cordova/plugins/Camera.d.ts",
        "./typings/cordova/plugins/FileSystem.d.ts",
        "./typings/cordova/plugins/FileTransfer.d.ts",
        "./typings/es6-promise/es6-promise.d.ts",
        "./typings/jquery/jquery.d.ts",
        "./typings/ng-cordova/actionSheet.d.ts",
        "./typings/ng-cordova/app-version.d.ts",
        "./typings/ng-cordova/appAvailability.d.ts",
        "./typings/ng-cordova/badge.d.ts",
        "./typings/ng-cordova/camera.d.ts",
        "./typings/ng-cordova/datepicker.d.ts",
        "./typings/ng-cordova/device.d.ts",
        "./typings/ng-cordova/deviceMotion.d.ts",
        "./typings/ng-cordova/deviceOrientation.d.ts",
        "./typings/ng-cordova/dialogs.d.ts",
        "./typings/ng-cordova/emailComposer.d.ts",
        "./typings/ng-cordova/file.d.ts",
        "./typings/ng-cordova/fileTransfer.d.ts",
        "./typings/ng-cordova/geolocation.d.ts",
        "./typings/ng-cordova/network.d.ts",
        "./typings/ng-cordova/toast.d.ts",
        "./typings/ng-cordova/tsd.d.ts",
        "./typings/tsd.d.ts"
    ],
    "atom": {
        "rewriteTsconfig": true
    }
}

I think I'm getting that because I'm missing the type definition file and atom-typescript doesn't compile because of this error

Not true. atom-ts still compiles ts -> js ... it should show the message compile failed but emit succeeded.
I think its because you have         "noEmit": true which is why an emit is not happening.
Feel free to discuss further if unclear :rose:

haha you are right. it is because of noEmit: true. Thanks for pointing that out for me.


feat: Add job for updating docker images for repository integration-k8s-kind

Signed-off-by: Denis Tingajkin<EMAIL_ADDRESS>Motivation
https://github.com/networkservicemesh/cmd-template/issues/20

Blocked by https://github.com/networkservicemesh/integration-k8s-kind/pull/14


Can't connect to database from Authenticator class

Stack Trace:
java.sql.SQLNonTransientConnectionException: No current connection.
	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
	at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
	at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
	at org.apache.derby.impl.jdbc.Util.noCurrentConnection(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedConnection.checkIfClosed(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedConnection.createStatement(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedConnection.createStatement(Unknown Source)
	at fixedIt.sql.database.SQLWriter.executeSQL(SQLWriter.java:57)
	at fixedIt.sql.database.SQLWriter.executeDBCommand(SQLWriter.java:49)
	at fixedIt.modelComponents.Authenticator.addNewUserToDB(Authenticator.java:48)
	at tests.AddNewUserToDBTest.main(AddNewUserToDBTest.java:12)
Caused by: java.sql.SQLException: No current connection.
	at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
	... 11 more

Potentially related to my issue?
On Mar 16, 2016 4:25 PM, "Mat Jones"<EMAIL_ADDRESS>wrote:

Stack Trace:
java.sql.SQLNonTransientConnectionException: No current connection.
at
org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown
Source)
at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.Util.noCurrentConnection(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.checkIfClosed(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.createStatement(Unknown
Source)
at org.apache.derby.impl.jdbc.EmbedConnection.createStatement(Unknown
Source)
at fixedIt.sql.database.SQLWriter.executeSQL(SQLWriter.java:57)
at fixedIt.sql.database.SQLWriter.executeDBCommand(SQLWriter.java:49)
at
fixedIt.modelComponents.Authenticator.addNewUserToDB(Authenticator.java:48)
at tests.AddNewUserToDBTest.main(AddNewUserToDBTest.java:12)
Caused by: java.sql.SQLException: No current connection.
at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown
Source)
at
org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown
Source)
... 11 more
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
https://github.com/mrjones2014/FixedIt/issues/1

--
This information is intended solely for the use of the individual to whom it is addressed.
Any review, disclosure, copying, distribution or use of this e-mail communication by
others is strictly prohibited.  If you are  not the intended recipient, please notify us
immediately by returning  this message to the sender and delete all copies.

nah, I've been having this for a few days now. No worries on your part.
Matthew Jones
York College of Pennsylvania 2018
Computer Science
<EMAIL_ADDRESS>215.527.9582
On Wed, Mar 16, 2016 at 4:28 PM, gghafir<EMAIL_ADDRESS>wrote:

Potentially related to my issue?
On Mar 16, 2016 4:25 PM, "Mat Jones"<EMAIL_ADDRESS>wrote:

Stack Trace:
java.sql.SQLNonTransientConnectionException: No current connection.
at
org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown
Source)
at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.Util.noCurrentConnection(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.checkIfClosed(Unknown
Source)
at org.apache.derby.impl.jdbc.EmbedConnection.createStatement(Unknown
Source)
at org.apache.derby.impl.jdbc.EmbedConnection.createStatement(Unknown
Source)
at fixedIt.sql.database.SQLWriter.executeSQL(SQLWriter.java:57)
at fixedIt.sql.database.SQLWriter.executeDBCommand(SQLWriter.java:49)
at

fixedIt.modelComponents.Authenticator.addNewUserToDB(Authenticator.java:48)

at tests.AddNewUserToDBTest.main(AddNewUserToDBTest.java:12)
Caused by: java.sql.SQLException: No current connection.
at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown
Source)
at

org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown

Source)
... 11 more
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
https://github.com/mrjones2014/FixedIt/issues/1

--
This information is intended solely for the use of the individual to whom
it is addressed.
Any review, disclosure, copying, distribution or use of this e-mail
communication by
others is strictly prohibited. If you are not the intended recipient,
please notify us
immediately by returning this message to the sender and delete all copies.
—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
https://github.com/mrjones2014/FixedIt/issues/1#issuecomment-197533950

--
This information is intended solely for the use of the individual to whom it is addressed.
Any review, disclosure, copying, distribution or use of this e-mail communication by
others is strictly prohibited.  If you are  not the intended recipient, please notify us
immediately by returning  this message to the sender and delete all copies.

IT FINALLY WORKSSSSS!!!!!!!!!!!!!!!!!!


fix: new file with compact node

Types

[x] 🐛 Bug Fixes

Background or solution

🤖 Generated by Copilot at df5e277

Update the active file decoration when a single node is selected in the file tree (link)
Remove the duplicated logic of updating the active file decoration from the handleMultiSelect method (link)

close #3045.

Changelog

🤖 Generated by Copilot at df5e277
Fix and refactor active file decoration logic in file-tree-model.service.ts. Simplify the code by moving the condition to check for the active file to the single select case only.

/next


mat-datepicker force change detection

Im using matDatepickerFilter, but if my data change when panel is opened, change detection  not working.
I have created a blitz
To reproduce it:

click on input

wait for 2 seconds

click on disabled date or close and open panel

The datepicker is set up to determine the disabled dates after content is initialized. Since this is a one-time thing done by the month-view, you'll want to determine the disabled states before showing that month.
A workaround will likely involve making the month-view refresh itself, which may be by closing/opening it quickly, or switching back and forth from a month.
Here's one implemented workaround: https://stackblitz.com/edit/angular-w42tkh?file=src/app/app.component.ts

Thanks Andrew,
Blitz

Thanks Andrew,
Blitz


Run gofmt

@atauln 's changes made me realize that I've never done that before. In order to make my life easier (in terms of reviewing), I'm gonna ninja merge this PR.

@atauln cool if I merge this? Tested it, and it does work.


Trying to log chat to console but it's not working..

Trying something simple.. to log chat to console but it's not working.. Here is what I have, don't mind the mess:
require('dotenv').config();
const { authenticator } = require('otplib');
const { Kient } = require('kient');

// OTP secret key
const otpSecret = process.env.OTP_SECRET;

// Function to generate a one-time code (OTP)
const generateOTP = (secret) => {
    return authenticator.generate(secret);
};

// Function to handle chat message events
const handleChatMessage = (chatMessageInstance) => {
    // Log the chat message to the console
    console.log("Chat Message:", chatMessageInstance.data.message);
};

// Function to subscribe to chat events
const subscribeToChatEvents = async (client) => {
    // Connect to chatroom socket
    await client.ws.chatroom.listen(process.env.CHATROOM_ID);
    // Listen for chat message events
    client.on("Message", handleChatMessage);
};

// Function to authenticate with Kient using OTP
const authenticate = async () => {
    try {
        // Initialize Kient instance
        const client = await Kient.create();

        // Generate OTP
        const otp = generateOTP(otpSecret);

        // Attempt authentication
        await client.api.authentication.login({
            email: process.env.EMAIL,
            password: process.env.PASSWORD,
            otc: otp
        });
        console.log(`Authentication successful!`);

        // Subscribe to chat events after successful authentication
        await subscribeToChatEvents(client);
        console.log("Listening for Chat Messages..");

    } catch (error) {
        console.error("Authentication failed:", error);
    }
}

const main = async () => {
    // Perform authentication
    await authenticate();
}

// Run the main function
main();

I do get this in the console though at first:
Authentication successful!
Listening for Chat Messages..

But when I type in my chat nothing shows up in the console.. maybe I read the documentation wrong =/

I want to redo the docs at some point, maybe once I can update the library into using the actual public Kick API... once it finally releases, because TypeDoc generation is somewhat limiting, at least for my use case, especially for events. So I can understand the confusion.
I believe your issue is your event listener, it's listening to an event Kient doesn't emit.
client.on("Message", handleChatMessage);
Kient exports a handy Events const to make this easier for you. You'd just client.on(Events.Chatroom.Message, handleChatMessage); I believe (sorry, on mobile) to achieve that. Otherwise your text editor should provide intellisense on the strings that Kient will accept.


ch2_enabled

Add ch2_enabled, for boilers with indirect heating, the inclusion of a second heating circuit is required (Baxi Nuvola-3 b40)

I've added this functionality in pull request #8. You can see the required config changes to configure those new sensors etc over there.
Since my boiler doesn't support a second channel, I cannot test whether everything works correct. Please keep me posted if all sensors etc work as expected so I can merge it into the default code.

I'll try to check this week.
While I have another code working, with a few of my improvements

You can add a few more sensors  //ASFflag error
error code
Service_required
Lockout_reset
Low_water_pressure
Gas_fault	return
Air_fault
Water_overtemp

I've added these sensors. The comment in the PR is updated describing these sensors.

promptly ;-)  I will try to check as quickly as possible

It would be nice to add a PID. :-)
I can throw off some interesting links on this topic. I experimented with my boiler for a long time (hot water did not work). I found many different versions of the code.
Some boilers require an exchange
Slave Member ID code
Member ID code
Slave Version
Master Version

I'm not planning to implement any PID related logic, as there are many great PID controllers available, both in Home Assistant and in ESPHome.
Using for example the PID Climate component in ESPHome with its output optionally connected through a Slow PWM Output component towards the CH enabled switch could be a great implementation.
The issue here is that there are many different boilers and heating systems, each with their own set of needs and quirks, so I'd have to spend a ton of time re-implementing what's basically already out there, but slightly different. And one of the strengths of HA and/or ESPHome is that by exposing various switches, sensors, ... various components can be hooked together very easy to build what is perfect for you setup. In the mean time, I can focus on making this particular component as good and reliable as possible exposing all the boiler's functionality.
If more sensors could be exposed that would make it easier to integrate this component with others such as the PID climate, please let me know.

ok.
MessageID::Toutside, 0));
spied here:
https://github.com/DRazumovskiy/Baxi-Luna3-Comfort-IN-HT-Solar-MQTT/tree/master/baxi-luna3-mqtt

Outside temperature added :+1:

MessageID:Status 0 bool OpenTherm::isFlameOn(unsigned long response) { return response & 0x8;

Not sure whether I understand what you mean. This is already implemented as the flame_active binary sensor.

Because a climate would give the impression that it would work like any other climate-controlled device. Typically on a climate you'll for example set the room temperature. However, central heating setpoints on a boiler typically control the temperature of the hot water flowing to your floor, radiator, or other heat-exchanger, which is a lot of cases doesn't reflect 1-to-1 to the room temperature. It's similar to the DHW setpoint, this would be set to some safe value (to prevent bacteria growth), and you'd mix the water temperature for your shower with another device; the faucet in this case.
If however, you'd be using some forced air heat exchanger where this setpoint almost exactly controls the temperature of the air coming out of is, you could simply hook it up to one of the climate components in ESPHome.

Is it still possible to use PID (Esphome) with your integration? What should I specify in heat_output?

Depends on the climate/pid integration you're using. You could link it up directly to the CH enabled, or go through a slow PWM component. If a switch would not be accepted, you can put a template output in between to map to the switch.
Personally I have multiple climates controlling the same boiler, so I template climates in HA that open/close my central heating hot water valves for the right zones, and have an automation so that if any valve is open, the CH enabled is turned ON.

there are plans to do the same..........

I'm probably already tired of it
MessageID:17:RelModLevel

Already available.

src/opentherm/OpenTherm.cpp: In constructor 'OpenTherm::OpenTherm(int, int, bool)':
src/opentherm/OpenTherm.cpp:14:2: error: class 'OpenTherm' does not have any field named 'Fault'
14 |  Fault(0),
|  ^~~~~
src/opentherm/OpenTherm.cpp: At global scope:
src/opentherm/OpenTherm.cpp:443:1: error: expected declaration before '}' token
443 | }
| ^

That's probably from another component, as this code has no OpenTherm.cpp file, nor an OpenTherm class.

Yes, the campaign has tightened up from the old project, it is necessary to delete

it works on the test board

Good to hear :+1:.
Based on the screenshot however, it seems your boiler does not support outside_temperature, oem_diagnostic_code, ch_2_setpoint_temperature and return_temperature. These all return UNKNOWN_DATA. You can remove these from your configuration.

The code is merged in main, you can remove the @feature/ch2 from this component's source.

Test