Using an embedded tomcat to start the application

The purpose of this PR is to allow dspace backend to be started using an embedded tomcat or via an executable jar.  It still allows DSpace backend to also run in an external Tomcat (as currently).
Major benefits to this PR

Allows DSpace backend to be more easily run in IntelliJ (community edition) and similar IDEs
Can be beneficial to Docker deployments (note: our Docker scripts currently use an external Tomcat but could be refactored to use embedded tomcat).
Easier to test PRs or run demos using embedded Tomcat (no need to maintain Tomcat separately)

To allow that I made the following changes:

the dspace-server-webapp module went from being a war to being a jar; it then becomes a simple dependency like dspace-api or dspace-iif
I moved the html and js resources required for the HAL Browser from scr/main/webapp to src/main/resources/static, in order to be detected by spring boot
I renamed the Application class of dspace-server-webapp to WebApplication, removing the @SpringBootApplication annotation since the spring boot modules will be others (server and the new server-boot)
I update the application.properties to set the context path via server.servlet.context-path = /server
I modified the module server adding the class ServerApplication in order to deploy the generated war as we do currently
I introduced a new module server-boot in order to run DSpace using an embedded tomcat (see the class ServerBootApplication). To run this class with using the embedded tomcat is enough to run it’s main method with this program argument: --dspace.dir=

With these changes you can start dspace in 3 ways:

deploying the war related to the server project on tomcat
running the main of ServerBootApplication method from the IDE (Eclipse or Intellij)
running the executable jar generated for the server-boot project (placed under the target folder)

These modifications had the side effect of modifying the order in which the beans are discovered and injected into lists annotated with autowired: for example, in DSpacePermissionEvaluator plugins can be inserted in an unspecified order. This highlighted a few issues which I fixed.
Checklist
This checklist provides a reminder of what we are going to look for when reviewing your PR. You need not complete this checklist prior to creating your PR (draft PRs are always welcome). If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!

[X] My PR is small in size (e.g. less than 1,000 lines of code, not including comments & integration tests). Exceptions may be made if previously agreed upon.
[X] My PR passes Checkstyle validation based on the Code Style Guide.
[X] My PR includes Javadoc for all new (or modified) public methods and classes. It also includes Javadoc for large or complex private methods.
[X] My PR passes all tests and includes new/updated Unit or Integration Tests based on the Code Testing Guide.
[X] If my PR includes new libraries/dependencies (in any pom.xml), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.
[X] If my PR modifies REST API endpoints, I've opened a separate REST Contract PR related to this change.
[X] If my PR includes new configurations, I've provided basic technical documentation in the PR itself.
[X] If my PR fixes an issue ticket, I've linked them together.

@LucaGiamminonni : One immediate question. How does this impact the old (v6) REST API (in [src]/dspace-rest)?  We have made promises to provide "backwards combability" with older clients/scripts by allowing sites to optionally include that old REST API alongside the new one.  How would one deploy the old (v6) REST API if we were to move this PR forward?
To be clear, I am a big fan of this PR & the movement towards an embedded Tomcat.  However, it's unclear to me if we can make this change in DSpace 7, or if we'd need to wait for DSpace 8 when the old REST API is removed.

I think this PR could be improved by adding some info regarding the benefits of using an embedded Tomcat for DSpace. I know that this makes packaging DSpace with Docker easier. I also believe it will improve developer workflows where one may need to change context several times a day, and each context would require rebuilding and deploying the application. But, a nice bulleted list explaining the benefits of this PR would help motivate a few more reviewers, I think.

Per today's discussion... a quick summary:
Major benefits to this PR (I copied these up into the description above to make them easier to find)

Allows DSpace backend to be more easily run in IntelliJ (community addition) and similar IDEs
Can be beneficial to Docker deployments (note: our Docker scripts currently use an external Tomcat but could be refactored to use embedded tomcat).
Easier to test PRs or run demos using embedded Tomcat (no need to maintain Tomcat separately)

Concerns expressed

Will this be hard to maintain so that we are embedding a version of Tomcat which is secure?   Answer: The version of embedded Tomcat is controlled by Spring Boot, as we are just using the embedded Tomcat feature which comes with Spring Boot. So, anytime we upgrade Spring Boot it will auto-update the version of embedded Tomcat for us.  Spring Boot does regular security releases (almost monthly) and is very responsive to patching vulnerabilities in its dependencies.  Current version of Tomcat embedded in Spring Boot v2 (which we use) is Tomcat v9.0.68.
This breaks the ability to use the Maven WAR Overlay for Server Webapp (in [dspace-src]/dspace/modules/server/).  Is that a deal breaker?  Answer:  We all feel very few people are using Overlays of the Server webapp.  The additions module will still work fine..  It's only the server overlay that no longer will work.  We can provide tips for how to move any overlayed files out of modules/server  (@abollini was going to add suggestions to this ticket)

Decision - Based on strong feedback from all that it'd be nice to have this feature sooner rather than later.

We'll move forward with this PR for 7.6.  Have several of us review it.
If there's any major issues we discover, we'll immediately move it to 8.0.  It's a "nice to have" improvement for 7.6, but not required.
If we find this is working well, then we will release it for 7.6.  However, we will document it as follows:

The embedded Tomcat feature is a beta feature.  We do not recommend it for Production at this time as the scalability/stability is untested.  It is currently only meant to ease development/debugging/testing.
We will keep the Install / Upgrade instructions as-is. They will still recommend setting up an external Tomcat & copying the server webapp into it.
We will document where institutions can move any files that were previously in [dspace-src]/dspace/modules/server/ ... as that WAR Overlay will no longer work.

I'm trying to get the new ServerBootApplication to start up, following the description in this PR, via a run configuration in IDEA. I've gotten pretty far, but am running into an error: https://gist.github.com/hardyoyo/fcd2a80d3857a4ca65bece180bd90fea

I can duplicate this on the CLI by running this:
cd dspace/modules/server-boot/target
java -jar ./server-boot-7.6-SNAPSHOT.jar --dspace.dir=/Users/hpotting/d/install/dspace7

exactly the same error... it's possible I need to copy more config?

Thanks, Luca, with that hint, I managed to track this down to another application.properties file being present (a failed attempt on my part to configure dspace.dir). When I removed that unnecessary file from my src and target folders, the ServerBootApplication spun up nearly instantaneously. I've also defined a "Before launch" task in IDEA, as an External tool, to run docker-compose -p d7 -f docker-compose-just-deps.yml up -d with the working directory set to my dspace project directory. The docker-compose-just-deps.yml file is linked above in a gist.
This is a very nice setup. I am pleased. I'm going to keep playing around with it, but as-is I'm pretty sure I'm 👍 on this.

As-is, the documented docker-build process no longer produces a working dspace container. Here's the command I ran:
docker-compose -f docker-compose.yml -f docker-compose-cli.yml build --build-arg JDK_VERSION=17
Then I ran this:
docker-compose -p d7 up -d
Pointing my browser at http://localhost:8080/server yields a 404 error
We could of course revise the docker image to use the embedded Tomcat provided with this PR, or we can revise it to continue to deploy the war file (which the existing Docker config seems unable to find).

I've been scouring this page for ideas: https://www.baeldung.com/properties-with-spring#1-applicationproperties-the-default-property-file but I like Tim's idea of figuring out how to get ConfigurationService to "discover" the value for dspace.dir from Tomcat properties.

This functionality does not impact the system's usage, only the way it can be made available. I believe we should consider this in the postpone decision.
In my opinion, I don't think we should postpone the addition of this feature solely (as I understood) due to the need to specify an additional parameter in the Tomcat settings. I haven't tested it yet, but from what I understand, the system can continue to function in both ways, it will just require specifying the dspace.dir to work in the usual manner (within a Tomcat container).
Based on my experience following the progress of DS7, from the first time our system became operational until today, I have found myself having to make several adjustments to base configurations and change supporting software. I have had to replace Java, Tomcat, Postgresql, perform a clean installation of Solr, as well as all the frontend support software. Honestly, it wouldn't bother me to have to define an extra configuration, the same value in two different places (however, this would need to be very clear in the release notes and in the installation documentation).
As an additional advantage, this functionality will further ease the process of building Docker images, simplifying the process and freeing us from the dependency on the Tomcat image (when that is changed).
I also want to note that this functionality has been requested by the community for some time.

It won't be easy to discover the DSpace directory tree root automatically in a Servlet context. One of the design principles for Servlet seems to be that the application should not know where it is unless it is explicitly told -- it lives in an abstract space and the container is supposed to supply everything it needs to know.

In this case, I think the proposal is to see if we can get The CommonsConfig stuff we're using in our Dspace configuration to detect and use a property set in the servlet container. From a brief skim of the docs for Commons Configuration, this does seem like it ought to be possible.

I don't know whether this would work, but I was reading through the Commons Configuration docs I linked above, and I think we can specify that JNDI properties can override other configuration options by adding a few lines here: https://github.com/DSpace/DSpace/blob/main/dspace/config/config-definition.xml#L27
just above that section, I think if we add:
        <!-- Load JNDI properties [does not automatically reload] -->
        <jndi/>

we should be able to not configure dspace.dir in any of the configs, and our CommonsConfiguration files should properly pick up the value from the Tomcat configuration. I could be totally wrong, but I think this might work?

Since there are still issues with this beta feature regarding how to support two different deployment methods in DS7.6, and it was decided to postpone it to DS8, does it make sense for DS8 to support these two different deployment approaches? Can we focus on just one (installation, documentation, support...), the one that simplifies and eases DSpace setup/deployment?

Hello @tdonohue, I made a new commit that will enable the resolution of the dspace.dir during the maven build phase. With this new change we can easily deploy the war file without having to address anything else (like it was before), and also we are able to start the spring-boot application using the embedded tomcat (by running the main class or just by executing the corresponding jar of the server-boot project).
The changes inside the dspace-server-webapp/pom.xml are used to load properties files during the build phase and substitute them where possible inside every other *.properies file.
Moreover, the changes inside the dspace/modules/server/pom.xml are used to copy the newly generated properties file of the dspace-server-webapp build to the additions output directory, used to build the WEB-INF folder of the dspace-server-webapp.war.
I tried all the possible execution configuration, listed above in this thread, and they seem to work fine for me.
Let me know if you find out something that is not working properly.
Thank you.

I'm going to test this PR later today, this is exciting, thanks, @vins01-4science !

I can confirm that this PR now builds correctly in Docker-Compose, and results in a running DSpace backend instance.
The build works flawlessly:
docker-compose -f docker-compose.yml -f docker-compose-cli.yml build

and then it starts up without any errors:
docker-compose -p d7 up -d
docker-compose -p d7 logs -f

Now I need to reconfirm that the embedded Tomcat version still works. I'll check that and report back, probably tomorrow. But this is looking very promising indeed. @tdonohue will be pleased, I'm sure.

I've made an attempt at testing the embedded Tomcat, and am stuck. I'm trying to do this from the CLI, working from the comments above, but I can't seem to get past this error
https://gist.github.com/hardyoyo/ba6085196aab0cf9907549ebfb4111bc
when running these commands:
cd dspace/modules/server-boot/target/
java -jar ./server-boot-8.0-SNAPSHOT.jar -Ddspace.dir=/Users/hpotting/d/install/dspace7

I've tried a few options, can cannot see a way to provide an override for the dspace.dir property for the server-boot jar. The inheritance from the dspace parent pom causes dspace.dir to be hardcoded in the server-boot JAR at build time, preventing runtime overrides. If I attempt to globally override the dspace.dir property at build time, the additions module fails to build. OH, after typing all that, I realize I can just skip the additions module. This seems to work:
mvn clean package -pl '!dspace/modules/additions' -Ddspace.dir=/Users/hpotting/d/install/dspace7

I've tried a few options, can cannot see a way to provide an override for the dspace.dir property for the server-boot jar. The inheritance from the dspace parent pom causes dspace.dir to be hardcoded in the server-boot JAR at build time, preventing runtime overrides. If I attempt to globally override the dspace.dir property at build time, the additions module fails to build. OH, after typing all that, I realize I can just skip the additions module. This seems to work:
mvn clean package -pl '!dspace/modules/additions' -Ddspace.dir=/Users/hpotting/d/install/dspace7

well... kinda... it still doesn't build successfully. This is a bit of a tangle, isn't it?

I tried again and if you provide both logging.dir and dspace.dir it works fine, or otherwise you can provide the application.properties file by using the spring.config.location property.
java -jar server-boot-8.0-SNAPSHOT.jar --spring.config.location=file:///path/to/target/application.properties

Could you try with this one?
Moreover, if we want to just run it without any parameter we need to change the building phase of the jar to just include it, take in count that with that configuration the application.properties will be shipped with the jar itself, and will point outside that jar so that could be a problem for someone that is not familiar with the project, java, spring-boot or maven.

I've tried this:
java -jar ./server-boot-8.0-SNAPSHOT.jar --spring.config.location=file:///Users/hpotting/d/install/dspace7/application.properties
with dspace.dir set correctly in that application.properties file (copied out of the additions module's target)
I get the same error, the embedded tomcat can't find the log config.
Can you provide an example of what you found that works? You mentioned:

if you provide both logging.dir and dspace.dir it works fine

Can you show me what you mean by that? Thanks!

I've tried this:
java -jar ./server-boot-8.0-SNAPSHOT.jar --spring.config.location=file:///Users/hpotting/d/install/dspace7/application.properties
with dspace.dir set correctly in that application.properties file (copied out of the additions module's target)
I get the same error, the embedded tomcat can't find the log config.
Can you provide an example of what you found that works? You mentioned:

if you provide both logging.dir and dspace.dir it works fine

Can you show me what you mean by that? Thanks!

Sure, here you got the command:
java -jar ./server-boot-8.0-SNAPSHOT.jar --dspace.dir=/path/to/install/folder/ --logging.config=file:///path/to/install/folder/config/log4j2.xml

In this way you are overriding the default configuration of the standard dspace.cfg file.

You will see the log inside the dspace.log file of the installation folder.

I think what we really need are instructions for testers of this PR. I've tried to get it running, and have gotten close, but still have not completely spun up the server-boot jar. I can't spend any more time on this today, I hope to be able to return to it later in the week. I really want this PR to be merged, because I feel very strongly that this is important for the project. Instructions would help not only me, but any other interested committers, or other community members.

OK, I managed to spin up the embedded tomcat. Here's what I needed to do:

create a new docker-compose-just-deps.yml file (copy the existing docker-compose.yml file, and remove the config for the service config for the DSpace (backend) webapp container). Here's an example: https://gist.github.com/hardyoyo/f029712f4f68f2986f6628d9c0c4ae91

run that with: docker-compose -f ./docker-compose-just-deps.xml -p d7 up -d

ensure the config (local.cfg and dspace.cfg) have solr.server=http://localhost:8983/solr configured, as well as default database configurations (this is probably correct as-is, but worth double-checking).

build this branch with maven: mvn clean package

cd dspace/modules/server-boot/target

java -jar ./server-boot-8.0-SNAPSHOT.jar --dspace.dir=/path/to/your/local/dspace7/home --logging.config=/path/to/your/local/dspace7/home/config/log4j2.xml --solr.server=http://localhost:8983/solr

step 3 I'm not entirely sure how important it is... but it's what I did.
Alright, I'm confident this all works. We need good docs. I'm going to give this PR a +1

This all looks fine, the Docker build/testing instructions still work for the war build, and the embedded tomcat works as well. I think we'll need lots of docs on how to best make use of the server-boot/embedded tomcat (with instructions for various IDEs). This is a nice improvement for DSpace 8, and will surely lead to improved deployment methods in the future. 👍

Thank you, I really appreciate that someone else is getting involved in this and that is giving its help and time to improve this new feature.
Moreover, I think that the better way to execute DSpace from the IDE will be by running it as a standard Java application, it will be compatible with all IDEs. I am going to provide a little recap down here just to allow everyone to run it on their own and provide some feedback.
How to try it out?
With this PR we can execute DSpace with different configurations:

Deploy the server.war target related to the /server/pom.xml
Run the server-boot.jar target related to the server-boot/pom.xml
Run the it by using the docker-compose commanddocker-compose -f docker-compose.yml -f docker-compose-cli.yml build

It just came to my mind the Handle Server... would this PR has any affect on how the Handle server integration is currently launched? In the same way, what about the CLI?

@paulo-graca : No, this PR has no impact on anything other than Tomcat.
With this PR in place you have two install options:

Install Apache Tomcat with the DSpace "server" WAR as the webapp
Or, alternatively, just run the DSpace "server-boot.jar" (which includes that "server" webapp with an embedded Tomcat).

However, this PR has no impact on the DSpace installation directory (dspace.dir), CLI, Handle Server or other configs stored in that location.  With "server-boot.jar" you still need to tell it where dspace.dir is.  The only thing this PR changes is how the "server" webapp runs.

Great work!

👍 Thank you @vins01-4science and @LucaGiamminonni ! This all looks good to me now. I cannot find any bugs with the approach taken when testing using the UI.
Obviously, this will require updates to our Installation Documentation: https://wiki.lyrasis.org/display/DSDOC8x/Installing+DSpace
If you have time, I'd appreciate help there. In the meantime, I'll flag with with a needs documentation label to remind us it requires docs.

Hello @tdonohue,
the installation procedure has been updated with a new deploy step involving the executable jar configuration.
However, the other changes made with this PR are involving mainly the development procedure (Development Experience), but I cannot find any page that contains this kind of information.
Could you show me where to put that execution information / details?
Thank you.

@vins01-4science : Thanks for the updated installation docs!
Regarding developer documentation, you are correct that we don't tend to add that into the official documentation space (DSDOC8x).  However, we do have some general IDE docs like these:

https://wiki.lyrasis.org/display/DSPACE/IDE+Integration+-+DSpace+and+IDEA
https://wiki.lyrasis.org/display/DSPACE/IDE+Integration+-+DSpace+and+NetBeans
https://wiki.lyrasis.org/display/DSPACE/IDE+Integration+-+DSpace%2C+Eclipse+and+Tomcat

If you could find time to document just one IDE (whichever one you tend to use), that might be helpful to others in how to use this feature for development.  So, if you tend to use IntelliJ, maybe just update that first page?
Or, honestly, if you feel those pages are way to outdated, just create a brand new page under this one https://wiki.lyrasis.org/display/DSPACE/Developer+Guidelines+and+Tools
My main goal is to just find a way to better document this for feature for development.  So, where you create the page doesn't matter much... I can always move it later.

@vins01-4science : Thanks for the updated installation docs!
Regarding developer documentation, you are correct that we don't tend to add that into the official documentation space (DSDOC8x). However, we do have some general IDE docs like these:
* https://wiki.lyrasis.org/display/DSPACE/IDE+Integration+-+DSpace+and+IDEA

* https://wiki.lyrasis.org/display/DSPACE/IDE+Integration+-+DSpace+and+NetBeans

* https://wiki.lyrasis.org/display/DSPACE/IDE+Integration+-+DSpace%2C+Eclipse+and+Tomcat

If you could find time to document just one IDE (whichever one you tend to use), that might be helpful to others in how to use this feature for development. So, if you tend to use IntelliJ, maybe just update that first page?
Or, honestly, if you feel those pages are way to outdated, just create a brand new page under this one https://wiki.lyrasis.org/display/DSPACE/Developer+Guidelines+and+Tools
My main goal is to just find a way to better document this for feature for development. So, where you create the page doesn't matter much... I can always move it later.

Documentation created here: https://wiki.lyrasis.org/display/DSPACE/DSpace+8+development+with+IntelliJ+IDE
Maybe someone could extend it to include instructions for the docker plugin / execution.
Note that the configuration / steps can be reused for pretty much every IDE, since basically we need just to start a standard Java Application and its main method :+1:


Add a checkbox to persist deploy preferences given at deploy time

Once #642 is implemented, we should add a checkbox to the new prompt dialog which is when set would ensure that the preferences set by the user during deploy are persisted and the next time the user opens the deploy preferences page or the prompt dialog is shown it'll use the values set in the previous run.

I feel like I'm getting a bit of preference fatigue. Every checkbox we add increases cognitive load for the dialog and requires documentation. If the user wants to change the defaults, they can change them in the preference pane. It might make sense to limit this dialog to just the things we're passing to gcloud: project ID, version, promote or no

The idea here is that the user could see the previously set values if that checkbox is set. Otherwise it would come up with always the ones saved through the preference page. If they want to quickly deploy one after each other, it's useful to see that previous version deployed was 1, now the user sets 2, and on the next deploy he/she will see that the next version is 3 (probably, based on his/her versioning schema).
If we don't give the option to save it, they may need to think more/go back to the pref page and change there.
We can also save these values by default (no checkbox to enable/disable) and have this issue here and if users vote/ask for it, we could implement later.

The combinatorial complexity is making my brain explode. :-)
Here's an idea: what if we remove the visible deploy preferences completely? Instead, the user enters them in the pop-up dialog as needed; and we remember those values as defaults for next time. That way the user only has to think about this when they're thinking about deployment. No confusion about where the values are coming from or where to set them.

+1 to only showing a dialog on each deploy.  Nobody looks at the project properties anyways.

Speaking of the project properties, one big difference from IntelliJ is project-level preferences vs. deploy configurations. That is, our Eclipse plugin can have only one deploy setting per project, while IntelliJ can have an arbitrary number of "Deploy Configurations" (actually Run/Debug Configurations re-purposed).

That's pretty interesting.  Do we have any detail on how people use such deploy configurations?  We could consider doing something similar with the launch configurations.  The Google Dataflow plugin creates Dataflow launch configurations.


[App] Unable to pass api key in cli

Os: windows 11 pro N
Python version: Python 3.6.8 :: Anaconda, Inc.
wandb login >
andb: You can find your API key in your browser here: https://wandb.ai/authorize
←[34m←[1mwandb←[0m: Paste an API key from your profile and hit enter:
and it gets stacked.
No way to paste or even type anything at the command line.

Hi @hn2 , to login on windows, could you please try running: wandb login YOUR_API_KEY?

You can also just set the api key in your environment if you're unable to use the command line option.

export WANDB_API_KEY=XXXXXXX
#Then run your python code

Hi @hn2 , I wanted to follow up on this request. Please let us know if we can be of further assistance or if your issue has been resolved.

We are closing this due to inactivity, please comment to reopen.

@Cupcc can you share the entire error you're seeing and what action you took that caused it?

The login error can be resolved by giving the 40char long key along with 'wandb login'. not after you click Enter
wandb login fcsaddbkj54as1cs4a17dea6b984dc53472cd959db60


update install.sh

curl is not available by default on minimal install
like lsb_release and sudo
I will fix all of them gradually
It will be more suitable for container use (docker)

This has been resolved in the docker images. on minimal images, I highly suggest using the new docker support. Its currently in Dev :)


LCC - T5 devices

Describe The Bug:

I have a T5 honeywell thermostat and I got the follow error when try to add it to homebridge:
device.groups is not iterable
I found this error on the issue for TCC devices where a special if was added to platform.js.
I switched the "TCC" string with "LCC" string on the platform.js file lines 272 and 402 and now it's working.
I assume that the groups array is not available on the honeywell api and LCC should be handled as a TCC.
To Reproduce:

Expected behavior:

Logs:

{
  displayedOutdoorHumidity: 52,
  vacationHold: { enabled: false },
  currentSchedulePeriod: { day: 'Tuesday', period: 'P1' },
  scheduleCapabilities: {
    availableScheduleTypes: [ 'None', 'Geofenced', 'TimedEmea' ],
    schedulableFan: false
  },
  scheduleType: { scheduleType: 'Timed', scheduleSubType: 'EMEA' },
  scheduleStatus: 'Resume',
  allowedTimeIncrements: 10,
  settings: {
    hardwareSettings: { brightness: 2, maxBrightness: 5 },
    temperatureMode: { air: true },
    specialMode: {},
    devicePairingEnabled: true
  },
  deviceClass: 'Thermostat',
  deviceType: 'Thermostat',
  deviceID: 'LCC-00D02DC1A545',
  userDefinedDeviceName: 'Thermostat',
  name: 'Thermostat',
  isAlive: true,
  isUpgrading: false,
  isProvisioned: true,
  macID: '00D02DC1A545',
  deviceSettings: {},
  service: { mode: 'Up' },
  deviceRegistrationDate: '2018-01-08T20:04:07.3733333',
  dataSyncStatus: 'Initiated',
  units: 'Celsius',
  indoorTemperature: 23,
  outdoorTemperature: 17,
  allowedModes: [ 'Heat', 'Off' ],
  deadband: 0,
  hasDualSetpointStatus: false,
  minHeatSetpoint: 5,
  maxHeatSetpoint: 35,
  minCoolSetpoint: -18,
  maxCoolSetpoint: -18,
  changeableValues: {
    mode: 'Off',
    heatSetpoint: 23,
    coolSetpoint: 10,
    thermostatSetpointStatus: 'NoHold',
    nextPeriodTime: '22:30:00',
    heatCoolMode: 'Heat',
    endHeatSetpoint: null,
    endCoolSetpoint: null
  },
  operationStatus: {
    mode: 'EquipmentOff',
    fanRequest: false,
    circulationFanRequest: false
  },
  deviceModel: 'T5-T6'
}

Homebridge Config:
Show your homebridge config.json here.
Remove any sensitive information, such as your homebridge-gsh / google-smarthome token.

Screenshots:

Thermostat Model:

Environment:

Node.js Version:
NPM Version:
Homebridge Version:
Homebridge Honeywell Home Version:
Homebridge Config UI X Plugin Version:
Operating System:

I have a T5 honeywell thermostat and I got the follow error when try to add it to homebridge:
device.groups is not iterable
Here is the JSON response for my device:
{
displayedOutdoorHumidity: 52,
vacationHold: { enabled: false },
currentSchedulePeriod: { day: 'Tuesday', period: 'P1' },
scheduleCapabilities: {
availableScheduleTypes: [ 'None', 'Geofenced', 'TimedEmea' ],
schedulableFan: false
},
scheduleType: { scheduleType: 'Timed', scheduleSubType: 'EMEA' },
scheduleStatus: 'Resume',
allowedTimeIncrements: 10,
settings: {
hardwareSettings: { brightness: 2, maxBrightness: 5 },
temperatureMode: { air: true },
specialMode: {},
devicePairingEnabled: true
},
deviceClass: 'Thermostat',
deviceType: 'Thermostat',
deviceID: 'LCC-00D02DC1A545',
userDefinedDeviceName: 'Thermostat',
name: 'Thermostat',
isAlive: true,
isUpgrading: false,
isProvisioned: true,
macID: '00D02DC1A545',
deviceSettings: {},
service: { mode: 'Up' },
deviceRegistrationDate: '2018-01-08T20:04:07.3733333',
dataSyncStatus: 'Initiated',
units: 'Celsius',
indoorTemperature: 23,
outdoorTemperature: 17,
allowedModes: [ 'Heat', 'Off' ],
deadband: 0,
hasDualSetpointStatus: false,
minHeatSetpoint: 5,
maxHeatSetpoint: 35,
minCoolSetpoint: -18,
maxCoolSetpoint: -18,
changeableValues: {
mode: 'Off',
heatSetpoint: 23,
coolSetpoint: 10,
thermostatSetpointStatus: 'NoHold',
nextPeriodTime: '22:30:00',
heatCoolMode: 'Heat',
endHeatSetpoint: null,
endCoolSetpoint: null
},
operationStatus: {
mode: 'EquipmentOff',
fanRequest: false,
circulationFanRequest: false
},
deviceModel: 'T5-T6'
}
I found this error on the issue for TCC devices where a special if was added to platform.js.
I switched the "TCC" string with "LCC" string on the platform.js file lines 272 and 402 and now it's working.
I assume that the groups array is not available on the honeywell api and LCC should be handled as a TCC.

@sdamasoc this is actually not the correct way to fix this. Please provide me more logs in debug mode so that I can work on getting this fixed for you.

why my 1st message was deleted?
Here are my logs:
[9/2/2020, 3:30:11 PM] [HoneywellHome] Got access token: XXXXXXXXXXXXXXXXXXXX
[9/2/2020, 3:30:11 PM] [HoneywellHome] New refresh token: YYYYYYYYYYYYYYYYYYYYYYYYYYY
[9/2/2020, 3:30:11 PM] [HoneywellHome] Homebridge config.json has been updated with new refresh token.
[9/2/2020, 3:30:12 PM] [HoneywellHome] # of Locations Found: 1.
[9/2/2020, 3:30:12 PM] [HoneywellHome] Getting devices for Mon domicile...
[9/2/2020, 3:30:12 PM] [HoneywellHome] 537879
[9/2/2020, 3:30:12 PM] [HoneywellHome] {
locationID: 537879,
name: 'Mon domicile',
country: 'BE',
zipcode: '1620',
devices: [
{
displayedOutdoorHumidity: 43,
vacationHold: [Object],
currentSchedulePeriod: [Object],
scheduleCapabilities: [Object],
scheduleType: [Object],
scheduleStatus: 'Resume',
allowedTimeIncrements: 10,
settings: [Object],
deviceClass: 'Thermostat',
deviceType: 'Thermostat',
deviceID: 'LCC-00D02DC1A545',
userDefinedDeviceName: 'Thermostat',
name: 'Thermostat',
isAlive: true,
isUpgrading: false,
isProvisioned: true,
macID: '00D02DC1A545',
deviceSettings: {},
service: [Object],
deviceRegistrationDate: '2018-01-08T20:04:07.3733333',
dataSyncStatus: 'Initiated',
units: 'Celsius',
indoorTemperature: 23,
outdoorTemperature: 19.5,
allowedModes: [Array],
deadband: 0,
hasDualSetpointStatus: false,
minHeatSetpoint: 5,
maxHeatSetpoint: 35,
minCoolSetpoint: -18,
maxCoolSetpoint: -18,
changeableValues: [Object],
operationStatus: [Object],
deviceModel: 'T5-T6'
}
],
users: [
{
userID: 603029,
username<EMAIL_ADDRESS>firstname: 'xxxx',
lastname: 'xxxxx',
created:<PHONE_NUMBER>,
deleted: -62135596800,
activated: true,
connectedHomeAccountExists: true,
locationRoleMapping: [Array],
isOptOut: '',
isCurrentUser: true
},
{
userID: 1182162,
username<EMAIL_ADDRESS>firstname: 'xxxx',
lastname: 'xxxxx',
created:<PHONE_NUMBER>,
deleted: -62135596800,
activated: true,
connectedHomeAccountExists: true,
locationRoleMapping: [Array],
isOptOut: 'True',
isCurrentUser: false
}
],
timeZone: 'W. Europe Standard Time',
ianaTimeZone: 'Europe/Berlin',
daylightSavingTimeEnabled: true,
geoFenceEnabled: false,
predictiveAIREnabled: false,
comfortLevel: 0,
geoFenceNotificationEnabled: false,
geoFenceNotificationTypeId: 13,
configuration: {
faceRecognition: {
enabled: false,
maxPersons: 10,
maxEtas: 2,
maxEtaPersons: 1,
schedules: [Array]
}
}
}
[9/2/2020, 3:30:12 PM] [HoneywellHome] # of Thermostats Found at Mon domicile: 1.
[9/2/2020, 3:30:12 PM] [HoneywellHome] {
displayedOutdoorHumidity: 43,
vacationHold: { enabled: false },
currentSchedulePeriod: { day: 'Wednesday', period: 'P1' },
scheduleCapabilities: {
availableScheduleTypes: [ 'None', 'Geofenced', 'TimedEmea' ],
schedulableFan: false
},
scheduleType: { scheduleType: 'Timed', scheduleSubType: 'EMEA' },
scheduleStatus: 'Resume',
allowedTimeIncrements: 10,
settings: {
hardwareSettings: { brightness: 2, maxBrightness: 5 },
temperatureMode: { air: true },
specialMode: {},
devicePairingEnabled: true
},
deviceClass: 'Thermostat',
deviceType: 'Thermostat',
deviceID: 'LCC-00D02DC1A545',
userDefinedDeviceName: 'Thermostat',
name: 'Thermostat',
isAlive: true,
isUpgrading: false,
isProvisioned: true,
macID: '00D02DC1A545',
deviceSettings: {},
service: { mode: 'Up' },
deviceRegistrationDate: '2018-01-08T20:04:07.3733333',
dataSyncStatus: 'Initiated',
units: 'Celsius',
indoorTemperature: 23,
outdoorTemperature: 19.5,
allowedModes: [ 'Heat', 'Off' ],
deadband: 0,
hasDualSetpointStatus: false,
minHeatSetpoint: 5,
maxHeatSetpoint: 35,
minCoolSetpoint: -18,
maxCoolSetpoint: -18,
changeableValues: {
mode: 'Heat',
heatSetpoint: 23,
coolSetpoint: 10,
thermostatSetpointStatus: 'HoldUntil',
holdUntil: '22:30:00',
nextPeriodTime: '22:30:00',
endHeatSetpoint: 23,
endCoolSetpoint: 10,
heatCoolMode: 'Heat'
},
operationStatus: {
mode: 'EquipmentOff',
fanRequest: false,
circulationFanRequest: false
},
deviceModel: 'T5-T6'
}
[9/2/2020, 3:30:12 PM] [HoneywellHome] LCC-00D02DC1A545
[9/2/2020, 3:30:12 PM] [HoneywellHome] Failed to refresh access token. device.groups is not iterable

Okay, I totally redid the device discovery, can you test the latest beta? v7.2.1-beta.0

I've tried latest beta and hit a new issue now:
[9/5/2020, 9:50:56 AM] Homebridge is running on port 51326.
[9/5/2020, 9:50:57 AM] [HoneywellHome] Got access token: s7PVKGeNGEWAqmVeAQN40SoWGp5d
[9/5/2020, 9:50:57 AM] [HoneywellHome] New refresh token: h6UUVGEONtWAxAXMN3ev0AgaPTeCMV3T
[9/5/2020, 9:50:57 AM] [HoneywellHome] Homebridge config.json has been updated with new refresh token.
[9/5/2020, 9:50:58 AM] [HoneywellHome] Total Locations Found: 1.
[9/5/2020, 9:50:58 AM] [HoneywellHome] Getting devices for Mon domicile...
[9/5/2020, 9:50:58 AM] [HoneywellHome] Total Devices Found at Mon domicile: 1.
[9/5/2020, 9:50:58 AM] [HoneywellHome] Device ID: LCC-00D02DC1A545
[9/5/2020, 9:50:58 AM] [HoneywellHome] Device Type: Thermostat
[9/5/2020, 9:50:58 AM] [HoneywellHome] Device Class: Thermostat
[9/5/2020, 9:50:58 AM] [HoneywellHome] Device Model: T5-T6
[9/5/2020, 9:50:58 AM] [HoneywellHome] Device Priority Type: undefined
(node:4092) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'allowedModes' of undefined
at HoneywellHomePlatform.deviceinfo (/usr/lib/node_modules/homebridge-honeywell-home/src/platform.ts:549:27)
at HoneywellHomePlatform.T5 (/usr/lib/node_modules/homebridge-honeywell-home/src/platform.ts:345:10)
at /usr/lib/node_modules/homebridge-honeywell-home/src/platform.ts:275:20
at Array.forEach ()
at /usr/lib/node_modules/homebridge-honeywell-home/src/platform.ts:265:24
at Array.forEach ()
at HoneywellHomePlatform.discoverDevices (/usr/lib/node_modules/homebridge-honeywell-home/src/platform.ts:260:15)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at HomebridgeAPI. (/usr/lib/node_modules/homebridge-honeywell-home/src/platform.ts:69:9)
(node:4092) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:4092) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

@snopas576, I just pushed out a new beta. can you test it?
To Install:
sudo npm install -g --unsafe-perm homebridge-honeywell-home@beta

To Revert:
sudo npm install -g --unsafe-perm homebridge-honeywell-home@latest

Ok it's better now:
[9/5/2020, 7:11:19 PM] [HoneywellHome] Got access token: 3OOtfukeY1lAjxBwML2JTTXpWs28
[9/5/2020, 7:11:19 PM] [HoneywellHome] New refresh token: vooNPw8LXOIy3IfCPkUGoEFCePmuqbGR
[9/5/2020, 7:11:19 PM] [HoneywellHome] Homebridge config.json has been updated with new refresh token.
[9/5/2020, 7:11:19 PM] [HoneywellHome] Total Locations Found: 1
[9/5/2020, 7:11:19 PM] [HoneywellHome] Getting devices for Mon domicile...
[9/5/2020, 7:11:19 PM] [HoneywellHome] Total Devices Found at Mon domicile: 1
[9/5/2020, 7:11:19 PM] [HoneywellHome] T5 UDID: ThermostatLCC-00D02DC1A545T5-T6
[9/5/2020, 7:11:19 PM] [HoneywellHome] Adding new accessory: Thermostat T5-T6 Thermostat
[9/5/2020, 7:11:19 PM] [HoneywellHome] Registering new device: Thermostat T5-T6 Thermostat - LCC-00D02DC1A545
[9/5/2020, 7:11:20 PM] [HoneywellHome] Fetched update for Thermostat from Honeywell API: {"mode":"Heat","heatSetpoint":22,"coolSetpoint":10,"thermostatSetpointStatus":"HoldUntil","holdUntil":"23:30:00","nextPeriodTime":"23:30:00","endHeatSetpoint":23,"endCoolSetpoint":10,"heatCoolMode":"Heat"}
[9/5/2020, 7:11:20 PM] [HoneywellHome] "Heat"
But there is another problem the targetting heat temperature show in homebridge ui is -18 (pictures attached)

@sdamasoc what does it look like in in homekit?

It shows -18 as in homebridge

It shows -18 as in homebridge

@sdamasoc okay, let me look more. Does it all seem to work besides this?

I can see the actual room temperature but can’t change the target heat temperature

@sdamasoc okay I release a new beta

To Install:
sudo npm install -g --unsafe-perm homebridge-honeywell-home@beta

To Revert:
sudo npm install -g --unsafe-perm homebridge-honeywell-home@latest

Thanks a lot but nothing changed:
[9/6/2020, 9:42:25 PM] [HoneywellHome] Initializing HoneywellHome platform...
[9/6/2020, 9:42:25 PM] [HoneywellHome] Finished initializing platform: HoneywellHome
[9/6/2020, 9:42:25 PM] [HoneywellHome] Config OK
[9/6/2020, 9:42:25 PM] Loading 1 accessories...
[9/6/2020, 9:42:25 PM] [HoneywellHome] Loading accessory from cache: Thermostat Thermostat
[9/6/2020, 9:42:25 PM] [HoneywellHome] Loading accessory from cache: Thermostat Thermostat
[9/6/2020, 9:42:25 PM] [HoneywellHome] Executed didFinishLaunching callback
[9/6/2020, 9:42:25 PM] Homebridge is running on port 51326.
[9/6/2020, 9:42:25 PM] [HoneywellHome] Got access token: XXXXXXXXXXXXXXXXXXXXXXXXXXX
[9/6/2020, 9:42:25 PM] [HoneywellHome] New refresh token: XXXXXXXXXXXXXXXXXXXXXXXXX
[9/6/2020, 9:42:25 PM] [HoneywellHome] Homebridge config.json has been updated with new refresh token.
[9/6/2020, 9:42:26 PM] [HoneywellHome] Total Locations Found: 1
[9/6/2020, 9:42:26 PM] [HoneywellHome] Getting devices for Mon domicile...
[9/6/2020, 9:42:26 PM] [HoneywellHome] Total Devices Found at Mon domicile: 1
[9/6/2020, 9:42:26 PM] [HoneywellHome] Adding new accessory: Thermostat T5-T6 Thermostat
[9/6/2020, 9:42:26 PM] [HoneywellHome] Registering new device: Thermostat T5-T6 Thermostat - LCC-00D02DC1A545
[9/6/2020, 9:42:26 PM] [HoneywellHome] T5 UDID: Thermostat-LCC-00D02DC1A545-T5-T6
[9/6/2020, 9:42:26 PM] [HoneywellHome] Fetched update for Thermostat from Honeywell API: {"mode":"Heat","heatSetpoint":20,"coolSetpoint":24,"thermostatSetpointStatus":"HoldUntil","holdUntil":"23:30:00","nextPeriodTime":"23:30:00","endHeatSetpoint":23,"endCoolSetpoint":10,"heatCoolMode":"Heat"}
[9/6/2020, 9:42:26 PM] [HoneywellHome] "Heat"
[9/6/2020, 9:43:26 PM] [HoneywellHome] Fetched update for Thermostat from Honeywell API: {"mode":"Heat","heatSetpoint":20,"coolSetpoint":24,"thermostatSetpointStatus":"HoldUntil","holdUntil":"23:30:00","nextPeriodTime":"23:30:00","endHeatSetpoint":23,"endCoolSetpoint":10,"heatCoolMode":"Heat"}
[9/6/2020, 9:43:26 PM] [HoneywellHome] "Heat"
[9/6/2020, 9:44:26 PM] [HoneywellHome] Fetched update for Thermostat from Honeywell API: {"mode":"Heat","heatSetpoint":20,"coolSetpoint":24,"thermostatSetpointStatus":"HoldUntil","holdUntil":"23:30:00","nextPeriodTime":"23:30:00","endHeatSetpoint":23,"endCoolSetpoint":10,"heatCoolMode":"Heat"}
[9/6/2020, 9:44:26 PM] [HoneywellHome] "Heat"
[9/6/2020, 9:45:26 PM] [HoneywellHome] Fetched update for Thermostat from Honeywell API: {"mode":"Heat","heatSetpoint":20,"coolSetpoint":24,"thermostatSetpointStatus":"HoldUntil","holdUntil":"23:30:00","nextPeriodTime":"23:30:00","endHeatSetpoint":23,"endCoolSetpoint":10,"heatCoolMode":"Heat"}
[9/6/2020, 9:45:26 PM] [HoneywellHome] "Heat"
[9/6/2020, 9:46:28 PM] [HoneywellHome] Fetched update for Thermostat from Honeywell API: {"mode":"Heat","heatSetpoint":24,"coolSetpoint":24,"thermostatSetpointStatus":"HoldUntil","holdUntil":"23:30:00","nextPeriodTime":"23:30:00","endHeatSetpoint":23,"endCoolSetpoint":10,"heatCoolMode":"Heat"}
[9/6/2020, 9:46:28 PM] [HoneywellHome] "Heat"
[9/6/2020, 9:47:26 PM] [HoneywellHome] Fetched update for Thermostat from Honeywell API: {"mode":"Heat","heatSetpoint":24,"coolSetpoint":24,"thermostatSetpointStatus":"HoldUntil","holdUntil":"23:30:00","nextPeriodTime":"23:30:00","endHeatSetpoint":23,"endCoolSetpoint":10,"heatCoolMode":"Heat"}
[9/6/2020, 9:47:26 PM] [HoneywellHome] "Heat"
In the last line you can see I change the target temp from 20° to 24° but in homebridge ui or homekit temperature is still -18

@sdamasoc Have you cleared the cache on your thermostat? I have changed a few things that may require you to do that. Could be causing this also.

I cleared everything and also reinstall from scratch the plugin and it still show -18. When I set to AUTO mode in HomeKit app I can change the temperature but it seems that heat and cool are inverted.
I took a lot at the code for the T5 and I think you can simplify some things:

The T5 has only ON /OFF modes, the is no cooling and no AUTO mode on this device
There is no fan control with the T5

I think with this you can simplify the code.
Hope this can help.

I cleared everything and also reinstall from scratch the plugin and it still show -18. When I set to AUTO mode in HomeKit app I can change the temperature but it seems that heat and cool are inverted.
I took a look at the code for the T5 and I think you can simplify some things:

The T5 has only ON /OFF modes, the is no cooling and no AUTO mode on this device

There is no fan control with the T5

I think with this you can simplify the code.
Hope this can help.

Are you sure all T5's have no fan? I thought I have seen that?

Indeed, you are right.
My T5 is connected to a heat system and so it only heat because I have no fan or no cooling system.

I will keep on working on this, trying to fine tune some other things for v8.0.0.

Hello,
I think I found the issue. I've called the API of my thermostat directly from honeywell web site (https://developer.honeywellhome.com) and found that only the follow values are set to -18:
"minCoolSetpoint": -18,
"maxCoolSetpoint": -18,
On line 103 of T5.js I see:
// Set Min and Max
this.service.getCharacteristic(this.platform.Characteristic.TargetTemperature)
.setProps({
minValue: this.toCelsius(device.minCoolSetpoint),
maxValue: this.toCelsius(device.maxCoolSetpoint),
minStep: 0.5,
});
I think that min and max should be set in function of the used mode. For me I have only HEAT mode on my thermostat and the code bellow should be:
// Set Min and Max
this.service.getCharacteristic(this.platform.Characteristic.TargetTemperature)
.setProps({
minValue: this.toCelsius(device.minHeatSetpoint),
maxValue: this.toCelsius(device.maxHeatSetpoint),
minStep: 0.5,
});
When I change that code everything works fine.
Also if you can use the variable allowedModes from the API it will be better, for me it has only HEAT and Off modes:
"allowedModes": [
"Heat",
"Off"
],
With this it will better match what I see when I add directly my T5 on HomeKit without passing through homebridge.

With this it will better match what I see when I add directly my T5 on HomeKit without passing through homebridge.

Good find!
I will try to implement this as others probably have the same. If you would like to submit a pull request that would also be helpful.

Cannot push changes:
git.exe push "origin" beta:beta
remote: Permission to donavanbecker/homebridge-honeywell-home.git denied to sdamasoc.
fatal: unable to access 'https://github.com/donavanbecker/homebridge-honeywell-home.git/': The requested URL returned error: 403

Here's the udiff:
--- a/src/Thermostats/T5.ts
+++ b/src/Thermostats/T5.ts
@@ -102,12 +102,25 @@ export class T5 {
     this.parseStatus();

     // Set Min and Max
-    this.service.getCharacteristic(this.platform.Characteristic.TargetTemperature)
-      .setProps({
-        minValue: this.toCelsius(device.minCoolSetpoint),
-        maxValue: this.toCelsius(device.maxCoolSetpoint),
-        minStep: 0.5,
-      });
+    if (this.device.changeableValues.heatCoolMode === 'Heat') {
+            this.platform.log.debug(`Device is in "Heat" mode`);
+            this.service.getCharacteristic(this.platform.Characteristic.TargetTemperature)
+                .setProps({
+                minValue: this.toCelsius(device.minHeatSetpoint),
+                maxValue: this.toCelsius(device.maxHeatSetpoint),
+                minStep: 0.5,
+            });
+    }
+    else {
+            this.platform.log.debug(`Device is in "Cool" mode`);
+            this.service.getCharacteristic(this.platform.Characteristic.TargetTemperature)
+                .setProps({
+                minValue: this.toCelsius(device.minCoolSetpoint),
+                maxValue: this.toCelsius(device.maxCoolSetpoint),
+                minStep: 0.5,
+            });
+    }
+

Cannot push changes:

I have pushed the changes, let me know if this fixes what you are experiencing.

That works now, I can change de temperature and changes are made on the device., thanks!
There's only one point I already mentioned that I can set the device in COOL mode or AUTO mode but it's not supported on my device. I'm still looking how you can use the "allowedModes" variable to configure the device in homebridge.

@sdamasoc, so with the latest beta, I pushed a potential fix for this. can you test it for me? My device supports ['Off','Heat','Cool','Auto'] so I can't test this. v7.2.2-beta.2

I've just tested the last beta but nothing has changed in the behaviour, I still have Off, Heat, Cool and Auto modes...

I've added some debug loggings and I never come in the if-else you add:
       if (this.device.allowedModes === ['Off', 'Heat', 'Cool', 'Auto']) {             this.platform.log.debug("'Off', 'Heat', 'Cool', 'Auto'");             this.service.getCharacteristic(this.platform.Characteristic.HeatingThresholdTemperature)                 .on('set', this.setHeatingThresholdTemperature.bind(this));         }         else if (this.device.allowedModes === ['Off', 'Heat']) {             this.platform.log.debug("'Off', 'Heat'");             this.service.getCharacteristic(this.platform.Characteristic.HeatingThresholdTemperature)                 .on('set', this.setHeatingThresholdTemperature.bind(this));         }
I'm not an expert in typescript/javascript but can you compare an array with === ? If so, order doesn't matter? In my case :
"allowedModes": [ "Heat", "Off" ],
First Heat and then Off...
But even when I remove all if-else conditions and just let the command:
this.service.getCharacteristic(this.platform.Characteristic.HeatingThresholdTemperature)                 .on('set', this.setHeatingThresholdTemperature.bind(this));
I still have the 4 modes in homebridge and homekit.

I think I have an idea of where it is at. just have to test.

@sdamasoc  okay can you give the new beta a try and report back? v7.2.2-beta.6

just tried it now but it is still the same.
[9/11/2020, 8:07:07 PM] [HoneywellHome] Adding new accessory: Thermostat T5-T6 Thermostat
[9/11/2020, 8:07:07 PM] [HoneywellHome] Registering new device: Thermostat T5-T6 Thermostat - LCC-00D02DC1A545
[9/11/2020, 8:07:07 PM] [HoneywellHome] Device is in "Heat" mode
[9/11/2020, 8:07:07 PM] [HoneywellHome] T5 UDID: Thermostat-LCC-00D02DC1A545-T5-T6
[9/11/2020, 8:07:08 PM] [HoneywellHome] Fetched update for Thermostat from Honeywell API: {"mode":"Heat","heatSetpoint":23,"coolSetpoint":10,"thermostatSetpointStatus":"NoHold","nextPeriodTime":"22:30:00","heatCoolMode":"Heat","endHeatSetpoint":null,"endCoolSetpoint":null}
[9/11/2020, 8:07:08 PM] [HoneywellHome] {"displayedOutdoorHumidity":49,"vacationHold":{"enabled":false},"currentSchedulePeriod":{"day":"Friday","period":"P1"},"scheduleCapabilities":{"availableScheduleTypes":["None","Geofenced","TimedEmea"],"schedulableFan":false},"scheduleType":{"scheduleType":"Timed","scheduleSubType":"EMEA"},"scheduleStatus":"Resume","allowedTimeIncrements":10,"settings":{"hardwareSettings":{"brightness":2,"maxBrightness":5},"temperatureMode":{"air":true},"specialMode":{},"devicePairingEnabled":true},"deviceClass":"Thermostat","deviceType":"Thermostat","deviceID":"LCC-00D02DC1A545","userDefinedDeviceName":"Thermostat","name":"Thermostat","isAlive":true,"isUpgrading":false,"isProvisioned":true,"macID":"00D02DC1A545","deviceSettings":{},"service":{"mode":"Up"},"deviceRegistrationDate":"2018-01-08T20:04:07.3733333","dataSyncStatus":"Initiated","units":"Celsius","indoorTemperature":24.5,"outdoorTemperature":21.5,"allowedModes":["Heat","Off"],"deadband":0,"hasDualSetpointStatus":false,"minHeatSetpoint":5,"maxHeatSetpoint":35,"minCoolSetpoint":-18,"maxCoolSetpoint":-18,"changeableValues":{"mode":"Heat","heatSetpoint":23,"coolSetpoint":10,"thermostatSetpointStatus":"NoHold","nextPeriodTime":"22:30:00","heatCoolMode":"Heat","endHeatSetpoint":null,"endCoolSetpoint":null},"operationStatus":{"mode":"EquipmentOff","fanRequest":false,"circulationFanRequest":false},"deviceModel":"T5-T6"}
[9/11/2020, 8:07:09 PM] [Airco] Login complete
HAP Warning: Characteristic 00000077-0000-1000-8000-0026BB765291 not in required or optional characteristics for service 000000BC-0000-1000-8000-0026BB765291. Adding anyway.
[9/11/2020, 8:07:32 PM] [Config] [admin] Accessory layout changes saved.
[9/11/2020, 8:07:53 PM] [HoneywellHome] Set TargetHeatingCoolingState: 1
[9/11/2020, 8:07:53 PM] [HoneywellHome] Set TargetTemperature:': 23
[9/11/2020, 8:07:53 PM] [HoneywellHome] Set HeatingThresholdTemperature: 23
[9/11/2020, 8:07:53 PM] [HoneywellHome] Set CoolingThresholdTemperature: 10
[9/11/2020, 8:07:53 PM] [HoneywellHome] Sending request to Honeywell API. mode: Heat, coolSetpoint: 10, heatSetpoint: 23
[9/11/2020, 8:07:53 PM] [HoneywellHome] {"mode":"Heat","thermostatSetpointStatus":"TemporaryHold","heatSetpoint":23,"coolSetpoint":10}
[9/11/2020, 8:07:55 PM] [HoneywellHome] Fetched update for Thermostat from Honeywell API: {"mode":"Heat","heatSetpoint":23,"coolSetpoint":10,"thermostatSetpointStatus":"TemporaryHold","nextPeriodTime":"22:30:00","heatCoolMode":"Heat","endHeatSetpoint":null,"endCoolSetpoint":null}
[9/11/2020, 8:07:55 PM] [HoneywellHome] {"displayedOutdoorHumidity":49,"vacationHold":{"enabled":false},"currentSchedulePeriod":{"day":"Friday","period":"P1"},"scheduleCapabilities":{"availableScheduleTypes":["None","Geofenced","TimedEmea"],"schedulableFan":false},"scheduleType":{"scheduleType":"Timed","scheduleSubType":"EMEA"},"scheduleStatus":"Resume","allowedTimeIncrements":10,"settings":{"hardwareSettings":{"brightness":2,"maxBrightness":5},"temperatureMode":{"air":true},"specialMode":{},"devicePairingEnabled":true},"deviceClass":"Thermostat","deviceType":"Thermostat","deviceID":"LCC-00D02DC1A545","userDefinedDeviceName":"Thermostat","name":"Thermostat","isAlive":true,"isUpgrading":false,"isProvisioned":true,"macID":"00D02DC1A545","deviceSettings":{},"service":{"mode":"Up"},"deviceRegistrationDate":"2018-01-08T20:04:07.3733333","dataSyncStatus":"Initiated","units":"Celsius","indoorTemperature":24.5,"outdoorTemperature":21.5,"allowedModes":["Heat","Off"],"deadband":0,"hasDualSetpointStatus":false,"minHeatSetpoint":5,"maxHeatSetpoint":35,"minCoolSetpoint":-18,"maxCoolSetpoint":-18,"changeableValues":{"mode":"Heat","heatSetpoint":23,"coolSetpoint":10,"thermostatSetpointStatus":"TemporaryHold","nextPeriodTime":"22:30:00","heatCoolMode":"Heat","endHeatSetpoint":null,"endCoolSetpoint":null},"operationStatus":{"mode":"EquipmentOff","fanRequest":false,"circulationFanRequest":false},"deviceModel":"T5-T6"}

I read a bit of homebridge documentation and I think that you use the Thermostat generic type from homebridge and then you have automatically the 4 modes.

@sdamasoc, beta v7.2.2-beta.11 should definitely work for you. Please report back. You should only see Heat and Off.

I think you are almost there.
In homekit I have a switch now but with modes: Heat, Auto instead of Heat,Off...
And in homebridge I still see the 4 modes.

I think the follow code:
    if (this.device.allowedModes.includes('Heat')) {
      TargetState.push(1);
    }
    if (this.device.allowedModes.includes('Off')) {
      TargetState.push(3);
    }

For my case, Off should be 0 and Heat should be 1...

I confirm the follow code works for me:
    TargetState() {
        this.platform.log.debug(this.device.allowedModes);
        const TargetState = [4];
        TargetState.pop();
        if (this.device.allowedModes.includes('Cool')) {
            TargetState.push(2);
        }
        if (this.device.allowedModes.includes('Heat')) {
            TargetState.push(1);
        }
        if (this.device.allowedModes.includes('Off')) {
            TargetState.push(0);
        }
        if (this.device.allowedModes.includes('Auto')) {
            TargetState.push(3);
        }
        this.platform.log.debug(JSON.stringify(TargetState));
        return TargetState;
    }

Wow for some reason I must of got it mixed up. push a new beta and just used:
  private TargetState() {
    this.platform.log.debug(this.device.allowedModes);

    const TargetState = [4];
    TargetState.pop();
    if (this.device.allowedModes.includes('Cool')) {
      TargetState.push(this.platform.Characteristic.TargetHeatingCoolingState.COOL);
    }
    if (this.device.allowedModes.includes('Heat')) {
      TargetState.push(this.platform.Characteristic.TargetHeatingCoolingState.HEAT);
    }
    if (this.device.allowedModes.includes('Off')) {
      TargetState.push(this.platform.Characteristic.TargetHeatingCoolingState.OFF);
    }
    if (this.device.allowedModes.includes('Auto')) {
      TargetState.push(this.platform.Characteristic.TargetHeatingCoolingState.AUTO);
    }
    this.platform.log.debug('Only Show These Modes:', JSON.stringify(TargetState));
    return TargetState;
  }

It's working now in Homekit! 👍
But in homebridge UI it is still showing the 4 modes I don't know if this is normal or not.

@sdamasoc, yeah I think that is the default. You could always submit a feature request over there.

@sdamasoc So I think we should be good right? good to close this issue?

It’s good for me. Thanks for all


TypeScript 2.5 not inferring return type of reduce

TypeScript Version:  2.7.0-dev.201xxxxx
Code
This is a (reasonably) minimal example of the code I'm compiling. My actual function is filtering entries before reconstructing the object.
 export function foo<V>(object: { [key: string]: V }): { [key: string]: V } {
  const entries = Object.entries(object);
  const rv = entries.reduce((obj: { [key: string]: V }, [key, value]) => {
    obj[key] = value;
    return obj;
  }, {});
  return rv;
}

Note that the above code requires some options to use Object.entries and so you can reproduce the same error with the following code snippet if desired.
const entries: [string, V][] = []; //
const rv = entries.reduce((obj: { [key: string]: V }, [key, value]) => {
  obj[key] = value;
  return obj;
}, {});

Expected behavior:
In TypeScript 2.4.2 the constant rv is correctly inferred to be of type { [key: string]: V } but it does not seem to be in TypeScript 2.5.3.
Actual behavior:
rv is inferred to be of type {}.
It doesn't seem like the definition of reduce has changed between versions. VSCode is jumping to this signature of reduce.
reduce<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U;
Obviously I can specify the return value of my function foo as I have and everything works, but previously I did not need to as it was correctly inferred.

I think the problem is that {} is used for inference before the callback is. According to its declaration, reduce takes initialValue: U and returns a U, so there is no "need" to look at the callback to complete inference. If you write {} as { [key: string]: V } the example will work without needing a type annotation for obj.

Thanks for the quick reply, that was my best guess too. Specifying the type on {} works. Time for me to write a lint rule to find all the places I haven't done so.

@andy-ms I explicitly said my problem was "reducing objects to array"
arroResponses is an array of objects. In fact, it is an array of HTTP responses with different shapes. Clearly string[] is an inappropriate comparison. Why would I call vItems.body on a string?

@Vandivier Thanks, created an issue at #25454.


Debug missing roomIDs/event timestamps seen at startup

Sentry: https://sentry.tools.element.io/organizations/element/issues/70026/events/7080aeab1d0b402e987a18f26c1ac329/?project=56&query=is%3Aunresolved
<EMAIL_ADDRESS>in Assert at line 77
<EMAIL_ADDRESS>in (*GlobalCache).Startup at line 242
<EMAIL_ADDRESS>in (*SyncLiveHandler).Startup at line 105

This has been seen for as long as we've had sentry reporting.
It's not clear to me if this has any negative consequences, but I would still like to understand wtf is going on here.
https://github.com/matrix-org/sliding-sync/blob/f699eabeedea2b7e00ffd5dd6a918f88ec2f90d9/sync3/caches/global.go#L222-L253
AFAICS the elements of roomIDs shouldbe exactly the keys of roomIDToMetadata. (We hold the mutex on roomIDToMetadata----I suppose something could be modifying it underneath us that's not playing by the rules and aquiring the lock.)
This suggests then that there is a duff value in roomIDToMetadata somewhere. I would like to know what the room IDs are so I can rule out there being dodgy data.

I suspect https://github.com/matrix-org/sliding-sync/pull/204 was the cause - specifically spaces.


Live chat will not support VS Build Tools install in containers

This documentation references a "live chat", but the live chat representative (Oscar Nunez) I was connected to refused to provide assistance with the Build Tools installer.
I started a live chat to ask about which components I needed to include (via --add) in the install in order to get cl.exe, since just Microsoft.VisualStudio.Workload.VCTools doesn't seem to be enough.
"I see, unfortunately as I said before this issue is out of scope due to we only assist with the installation of visual studio (excluding the use of docker container, json files and scripts), the installation of extensions and components such as Build Tools and/or SSDT are out of the scope of this support, however you can check for the information in the developers community forum"
If live chat will not support any of the installation issues that people might be asking about when following these instructions, then the reference to the live chat should be removed from these pages so developers do not waste time.
Thanks,

Lisanna

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: b91a4a43-5353-97cf-7532-7644aa3b497f
Version Independent ID: 858d9a5c-72f3-6a85-9270-0a0dd9e0438b
Content: Install Visual Studio Build Tools into a container
Content Source: docs/install/build-tools-container.md
Product: visual-studio-windows
Technology: vs-installation
GitHub Login: @heaths
Microsoft Alias: tglee

Hi Lisanna,
Sorry for the inconvenience caused to you. There appears to be some confusion regarding the support which is resulted in conveying the message from Oscar. If you are trying to install and get help for stand alone Build Tools for Visual Studio package installation then yes, that support is out of scope of VS Setup Chat support. Perhaps that might have been communicated to you but we are looking into it to avoid any confusion such as documentation and links etc.. . Thank you for bringing this to our attention.
Regarding the question you have about the workload to add to get cl.exe, please do chose "Desktop Development With C++" workload from VS Setup Installation Window, and then selecting any build tool components will have cl.exe installed as part of Platform Tool Set. That includes, Compilers, Linker and other build tools. For more information about what component includes cl.exe, you can refer the "Microsoft C++ tool set usage from Command Line" doc.
Please try the above option and let us know if that answered and resolved your issue.

Hi Raviuppa,
Thanks for the response. I was able to determine the components I needed for my project.
Thanks!


chore(docs): update Care Kit documentation

chore(docs): update Care Kit documentation

@pmarchini sigh.
This a brand new PR. I think I removed all the broken links from the repository but it still breaks at build time. :(

@pmarchini sigh. This a brand new PR. I think I removed all the broken links from the repository but it still breaks at build time. :(

This seems to be the issue: there still seems to be a broken link:
https://github.com/mia-platform/documentation/actions/runs/7538129327/job/20518156464?pr=1012#step:9:65
- On source page path = /docs/runtime_suite/care-kit/components/ck-threshold-modal:
   -> linking to ../../runtime_suite/therapy-and-monitoring-manager/overview (resolved as: /docs/runtime_suite/runtime_suite/therapy-and-monitoring-manager/overview)
   -> linking to ../../runtime_suite/therapy-and-monitoring-manager/overview#prototypes (resolved as: /docs/runtime_suite/runtime_suite/therapy-and-monitoring-manager/overview)
   -> linking to ../../runtime_suite/therapy-and-monitoring-manager/overview#therapies (resolved as: /docs/runtime_suite/runtime_suite/therapy-and-monitoring-manager/overview)

    at throwError (/home/runner/work/documentation/documentation/node_modules/@docusaurus/logger/lib/index.js:76:11)
    at handleBrokenLinks (/home/runner/work/documentation/documentation/node_modules/@docusaurus/core/lib/server/brokenLinks.js:153:47)
    at async buildLocale (/home/runner/work/documentation/documentation/node_modules/@docusaurus/core/lib/commands/build.js:186:5)
    at async tryToBuildLocale (/home/runner/work/documentation/documentation/node_modules/@docusaurus/core/lib/commands/build.js:41:20)
    at async mapAsyncSequential (/home/runner/work/documentation/documentation/node_modules/@docusaurus/utils/lib/jsUtils.js:34:24)
    at async Command.build (/home/runner/work/documentation/documentation/node_modules/@docusaurus/core/lib/commands/build.js:76:21)

@pmarchini @fredmaggiowski I fixed the conflicts, I think you can merge.


issue installing the gallery widget

Good day,
I keep getting this error whenever i try to install the widget.
I have changed my minimum stability setting in my composer.json to @dev, but still I keep getting the same error
Your requirements could not be resolved to an installable set of packages.
Problem 1
- 2amigos/yii2-gallery-widget 1.0.x-dev requires bower-asset/blueimp-gallery ~2.17.0 -> no matching package found.
- 2amigos/yii2-gallery-widget 1.1.0 requires bower-asset/blueimp-gallery ~2.17.0 -> no matching package found.
- 2amigos/yii2-gallery-widget 1.0.3 requires bower-asset/blueimp-gallery ~2.17.0 -> no matching package found.
- 2amigos/yii2-gallery-widget 1.0.2 requires bower-asset/blueimp-gallery ~2.15.0 -> no matching package found.
- 2amigos/yii2-gallery-widget 1.0.1 requires bower-asset/blueimp-gallery ~2.15.0 -> no matching package found.
- 2amigos/yii2-gallery-widget 1.0.0 requires bower-asset/blueimp-gallery ~2.15 -> no matching package found.
- Installation request for 2amigos/yii2-gallery-widget ~1.0 -> satisfiable by 2amigos/yii2-gallery-widget[1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.1.0, 1.0.x-dev].
Potential causes:

A typo in the package name
The package is not available in a stable-enough version according to your minimum-stability setting
see https://getcomposer.org/doc/04-schema.md#minimum-stability for more details.

Read https://getcomposer.org/doc/articles/troubleshooting.md for further common problems.

Please add:
"minimum-stability": "dev",
"prefer-stable": true,

to your composer file.

thanks for your swift reply,
i already did that but it still gives me the same error
this is what my composer.json looks like
{
"name": "yiisoft/yii2-app-advanced",
"description": "Yii 2 Advanced Project Template",
"keywords": ["yii2", "framework", "advanced", "project template"],
"homepage": "http://www.yiiframework.com/",
"type": "project",
"license": "BSD-3-Clause",
"support": {
"issues": "https://github.com/yiisoft/yii2/issues?state=open",
"forum": "http://www.yiiframework.com/forum/",
"wiki": "http://www.yiiframework.com/wiki/",
"irc": "irc://irc.freenode.net/yii",
"source": "https://github.com/yiisoft/yii2"
},
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": ">=5.4.0",
"yiisoft/yii2": "~2.0.6",
"yiisoft/yii2-bootstrap": "~2.0.0",
"yiisoft/yii2-swiftmailer": "~2.0.0",
"kartik-v/yii2-widget-datepicker": "@dev",
"yidas/yii2-bower-asset": "^2.0",
"kartik-v/yii2-grid": "@dev",
"kartik-v/yii2-editable": "@dev",
"perminder-klair/yii2-dropzone": "dev-master",
"mpdf/mpdf": "@dev",
"slavkovrn/yii2-imagegalary": "",
"2amigos/yii2-google-maps-library": "",
"kartik-v/yii2-widget-activeform": "@dev",
"dektrium/yii2-user": "^0.9.12",
"thyseus/yii2-message": "^0.3.0",
"wolfguard/yii2-gallery": "",
"apolle/yii2-gallery-manager": "dev-master",
"kartik-v/yii2-field-range": "",
"noam148/yii2-image-manager": "*",
"2amigos/yii2-gallery-widget": "~1.0"
},
"require-dev": {
    "yiisoft/yii2-debug": "~2.0.0",
    "yiisoft/yii2-gii": "~2.0.0",
    "yiisoft/yii2-faker": "~2.0.0",

    "codeception/base": "^2.2.3",
    "codeception/verify": "~0.3.1"
},

"config": {
    "process-timeout": 1800,
    "fxp-asset":{
        "installer-paths": {
            "npm-asset-library": "vendor/npm",
            "bower-asset-library": "vendor/bower"
        }
    }
}

}
i still get the same error

what about if you do: 2amigos/yii2-gallery-widget": "1.1.*"

seems to work now. Thanks much appreciated


Doesn't save Latent Couple state data

Doesn't save the numeric/enabled state data for the Latent Couple extension
Might be an issue on their side.

No, extensions require additional work and support, unfortunately...

I've move over to https://github.com/SenshiSentou/sd-webui-state-manager for now...
It partially captuires that extension's state. Perhaps it would be worth combining efforts?
Thanks for your hard work though!


Prove some uniqueness theorems

We do not really have type uniqueness because of cumulativity, but we at least need the following:

If G |- M : Π A B and G |- M : Π A' B', then G |- A ≈ A' : Type@j for some j.     (1)

Why? Let's think about the following type inference process for application M N:

Infer a type A of M under G
Get B and C satisfying G |- Π B C ≈ A : Type@i for some i
Check N whether it is of B under G
Return C[Id,,N]

The problem here is on step 3. What if N is not of B? To get a complete algorithm, we need to show

If G |- M : Π B C is true but G |- N : B is false, G |- M N : D is false for any D      (2)

However, without the theorem (1) above, we don't know if there is G |- M : Π B' C' while G |- N : B' is also true (and if this is the case (2) is not true and the algorithm is incomplete)
I think (1) can be proved by the normal form of a function. Our lambda syntax contain a type annotation for its argument, and that should guarantee the equivalence between all possible types. (this isn't the case)

Or maybe what we need is a more lenient judgement than type subsumption so that we indeed have (directed) uniqueness modulo that judgement.

Actually (1) is not true... in eta, an argument can be lifted (along the cumulativity) as well.

It is actually easier to define a judgement (that subsumes type subsumption) for completeness

#120 is more fundamental.


TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.
If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.
If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/56213

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/56642

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/69647

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/85943


Update iot_test_freertos_tcp.c

Description
Update the test after the change brought in by the PR https://github.com/aws/amazon-freertos/pull/2251.
Checklist:

[ ] I have tested my changes. No regression in existing tests.
[ ] My code is Linted.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

/bot run checks


Implement array setitem by slice

Normally, contributors never use merge command (including pull) in github projects. Only github does it.
Will you try to rebase your work?
When RustPython/RustPython is remote upstream, (try git remote add upstream https://github.com/RustPython/RustPython.git if you don't have one yet)
git rebase upstream/master will remove merge commits from your patch.

@qingshi163 did you pushed a wrong commit? It is closed


how to fix "Cannot modify header information - headers already sent by Filename: libraries/Session.php

A PHP Error was encountered
Severity: Warning
Message: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\xxx.php:522)
Filename: libraries/Session.php
Line Number: 675
How to fix this message?
i want make Avant bootstrap and join my codeigniter

@anharku this not an issue of codeigniter. If you add any space/line before php starting(<?php) tag in controller it may show this type of error.

This is a bug tracker, we don't provide general help here.
Please ask your questions on our forums instead.

error_reporting(0) will not solve the problem, but it will clean the output error


Return early if start or stop are null

Hey hey!
This patch should make sure that we don't throw when getVisibleRange returns a empty object:
https://github.com/clauderic/virtualized-list/blob/d519d57de207d73685a0230b9449e1d491d56353/src/VirtualList/SizeAndPositionManager.js#L121
Instead we just return early. Not sure if there is a better way to handle this case.

Why would start or end be null??


use php pear binary property in all recipes

Description
This commit adds the usage of the binary property to all uses of the
php_pear and php_pear_channel resources in the cookbook. This allows
users of the cookbook to override the pear binary location when using
these recipes.
Issues Resolved
#228

Thanks


chore: change grid generator logic, zoom out svg size

Description
修改grid背景逻辑，不用100%，使用单个格子的大小，减少svg size

Motivation and Context
Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] Enhancement (changes that improvement of current feature or performance)
[ ] Refactoring (changes that neither fixes a bug nor adds a feature)
[ ] Test Case (changes that add missing tests or correct existing tests)
[ ] Code style optimization (changes that do not affect the meaning of the code)
[ ] Docs (changes that only update documentation)
[✅] Chore (changes that don't modify src or test files)

Self Check before Merge

[ ] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[ ] I have read the CONTRIBUTING document.
[ ] I have added tests to cover my changes.
[ ] All new and existing tests passed.

没有改pattern的逻辑，觉得这个逻辑修改起来太重了，尽可能缩小生成的svg体积就好了， 利用background的repeat重复就可以了。


[Spec Noncompliance]: Missing Span.recordException

Our Span class and API definition currently do not define the required recordException method.
https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/api.md#record-exception

Duplicates #1322


question: check JWT expiry

Hello! I have a use-case wherein I am looking to both verify and validate (expiry) a JWT on Caddy. I was wondering if there is a way to check if an incoming JWT is still valid or is expired. From what I understand, the Token Verification only verifies the signature (?) and while the ACLs seem to be a promising place for the token expiry validation, the documentation mentions no such capability within the "condition" block.
An idea could be to support a comparison operator within the "condition" block and compare "exp" field to current time via placeholder {time.now.unix} and allow or deny request based on the result.
Would greatly appreciate any inputs or direction with this. Thank you!

I too would welcome this feature, jyanadi did you impliment a work around at?


[Java Integration]: Fix jvm data bug

Fix the bug that some method and data are missing from the report.
Also, now the call tree are displaying method arguments, to distinguish same name method with different argument for unique identification purpose.
Related to issue #536
Aim to fix bug for PR #604

Because the report group functions with same name from the same source file as one row, it generates false cases for java because in the same source file (class) there could be more than one function with the same name but different signature and arguments. That original logic does not handle this cases. In order to accommodate this cases, the new logic consider the whole method signature (including name and arguments) as the method name in order to give the method an unique identifiers for the further process in the report. It also give better understanding of which method is being called and covered by the code.
Sample of the report are as follows.


Update trappy and fix cpu_idle

Some people have been using a later trappy version than the one specified in the submodules. That version contains a commit by me that breaks LISA's idle analysis module, so here's a fix for it.

Pushed a new version w/ comment addressed

LGTM, let's merge it.


Missing google::int32 in raw_logging.h.

We got the following error when using raw_logging.h.
In file included from bazel-out/k8-opt/bin/external/com_github_google_glog/_virtual_includes/default_glog_headers/glog/raw_logging.h:44:
bazel-out/k8-opt/bin/external/com_github_google_glog/_virtual_includes/default_glog_headers/glog/vlog_is_on.h:113:16: error: no type named 'int32' in namespace 'google'
extern google::int32 kLogSiteUninitialized;
       ~~~~~~~~^
bazel-out/k8-opt/bin/external/com_github_google_glog/_virtual_includes/default_glog_headers/glog/vlog_is_on.h:124:13: error: no type named 'int32' in namespace 'google'
    google::int32** site_flag,
    ~~~~~~~~^
bazel-out/k8-opt/bin/external/com_github_google_glog/_virtual_includes/default_glog_headers/glog/vlog_is_on.h:125:13: error: no type named 'int32' in namespace 'google'
    google::int32* site_default,
    ~~~~~~~~^
bazel-out/k8-opt/bin/external/com_github_google_glog/_virtual_includes/default_glog_headers/glog/vlog_is_on.h:127:13: error: no type named 'int32' in namespace 'google'
    google::int32 verbose_level);
    ~~~~~~~~^
4 errors generated.

Seems the definition is in logging.h but it wasn't included.

https://github.com/google/glog/blob/9733727be4aed835e21a8f73c403f546b71663fe/src/glog/logging.h.in#L113-L116
https://github.com/google/glog/blob/f8c8e99fdfb998c2ba96cfb470decccf418f0b30/src/glog/raw_logging.h.in#L39-L44

I've never seen this before. Are you able to provide a repro, or at least information about the platform on which you're building?

]$ cat repro.cpp && g++ repro.cpp -o repro -lglog
#include <glog/raw_logging.h>

int main()
{
    RAW_LOG_INFO("");
    return 0;
}
In file included from /usr/local/include/glog/raw_logging.h:44:0,
                 from repro.cpp:1:
/usr/local/include/glog/vlog_is_on.h:113:8: error: ‘int32’ in namespace ‘google’ does not name a type
 extern google::int32 kLogSiteUninitialized;
        ^
/usr/local/include/glog/vlog_is_on.h:124:5: error: ‘int32’ is not a member of ‘google’
     google::int32** site_flag,
     ^
/usr/local/include/glog/vlog_is_on.h:124:21: error: ‘site_flag’ was not declared in this scope
     google::int32** site_flag,
                     ^
/usr/local/include/glog/vlog_is_on.h:125:5: error: ‘int32’ is not a member of ‘google’
     google::int32* site_default,
     ^
/usr/local/include/glog/vlog_is_on.h:125:20: error: ‘site_default’ was not declared in this scope
     google::int32* site_default,
                    ^
/usr/local/include/glog/vlog_is_on.h:126:5: error: expected primary-expression before ‘const’
     const char* fname,
     ^
/usr/local/include/glog/vlog_is_on.h:127:5: error: ‘int32’ is not a member of ‘google’
     google::int32 verbose_level);
     ^
/usr/local/include/glog/vlog_is_on.h:127:32: error: expression list treated as compound expression in initializer [-fpermissive]
     google::int32 verbose_level);
                                ^

All use case of raw_logging.h in glog repo seems to have logging.h included before it, which may be the reason why you didn't notice it.

Thanks for clarifying: it seems this is not Bazel-specific.
@sergiud Is this expected or should raw_logging.h include logging.h itself?

Yes it has nothing to do with bazel itself.

@drigz I don't believe this is expected. Probably no one noticed until now.

@xkszltl Would you like to send a PR to add a #include to raw_logging.h?

PR: https://github.com/google/glog/pull/713
Could you back port this to old versions as well?
Especially old major versions.

I'm afraid there are no major versions, the last release was 0.5, and the project doesn't have release branches so I don't think that's feasible right now.

I'm afraid there are no major versions, the last release was 0.5, and the project doesn't have release branches so I don't think that's feasible right now.

Oh I mean 0.5.1/0.4.1/0.3.6

This is unlikely to happen due to higher maintenance burden.


Account contain a file that I do not wish too see... Is there a way to disassociate it with my account?

file behavior seems to be correct


[Bug] The indent isn't working correctly

gtame1980 comment on Reddit
"The ident isn't working correctly. [only the related snippet of the comment is here]"

Today v6.1.0 was published. All gutter css styling bugs were looked at and should be fixed now. If this is not the case please open another issue.


Feature request: Bag Repartition "partition_size" keyword argument

Hi there,
Love this project, use it extensively in my day to day.
This is a feature request for the Bag.repartition function. The Dataframe.repartition function has a nice partition_size keyword which repartitions the dataframe by a specified size. It would be really nice to have the same argument for Bag.repartition. Right now I have to estimate the number of partitions I'll need to get my data down to 100mb per partition prior to calling repartition, so this would be a quality of life improvement for me.
Cheers and thank you for this great project!

Hi @ankur-gos thank you for the suggestion! This seems like a reasonable suggestion and one that could be supported. Would you be interested in working on this?


Mention in readme that ~ is null in YAML

This is a weird YAML gotcha, and it seems worth mentioning in the readme
since dotbot users are likely to run into it.

Good point.
I made a tiny change to your commit (hard wrapped the text) and merged in 295f8e31606db36c6c745dc2346e029ac2d277a2.
Thanks!

Sweet, you bet!


Added stub extension function

with this method one can define mock for class
val someMock = mock<Object>()
and then define stubs in test
someMock.stub {       on { something } doReturn somethingElse   }
It is useful when some tests reuse mock object but with different stubbing

Nice idea! Could you perhaps add some regression tests, like https://github.com/nhaarman/mockito-kotlin/blob/master/mockito-kotlin/src/test/kotlin/test/MockitoTest.kt#L375 ?

please let me know if this is enough, or should I add all variants of stubbing to this.

Spot on, thanks!


Add a field: cloud name in the azure cli client-side telemetry as part of Azure CLI command execution

Related command

Add a field: cloud name in the azure cli client-side telemetry as part of Azure CLI command execution
Is your feature request related to a problem? Please describe.

As of now, we have no way to track the usages of extension in different clouds.
Describe the solution you'd like

Since azure cli does collect some basic telemetry. Is it possible if azure cli can also collect the cloud name as one additional dimension where it is running from? That can help understand the usage of the CLI across different clouds.
Describe alternatives you've considered

Add a new property for all cli commands, leveraging telemetry.add_extension_event() function to add custom info only for a specific extension. Almost all of the commands need to be updated to start sending the cloud name as new dimension in the telemetry.
Additional context

add cloudname in telemetry


Metrics for operator

Is your feature request related to a problem? Please describe.
The operator deploys ServiceMonitors for monitoring fluent(bit|d) but there seems to be no metrics exposed for the operator itself. It'd be nice to have metrics for reconcile failures, etc.
Describe the solution you'd like

Some basic metrics exposed by the operator
Option in the helm chart to deploy a ServiceMonitor and Service for Prometheus to scrape it

I can see that the operator is actually exposing the default metrics that kubebuilder exposes, so at a minimum the helm chart can be updated to expose those metrics.


UNable to remove Google Hangouts from Extensions

System Details

OS: Ubuntu 22.04
Thorium Version Version 117.0.5938.157 (Official Build) stable
Problem
In extensions Google Hangouts is unable to be disabled or removed. This is not the case in Chrome, so reporting this as a bug.

Screenshots

Additional Notes
I looked on Chrome and the Hangouts extensions isnt installed by default. Sidenote: I'd also like to [at least have the option] to remove the Chromium PDF viewing extension, I have a program for that.

Me too

I would also like to remove Hangouts. Even better, Thorium should come without it.

Yeah idk why this is here along with the other unremovable exention, like it could be avuble to download but it doesn't make sence to come preinstalled and not removable.

This is a built-in extension of the browser and is not allowed to be deleted for the time being. We are just taking some measures to display them all.

And it is forcefully enabled in incognito. You have some explaining to do.

@mezhgano @Templayer @SilentWarrior1 @ags1234 Every Chromium based browser has these extensions built in. Since they are built in and not removable, they are normally hidden. I just take a patch from Ungoogled Chromium to display ALL extensions, no matter the state.
This can be seen in Ungoogled Chromium too.
Also, you can make these appear in Brave, regular Chromium, or Google Chrome, by appending the commandline switch --show-component-extension-options (The patch mentioned above simply always enables the toggle that this commandline flag normally controls).
There are three. Specifically what they do are:
"Chromium PDF Reader" - Used for embedding PDFium when viewing PDFs. Removing this would cause all PDFs to stop displaying.
"Google Hangouts" - Added when using the build arg enable_hangout_services_extension = true. This enabled proper Audio/Video passthrough when using Google Hangouts. It is never activated unless you are using that site.
"Web Store" - Under the 'Chrome Apps' section. This is self explanatory and provides integration with the Web Store to treat it as a special domain that doesn't allow extensions scripts to run on it, and to allow .crx files to be installed (to install extensions from the store), rather than just downloading them like a normal file.
So, these extensions are harmless, normal, and would break functionality if they are removed.

"Chromium PDF Reader" - Used for embedding PDFium when viewing PDFs. Removing this would cause all PDFs to stop displaying.
"Google Hangouts" - Added when using the build arg enable_hangout_services_extension = true. This enables proper Audio/Video passthrough when using Google Hangouts. It is never activated unless you are using that site.

I'm not using the functionality of these two. Screw hangouts, and I'm using Foxit Reader to show PDFs.
Is there really no way of pragmatically disabling these, or at least to disable them in Incognito mode?

@Templayer the PDF reader will not be disabled. It has to be disabled at the source level. Most people use the built in PDF reader, so I'm not going to disable it because that would break functionality for alot of people including me.
Why are you so concerned about hangouts? Like I said it only activates when you use the hangouts site, and even then, its not like it sends out any information. It's just used as a bridge to allow special permissions regarding microphone, etc.

Like I said it only activates when you use the hangouts site, and even then, its not like it sends out any information. It's just used as a bridge to allow special permissions regarding microphone, etc.

And if somebody finds a weakpoint and spoofs the website?

@Templayer IDK, like I said almost every other Chromium based browser has this extension, and I haven't heard of any security vulnerabilities ever happening related to it.

Well, at the end that extension is designed to leak CPU info to any google.com website.
Cab you remove it now?

@javierriveracastro @Templayer Following more research and complaints, I have removed it from Thorium since M124, so I am closing this now.


Validate Mnemonic word lengths

Ensure words in mnemonic seed phrases are greater than three characters long

Fixed in #12


Redirect for edit task for managers

Add a redirect button from view single task to managers will be able to edit that task

I'm on it


Sort routes based on create_time

Fixes #60. Got rid of the pages[] array and implemented a more straightforward list rendering logic. The onLoadMore() method for infinite scrolling has been preserved. The dates/times on all the route cards have been removed.

Are the conflicts resolved yet?

The conflicts have been resolved. However, I'm seeing that /src/pages/dashboard/activities/PairActivity.tsx has a lot of unsafe call, returns & assignments. I've disabled everything for now since that is out of the scope of this PR. Worth checking later.

Congrats on the passing tests!!

😂 seriously?


Update old version of nodejs and wrong PATH

Bug
The flag VERSION has a major change.
Further, the PATH-variable should use the bin-folder and occurs twice in shellrc.sh.
Reproduce the symptoms
echo $PATH

Acceptance Criteria

[ ] Update nodejs-version
[x] Remove second occurence of export PATH=path-to-nodejs:${PATH}
[x] Use the bin-folder for path-to-nodejs

Should be covered by #6


GPT does not respond to Korean documents.

English documents are normal, but a message saying that the number of tokens is exceeded occurs for Korean documents.
All installations were completed normally, but when I inquire about Korean documents, only the following answers are repeated.

The corresponding Korean document is also attached.
CEOs_Digest_Weekly Report _ 2023.08.14 (n.314).pdf

Thanks for the report, sounds like this may be a limitation in the package we use to estimate token counts (in messagebuilder/modelhelper). FYI @srbalakr

Ack, let me check.

Hi I notice that this is also the same case for Chinese characters. Is it the same bug?

Hi I notice that this is also the same case for Chinese characters. Is it the same bug? Any updates on this?

@jasonchanhku
I solved this problem. The cause was that the number of tokens occupied by Korean was nearly twice that of English, and it worked normally after distributing from gpt 3.5-turbo to gpt 3.5-turbo 16K.

@jasonchanhku
I solved this problem. The cause was that the number of tokens occupied by Korean was nearly twice that of English, and it worked normally after distributing from gpt 3.5-turbo to gpt 3.5-turbo 16K.

We've merged a proposed fix, please let us know if you experience this issue, and provide the exact input if so.


Add extension methods for add_system_graph and add_system_graph_to_stage

Saves .into() boilerplate.

This package is now deprecated in favor of Bevy's ECS Schedule V3 introduced in 0.10.


Configurable log level

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
configurable log level for timing logand uvicorn log

What is the current behavior? (You can also link to an open issue here)
not configurable

What is the new behavior (if this is a feature change)?
now it's configurable

Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
no

Have unit tests been run against this PR? (Has there also been any additional testing?)
no

Related Python client changes (link commit/PR here)
no

Related documentation changes (link commit/PR here)
no

Other information:

docker run --name marqo --privileged -p 8882:8882 --add-host host.docker.internal:host-gateway -e MARQO_LOG_LEVEL=warning marqo_docker_0

Please check if the PR fulfills these requirements

[x] The commit message follows our guidelines
[ ] Tests for the changes have been added (for bug fixes/features)
[ ] Docs have been added / updated (for bug fixes / features)

docker run --name marqo --privileged -p 8882:8882 --add-host host.docker.internal:host-gateway -e MARQO_LOG_LEVEL=warning marqo_docker_0

Logs adding 1000 documents into index with this PR
docker run --name marqo --privileged -p 8882:8882 --add-host host.docker.internal:host-gateway marqo_docker_0

DIND OS tests pass: https://github.com/marqo-ai/marqo/actions/runs/4150909911/jobs/7180884258

Testing required:

DIND OS test against this branch
Manual testing if log_level = (error, debug) works

docker run --name marqo --privileged -p 8882:8882 --add-host host.docker.internal:host-gateway -e MARQO_LOG_LEVEL=debug marqo_docker_0


new XML Noteapd version <IP_ADDRESS>

[x] Have you signed the Contributor License Agreement?
[x] Have you checked that there aren't other open pull requests for the same manifest update/change?

[x] Does your manifest conform to the 1.0 schema?

Note: <path> is the name of the directory containing the manifest you're submitting.

Microsoft Reviewers: Open in CodeFlow

Since the packages use Versioned URL's and they seem to be retained, it would be best to not remove version <IP_ADDRESS>

thanks, please go ahead with this one, I'll change my publishing script so that next time it will remove the oldest version (<IP_ADDRESS>) instead.


feat: Custom Endpoint - Total Delegated Voting Supply

Feature Request
Describe the Feature Request

Describe Preferred Solution

Describe Alternatives

Related Code

Additional Context

Estimate points suggestion: 2