Channel.WaitToReadAsync ignores cancellation token when there are items in buffer

https://github.com/dotnet/corefxlab/blob/9ac45562a90a46201d15cf17c3b538ebbdbb013c/src/System.Threading.Tasks.Channels/System/Threading/Tasks/Channels/UnboundedChannel.cs#L117-L119
Generally expected behavior when a token is cancelled is for methods to throw, but here it will check the item buffer and short circuit without checking the token if an item exists.

FWIW, I did this on purpose for performance reasons.  If you look back through the commit history, there's a PR somewhere where I made all of the channels consistently check for data first before checking for cancellation.

Oh. It's just unexpected, the issue I ran into with it is very easily worked around, just wanted to raise an issue because of how odd it seemed.

From: Stephen Toub<EMAIL_ADDRESS>Sent: Tuesday, October 3, 2017 7:18:55 PM
To: dotnet/corefxlab
Cc: Brennan Conroy; Author
Subject: Re: [dotnet/corefxlab] Channel.WaitToReadAsync ignores cancellation token when there are items in buffer (#1813)
FWIW, I did this on purpose for performance reasons. If you look back through the commit history, there's a PR somewhere where I made all of the channels consistently check for data first before checking for cancellation.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fdotnet%2Fcorefxlab%2Fissues%2F1813%23issuecomment-334032223&data=02|01|brecon%40microsoft.com|04aa0e4f7c314b501db408d50ace4402|72f988bf86f141af91ab2d7cd011db47|1|0|636426803381643320&sdata=dce0MuD91mDuj0KqXkOfQ9C6GajzO3naYWSK3j%2B5fBM%3D&reserved=0, or mute the threadhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAHOVEbtGXfHlGpLJ84gGPV8S1RQHz8VBks5sousPgaJpZM4Ps3HK&data=02|01|brecon%40microsoft.com|04aa0e4f7c314b501db408d50ace4402|72f988bf86f141af91ab2d7cd011db47|1|0|636426803381643320&sdata=hGgWk9fe5lDdqMf%2B22BOw6gGMreFJVH8rviGZKMOrwk%3D&reserved=0.

Shouldn't this issue be closed?

Shouldn't this issue be closed?

Not if it's surprising enough that we want to change the implementation.


anchors - how can we list or delete them?

I've created and anchor as dest for a sign portal. If I delete the sign there is no trace of the anchor. How can I list them and delete them. I only have in-game access - not server files.

You can get in-game help for any command by using a ? like so:
/mv anchor ?

To answer your question:
Listing Anchors
To list anchors simply don't add an anchor name:
/mv anchors

Deleting anchors
To remove an anchor, use the -d flag.
/mv anchor myanchor -d


VSphere check traceback

Datadog Agent (supervisor) is running all child processes

Additional environment details (Operating System, Cloud provider, etc):
VMWare ESXI 6.5, Ubuntu 14 image.
Steps to reproduce the issue:

Enable vsphere integration
Wait a while.

Describe the results you received:
Uncaught error running the Agent#012Traceback (most recent call last):#012  File "/opt/datadog-agent/agent/agent.py", line 631, in <module>#012    sys.exit(main())#012  File "/opt/datadog-agent/agent/agent.py", line 573, in main#012    agent.start(foreground=True)#012  File "/opt/datadog-agent/agent/daemon.py", line 255, in start#012    self.run()#012  File "/opt/datadog-agent/agent/agent.py", line 351, in run#012    configs_reloaded=True if self.reload_configs_flag else False)#012  File "/opt/datadog-agent/agent/utils/logger.py", line 22, in wrapper#012    result = func(*args, **kwargs)#012  File "/opt/datadog-agent/agent/checks/collector.py", line 494, in run#012    self._populate_payload_metadata(payload, check_statuses, start_event)#012  File "/opt/datadog-agent/agent/checks/collector.py", line 721, in _populate_payload_metadata#012    check_tags = getter()#012  File "/opt/datadog-agent/embedded/lib/python2.7/site-packages/datadog_checks/vsphere/vsphere.py", line 305, in get_external_host_tags#012    for mor in mor_by_mor_name.itervalues():#012RuntimeError: dictionary changed size during iteration

After this error occurs many checks stop happening.
Describe the results you expected:
No error, continued checking.
Additional information you deem important (e.g. issue happens only occasionally):

Thank you @ofek !


[libSyntax] Incremental syntax tree transfer

This PR adds the ability to incrementally transfer a libSyntax tree from the C++ side to the Swift side of swiftSyntax.
The basic idea behind it is that we assign a unique ID to each node. If the node has been pulled from the SyntaxParsingCache during incremental syntax parsing, we know that the client already has that node. So, instead of serialising it again, we just add a stub node to the transferred tree that consists of only the node's ID. The client can then substitute the stub node with the node of that ID which is already present in its old syntax tree.

@swift-ci Please smoke test

@swift-ci Please smoke test

@nkcsgexi I implemented the changes you requested in the comments and have refactored the swiftSyntax entry point API so that we no longer need to pass the IncrementalParsingSession around.

So, instead of serialising it again, we just add a stub node to the transferred tree that consists of only the node's ID.

I couldn't find JSON output test cases for "omitted": true node. Could you add some? Or am I missing something?

@rintaro It's implicitly tested when we do the round trip through swiftSyntax. But good point. I'll add a test case.

@rintaro I've added a test case that checks the JSON syntax tree with omitted nodes.
@swift-ci Please smoke test

Test failure seems unrelated.
@swift-ci Please smoke test

@swift-ci Please Python lint


display issue with cross origin image

i'm recently using cropper on cross origin images fetched from an image url via a cross-origin server. The image element is like this:

and cropper is added as below:
$('#sel-img').cropper({
                    scalable: false,
                    zoomable: false,
                    movable: false,
                    rotatable: false,
                    crop: function(e) {
                           ...
                    }
                });

the result shows with a gray mask above the whole image with a invalid icon at top left corner:

in the chrome console, there is a error stating:

if i don't add cropper, everything works ok without error.
really struggling with this, hope for help.

Two options for you:

Search the issues history for "cross origin" to find the resolution.
Set both the checkCrossOrigin and checkOrientation options to false.

setting checkCrossOrigin to false solves the issue. thanks for help.


[ENH] Catch22 error handling for unimported pycatch22 module

What does this implement/fix? Explain your changes.
Currently when running pycatch22 within catch22 a error may occur if the user hasn't imported the module. Instead, a warning is shown that the user needs to install pycatch22 and allowing the algorithm to still run using default settings.
Does your contribution introduce a new dependency? If yes, which one?
Warnings. Though aeon library already has the dependency installed.

It would be good to change/add to the testing somehow to cover this. We have CI with and without the pycatch22 install, so a test to make sure that it functions correctly without would be good.


azure-cli mktemp: Invalid argument

Environment summary
Install Method (interactive script) / CLI version (az --version N/A) / Shell Type (bash)

Installation via curl -L https://aka.ms/InstallAzureCli | bash gives the error in the title. Solution: mktemp -t azure_cli_install_tmp_XXXX should be mktemp -t azure_cli_install_tmp_XXXXXX

Pull request #8418 has the requested changes

These changes haves been deployed now.

vsts cli installation  failed "mktemp: Invalid argument" on the azure-cli docker image, can someone help here

Howdy, I'm afraid the VSTS CLI is a different product. Please checkout https://github.com/Azure/azure-devops-cli-extension for more help.


[plugin-search] drafts break searchSync

Link to reproduction
https://github.com/wkentdag/payload-search-delete-bug/tree/version-bug
Describe the Bug
Setting a document's status to draft prevents it from ever being included in search results (even after it's re-published). This applies to any searchable versioned document that's ever marked as a draft, regardless of whether it's been initialized that way.
Any time you publish a change to a "tainted" document, the searchSync hook fails with this error: Error creating search document: ValidationError: The following field is invalid: doc
I inspected the value of doc and noticed that failing requests  have doc.value as a string, rather than a number:
✅
    doc: {
      "relationTo": "pages",
      "value": 9
    }
    title: "published page"

❌
   doc: {
      "relationTo": "pages",
      "value": "9"
    }
    title: "published page updated"

On a related note, I would also hope that
if you save a draft update on top of a published document, the existing published search result persists until the document is published or deleted. But I realize that might be a feature request rather than a bug!
https://github.com/payloadcms/payload/assets/3254957/4772f693-c075-4b3d-bb95-0e579e34d802
To Reproduce

Clone my fork and run it
Create a new page and immediately publish it, note that it appears in search results.
Make a change to the document and save it as a draft, note it's removed from search results
Publish the document, note that it's still missing from search results, and the error message in the console

Payload Version
2.12.1
Adapters and Plugins
plugin-search, db-postgres

Can I work on this one ? @wkentdag

@kiranrega looks like the fix is incoming :) #5794


Night mode with gray background doesn't work anymore

Since last update it just acts as default (black background).

Still broken for me here, tried what Dogway mentioned but no dice.

Yeah, same for me.


Aiobotocore instrumentation

This PR provides instrumentation support for AioBotocore

Codecov Report
Attention: Patch coverage is 82.14286% with 5 lines in your changes are missing coverage. Please review.

Project coverage is 81.61%. Comparing base (8884497) to head (95a3338).

Files
Patch %
Lines

newrelic/hooks/external_aiobotocore.py
79.16%
5 Missing :warning:

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1135      +/-   ##
==========================================
+ Coverage   81.55%   81.61%   +0.06%
==========================================
  Files         192      193       +1
  Lines       21304    21328      +24
  Branches     3706     3707       +1
==========================================
+ Hits        17374    17407      +33
+ Misses       2859     2844      -15
- Partials     1071     1077       +6

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Unable to open file directly

We have written the needed data into your clipboard because it was too large to send. Please paste.
Issue Type: Performance Issue
The issue started right after installing the app. The 'open with' option is not available on any folder and thus I am not able to open any folder directly on VS code.  Also I am not able to open the writeup present on the VS code using extensions(currently I am using live server). Please help me regarding this issue.
VS Code version: Code 1.59.1 (3866c3553be8b268c8a7f8c0482c0c0177aa8bfa, 2021-08-19T11:54:37.513Z)
OS version: Linux x64 5.3.0-28-generic
Restricted Mode: No

System Info

Item
Value

CPUs
Intel(R) Core(TM) i5-2450M CPU @ 2.50GHz (4 x 2267)

GPU Status
2d_canvas: enabledgpu_compositing: enabledmultiple_raster_threads: enabled_onoop_rasterization: disabled_offopengl: enabled_onrasterization: disabled_softwareskia_renderer: enabled_onvideo_decode: disabled_softwarevulkan: disabled_offwebgl: enabledwebgl2: enabled

Load (avg)
0, 0, 1

Memory (System)
3.83GB (0.86GB free)

Process Argv
--unity-launch --crash-reporter-id a0524810-6bff-4604-87d5-5a3187fe2e79

Screen Reader
no

VM
0%

DESKTOP_SESSION
ubuntu

XDG_CURRENT_DESKTOP
Unity

XDG_SESSION_DESKTOP
ubuntu

XDG_SESSION_TYPE
x11

Process Info
CPU %	Mem MB	   PID	Process
    0	   149	  2444	code main
    0	    39	  2449	   zygote
    0	   102	  2540	     gpu-process
    0	    39	  2450	   zygote
    0	     8	  2452	     zygote
    1	    82	  3077	       window (Issue Reporter)
    0	    55	  2589	   utility
    0	   196	  2614	   window (<!DOCTYPE html> - Documents - Visual Studio Code)
    0	   110	  2707	     extensionHost
    0	    63	  2731	     watcherService
    0	    63	  2787	     searchService
    0	   118	  2694	   shared-process
    0	    59	  2747	     ptyHost
    0	     0	  3132	     /bin/sh -c /bin/ps -ax -o pid=,ppid=,pcpu=,pmem=,command=
    0	     0	  3133	       /bin/ps -ax -o pid=,ppid=,pcpu=,pmem=,command=

Workspace Info
|  Window (<!DOCTYPE html> - Documents - Visual Studio Code)
|    Folder (Documents): 3 files
|      File types: txt(1)
|      Conf files:;

Extensions (1)

Extension
Author (truncated)
Version

LiveServer
rit
5.6.1

A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
pythonvspyt602:30300191
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492:30256859
pythonvspyt639:30300192
pythontb:30283811
pythonptprofiler:30281270
vsdfh931cf:30280410
vshan820:30294714
vstes263:30335439
pythondataviewer:30285071
pythonvsuse255:30340121
vscod805:30301674
pythonvspyt200:30340761
vscextlang:30333561
binariesv615:30325510
pythonvssor306:30344512
bridge0708:30335490
vstre464:30350172
bridge0723:30353136
vsdyn420:30354109

The 'open with' option is not available on any folder

Is this in your Linux file / folder explorer?
Are you able to start VS Code and then use Open Folder from its File menu?

The 'open with' option is not available on any folder

Is this in your Linux file / folder explorer?
Are you able to start VS Code and then use Open Folder from its File menu?

Yes, it is in a Linux file/folder explorer.
Yes, I am able to start VS Code and then use open folder from its file menu.


Update README.md

Hi. I just started using your tool and found some small typos on your readme file. Please accept the merge request.

Thanks a lot for your effort.

Because the repo is in the paper link, I will modify the readme.md instead of merging. I reversed the merging. It may be confusing that the people who contribute to the repo are not on the author list. Thanks a lot.


add two rake tasks for keyspace

Add rake tasks:

cequel:keyspace:create_if_not_exist
cequel:keyspace:drop_if_exist

Would love to have the ability to avoid getting the error if keyspace already exists.

:+1:

I like these tasks. If you rebase to master i'd merge this PR.

Rebased

Merged! Thanks for the improvement.


DOC: No explanation of OPENAI_FUNCTIONS agent

Issue with current documentation:
This is not documented. An example is provided, with no explanation whatsoever. As such this page contributes nothing over and above the source code.
Idea or request for content:
Actually document this feature.

The feature was just released, so we can definitely cut langchain slack, but I honestly agree that it is tremendously difficult to figure it out.
I read the source code for StructuredTools and the new conversion functions, so for anyone who comes across this, here's some sample code that works for me and comments explaining each portion
from pydantic import BaseModel, Field
from langchain.tools import StructuredTool, format_tool_to_openai_function
from my_library.utils import save_user # this is your function you are trying to get OpenAI to use
from langchain.schema import (
    HumanMessage,
    AIMessage,
    SystemMessage,
    FunctionMessage,
    BaseMessage,
)

# By defining the args_schema, you can tell OpenAI what each of the fields mean
class SaveUserInput(BaseModel):
    name: str = Field(description="The full name of the user")

# By setting up the tool, you can use the name, description, and args_schema of the tool as the inputs required for the functions
save_user_tool = StructuredTool.from_function(
  name="save_user",
  func=save_user,
  description="Save user data to database",
  args_schema=SaveUserInput
)
tools = [save_user_tool]
functions = [format_tool_to_openai_function(t) for t in tools]
llm = OpenAIChat(
  model="gpt-3.5-turbo-0613",
  temperature=0,
)

# You can construct the messages to send to OpenAI by using the Langchain.schema classes like HumanMessage, AIMessage, and FunctionMessage. I construct the messages by hand instead of using the memory class since it is not supported yet and frankly a lot of magic and overhead that makes it more difficult to understand and use.
messages =[SystemMessage(content="You are a chatbot trying to get the name of the user so you can save it to the database")]
messages.append(<ADD YOUR MESSAGE HISTORY HERE>)

# Returns AIMessage from LLM
# AIMessage looks like: AIMessage(content='', additional_kwargs={'function_call': {'name': 'save_user', 'arguments': '{\n  "source_path": "foo",\n  "destination_path": "bar"\n}'}}, example=False)
response_message = llm.predict_messages(
  messages=messages,
  functions=functions
)

# Code below to run the function
function_json = response_message.additional_kwargs.get("function_call")
if function_json:
  # Call your function based on the data returned by the LLM
  function_name = function_json.get("name")
  arguments = json_formatting(function_json.get("arguments"))
  if function_name == "save_user":
    <INSERT YOUR CODE HERE TO CALL YOUR FUNCTION BASED ON THE NAME AND ARGS>
    response_json = <YOUR FUNCTION>
    function_msg = FunctionMessage(name=function_name, content=response_json)
    messages.append(function_msg)
    response_message = llm.predict_messages(
      messages=messages,
      functions=functions
    )

Hey! @francisjervis
I've tried to add comments to explain the given example in the notebook and created a Pull Request.
Meanwhile! please refer the notebook here.
https://github.com/sumanthdonthula/langchain/blob/master/docs/modules/agents/agents/examples/openai_functions_agent.ipynb
Let me know in case of any issues.

Cool, thanks for adding that - unfortunately the functions feature itself seems to be deeply flawed at model level. The instruction following is so subpar it's not really usable (eg ignoring "yes" | "no" and returning "true" or simply not returning JSON at all). I would strongly advise people not to migrate from "old fashioned" approaches just yet.


Calculate and use User Engagement Metrics

[x] Calculate metrics for user engagement
[x] compare to FY 2023
[x] Make metrics available to toolbox users and developers.

Developed metrics from google analytics.
Next steps:

discuss with FIT committee
share info with users/developers as is relavent.

We decided that we can share info with developers on their tool when we reach out to them to do quality reviews.
Other take home messages (That will be captured in separate issues) are:

Blog posts are not being read that much, perhaps they are hard to find (could change "resources" to "blogs" on the FIT homepage, or feature "top 10 blog posts" directly on FIT homepage
Could show number of tool downloads on FIT website (for tools being downloaded from GitHub)
NOAA specific content on blog posts seems most popular.


Verify dct:identifier type

Referring to the DCAT to IPT mappings, can you please verify dct:identifier is supposed to be type literal, and not type resource?

@pietercolpaert might know: is dct:identifier supposed to be a literal?

Yes, should be a literal

Also see http://dublincore.org/documents/dcmi-terms/#terms-identifier → has range Literal :-)

Thanks - you can't argue with the documentation :)
Can I suggest using the dataest DOI as the primary value for dct:identifier, defaulting to the GBIF UUID if none exists?
Take http://ipt.gbif-uat.org/resource?r=testdelor , which has been assigned DOI but isn't registered with GBIF. The value for dct:identifier could be "doi:10.15469/bnyean"  or the URL "http://doi.org/10.15469/bnyean".

Where can the DOI identifier be found in the IPT code?

DOI is an attribute of the Resources, and stored as part of each VersionHistory entry.
Please be aware the IPT only mints DOIs for datasets when it is configured with a DataCite or EZID account.
When the IPT registers a dataset with GBIF, GBIF will assigns it a DOI. The IPT doesn't show the GBIF assigned DOI however. There is an open issue to do this in the future though, see https://github.com/gbif/ipt/issues/1151

Would it be OK to pick up this feature when https://github.com/gbif/ipt/issues/1151 has been implemented?

Sounds like a good idea, let's open a separate issue for that. In the meantime, I'd really appreciate your guys' help testing the DCAT feed.


SyntaxError

Hello,
i can't send an email via using the sendgrid node.
I tried different things but i'm always getting the same error message:

I'm setting the msg.payload and msg.topic via a template node.
Both are containing only plain text.

Hmm... In my environment, the node works correctly. Could you share your simplest flow as JSON data?

Sure. The complete JSON looks like this:
{
	"msg": {
		"payload": "The refrigerator temperature is -19 °C",
		"topic": "Fridge info"
	}
}

The Template for the Message node looks like this:

Set property => msg.payload
Format => Mustache template
Template => The refrigerator temperature is {{payload}} °C
Output as => Plain text

The Template for the Subject node looks like this:

Set property => msg.topic
Format => Plain text
Template => Fridge info
Output as => Plain text

Thank you for your sharing. I tried it. It works correctly and I received the e-mail from sendgrid node.

Please try to use my flow. :)
[{"id":"860e0efa.3b3ee","type":"sendgrid","z":"ff1c2313.11ba7","from":"","to":"","name":"Sendmail","x":380,"y":260,"wires":[]},{"id":"4c2d43bf.e0024c","type":"inject","z":"ff1c2313.11ba7","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":120,"y":140,"wires":[["538a091d.4f1958"]]},{"id":"538a091d.4f1958","type":"template","z":"ff1c2313.11ba7","name":"Message","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"The refrigerator temperature is {{payload}} °C","output":"str","x":140,"y":200,"wires":[["387010c1.2b588"]]},{"id":"387010c1.2b588","type":"template","z":"ff1c2313.11ba7","name":"Subject","field":"topic","fieldType":"msg","format":"handlebars","syntax":"plain","template":"Fridge info","output":"str","x":280,"y":200,"wires":[["860e0efa.3b3ee"]]},{"id":"c8228178.14e4b","type":"comment","z":"ff1c2313.11ba7","name":"Input API Key, From, To ->","info":"","x":190,"y":260,"wires":[]}]

Thanks for your efford.
I tried your flow and reinstalled the sendgrid node but i'm getting the same error.
What else could i try?

I completely reset my raspberry pi and reinstalled node-red from scratch.
Still getting the same error!
Do i need to configure something additional?

Could you tell me your envrionment (Node- RED version, Node.js version, OS, browser). To survey the problem, I'll try to use the node on the same environment.

Sure.
Raspberry PI:
Node-RED version: v0.18.4
Node.js  version: v4.8.2
Linux 4.14.34-v7+ arm LE

Browser:
Google Chrome: Version 65.0.3325.181 (Offizieller Build) (64-Bit)

I encountered same problem when I tried to use Node.js v4.4.5. After I upgraded it to Node.js v8.1.1, the problem was solved. Therefore, the problem occurs from Node.js version. If you use Raspberian on Raspberry Pi, "update-nodejs-and-nodered" command will be useful to upgrade your Node.js.
https://nodered.org/docs/hardware/raspberrypi


xUnit output has incorrect number of tests

Description
testsuite element includes an attribute tests for the number of tests run. This is alway zero
Expected behavior
tests attribute is set to the number of tests that were run.
Actual behavior
test attribute is zero
Steps to reproduce
No response
swift-testing version/commit hash
25d0eed9b339de36365ff16deb9a3d9c64322f1c
Swift & OS version (output of swift --version ; uname -a)
No response

verified as working


The example does not work using the Chrome browser

It has worked with Safari and Firefox.

Hi, are you trying to run the example locally?  Chrome doesn't allow XHR for file:// URLs, so if you run the example as a local file it won't be able to load the dependencies.
It works for me if I access the example via HTTP (local webserver).

Seems to work correctly in Chrome.  Please open a new issue if there are any further issues.


Improve Version information

Clicking on the version string currently takes user to the new release info doc
Clicking in ember on the version string shows a popup containing some useful info (specific versions, links to repos, downloads etc)

I'm not sure where this info comes from, or if it only shows in specific scenarios, but we should aim to match it
I'm also not sure where and how it should display. Would be nice in the release doc though we'd need to work out how to inject it

The Helm and machine versions aren't that useful, and we generally always make the Ui version match the Rancher version now.
But the image lists are important for people setting up airgap.

Tested on Rancher master-head version 351f7ca
From the top-left dropdown, the user is able to see version information.

https://..../dashboard/about


Allow for rectangular regions of interest for satellite data

Detailed Description
At the moment, we select square ROIs of satellite data (square in pixel space).
But, when projected to OSGB, those "square" images are actually quite tall rectangles. Which isn't ideal because, if anything, we probably want satellite images that are wider than taller (because most winds across the UK are from west to east)
A simple solution would be to allow for rectangular (in pixel space) satellite images, so we can manually request satellite imagery that is, say, 64 pixels tall and 128 pixels wide (which would be rectangular in pixel space, but might be very roughly square in OSGB).
Here are two plots of our satellite imagery at the moment:
Here's a plot in geostationary projection (which shows that the satellite image is square in pixel space):

And here's the exact same data, but now reprojected to OSGB. Note how tall and thin the satellite image is:

Interestingly, our HRV batches don't cover exactly the same geographical extent as our PV batches. Here's a plot of HRV imagery and PV systems (in red).

I think what's going on is that PVDataSource calculates its geographical region of interest by multiplying image_size_pixels=64 x meters_per_pixel=2000. But each satellite pixel is a "tilted rectangle" which is about 1.3 km wide x 2.5 km high.
This isn't terrible. But I thought I'd flag it up! A quick fix might be to allow for rectangular (in pixel-space) satellite batches

I'm starting to work on this! I'm not sure the easiest way to approach it, I was thinking of having the config setup now have a image_size_pixels_height and image_size_pixels_width for the satellite imagery? Slightly less changes would be required for just setting the width to be twice that of image_size_pixels but would be less flexible in the future, any preference @peterdudfield @JackKelly ?

i like the idea of

image_size_pixels_height
image_size_pixels_width
but I can see the quick fix of times by 2.

Perhaps give the height and width ago and if it gets to messy we can take the quick option.
Happy to do some paired programming on it if you like

Either option sounds good to me! Thanks guys!

Yeah, I'm trying with adding height and width first, as also as we go to other places latitudes, the difference between how tall and how wide each pixel is would change.


Remove "static/" from ThumbnailsProxyView path

Chromium's service worker cache exhibits poor performance when using ignoreSearch:true (which is necessary for paths using HA's auth). This makes it unsuitable for thumbnails especially as they are 1) numerous (the latency appears to increase linearly with number of cached objects) and 2) small (there's not much data usage savings, so latency would have been the main benefit, but even that doesn't appear to be a benefit here).
This PR removes "static" from the ThumbnailsProxyView path name. The service worker should now treat it with the NetworkOnly() strategy.

Thanks @uvjustin !


Installation

Oh my days. This Aqualisa shower was touted as being smart and it's as thick as s***. The app is next to hopeless and profiles have been removed from the controller. Sigh.
What do I want?  I'd love to help test this with you and using HomeBridge and therefore into Home Assistant to make it actually useful.
THANKYOU!

lol yeah tell me about it. This plugin is "on hold" for two reasons basically:

Aqualisa has a firmware bug which I'm trying to get fixed with them before proceeding; if you set a bath to run for 20 minutes, it'll stop running after 12 because the anti-overflow code kicks in, and the timer code doesn't overrule it. This is silly.
Homekit doesn't like the valve setup very much. I've got a prototype going to correctly display the valves, timer and temperature in Homekit (presenting a very nice little layout) but Home does not like changing between valves very much at all - it often won't register a change.

2 is the main one - it makes the valve display unreliable and the state within Homekit gets all wonky. I hope to find time to fix that up, and the API clues in the README will let any dev with more time do it faster than me, but that's basically where we're at.
I think the other reason I was a bit discouraged is that I haven't figured out how to locally control the shower on the network. At the moment I have to communicate via Aqualisa servers, and I don't like that - I'd prefer to have local network control.
Anyway, thanks for the comment, it might spur me in to action soon!

I don't know much about MQTT, but have you fired any at port 49153? I mention it in the README, it... appears to receive things, and there's the aqualisa repo about it. But I haven't been able to get any good results from it.

As an MQTT client, it will need to connect to a MQTT broker with credentials, likely the .st domain.  Pointing MQTT Explorer at 49153 gets rejected, also tried using my AQ credentials, rejected.
One could have the router redirect traffic bound for the .st domain to my local MQTT broker, but unless we know either the credentials, or how to change them, this may not get too far.

Help us cr3ative - you're our only hope!
But seriously, thanks for running with this. I don't have the technical knowledge to pull this all apart and make the progress you have. If you need someone to test/validate please give me a shout - I have an Optic Q Shower/Drench and a Unity Q bath filler, with seem to use the exact same mixer unit, albeit with slightly different "controllers". All of my homeauto stuff (well, almost) is integrated via openhab with homebrew devices firing MQTT.

Have you looked at port 1935? Possibly rtmp

@Dantenz Noted!  If we can gain local control, I'll be the first person on this - that would be incredibly exciting.
@garethcook Port is closed on mine:
PORT     STATE  SERVICE
1935/tcp closed rtmp

nmap is just noting that 1935 is traditionally rtmp

WoooHoo, I just ordered the Q Optic and I was praying there is a HomeBridge solution. But reading the comments here has got me nervous!
How are we looking Smart Tech family? Am I set for disappointment, should I get a basic mixer? I was hoping the other solution would be for Siri to speak to Alexa to get the shower on. Not sure if that is an idea, if this does not work.
I would love to help with the coding, but I just about manage setting up smart lights lol

I have just bought a new house and got one of these installed. I'm willing to test this plugin and help where I can. How can I get it installed onto my home bridge setup ?

Still the case that this plug-in is exploratory documentation only at the moment. The cloud service is so shockingly bad that I have no interest in integrating it at the moment. If local network control becomes available I'll absolutely reconsider.

So no way for me to try myself via homebridge?

Not at the moment. I think the extent of the info on the API and how it works is in this repo (I've written it down as best I can) but there are no working homebridge plugins yet.

Ill fire up the node server and take a peak - what is their mobile app like ?

Fairly dire. I got the endpoints by debugging their Android app. You won't find any more than is in the Postman collection in this repo, it'll save you a lot of time.

First, thanks for putting this together @cr3ative!
I just spoke to Aqualisa support about the state of the app. I'm not sure if everyone else's has the same problem, but mine just times out when requesting the shower to turn on, from both app and alexa. Then ~5-10 minutes later it'll switch on.
Anyway, they said they are aware of issues with the app and they're working to fix them. They couldn't give me a timeline though. They mentioned that they're changing the team that's working on it. So, maybe that's a good sign that things might change soon.
Fingers crossed they sort it out 🤞

Thanks for the update @Joezo , that's exactly the same problem I have too.
I'm quietly suspicious that EVERYONE has this problem and they just don't know it. Their messaging queue slows down to the point it can't reply to actions, then things happen X minutes later. It's a horrible mess.
I've offered them my services as a developer of apps/embedded stuff, but they never seem to reach out more than once. Requests to have the app person call me back fall on deaf ears.
Ah well. I'm very glad to hear they're changing the team. I just hope it's back-end not front-end, as faffing about with how the app looks won't fix this!

I agree everyone must be having this problem.
I ended up soldering some wires to the official remote (£86 from Amazon) and connecting it to my Pi.
Very easy to do.

I agree everyone must be having this problem.
I ended up soldering some wires to the official remote (£86 from Amazon) and connecting it to my Pi.
Very easy to do.

This sounds like an idea. Could you post a picture please and what components are needed apart from the remote? Cheers

On the Raspberry Pi I use the Domoticz home automation system, so for the integration with Alexa there are quite a few elements of software and configuration to set up, which I don't cover here.
The below hardware gives your Pi control of the shower, and some simple python code to make it work.
Buy the official Aqualisa Optic Q shower remote from Amazon for £86.
Pair it with the shower using the included instructions.
Open it up (2 small screws).
Remove the switch push-plate (it's just held on by a clear sticky thing) and solder a wire to each of the two parts of the switch (they are really good surfaces for solder).
Drill (or use your soldering iron.. I'm lazy) a couple of holes out of which to pass the wires.

In the picture, the parts are plugged in to a breakout board to make it easier to demonstrate.
The remote is left open so you can see where I've soldered the wires.
(Apologies for the shadows).
The remote switch wires are connected to the relay board.
The relay board power is connected to 0V and 5V directly from the Pi.
In my example, the relay control is connected to the Pi on GPIO 18, and is activated by python.
A light-dependent resistor (LDR) is blu-tac'd over the white LED on the remote.
(in the picture, it's on the end of the blue and yellow wires, hanging in mid-air just to the left of the white LED.
It should be stuck right over the white LED (which looks green in the picture..)
It works with the switch cover screwed back on, and the LED blu-tac'd on top of the case)
The LDR forms the top part of a voltage divider between 0V and 3.3V on the Pi.
The bottom part is a 220k resistor
LDR(leg 1)->3.3V, 220k(leg 1)->0V, LDR(leg 2)&220k(leg 2)->GPIO pin.
In my example, GPIO pin 17 reads the signal from the voltage divider.
When the white LED is lit, the light falling on the LDR reduces its resistance from several meg to about 20k, which raises the voltage at the centre of the divider to around 3V which is enough to trigger the GPIO pin.
When the shower is started by activating the relay, the white LED flashes regularly until the shower reaches operating temperature, at which point it stops flashing. (it was a little erratic during testing however, see below).
(the instructions say the LED stays on for 5 seconds once the temperature is reached, but mine doesn't seem to do that).
The python program detects the "warming" flashes, and then assumes "ready" when the flashing stops, at which point I get my Echo to say that the shower is ready.
Parts:
Any Raspberry Pi  - in the picture is my test Pi Zero W - £10 ish but they seem to be sold out in most places. Can maybe get one for double the price on ebay.
One relay board - 10 for £14.99 https://smile.amazon.co.uk/gp/product/B08MTD5BPJ
One 220k resistor - anything around 300k or thereabouts should work, my 220k one came from this pack: https://smile.amazon.co.uk/gp/product/B07P1GWKSJ
One light-dependent resistor (LDR) - https://www.ebay.co.uk/itm/114833522481
Some connector cables. I use this to make them: https://smile.amazon.co.uk/gp/product/B07V5FVSYL
The code is a first draft and has no error trapping whatsoever.
The flashes on the remote whilst I was testing became a little erratic. It may work just fine from cold as I think this was due to me constantly turning the shower on and off.
The comments show what was going on.
When I "preview" this comment, the code seems to have lost its indentation.. let's hope publishing it doesn't..
Cheers! Steve Prior.
`import RPi.GPIO as GPIO
from time import sleep
import datetime
GPIO.setmode(GPIO.BCM)   #use Pi pin numbers, not board pin numbers
GPIO.setup(17, GPIO.IN)  #LDR signal in
GPIO.setup(18, GPIO.OUT) #relay control out
#switch the relay
GPIO.output(18,GPIO.HIGH)
sleep(0.5)
GPIO.output(18,GPIO.LOW)
warmedup=0  #set to 1 when flashing ends
last=0      #used to determine if this is a change of LED state
flashing=0  #set to 1 when flashing is detected
lts=0       #timestamp of the last change of state
while not warmedup:
gpin=GPIO.input(17)
if gpin==1:
if last==0:
print("On")
ts=datetime.datetime.now().timestamp()
tdiff=ts-lts    #calculate the time since the end of the last flash
lts=ts
print(tdiff)
last=1
else:
if last==1:
print("Off")
ts=datetime.datetime.now().timestamp()
tdiff=ts-lts    #calculate the length of this flash
lts=ts
print(tdiff)
if tdiff<1 and flashing==0: #we have the end of the first short flash, so flashing has started
flashing=1
print("Flashing started..")
if tdiff>1 and tdiff<10:    #sometimes it only flashes once, for a 3 or 4 seconds
print("Long flash, could be either already warm, recently turned on, or being turned off.. exitting")
warmedup=1
last=0
ts=datetime.datetime.now().timestamp()
tdiff=ts-lts                   #check if there hasn't been a flash for a while
if tdiff>2 and flashing==1:    #no flashes for over a 2 seconds	 so assume warmed up
warmedup=1
sleep(0.1)
print("Shower (probably) warmed up, or you're using this program to turn it off :)")
#run some code to here to get Alexa to speak "Your shower is ready"
GPIO.cleanup()
`

Yeah, no indentation...

Ok forget all of that flashing-light rubbish. It is just terribly inconsistent.
This is still very useful to start, stop and change outlets.
My shower takes less than a minute to warm up, so I've added a timer in to my Alexa routine before it tells me it's ready.
At that point I switch outlets with a longer switch of the relay because I start with the rainfall, but I also want the wall shower to be warmed up.
The circuit is much simpler, as is the code:
`import RPi.GPIO as GPIO
from time import sleep
GPIO.setmode(GPIO.BCM)   #use Pi pin numbers, not board pin numbers
GPIO.setup(18, GPIO.OUT) #relay control out
#switch the relay
GPIO.output(18,GPIO.HIGH)
sleep(0.5)
GPIO.output(18,GPIO.LOW)
GPIO.cleanup()
`

@serf2 This is ridiculously impressive. Thank you for the detailed notes!
Speaking of the remote, it's BTLE apparently. Someone on my Twitter is looking in to the protocol, but as I don't have a BTLE sniffer, I can't help much there. It'd be a really neat implementation though if it were decoded.

If we do get the Bluetooth interface decoded I'd be really interested. This could then be handled by an esp32 and MQTT..
Looking forward to any updates :)

I do have a sniffer but I can't for the life of me get anything from either the remote or the shower..  it doesn't seem to be presenting any MAC address at all!   But I am no expert..

But it is a Nrf51822 chip inside....


[Sticky] Make  _removeSticky() work for anchors which have 0 top offset

How to reproduce this bug:

Use Sticky with an anchor element which has 0 top offset
In https://github.com/zurb/foundation-sites/blob/develop/js/foundation.sticky.js#L79 scroll >= _this.topPoint will be true so _this._removeSticky is called like _this._removeSticky(false) and therefore the sticky element will be at bottom, which is unexpected.

What should happen:
Even with an anchor element with 0 top offset the sticky should be anchored at top by default.
Also when the page is scrolled and I reload, the Sticky element will be at the bottom.
What happened instead:
The sticky element is anchored at the bottom.
Browser(s) and Device(s) tested on:

Mac OS X 10.12.6
Chrome 59.0.3071.115

Foundation Version(s) you are using:

6.4.2

Test case link:

from http://foundation.zurb.com/sites/docs/sticky.html

We could need a codepen here so we can reproduce it.


add title tag and seo codes

for #4
i referred this gist

Thank you so much for your pull request. This is indeed an important feature for a blogging platform, I just couldn't find the time to add it.