Can't receive back data telemetry

Hello,
I try to redo your project with my drone DJI Tello. My computer uses Windows 10
-I have followed the explanations of the installation
-I imported the flow solution "Receiving Tello Telemetry Data".
-I opened port 8890 in the firewall
-I connected the computer to the Wi-Fi of the drone
I can launch the drone and make it move but I can't receive telemetry information.
This error is displayed in the debug and in the command prompt :
[udp in:bd7e5975.45fad8] error: EACCES
Do you know how to fix this error so that I can access the telemetry information?

Hi @max051505  - Its been a while since I played with my Tello.
I'm a Linux user so I'm not certain about Win10 firewall rules.  I show the Linux firewall commands to receive telemetry data in [Part5](https://github.com/johnwalicki/Node-RED-Tello-Control/blob/main/docs/PART5.md
From your screenshot, you might have too many Node-RED flow tabs listening to port?  You might want to "Disable" all the flows except for the telemetry flow.  Double click on the tab and at the bottom there is a button to Enable / Disable. Change the other tabs to Disable and Deploy.

Thank you for your answer !
I tried to do as you told me but it still doesn't work. So I decided to use ubuntu :

I installed Node-RED
I imported your flow
I opened the ports in the firewall (ufw)

But I've got a telemetry error again:
error] [udp in:bd7e5975.45fad8] error: EADDRINUSE

It's ok, I found the solution ! Thank you !

Great news!

Thank you for your answer !
I tried to do as you told me but it still doesn't work. So I decided to use ubuntu :

I installed Node-RED
I imported your flow
I opened the ports in the firewall (ufw)

But I've got a telemetry error again:
error] [udp in:bd7e5975.45fad8] error: EADDRINUSE

It's ok, I found the solution ! Thank you !

Hi Max,
Could you share, what solution you got for the same on Windows 10?
I am facing the same problem
Vipin


feat(aws-cloudfront-mediastore): new aws-cloudfront-mediastore pattern implementation

Issue #, if available: #104
Description of changes:
This PR introduces a new pattern which can be used by live streaming solutions. The pattern creates an Amazon CloudFront distribution whose origin is an AWS Elemental MediaStore container.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

AWS CodeBuild CI Report

CodeBuild project: codebuildgithubautobuildPro-rp7jMDIK1wBN
Commit ID: 923455ea7645021334f397eecef2297791f1e5aa
Result: FAILED
Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

AWS CodeBuild CI Report

CodeBuild project: codebuildgithubautobuildPro-rp7jMDIK1wBN
Commit ID: 658a9cf72740854ffdf4908a56cca2a400860748
Result: FAILED
Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

AWS CodeBuild CI Report

CodeBuild project: codebuildgithubautobuildPro-rp7jMDIK1wBN
Commit ID: 51a7ace797794e50e70c24041225446ceeb94087
Result: SUCCEEDED
Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

AWS CodeBuild CI Report

CodeBuild project: codebuildgithubautobuildPro-rp7jMDIK1wBN
Commit ID: 0f5c18556b9ed89d7598999bca80a2ffefc8b01b
Result: SUCCEEDED
Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

AWS CodeBuild CI Report

CodeBuild project: codebuildgithubautobuildPro-rp7jMDIK1wBN
Commit ID: 5ec9e802ed1e3b5aa319348e32efe51f3d668ed8
Result: SUCCEEDED
Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

AWS CodeBuild CI Report

CodeBuild project: codebuildgithubautobuildPro-rp7jMDIK1wBN
Commit ID: f5db2133e29b78a001b758077135e93656046c01
Result: SUCCEEDED
Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

Thanks for the contribution, the updates will be pushed out in v1.77.0 release


[multistage][testing] Add some having test case

Direct translation of select_having.sql from psql regress test.
The only difference is we don't support long type.

Codecov Report

Merging #9833 (926c881) into master (e98fa6e) will decrease coverage by 2.30%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master    #9833      +/-   ##
============================================
- Coverage     70.26%   67.96%   -2.31%
- Complexity     4924     5254     +330
============================================
  Files          1964     1461     -503
  Lines        105055    76338   -28717
  Branches      15907    12147    -3760
============================================
- Hits          73822    51886   -21936
+ Misses        26101    20779    -5322
+ Partials       5132     3673    -1459

Flag
Coverage Δ

integration1
?

integration2
?

unittests1
67.96% <ø> (+<0.01%)
:arrow_up:

unittests2
?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

...va/org/apache/pinot/common/config/NettyConfig.java
0.00% <0.00%> (-100.00%)
:arrow_down:

...a/org/apache/pinot/common/metrics/MinionMeter.java
0.00% <0.00%> (-100.00%)
:arrow_down:

...g/apache/pinot/common/metrics/ControllerMeter.java
0.00% <0.00%> (-100.00%)
:arrow_down:

.../apache/pinot/common/metrics/BrokerQueryPhase.java
0.00% <0.00%> (-100.00%)
:arrow_down:

.../apache/pinot/common/metrics/MinionQueryPhase.java
0.00% <0.00%> (-100.00%)
:arrow_down:

...ache/pinot/server/access/AccessControlFactory.java
0.00% <0.00%> (-100.00%)
:arrow_down:

...he/pinot/common/messages/SegmentReloadMessage.java
0.00% <0.00%> (-100.00%)
:arrow_down:

...he/pinot/common/messages/TableDeletionMessage.java
0.00% <0.00%> (-100.00%)
:arrow_down:

...pinot/core/data/manager/realtime/TimerService.java
0.00% <0.00%> (-100.00%)
:arrow_down:

...not/common/exception/HttpErrorStatusException.java
0.00% <0.00%> (-100.00%)
:arrow_down:

... and 741 more

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


intent of "remove non alphanumeric leading and trailing"

Hi, can we talk about commit eb0dcb90c , "remove non alphanumeric leading and trailing", which does a:
 .gsub(/^[^A-Z0-9]*|[^A-Z0-9]*$/, '')

What's the intent of this, what sort of input did you have that required it?
Thinking about the fact that this also removes all non-ascii --- non-ascii isn't neccesarily going to work right with this script anyway, but simply stripping it isn't neccesarily the right solution.
I'm not sure this line is a problem... but I'm getting nervous about not being sure what is or is not a problem, as I get deeper into this,and see how easy it is to mess up weird cases.
Looking at your three tested examples:

.A20  => To me, this reads like a typo, it's a cutter without a class number. But after your 'correction', it will be parsed as if it were class number A 20. I think it's unlikely to be so though, I've never seen a leading period like this used intentionally. I think .A20 is more likely to be a cutter missing it's actual class numbers, which should be thrown out as invalid rather than read as "A 20".
B31.4 1992.  =>  Stripping the trailing period is unneccesary -- the existing logic without the stripping will still recognize this as a valid call number, and in fact will still do exactly the same thing with it, as the existing logic strips non-alphanumeric from the 'extra' portion.
'Microfilm.'  => invalid anyway, it's not Lcsort's responsibility to do anything particularly useful with things that simply aren't lc call numbers.

So I'm inclined to suggest reversing that gsub. What do you think?

PS:  While I don't generally do "test-driven development", this kind of confusing code is one place where I find writing a failing test first handy.  Writing a failing test first in this case would have shown that B31.4 1992. is treated exactly the same before and after eb0dcb9 .

I had added that commit because there were call numbers with leading and trailing periods that were throwing off the sorting. I think most of them were not valid LC though. I'll take a look and will let you know if there is a good case for keeping this in. Otherwise I'm fine with including the gsub in as part of x = Lcsort.normalize(callno) || callno.upcase.gsub(/^[^A-Z0-9]*|[^A-Z0-9]*$/, '')

Cool. Yep, you could always just normalize it yourself first too:
  = Lcsort.normalize( callno.upcase.gsub(/^[^A-Z0-9]*|[^A-Z0-9]*$/, ''))

Would do exaclty what's there now, but with you having to be explicit about doing it first.
I think actual call number data and practices vary enough that most people are going to have to do SOME pre-normalization on the way in, unique to their circumstances. For instance I'm going to have to remove some local prefixes from mine first, before sending to Lcsort.normalize. Trying to put too much in a shared lcsort gem will just make it less general purpose.

Perhaps normalize could take a block, i.e.,
normalize(call_no) do |cn|
  # my special stuff, filters, whatever here
end

?

Honestly, I don't think it's necessary and would try to keep it simple.   I don't see a huge advantage to that over the API client developer just writing:
normalize(do_my_special_stuff call_no)

With their own do_my_speical_tuff method, if they want to do their own normalization and filters first.  It's not really any less readable or less convenient, and avoids feature bloat in Lcsort. Just write ruby.

Sure, that's fine. Just an idea (and I always feel cool when I get to implement something that takes a block :wink:).


Ethernet cable connected device

Hi
I have just started experimenting with this. So far:

the unit is discoverable
does not allow a remotely initiated connection
does allow a second server to be specified in the web UI to allow both servers to be updated
I have done a hack to allow the device to do the connection
it will initiate a TCP connection and send periodic data and keep alive packets
I am struggling to get meaningful data for some values I am looking for - it is also not obvious what is in the periodic data

I am now retired for IT management, so only hobby developer!
any help appreciated - ultimate destination for the data is Home Assistant
Stuart

Hi @drsmarsden,
I am using this with a Wifi data logging stick, which does listen on tcp/8899 by default. I don't have an Ethernet data logging stick so I'm not sure how much assistance I can be unfortunately.
If I navigate to the URL below, I see the config screen below. You can see port 8899 defined under Internal Server Parameters Setting
http://<DATA_LOGGER_IP_ADDRESS>/config_hide.html

Hi
Thanks
Weird - if I use your original code I can get a TCP connection to the logger on port 8899 , send a request but get no reply
If I add my PC as server B on the logger, change the code so we just listed on port 10004 we get a TCP connection to us and receive data (but so far only the date looks correct)
I am trying to get the API keys from Ginlong so I can try the cloud route
thanks
Stuart

On 31 May 2022, at 23:12, Jonathan McCrohan @.***> wrote:
Hi @drsmarsden https://github.com/drsmarsden,
I am using this with a Wifi data logging stick, which does listen on tcp/8899 by default. I don't have an Ethernet data logging stick so I'm not sure how much assistance I can be unfortunately.
If I navigate to the URL below, I see the config screen below. You can see port 8899 defined under Internal Server Parameters Setting
http://<DATA_LOGGER_IP_ADDRESS>/config_hide.html
https://user-images.githubusercontent.com/315209/171292636-e64b1dea-0665-4b49-99ae-b958a1b6e4ff.png
—
Reply to this email directly, view it on GitHub https://github.com/jmccrohan/pysolarmanv5/issues/7#issuecomment-1142687777, or unsubscribe https://github.com/notifications/unsubscribe-auth/AV53RLTGT5K3HFSH2N3IMPDVM2FGJANCNFSM5XK7JJLQ.
You are receiving this because you were mentioned.

Hi Stuart.
Because Ginlong are moving people to a new portal I am in the process of moving away from pulling the data from the web API and instead pulling directly from the data logger (no internet connection required) - however I saw your comment and thought I would share what I have been using to pull the data via the Ginlong v1 portal ... Hope it helps you.
I have been using the following code for the past year - it polls the Ginlong API that are called by the Ginlong V1 portal web pages.  In other words it pretends to be 'you', logging in as 'you' and grabbing the JSON responses and then posts them to a MQTT server so I can process with NodeRed/etc
I have a NodeRed node node that calls this python script on a 5 min interval.
I chose to do this, rather than have the python script loop/repeat so that I can dynamically control the time interval from NodeRed.
If you don't want to run this code, the URL's that you need are contained in the code below.
ginlong_scraper_rs_norepeat.py
Note: I did not write the original code, and I massively apologise to the original author as I have forgotten his name, sorry.
Note: Mentions of 'Raoul', 'Toby' or 'RS' are my own additions/comments ... sorry I have left in the debugging, it should be cleaned up._
#!/usr/bin/python
import requests
import urllib
import json
import datetime
import time
import os
import logging
import schedule

# Not all keys are avilable depending on your setup
COLLECTED_DATA = {
    'DC_Voltage_PV1': '1a',
    'DC_Voltage_PV2': '1b',
    'DC_Current1': '1j',
    'DC_Current2': '1k',
    'AC_Voltage': '1ah',
    'AC_Current': '1ak',
    'AC_Power': '1ao',
    'AC_Frequency': '1ar',
    'DC_Power_PV1': '1s',
    'DC_Power_PV2': '1t',
    'Inverter_Temperature': '1df',
    'Daily_Generation': '1bd',
    'Monthly_Generation': '1be',
    'Annual_Generation': '1bf',
    'Total_Generation': '1bc',
    'Generation_Last_Month': '1ru',
    'Power_Grid_Total_Power': '1bq',
    'Total_On_grid_Generation': '1bu',
    'Total_Energy_Purchased': '1bv',
    'Consumption_Power': '1cj',
    'Consumption_Energy': '1cn',
    'Daily_Energy_Used': '1co',
    'Monthly_Energy_Used': '1cp',
    'Annual_Energy_Used': '1cq',
    'Battery_Charge_Percent': '1cv'
}

def do_work():
    # solis/ginlong portal config

    # Raoul 2021-06-04
    #username = os.environ['GINLONG_USERNAME']
    #password = os.environ['GINLONG_PASSWORD']
    #domain = os.environ['GINLONG_DOMAIN']
    #lan = os.environ['GINLONG_LANG']
    #deviceId = os.environ['GINLONG_DEVICE_ID']

    username = 'PUTYOURLOGINHERE'
    password = 'PUTYOURPASSWORDHERE'
    domain = 'm.ginlong.com'
    lan = '2'
    #deviceId = 'IDONTUSETHIS'
    deviceId = ''   # Leave blank so we get other data as well
    # Raoul 2021-06-04

    ### Output ###

    # MQTT
    # Raoul 2021-06-04
    #mqtt = os.environ['USE_MQTT']
    #mqtt_client = os.environ['MQTT_CLIENT_ID']
    #mqtt_server = os.environ['MQTT_SERVER']
    #mqtt_username = os.environ['MQTT_USERNAME']
    #mqtt_password = os.environ['MQTT_PASSWORD']

    mqtt = 'true'
    mqtt_client = 'SolisPi'
    mqtt_server = 'PUTYOURMQTTSERVERIPHERE'
    mqtt_username = ''
    mqtt_password = ''
    # Raoul 2021-06-04

    ###

    if username == "" or password == "":
        logging.error('Username and password are mandatory for Ginlong Solis')
        return

    # Create session for requests
    session = requests.session()

    # building url
    url = 'https://' + domain + '/cpro/login/validateLogin.json'
    params = {
        "userName": username,
        "password": password,
        "lan": lan,
        "domain": domain,
        "userType": "C"
    }

    # default heaeders gives a 403, seems releted to the request user agent, so we put curl here
    headers = {'User-Agent': 'curl/7.58.0'}

    # login call
    loginSuccess = False
    try:
        resultData = session.post(url, data=params, headers=headers)
        resultJson = resultData.json()
        if resultJson.get('result') and resultJson.get('result').get('isAccept', 0) == 1:
            loginSuccess = True
            logging.info('Login successful for %s' % domain)
        else:
            raise Exception(json.dumps(resultJson))
    except Exception as e:
        logging.debug(e)
        logging.error('Login failed for %s' % domain)

    if loginSuccess:
        if deviceId == "":
            logging.info('Your deviceId is not set, auto detecting')
            url = 'https://' + domain + '/cpro/epc/plantview/view/doPlantList.json'
            logging.debug('URL: %s' % url)

            cookies = {'language': lan}
            resultData = session.get(url, cookies=cookies, headers=headers)
            resultJson = resultData.json()
            logging.debug('Ginlong plant list: %s' % json.dumps(resultJson))

            RS_doPlantList_resultJson = resultJson
            logging.debug('RS>>> doPlantList: %s' % json.dumps(RS_doPlantList_resultJson))

            plantId = resultJson['result']['pagination']['data'][0]['plantId']
            logging.info('Your plantId is %s' % plantId)

            url = 'https://' + domain + '/cpro/epc/plantDevice/inverterListAjax.json?'
            params = {
                'plantId': int(plantId)
            }
            logging.debug('URL: %s' % url)

            cookies = {'language': lan}
            resultData = session.get(url, params=params, cookies=cookies, headers=headers)
            resultJson = resultData.json()
            logging.debug('Ginlong inverter list: %s' % json.dumps(resultJson))

            # .result.paginationAjax.data
            deviceId = resultJson['result']['paginationAjax']['data'][0]['deviceId']

            logging.info('Your deviceId is %s' % deviceId)

        # get device details
        logging.info('Querying deviceId %s' % deviceId)
        url = 'https://' + domain + '/cpro/device/inverter/goDetailAjax.json'
        params = {
            'deviceId': int(deviceId)
        }

        cookies = {'language': lan}
        resultData = session.get(url, params=params, cookies=cookies, headers=headers)
        resultJson = resultData.json()
        logging.debug('Ginlong device details: %s' % json.dumps(resultJson))

        RS_goDetailAjax_resultJson = resultJson

        # RAOUL ADDITIONAL showPlantDetailAjax
        url = 'https://' + domain + '/cpro/epc/plantDetail/showPlantDetailAjax.json?'
        params = {
            'plantId': int(plantId)
        }
        logging.debug('RS>>> URL: %s' % url)

        cookies = {'language': lan}
        RS_showPlantDetailAjax_resultData = session.get(url, params=params, cookies=cookies, headers=headers)
        RS_showPlantDetailAjax_resultJson = RS_showPlantDetailAjax_resultData.json()

        # RAOUL ADDITIONAL devicestate
        url = 'https://' + domain + '/cpro/epc/plantDetail/devicestate.json?'
        params = {
            'plantId': int(plantId)
        }
        logging.debug('RS>>> URL: %s' % url)

        cookies = {'language': lan}
        RS_devicestate_resultData = session.get(url, params=params, cookies=cookies, headers=headers)
        RS_devicestate_resultJson = RS_devicestate_resultData.json()

        logging.debug('>>>')

        toby_dataJSON = resultJson['result']['deviceWapper']['dataJSON']
        toby_paramDaySelectors = resultJson['result']['deviceWapper']['paramDaySelectors']
        logging.debug('TOBY toby_paramDaySelectors = %s:' % resultJson['result']['deviceWapper']['paramDaySelectors'])
        # RAOUL ADDITIONAL

        # Get values from json
        updateDate = resultJson['result']['deviceWapper'].get('updateDate')
        inverterData = {'updateDate': updateDate}
        for name, code in COLLECTED_DATA.items():
            logging.debug('>>> NAME=%s: CODE=%s' % (name, code))
            inverterData[name] = float(0)
            value = resultJson['result']['deviceWapper']['dataJSON'].get(code)
            logging.debug('>>> VALUE=%s' % value)
            if value is not None:
                inverterData[name] = float(value)

        logging.debug('>>>')

        # Print collected values
        logging.debug('Results from %s:' % deviceId)
        logging.debug('%s' % time.ctime((updateDate) / 1000))
        for key, value in inverterData.items():
            logging.debug('%s: %s' % (key, value))

        # Push to MQTT
        if mqtt.lower() == "true":
            logging.info('MQTT output is enabled, posting results now...')

            import paho.mqtt.publish as publish
            msgs = []

            mqtt_topic = ''.join([mqtt_client, "/"])  # Create the topic base using the client_id and serial number

            if (mqtt_username != "" and mqtt_password != ""):
                auth_settings = {'username': mqtt_username, 'password': mqtt_password}
            else:
                auth_settings = None

            msgs.append((mqtt_topic + "updateDate", int(updateDate), 0, False))
            #for key, value in inverterData.items():
            #    msgs.append((mqtt_topic + 'dkruyt/' + key, value, 0, False))

            # RAOUL - toby stuff
            logging.info('RS>>> DEBUGGING >>>')

            logging.debug('toby_paramDaySelectors=  %s:' % toby_paramDaySelectors)

            logging.info('RS>>> DEBUGGING >>>')

            toby_json = json.loads(toby_paramDaySelectors)
            for json_data in toby_json:
                logging.info('RS>>> ')
                logging.debug('jason_data=  %s: ' % json_data)
                logging.info('RS>>> ')
                logging.debug('Inverter name: %s value: %s' % (json_data['name'], json_data['value']))
                logging.info('RS>>> ')
                logging.info('RS>>> ')
                logging.info('RS>>> ')
                toby_key = json_data['name'].replace('  ','_').replace(' ', '_').replace('/', '-')
                toby_value = json.dumps(json_data)
                msgs.append((mqtt_topic + 'Inverter/' + toby_key, toby_value, 0, False))

            logging.info('RS>>> DEBUGGING >>>')

            plantData = RS_showPlantDetailAjax_resultJson['result']['plantAllWapper']['plantData']
            logging.debug('plantData %s : ' % json.dumps(plantData))
            for key in plantData:
                logging.debug('plantData key %s : ' % key)
                msgs.append((mqtt_topic + 'Plant/' + key, plantData[key], 0, False))

            # RAOUL - toby stuff

            # RAOUL
            logging.info('RS>>> posting additional')
            msgs.append((mqtt_topic + '_showPlantDetailAjax', json.dumps(RS_showPlantDetailAjax_resultJson), 0, False))

            msgs.append((mqtt_topic + '_devicestate', json.dumps(RS_devicestate_resultJson), 0, False))

            msgs.append((mqtt_topic + '_doPlantList', json.dumps(RS_doPlantList_resultJson), 0, False))

            msgs.append((mqtt_topic + '_goDetailAjax', json.dumps(RS_goDetailAjax_resultJson), 0, False))

            # RAOUL

            publish.multiple(msgs, hostname=mqtt_server, auth=auth_settings)

def main():
    global next_run_yes
    try:
        do_work()
    except Exception as e:
        logging.error('%s : %s' % (type(e).__name__, str(e)))
    next_run_yes = 0	# Using crontab to re-run every 5 minutes

global next_run_yes

# Raoul 2021-06-04
#get_loglevel = os.environ['LOG_LEVEL']
get_loglevel = 'DEBUG'
# Raoul 2021-06-04

loglevel = logging.INFO
if get_loglevel.lower() == "info":
    loglevel = logging.INFO
elif get_loglevel.lower() == "error":
    loglevel = logging.ERROR
elif get_loglevel.lower() == "debug":
    loglevel = logging.DEBUG

logging.basicConfig(level=loglevel, format='%(asctime)s %(levelname)s %(message)s')
logging.info('Started ginlong-solis-scraper')

#schedule.every(4).minutes.at(':00').do(main).run()
#while True:
#    if next_run_yes == 1:
#        next_run = schedule.next_run().strftime('%d/%m/%Y %H:%M:%S')
#        logging.info('Next run is scheduled at %s' % next_run)
#        next_run_yes = 0
#    schedule.run_pending()
#    time.sleep(1)

main()

Hi
Thanks - I will give this a go
Still no progress on getting a solis cloud api key
Stuart
Sent from my iPad

On 24 Jun 2022, at 09:38, RaoulSargent @.***> wrote:

Hi Stuart.
Because Ginlong are moving people to a new portal I am in the process of moving away from pulling the data from the web API and instead pulling directly from the data logger (no internet connection required) - however I saw your comment and thought I would share what I have been using to pull the data via the Ginlong v1 portal ... Hope it helps you.
I have been using the following code for the past year - it polls the Ginlong API that are called by the Ginlong V1 portal web pages. In other words it pretends to be 'you', logging in as 'you' and grabbing the JSON responses and then posts them to a MQTT server so I can process with NodeRed/etc
I have a NodeRed node node that calls this python script on a 5 min interval.
I chose to do this, rather than have the python script loop/repeat so that I can dynamically control the time interval from NodeRed.
If you don't want to run this code, the URL's that you need are contained in the code below.
ginlong_scraper_rs_norepeat.py
Note: I did not write the original code, and I massively apologise to the original author as I have forgotten his name, sorry.
Note: Mentions of 'Raoul', 'Toby' or 'RS' are my own additions/comments ... sorry I have left in the debugging, it should be cleaned up._
#!/usr/bin/python
import requests
import urllib
import json
import datetime
import time
import os
import logging
import schedule
Not all keys are avilable depending on your setup
COLLECTED_DATA = {
'DC_Voltage_PV1': '1a',
'DC_Voltage_PV2': '1b',
'DC_Current1': '1j',
'DC_Current2': '1k',
'AC_Voltage': '1ah',
'AC_Current': '1ak',
'AC_Power': '1ao',
'AC_Frequency': '1ar',
'DC_Power_PV1': '1s',
'DC_Power_PV2': '1t',
'Inverter_Temperature': '1df',
'Daily_Generation': '1bd',
'Monthly_Generation': '1be',
'Annual_Generation': '1bf',
'Total_Generation': '1bc',
'Generation_Last_Month': '1ru',
'Power_Grid_Total_Power': '1bq',
'Total_On_grid_Generation': '1bu',
'Total_Energy_Purchased': '1bv',
'Consumption_Power': '1cj',
'Consumption_Energy': '1cn',
'Daily_Energy_Used': '1co',
'Monthly_Energy_Used': '1cp',
'Annual_Energy_Used': '1cq',
'Battery_Charge_Percent': '1cv'
}
def do_work():
# solis/ginlong portal config
# Raoul 2021-06-04
#username = os.environ['GINLONG_USERNAME']
#password = os.environ['GINLONG_PASSWORD']
#domain = os.environ['GINLONG_DOMAIN']
#lan = os.environ['GINLONG_LANG']
#deviceId = os.environ['GINLONG_DEVICE_ID']

username = 'PUTYOURLOGINHERE'
password = 'PUTYOURPASSWORDHERE'
domain = 'm.ginlong.com'
lan = '2'
#deviceId = 'IDONTUSETHIS'
deviceId = ''   # Leave blank so we get other data as well
# Raoul 2021-06-04

### Output ###

# MQTT
# Raoul 2021-06-04
#mqtt = os.environ['USE_MQTT']
#mqtt_client = os.environ['MQTT_CLIENT_ID']
#mqtt_server = os.environ['MQTT_SERVER']
#mqtt_username = os.environ['MQTT_USERNAME']
#mqtt_password = os.environ['MQTT_PASSWORD']

mqtt = 'true'
mqtt_client = 'SolisPi'
mqtt_server = 'PUTYOURMQTTSERVERIPHERE'
mqtt_username = ''
mqtt_password = ''
# Raoul 2021-06-04

###

if username == "" or password == "":
    logging.error('Username and password are mandatory for Ginlong Solis')
    return

# Create session for requests
session = requests.session()

# building url
url = 'https://' + domain + '/cpro/login/validateLogin.json'
params = {
    "userName": username,
    "password": password,
    "lan": lan,
    "domain": domain,
    "userType": "C"
}

# default heaeders gives a 403, seems releted to the request user agent, so we put curl here
headers = {'User-Agent': 'curl/7.58.0'}

# login call
loginSuccess = False
try:
    resultData = session.post(url, data=params, headers=headers)
    resultJson = resultData.json()
    if resultJson.get('result') and resultJson.get('result').get('isAccept', 0) == 1:
        loginSuccess = True
        logging.info('Login successful for %s' % domain)
    else:
        raise Exception(json.dumps(resultJson))
except Exception as e:
    logging.debug(e)
    logging.error('Login failed for %s' % domain)

if loginSuccess:
    if deviceId == "":
        logging.info('Your deviceId is not set, auto detecting')
        url = 'https://' + domain + '/cpro/epc/plantview/view/doPlantList.json'
        logging.debug('URL: %s' % url)

        cookies = {'language': lan}
        resultData = session.get(url, cookies=cookies, headers=headers)
        resultJson = resultData.json()
        logging.debug('Ginlong plant list: %s' % json.dumps(resultJson))

        RS_doPlantList_resultJson = resultJson
        logging.debug('RS>>> doPlantList: %s' % json.dumps(RS_doPlantList_resultJson))

        plantId = resultJson['result']['pagination']['data'][0]['plantId']
        logging.info('Your plantId is %s' % plantId)

        url = 'https://' + domain + '/cpro/epc/plantDevice/inverterListAjax.json?'
        params = {
            'plantId': int(plantId)
        }
        logging.debug('URL: %s' % url)

        cookies = {'language': lan}
        resultData = session.get(url, params=params, cookies=cookies, headers=headers)
        resultJson = resultData.json()
        logging.debug('Ginlong inverter list: %s' % json.dumps(resultJson))

        # .result.paginationAjax.data
        deviceId = resultJson['result']['paginationAjax']['data'][0]['deviceId']

        logging.info('Your deviceId is %s' % deviceId)

    # get device details
    logging.info('Querying deviceId %s' % deviceId)
    url = 'https://' + domain + '/cpro/device/inverter/goDetailAjax.json'
    params = {
        'deviceId': int(deviceId)
    }

    cookies = {'language': lan}
    resultData = session.get(url, params=params, cookies=cookies, headers=headers)
    resultJson = resultData.json()
    logging.debug('Ginlong device details: %s' % json.dumps(resultJson))

    RS_goDetailAjax_resultJson = resultJson

    # RAOUL ADDITIONAL showPlantDetailAjax
    url = 'https://' + domain + '/cpro/epc/plantDetail/showPlantDetailAjax.json?'
    params = {
        'plantId': int(plantId)
    }
    logging.debug('RS>>> URL: %s' % url)

    cookies = {'language': lan}
    RS_showPlantDetailAjax_resultData = session.get(url, params=params, cookies=cookies, headers=headers)
    RS_showPlantDetailAjax_resultJson = RS_showPlantDetailAjax_resultData.json()

    # RAOUL ADDITIONAL devicestate
    url = 'https://' + domain + '/cpro/epc/plantDetail/devicestate.json?'
    params = {
        'plantId': int(plantId)
    }
    logging.debug('RS>>> URL: %s' % url)

    cookies = {'language': lan}
    RS_devicestate_resultData = session.get(url, params=params, cookies=cookies, headers=headers)
    RS_devicestate_resultJson = RS_devicestate_resultData.json()

    logging.debug('>>>')

    toby_dataJSON = resultJson['result']['deviceWapper']['dataJSON']
    toby_paramDaySelectors = resultJson['result']['deviceWapper']['paramDaySelectors']
    logging.debug('TOBY toby_paramDaySelectors = %s:' % resultJson['result']['deviceWapper']['paramDaySelectors'])
    # RAOUL ADDITIONAL

    # Get values from json
    updateDate = resultJson['result']['deviceWapper'].get('updateDate')
    inverterData = {'updateDate': updateDate}
    for name, code in COLLECTED_DATA.items():
        logging.debug('>>> NAME=%s: CODE=%s' % (name, code))
        inverterData[name] = float(0)
        value = resultJson['result']['deviceWapper']['dataJSON'].get(code)
        logging.debug('>>> VALUE=%s' % value)
        if value is not None:
            inverterData[name] = float(value)

    logging.debug('>>>')

    # Print collected values
    logging.debug('Results from %s:' % deviceId)
    logging.debug('%s' % time.ctime((updateDate) / 1000))
    for key, value in inverterData.items():
        logging.debug('%s: %s' % (key, value))

    # Push to MQTT
    if mqtt.lower() == "true":
        logging.info('MQTT output is enabled, posting results now...')

        import paho.mqtt.publish as publish
        msgs = []

        mqtt_topic = ''.join([mqtt_client, "/"])  # Create the topic base using the client_id and serial number

        if (mqtt_username != "" and mqtt_password != ""):
            auth_settings = {'username': mqtt_username, 'password': mqtt_password}
        else:
            auth_settings = None

        msgs.append((mqtt_topic + "updateDate", int(updateDate), 0, False))
        #for key, value in inverterData.items():
        #    msgs.append((mqtt_topic + 'dkruyt/' + key, value, 0, False))

        # RAOUL - toby stuff
        logging.info('RS>>> DEBUGGING >>>')

        logging.debug('toby_paramDaySelectors=  %s:' % toby_paramDaySelectors)

        logging.info('RS>>> DEBUGGING >>>')

        toby_json = json.loads(toby_paramDaySelectors)
        for json_data in toby_json:
            logging.info('RS>>> ')
            logging.debug('jason_data=  %s: ' % json_data)
            logging.info('RS>>> ')
            logging.debug('Inverter name: %s value: %s' % (json_data['name'], json_data['value']))
            logging.info('RS>>> ')
            logging.info('RS>>> ')
            logging.info('RS>>> ')
            toby_key = json_data['name'].replace('  ','_').replace(' ', '_').replace('/', '-')
            toby_value = json.dumps(json_data)
            msgs.append((mqtt_topic + 'Inverter/' + toby_key, toby_value, 0, False))

        logging.info('RS>>> DEBUGGING >>>')

        plantData = RS_showPlantDetailAjax_resultJson['result']['plantAllWapper']['plantData']
        logging.debug('plantData %s : ' % json.dumps(plantData))
        for key in plantData:
            logging.debug('plantData key %s : ' % key)
            msgs.append((mqtt_topic + 'Plant/' + key, plantData[key], 0, False))

        # RAOUL - toby stuff

        # RAOUL
        logging.info('RS>>> posting additional')
        msgs.append((mqtt_topic + '_showPlantDetailAjax', json.dumps(RS_showPlantDetailAjax_resultJson), 0, False))

        msgs.append((mqtt_topic + '_devicestate', json.dumps(RS_devicestate_resultJson), 0, False))

        msgs.append((mqtt_topic + '_doPlantList', json.dumps(RS_doPlantList_resultJson), 0, False))

        msgs.append((mqtt_topic + '_goDetailAjax', json.dumps(RS_goDetailAjax_resultJson), 0, False))

        # RAOUL

        publish.multiple(msgs, hostname=mqtt_server, auth=auth_settings)

def main():
global next_run_yes
try:
do_work()
except Exception as e:
logging.error('%s : %s' % (type(e).name, str(e)))
next_run_yes = 0	# Using crontab to re-run every 5 minutes
global next_run_yes
Raoul 2021-06-04
#get_loglevel = os.environ['LOG_LEVEL']
get_loglevel = 'DEBUG'
Raoul 2021-06-04
loglevel = logging.INFO
if get_loglevel.lower() == "info":
loglevel = logging.INFO
elif get_loglevel.lower() == "error":
loglevel = logging.ERROR
elif get_loglevel.lower() == "debug":
loglevel = logging.DEBUG
logging.basicConfig(level=loglevel, format='%(asctime)s %(levelname)s %(message)s')
logging.info('Started ginlong-solis-scraper')
#schedule.every(4).minutes.at(':00').do(main).run()
#while True:
if next_run_yes == 1:
next_run = schedule.next_run().strftime('%d/%m/%Y %H:%M:%S')
logging.info('Next run is scheduled at %s' % next_run)
next_run_yes = 0
schedule.run_pending()
time.sleep(1)
main()
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.

Hi
The wifi logger will not accept connections. Instead,  on the logger web interface it is possible to add an additional “user” server. The logger will then make a connection to pysolarmanv5
In addition to replies to data requests the logger will periodically send unsolicited data, and short “keepalive?” Packet.
I had real issues trying to get sensible data and Ginlong refused to provide packet data.
I finally get access to the soliscloud.com API and I am testing https://github.com/hultenvp/solis-sensor https://github.com/hultenvp/solis-sensor
The data into HA appears to be mostly correct but the "Energy dashboard” is giving mostly wrong results, which I am starting to investigate.
Thanks for all your help
Stuart

On 19 Jul 2022, at 10:55, Jonathan McCrohan @.***> wrote:
Hi @drsmarsden https://github.com/drsmarsden,
I'm doing a bit of housekeeping on older issues. Did you ever manage to get pysolarmanv5 working with your ethernet logger?
Regards,
Jon
—
Reply to this email directly, view it on GitHub https://github.com/jmccrohan/pysolarmanv5/issues/7#issuecomment-1188848801, or unsubscribe https://github.com/notifications/unsubscribe-auth/AV53RLUJQFLRY4MNLAODOL3VUZ3RFANCNFSM5XK7JJLQ.
You are receiving this because you were mentioned.

Hi @drsmarsden,
Thanks, that is very helpful to know. Does this provide full Modbus RTU access using pysolarmanv5?
Would you mind documenting the steps for the additional user server and I can add to the documentation (with accreditation of course!).
Regards,
Jon

Closing; Duplicate of #5


[#4310] Re-design initiative config to use V2 app & styles

Deprecates ActorInitiativeConfig in favor of InitiativeConfig which uses ApplicationV2 and the new styles. Also displays the check bonuses for the selected ability to clarify what contributes to initiatve rolls.

A good time to deprecate the Alert and advantage flags perhaps?

A good time to deprecate the Alert and advantage flags perhaps?

Since the roll refactor unblocks min and max we could at least add those to this dialog. I don't think we can deprecate the alert feat flag because of how it behaves differently between the 2014 and 2024 rules.
We could deprecate the initiative advantage flag and use the mode, but I don't think we have all of the architecture in place yet to support mode, do we?

We could deprecate the initiative advantage flag and use the mode, but I don't think we have all of the architecture in place yet to support mode, do we?

Currently only in Concentration saves where it sets the default. (That may have changed in the 4.1 branch, I have not checked.)


fix: Update TypeScript Version in Yeoman Templates to 4.0.7

Fixes #4251
Description

Updates the TypeScript version of the generators for empty, echo, and core bot templates to the earliest supported version, 4.0.7, to resolve the bug.
Specific Changes

Update TS version package.json.ts and package-with-tests.json.ts in core bot template from 3.9.2 to 4.0.7.
Update TS version package.json.ts in echo  bot template from 3.9.2 to 4.0.7.
Update TS version package.json.ts in empty bot template from 3.9.2 to 4.0.7.

Testing

npm install fails on version 3.9.2. Updating the version and rerunning the install results in a success and the bot then runs.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
1 unchanged line in 1 file lost coverage.
Overall coverage increased (+0.003%) to 84.484%

Files with Coverage Reduction
New Missed Lines
%

libraries/botbuilder-lg/src/templateExtensions.ts
1
84.48%

Totals

Change from base Build<PHONE_NUMBER>:
0.003%

Covered Lines:
19903

Relevant Lines:
22311

💛  - Coveralls


fix!: replace darwinModules default with a method

Creating a PR to continue the conversation from https://github.com/srid/nixos-flake/discussions/27.
My findings:
The existence of darwinModules in this flake as well as being defined in our own flakes causes a conflict at best, or a segfault at worst.
Out of the box you will get a segfault. Creating just a stub in flake-module.nix gives:
error: The option `flake.darwinModules' is defined multiple times while it's expected to be unique.

Definition values:
- In `/nix/store/sr93gdr5xg835syipdi25agf7smbi135-source/nixos-flake/flake-module.nix':
   {
     home-manager = { };
   }
- In `/nix/store/hjhx6dxw6jg1bxdj4w5raqr9cflxcjrn-source/nix-darwin':
   {
     default = {
       imports = [
         {
           users = {
   ...
Use `lib.mkForce value` or `lib.mkDefault value` to change the priority on any of these definitions

My conclusion here was that the update to flake-parts changing the way inputs are passed in has affected the behaviour of which objects are referenced and when. Because of this it's no longer possible to define this in two places.
I realise this change I have made is not backwards compatible, though to have this work out of the box with the latest version of flake-parts I think it needs to happen. It could be avoided by changing the darwinModules name outside this flake like my first work around but then you still run into issues with people accidentally having a naming collision.
I figured the simplest thing I could do to make this work would just be to create a method that does what we need up front instead of supplying that value to it later. So that's what is in this PR.
I have only 1 week of experience with nix so far, so realise this PR is not likely up to scratch just yet. I'm happy to work on it with you - or for you to take over if that's what you'd prefer.
I've consumed the fix here and it all appears working for me: https://github.com/squirmy/nixos-config/commit/7ccecbf56a38c192823ef9903ea7ed1002ffc823
I believe that this is the key to fixing: https://github.com/srid/nixos-config/issues/31

Note: I went with #39, because I didn't want to introduce a new function (to learn/use) just to workaround this upstream bug.

I realized that your solution was actually better than mine in some respects, so:  https://github.com/srid/nixos-flake/pull/70


XPath searching on find results is still relative to the original document

If I have a document like so
<response status="success" code="19">
  <result total-count="2" count="2">
    <port>
      <name>ethernet/2.3389</name>
    </port>
    <port>
      <name>ethernet/2.2771</name>
    </port>
  </result>
</response>

And I perform an xpath lookup on it
xmldoc.find('/response/result/port')

Then suppose I do this:
for (let item of xmldoc.find('/response/result/port')) {
  console.log(item.find('/port/name'))
}

Will print "" - i.e. empty array. This is especially confusing and extremely unintuitive if I want to iterate over members regardless of position (using .get('//member')), thinking that I will get members of each child, but instead I get only the first child's members twice because the library searches from the root of the original document:
for (let item of xmldoc.find('/response/result/port')) {
  console.log(item.get('//name').text())
}

Prints
ethernet/2.3389
ethernet/2.3389

Workaround is to do something like this
for (let item of xmldoc.find('/response/result/port')) {
  console.log(libxmljs.parseXmlString(item.toString()).get('//name').text())
}

Or use relative path
for (let item of xmldoc.find('/response/result/port')) {
  console.log(item.get('.//name').text())
}

But that should not be necessary for users of the library. Please fix.

Same issue here. Thanks for posting the workarounds, @megakoresh.

Just found this as I was having the same issue, another thanks for the workarounds @megakoresh

The current behaviour seems appropriate, given that it's XPath: either use a relative path or a dot to select children of the current node.
for (const item of doc.find('/response/result/port')) {
  console.log(item.get('name'))
}

for (const item of doc.find('/response/result')) {
  console.log(item.find('.//name'))
}

I was scratching my head around this problem, unfortunately I was replacing this library with an existing DOM XML parsing library so figuring out this problem wasn't trivial.


Obtain token embeddings

Is there any straightforward way to simply obtain the token embeddings (last hidden state) from the HuggingFace or your repo implementations of mpt-7B? It seems I can only obtain logits for next work predictions

Maybe this:
from llmfoundry.models import MPTModel
model = MPTModel.from_pretrained(base_model_name, trust_remote_code=True, torch_dtype=torch.float16)
model.eval()
input_ids = tokenizer(your_text, max_length=256, return_tensors="pt")
output = model(input_ids=input_ids['input_ids'], output_hidden_states=True, return_dict=True)
token_embeddings = output["last_hidden_state"]

Yes, this recommendation is essentially correct, but I would suggest a slightly different route to leverage the AutoModel stuff:
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM

base_model_name = 'mosaicml/mpt-7b'
your_text = 'what a wonderful day to use llm foundry'
model = AutoModelForCausalLM.from_pretrained(base_model_name, trust_remote_code=True, torch_dtype=torch.bfloat16)
tokenizer = AutoTokenizer.from_pretrained(base_model_name, trust_remote_code=True)
input_ids = tokenizer(your_text, return_tensors="pt")
output = model(input_ids=input_ids['input_ids'], output_hidden_states=True, return_dict=True)
token_embeddings = output["hidden_state"][-1]

Or to use the base MPTModel as described above, replace the last 2 lines with (the result will be the same)
output = model.transformer(input_ids=input_ids['input_ids'], output_hidden_states=True, return_dict=True)
token_embeddings = output["last_hidden_state"]


One test fails to compile due to errorsC2061,C4430, C2338 with latset reversion on boost master branch

Environment:
VS2019+Windows Server 2019
Issue description:
Found \boost\libs\json build errors C3892,C2039  in MSVC, this issue can be reproduced on https://github.com/boostorg/boost/commit/97f075e. Could you please take a look?
Reproduce steps:
1.git clone -c core.autocrlf=true --recursive https://github.com/boostorg/boost.git F:\gitP\boostorg\boost
2.open a VS 2019 x64 command prompt and browse to F:\gitP\boostorg\boost
4..\b2 headers variant=release --build-dir=..\out\amd64rel address-model=64
5..\b2 variant=release --build-dir=..\out\amd64rel address-model=64
6..\b2 -j16 variant=release --build-dir=F:\gitP\boostorg\boost\out\amd64rel libs\json\test address-model=64 2>&1
ErrorMessage:
libs\bimap\test\compile_fail\test_bimap_mutable_1.cpp(36): error C3892: 'cbm': you cannot assign to a variable that is const
libs\bimap\test\compile_fail\test_bimap_mutable_3.cpp(35): error C3892: 'bm': you cannot assign to a variable that is const
libs\bimap\test\compile_fail\test_bimap_mutable_2.cpp(36): error C3892: 'boost::bimaps::container_adaptor::associative_container_adaptor<Base,Iterator,ConstIterator,KeyType,IteratorToBaseConverter,IteratorFromBaseConverter,ValueToBaseConverter,ValueFromBaseConverter,KeyToBaseConverter,boost::mpl::vector1>::find': you cannot assign to a variable that is const
libs\bimap\test\compile_fail\test_bimap_info_2.cpp(35): error C2039: 'info': is not a member of 'boost::bimaps::relation::mutant_relation<TA,TB,Info,false>'
.\boost/bimap/views/map_view.hpp(108): error C2039: 'info': is not a member of 'boost::bimaps::relation::structured_pair<TA,TB,Info,boost::bimaps::relation::normal_layout>'
libs\bimap\test\compile_fail\test_bimap_info_1.cpp(36): error C3892: 'cbm': you cannot assign to a variable that is const
...failed testing.capture-output F:\gitP\boostorg\boost\out\amd64rel\boost\bin.v2\libs\bimap\test\test_bimap_unordered.test\msvc-14.2\release\threading-multi\test_bimap_unordered.run...
log
test.log.16.txt

The failure is in the Bimap tests, not JSON tests.
The compile errors you list are correct; they occur in compile-fail tests. The failure is in another test:
...failed testing.capture-output ..\..\bin.v2\libs\bimap\test\test_bimap_unordered.test\msvc-14.3\debug\threading-multi\test_bimap_unordered.run...

and is probably caused by recent changes to Unordered. I'll transfer the issue there.


Error reading selected elements (n, o, p, s) inside brackets

Reading any string that contains selected elements (except C) inside brackets fails.
Some examples and their respective errors during parsing:

[nH]1cccc1 (Error: Character(1))
[18o]1cccc1 (Error: Character(3))
[pH]1cccc1 (Error: Character(1))
[36s]1cccc1 (Error: Character(3))

By the production rules in the Balsa specification all the above should be correct, nevertheless they all fail to be parsed.
<bracket> ::= "[" <isotope>? <symbol> <parity>? <virtual_hydrogen>? <charge>? "]"
<symbol> ::= <star> | <element> | <selection>
<selection> ::= "c" | "n" | "o" | "p" | "s"

Thanks for catching and fixing this.


How to send command for function and other keys in wc3270

For Function we know Send PF{N} but for below how to do
Function + PGUP
Function + PGDn
Down
UP
Left
Right
Shift + PgUP
Alt
CTRL
ALT + R
where we can get documentation for this

Hi @nirajk1083 You can use the keyword "Execute Command" in the keyword documentation... there exist a link to the x3270 actions wiki page, the "execute command" accept all of the actions.
for example to send UP you need to send this one: https://x3270.miraheze.org/wiki/Up()_action


Cannot find module "algorithms/RSASSA-PKCS1-v1_5"

I'm developing an Angular6+ solid-app (codebase). The app itself depends on:
"crypto-js": "^3.1.9-1",
"rdflib": "^0.19.0",
"solid-auth-client": "^2.2.6",
"stream": "0.0.2",
"webcrypto": "^0.1.1",
"zone.js": "^0.8.26"

What I'm trying to do is deleting a RDF resource using rdflib.UpdateManager.update():
    $rdf.UpdateManager(this.store).update(toBeDeleted, [], (uri, ok, message, response) => {
      if (ok) {
        console.log('DELETED')
      } else {
        console.warn(message)
      }
    })

You can find more the JSDoc about the UpdateManager here and an introduction of rdflib.js here.
Now, using Firefox 63.0b12 (64-bit), I keep getting the following error which I think could be related to the fact that accessing to the WebCrypto API should be restricted to secure origins (which is to say https:// pages). The same error is fired when using Opera.
Unhandled Promise rejection: Cannot find module "../algorithms/RSASSA-PKCS1-v1_5". ; Zone: <root> ; Task: Promise.then ; Value: Error: Cannot find module "../algorithms/RSASSA-PKCS1-v1_5".
at webpackEmptyContext (algorithms sync:2)
at SupportedAlgorithms.normalize (SupportedAlgorithms.js:84)
at SubtleCrypto.importKey (SubtleCrypto.js:279)
at RSASSA_PKCS1_v1_5.importKey (RSASSA-PKCS1-v1_5.js:124)
at Function.importKey (JWA.js:113)
at Function.importKey (JWK.js:46)
at Function.issueFor (PoPToken.js:57)
at webid-oidc.js:183
at fetchWithCredentials (authn-fetch.js:63)
at authn-fetch.js:41 Error: Cannot find module "../algorithms/RSASSA-PKCS1-v1_5".
at webpackEmptyContext (http://localhost:4200/main.js:11:10)
at SupportedAlgorithms.normalize (http://localhost:4200/vendor.js:132732:107)
at SubtleCrypto.importKey (http://localhost:4200/vendor.js:132336:51)
at RSASSA_PKCS1_v1_5.importKey (http://localhost:4200/vendor.js:124747:28)
at Function.importKey (http://localhost:4200/vendor.js:125342:34)
at Function.importKey (http://localhost:4200/vendor.js:125411:18)
at Function.issueFor (http://localhost:4200/vendor.js:127189:18)
at http://localhost:4200/vendor.js:185374:44
at fetchWithCredentials (http://localhost:4200/vendor.js:184423:49)
at http://localhost:4200/vendor.js:184401:16

I've traced back the issue using the debugger ending up at webid-oidc.js:183, and there I stopped because I didn't see anything clearly wrong.
Am I missing a npm dependency? What is the root cause of this issue?

Hi @sentenza. Are you excluding the webcrypto module in your Webpack config? (It and a couple others must be present in the externals: section of the config.

Hi @sentenza. Are you excluding the webcrypto module in your Webpack config? (It and a couple others must be present in the externals: section of the config.

Do you this piece of configuration?

I mean more like this: https://github.com/solid/solid-auth-client/blob/master/webpack/webpack.common.config.js#L23 (I don't think it's equivalent to the section you link to)

Indeed, @dmitrizagidulin has the correct cause. This piece of code shouldn't be executing in the browser. Instead, the browser should be using the browser's built-in crypto instead of @trust/webcrypto. With webpack, this can be achieved by using the config linked to above.


ui: show kubectl config download link on auth page

Some people that are not the admin user need the kubectl config file.
This link is only accessible in the dashboard page.
This patch shows s a link on for anonymous users on the authentication
page.
bsc#1093528
Signed-off-by: Vítor Avelino<EMAIL_ADDRESS>(cherry picked from commit 53124228fc1ad3ab570aa4be353a1fc1f6b1cd8d)

 Bug 1093528 – Velum: provide link to kubectl config download page on the front page

@flavio This needs a force merge along with https://github.com/kubic-project/automation/pull/395


** (double-asterisk) in .yotta_ignore file expressions doesn't work

This seems to be because they aren't supported by pathlib's Path.match.
There's a pull request to fix this, but it seems to be stuck in legal limbo:
https://bitbucket.org/pitrou/pathlib/pull-request/5/fix-several-bugs-with-double-star-in/diff

Now that #263 has landed I don't consider this a problem any more.


DNS: Host your domain - Content Standards

@duongau : Thanks for your contribution! The author(s) have been notified to review your proposed change.


Lets Encrypt certificate outdated use of API

Guessing this should be reported to navcontainerhelper, but i post it here.
Running aka.ms/getbc with the template mcr.microsoft.com/businesscentral/onprem:no
with lets encrypt gives this error.

12:53:42 PM Restarting computer and start Installation tasks
12:53:40 PM Reverting to Self Signed Certificate
}
"status": 403
"detail": "Account creation on ACMEv1 is disabled. Please upgrade your ACME client to a version that supports ACMEv2 / RFC 8555. See https://community.letsencrypt.org/t/end-of-life-plan-for-acmev1/88430 for details.",
"type": "urn:acme:error:unauthorized",

Content: {
Code: Forbidden
+Response from server:
12:53:40 PM Unexpected error
12:53:20 PM Using Lets Encrypt certificate
12:53:20 PM Using Nav Container Helper version <IP_ADDRESS>
12:52:56 PM Installing Latest Nav Container Helper from PowerShell Gallery
12:52:56 PM Downloading C:\DEMO\Install-VS2017Community.ps1

When trying to download symbols, it gives error regarding the ssl certificate. Since the fallback to self-signed ones instead.

Yep, got this one this morning as well - will fix this today/tomorrow

Updated to ACME v2 now (requires NavContainerHelper <IP_ADDRESS>, which is automatically installed with new instances)


Filtering sensitive data

Would you be open to a basic, non-full-featured, implementation of Filter Sensitive Data?
I can't promise any timeline or that I'd do it at all, but I want to check with you before working on it.
Thanks!

Yes, absolutely, that would be much appreciated!
The approach we're currently using internally, is to put VCR files into encrypted cloud storage, and downloading them before running tests into gitignored location, so then auth secrets are never revealed in git history.
But, of course that approach is not ideal, and something close to original upstream feature would be very helpful.

Thank you for contribution @niclas-ahden ! I had added integration tests for the data filtering feature in PR https://github.com/ChorusOne/rvcr/pull/12, your review/comments are very welcome.


Documentation: Security

Description
Software security is a critical aspect of software development that aims to protect applications, systems, and data from various security threats and vulnerabilities. Implementing robust software security measures is essential to prevent security breaches, data leaks, and other cyberattacks. Here are some software security best practices to follow:
Attributes
Software security attributes, also known as security properties or characteristics, are critical aspects of a software system that help protect it from various types of security threats and vulnerabilities.

Attribute
Description

Secure Coding Practices
- Follow secure coding guidelines and best practices relevant to your programming language and framework.  - Use strong authentication and authorization mechanisms to control access to sensitive functions and data.  - Validate and sanitize all user inputs to prevent common vulnerabilities like SQL injection and cross-site scripting (XSS)

Regular Code Reviews
- Conduct regular code reviews to identify and address security issues early in the development process.  - Consider using automated code analysis tools to detect vulnerabilities and coding errors.

Secure Data Handling
- Encrypt sensitive data both in transit and at rest using strong encryption algorithms and protocols.  - Implement proper access controls to ensure that data is only accessible to authorized users.

Authentication and Authorization
- Use strong authentication mechanisms, such as multi-factor authentication (MFA), where appropriate.  - Implement role-based access control (RBAC) to enforce proper authorization levels.

Secure Configuration
- Securely configure servers, databases, and other components to minimize security risks.  - Remove unnecessary services, features, and default accounts.

Input Validation
- Implement strict input validation to reject malicious inputs and limit the impact of potential attacks.  - Use parameterized queries or prepared statements to prevent SQL injection.

Error Handling
- Implement proper error handling to prevent the disclosure of sensitive information to attackers.  - Provide user-friendly error messages without revealing implementation details.

Session Management
- Use secure session management techniques to protect user sessions and prevent session hijacking.  - Use session timeouts and regenerate session identifiers after login.

Cross-Site Scripting (XSS) Prevention
- Sanitize and validate user-generated content to prevent XSS attacks.  - Implement security headers like Content Security Policy (CSP) to mitigate XSS risks.

Security Testing
- Perform regular security testing, including penetration testing and vulnerability scanning.  - Conduct security assessments throughout the development lifecycle, not just before deployment.

Security Updates and Patch Management
- Keep all software components and dependencies up to date with security patches.  - Establish a process for monitoring and applying security updates.

Security Awareness Training
- Train development and operational teams in security best practices.  - Create a security-conscious culture within the organization.

Incident Response Plan
- Develop an incident response plan to address security incidents promptly and effectively.  - Conduct tabletop exercises to test the plan's effectiveness.

Secure Deployment
- Use secure deployment practices, such as containerization, to isolate and protect applications.  - Implement proper network segmentation to limit lateral movement in case of a breach.

Monitoring and Logging
- Implement robust logging and monitoring solutions to detect and respond to security incidents.  - Use security information and event management (SIEM) systems where applicable.

Third-Party Component Security:
- Assess the security of third-party libraries and components used in your software.   - Monitor for vulnerabilities and update dependencies as needed.

Compliance and Regulations
- Ensure that your software complies with relevant industry-specific regulations (e.g., GDPR, HIPAA) and standards (e.g., OWASP Top Ten).

Security Documentation
- Maintain comprehensive documentation of security-related aspects of your software, including architecture diagrams, threat models, and security policies.

Security Training for Users
- Educate end-users about security best practices, such as strong password management and safe browsing habits.

Remember that security is an ongoing process, and the threat landscape is continually evolving. Therefore, it's essential to stay informed about emerging threats and update your security practices accordingly. Collaboration between development, operations, and security teams is key to achieving a robust and resilient software security posture.

@wycliffepeart  :bulb: Tip: I need to read up on some of these.


Update link: data.md

https://github.com/osome-iu/top-FIBers/blob/baca20c0f0066a2ef57738a3e4f037abdd3577a2/docs/data.md?plain=1#LL36C17-L36C17
This references Matt's old repository.
Please update with a link for this repository and update the last updated date in the yaml.

Done!


NIFI-13267 - Bump NiFi NAR Maven plugin version

Summary
NIFI-13267 - Bump NiFi NAR Maven plugin version
Tracking
Please complete the following tracking steps prior to pull request creation.
Issue Tracking

[ ] Apache NiFi Jira issue created

Pull Request Tracking

[ ] Pull Request title starts with Apache NiFi Jira issue number, such as NIFI-00000
[ ] Pull Request commit message starts with Apache NiFi Jira issue number, as such NIFI-00000

Pull Request Formatting

[ ] Pull Request based on current revision of the main branch
[ ] Pull Request refers to a feature branch with one commit containing changes

Verification
Please indicate the verification steps performed prior to pull request creation.
Build

[ ] Build completed using mvn clean install -P contrib-check

[ ] JDK 21

UI Contributions

[ ] NiFi is modernizing its UI. Any contributions that update the current UI also need to be implemented in the new UI.

Licensing

[ ] New dependencies are compatible with the Apache License 2.0 according to the License Policy
[ ] New dependencies are documented in applicable LICENSE and NOTICE files

Documentation

[ ] Documentation formatting appears as expected in rendered files

Thanks @bbende for switching the status of this PR. This is ready for review / merge from my PoV.


Create composer.json file in repository

This repo doesn't have a composer.json file, so it can't be directly installed via composer without adding a custom package definition on the "repositories" of a top-level composer.json file.
On the other hand, the instructions in this repository to install via composer actually ends up installing the base repository which does not have any PHP code in it.
It seems like the composer.json from the base repo actually belongs in this repo, with an updated autoload path?

I opened a pull request to the develop branch with a composer.json file added.


[15/10/2022]: Backend API [feat] - users db model

Summary
Added database schema models for users and admins including their passwords
Fixes #30
List of changes proposed in this PR (pull-request)

Add schema models for end users and admins
Add password models for admin and end users

What should a reviewer concentrate their feedback on?

[x] Everything looks ok?

@BatoolMM  @alswajiab please review and merge

Done!


Pin kurtosis module versions

Kurtosis supports pinning versions which is great for the stability of our local development environment. This commit pins our dependencies to v2.0.0 of the kurtosis-tech/eth-network-package.
Resolves #1

This is running fine. Merging...


check if the accessToken

Good morning,
I would like to know if the package offers any function when pressing the call button.
check if the accessToken is expired?
in the function below how do I pass my new changed token?
I tried to pass it as a parameter but it doesn't accept.
String newTokenChange = apinewToken;
 TwilioVoice.instance.setOnDeviceTokenChanged((newTokenChange) {
  print("voip-device token changed");
});

@cybex-dev any solution  for me help ?

You must log the time you obtained the token and do the calculation to know if it has expired.
For the example you mention, you can use the same funciton you used at startup to get your token from the backend and register it.

As I pass my new changed token to this function, I find I can't pass it as a parameter. how does it work and how does it expect

As I pass my new changed token to this function, I find I can't pass it as a parameter. how does it work and how does it expect

See this from the example provided.
https://github.com/diegogarciar/twilio_voice/blob/master/example/lib/main.dart#L42

@VictorPadovan1997 did the documentation & example provide a solution?

@cybex-dev you can forward me your e-mail to ask a question

@VictorPadovan1997 please ask here as it may help others

Conforme passo meu novo token alterado para esta função, descubro que não posso passá-lo como um parâmetro. como funciona e como espera

Veja isso no exemplo fornecido.
https://github.com/diegogarciar/twilio_voice/blob/master/example/lib/main.dart#L42

then.
I didn't bring a solution because I still don't understand how I pass the token as a parameter and activate the function.

@VictorPadovan1997 did the documentation & example provide a solution?
@cybex-dev
now that I've updated to the updates it got in the package.
I'm managing to pass my token as a parameter, but it never enters the print() function.

 if (updateToken != currentToken) {
    TwilioVoice.instance.setOnDeviceTokenChanged((updateToken) {
      print("voip-device token changed");
      print("token Update is : $updateToken");
    });
}

@VictorPadovan1997 did the documentation & example provide a solution?
@cybex-dev
now that I've updated to the updates it got in the package.
I'm managing to pass my token as a parameter, but it never enters the print() function and register().

 if (updateToken != currentToken) {
    TwilioVoice.instance.setOnDeviceTokenChanged((updateToken) {
      print("voip-device token changed");
      print("token Update is : $updateToken");
       register(userId);
    });
}

so passing only as a parameter and not print them like this: TwilioVoice.instance.setOnDeviceTokenChanged((updateToken));
returns this: _TypeError (type 'String' is not a subtype of type '(String) => dynamic')

The reason is setOnDeviceTokenChanged requires a function pointer or consumer named OnDeviceTokenChanged
See implementation [here](https://github.com/diegogarciar/twilio_voice/blob/master/lib/twilio_voice.dart#L38)
  OnDeviceTokenChanged? deviceTokenChanged;
  void setOnDeviceTokenChanged(OnDeviceTokenChanged deviceTokenChanged) {
    deviceTokenChanged = deviceTokenChanged;
  }

where the function OnDeviceTokenChanged is defined as
typedef OnDeviceTokenChanged = Function(String token);

i.e. a void function that requires a single String parameter (a consumer).
For your example, you need to do something like
OnDeviceTokenChanged updateToken = (String token) {
    print("Token changed to ${token}");
};
TwilioVoice.instance.setOnDeviceTokenChanged(updateToken);

I just couldn't understand here how I pass my Changed token inside this function you passed.
because in the function it is a String token as a parameter but if I pass my token as a parameter the updateToken returns null.
this is my function and the updated token is coming as a parameter in this function as tokenChanged
registerAndUpdateToken(String tokenChanged) {
  OnDeviceTokenChanged updateToken = (String token) {
    print(token);
  };
  TwilioVoice.instance.setOnDeviceTokenChanged(updateToken);
}

@VictorPadovan1997 I'm certain you've resolved this issue by now, however I'll be answering it for the record.
The onDeviceTokenChanged only applies to the iOS implementation (see SwiftTwilioVoicePlugin.swift#L349 and SwiftTwilioVoicePlugin.swift#L578 as reference).
This onDeviceTokenChanged event is triggered when the iOS device receives a new Push Token from the APNS which is then used by Twilio to register for push notifications.


Meeting 18-03-2019

18th March meeting
Agenda

nginx progress (air dropped in by Dan)
haproxy de-poise
haproxy centos 6 fix https://github.com/sous-chefs/haproxy/pull/357
Mariadb PR https://github.com/sous-chefs/mariadb/pull/234

Can we add this pr to the meeting please?
https://github.com/sous-chefs/mariadb/pull/234

Notes

nginx

we're redesigning this cookbook to be resource driven - open tickets with more to come https://github.com/sous-chefs/nginx/issues
reviewed and merged several PRs during the meeting

https://github.com/sous-chefs/nginx/pull/473
https://github.com/sous-chefs/nginx/pull/475
https://github.com/sous-chefs/nginx/pull/480
https://github.com/sous-chefs/nginx/pull/481

haproxy

poise - Jason, John & Dan plan to grab time and finish this

mariadb - PR received reviews


[Enhancement] Support compact thrift protocol (backport #29888)

Fixes #issue
What type of PR is this:

[ ] BugFix
[ ] Feature
[x] Enhancement
[ ] Refactor
[ ] UT
[ ] Doc
[ ] Tool

Does this PR entail a change in behavior?

[ ] Yes, this PR will result in a change in behavior.
[ ] No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

[ ] Interface/UI changes: syntax, type conversion, expression evaluation, display information
[ ] Parameter changes: default values, similar parameters but with different default values
[ ] Policy changes: use new policy to replace old one, functionality automatically enabled
[ ] Feature removed
[ ] Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

[x] I have added test cases for my bug fix or my new feature
[ ] This pr needs user documentation (for new or modified features or behaviors)

[ ] I have added documentation for my new feature or new function

Bugfix cherry-pick branch check:

[x] I have checked the version labels which the pr will be auto-backported to the target branch

[ ] 3.1
[ ] 3.0
[ ] 2.5
[ ] 2.4

[FE Incremental Coverage Report]
:heart_eyes: pass : 19 / 22 (86.36%)
file detail

path
covered_line
new_line
coverage
not_covered_line_detail

:large_blue_circle:
com/starrocks/rpc/AttachmentRequest.java
5
8
62.50%
[38, 40, 50]

:large_blue_circle:
com/starrocks/qe/SessionVariable.java
2
2
100.00%
[]

:large_blue_circle:
com/starrocks/rpc/PExecPlanFragmentRequest.java
2
2
100.00%
[]

:large_blue_circle:
com/starrocks/rpc/PExecBatchPlanFragmentsRequest.java
2
2
100.00%
[]

:large_blue_circle:
com/starrocks/qe/Coordinator.java
4
4
100.00%
[]

:large_blue_circle:
com/starrocks/rpc/BackendServiceClient.java
4
4
100.00%
[]

[BE Incremental Coverage Report]
:disappointed: fail : 0 / 1 (00.00%)
file detail

path
covered_line
new_line
coverage
not_covered_line_detail

:large_blue_circle:
src/service/internal_service.cpp
0
1
00.00%
[422]


Add tabindex attribute for trix_editor_tag

I have added tabindex attribute for trix_editor_tag.
I found it quite useful for a project that I am currently working on and maybe this would be helpful for others as well. This is helpful when trix editor field is not the first on the page (e.g. there is a title, tags or categories fields above) and a user wants to tab from the above fields to trix editor field. Without tabindex, tab goes through all the editor icons first which is not very user-friendly.
With this change trix_editor accepts tagindex attribute similarly as other attributes, e.g. tabindex: 1
Please let me know what you think.

@maclover7 would you be able to have a look at this PR when you have some time and let me know if it makes sense? thanks :)

Thanks @marcindrozd — I was just trying to figure out how to do this as well! +1 if this was merged 😁

@marcindrozd thanks, I would also love to see this one merged.

Any updates or feedback on this one, I don't see what is wrong with this pull, really looking forward seeing this merged

@maclover7 I have done the requested changes, but now build is failing (looks like Rubocop fails). Everything seems to be working locally. I also tried updating to the newest master, but no luck.

@marcindrozd Can you please rebase your PR? Thanks!

@maclover7 done :)

@marcindrozd Can you please add some test coverage for this new behavior? Thanks!

@maclover7 sorry for that. I have added some specs to test all the whitelisted html options (including tabindex) + a simple spec to make sure that it does not allow some random strings.

@marcindrozd Awesome work! Can you squash this down to one commit, then I'll merge in? Thanks!

@maclover7 squashed. Thanks!

@marcindrozd Can you take a look at the merge conflict? Thanks!


Not working with iPhone > 6.

The log returns this at line 27:
The relevant UICollectionViewFlowLayout instance is <FullyHorizontalFlowLayout: 0x7f827acdcbc0>, and it is attached to <UICollectionView: 0x7f827b08c000; frame = (0 0; 414 93); clipsToBounds = YES; gestureRecognizers = <NSArray: 0x7f827acc9130>; layer = <CALayer: 0x7f827acc86a0>; contentOffset: {0, 0}; contentSize: {0, 93}> collection view layout: <FullyHorizontalFlowLayout: 0x7f827acdcbc0>.

This solved my problem. I don't know why but (int)(self.collectionView.frame.size.height / self.itemSize.height) returns zero.


EvaluationWrapperTest.FormulaTest failure

I'm using CRAN R 3.3.0
Test Name:	EvaluationWrapperTest.FormulaTest
Test FullName:	Microsoft.VisualStudio.R.Package.Test.DataInspect.EvaluationWrapperTest.FormulaTest
Test Source:	C:\Projects\huguesv\RTVS\src\Package\Test\DataInspect\EvaluationWrapperTest.cs : line 87
Test Outcome:	Failed
Test Duration:	0:00:03.623

Result StackTrace:
at FluentAssertions.Execution.XUnit2TestFramework.Throw(String message) in C:\projects\fluentassertions-vf06b\Src\FluentAssertions.Net45\Execution\XUnit2TestFramework.cs:line 35
   at FluentAssertions.Execution.TestFrameworkProvider.Throw(String message) in C:\projects\fluentassertions-vf06b\Src\FluentAssertions.Net40\Execution\TestFrameworkProvider.cs:line 42
   at FluentAssertions.Execution.CollectingAssertionStrategy.ThrowIfAny(IDictionary`2 context) in C:\projects\fluentassertions-vf06b\Src\Core\Execution\CollectingAssertionStrategy.cs:line 50
   at FluentAssertions.Execution.AssertionScope.Dispose() in C:\projects\fluentassertions-vf06b\Src\Core\Execution\AssertionScope.cs:line 252
   at FluentAssertions.Equivalency.EquivalencyValidator.AssertEquality(EquivalencyValidationContext context) in C:\projects\fluentassertions-vf06b\Src\Core\Equivalency\EquivalencyValidator.cs:line 37
   at FluentAssertions.AssertionExtensions.ShouldBeEquivalentTo[T](T subject, Object expectation, Func`2 config, String because, Object[] becauseArgs) in C:\projects\fluentassertions-vf06b\Src\Shared\AssertionExtensions.cs:line 687
   at Microsoft.VisualStudio.R.Package.Test.DataInspect.VariableRHostScript.AssertEvaluationWrapper(IRSessionDataObject rdo, VariableExpectation expectation) in C:\Projects\huguesv\RTVS\src\Package\Test\DataInspect\VariableRHostScript.cs:line 75
   at Microsoft.VisualStudio.R.Package.Test.DataInspect.VariableRHostScript.<EvaluateAndAssert>d__6.MoveNext() in C:\Projects\huguesv\RTVS\src\Package\Test\DataInspect\VariableRHostScript.cs:line 68
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at Microsoft.VisualStudio.R.Package.Test.DataInspect.EvaluationWrapperTest.<RunTest>d__29.MoveNext() in C:\Projects\huguesv\RTVS\src\Package\Test\DataInspect\EvaluationWrapperTest.cs:line 574
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
Result Message:
Expected member Value to be
"Class 'formula' length 3 y ~ x1 * x2" with a length of 36, but
"Class 'formula'  language y ~ x1 * x2" has a length of 37.
Expected member Value to be
"Class 'formula' length 3 y ~ x1 * x2", but
"Class 'formula'  language y ~ x1 * x2" differs near " la" (index 16).

With configuration:
- Use declared types and members
- Compare enums by value
- Try to match member by name
- Be strict about the order of items in byte arrays

3.2 makes
Class 'formula' length 3 y ~ x1 * x2
3.3+ yields
Class 'formula'  language y ~ x1 * x2

I'll change it to conditionally validate against proper string based on the version of R.


New Purchase Job Price list screen, costs are not picking in the purchase lines.

Purchase Job Price List, with Job JOB00020, Item 1908-S, Min Qty 3, Price 45 and Discount 10%.

Created the purchase invoice with Vendor 20000, Job JOB00020, Item 1908-S, Min Qty 3, Price 45 and Discount 10% but it didn't picked the cost 45 from the new purchase job price list, it is still updating from the item card.

Expected result: It should pick unit cost 45 instead from the item card. Please let me know if I am doing something wrong or let me know how it works and I don't see the in the MSDN documentation links.
https://docs.microsoft.com/en-GB/dynamics365/business-central/purchasing-how-record-purchase-price-discount-payment-agreements?tabs=current-experience
https://docs.microsoft.com/en-gb/dynamics365-release-plan/2020wave2/smb/dynamics365-business-central/use-new-sales-pricing-experience-
https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-extending-best-price-calculations#examples-of-extended-price-calculations

This repo is for issues with the core language or compiler, not the application. It sounds like you first want to post on a user forum like Yammer or Mibuso, and if confirmed as as bug then log it via partner support.


Port to go

Controller has evolved from:

initial kotlin & fabric8 client in java
moved to graal-native image to achieve low footprint and small image, but all the quarkus fuzz and the insane build-time is awful

hence port it to go

done


[CSL-1780] Extract block package

This PR introduces a new package called cardano-sl-block, based mostly on Pos.Block.* modules. Summary of accompanying changes:

Moved modules:

Pos.Arbitrary.Block
Pos.Binary.Block.Types
Pos.Block.*
Pos.DB.Block[.*]
Pos.GState.BlockExtra
Pos.Lrc[.*]
Pos.Util.JsonLog

New module: Pos.Block.Configuration. I moved ccNetworkDiameter and ccRecoveryHeadersMessage from NodeConfiguration there because many functions in Pos.Block depend on them. I also patched configuration.yaml.
New module: Pos.Block.WorkMode. It contains BlockWorkMode, which is a subset of constraints from Pos.WorkMode.Class. Furthermore, it contains a number of constraints for instances which are unavailable in cardano-sl-block, specifically, the ones from Pos.Binary.Communication, Pos.Communication.Message and Pos.Communication.Limits.
New module: Pos.GState.SanityCheck. It exports sanityCheckDB which was moved from Pos.DB.DB.
New module: Pos.Lrc.Genesis. It has genesisLeaders which had previously been in Pos.Context.Functions.
[Monad]LastKnownHeader[Tag], [Monad]ProgressHeader[Tag] and [Monad]RecoveryHeader[Tag] were moved from Pos.Context.Context to Pos.Block.Types. I'm not sure that this is the best place to put them; please suggest otherwise if you have any better ideas.
Pos.Ssc.Util is deleted and its contents (toSscBlock) are moved into Pos.Block.Logic.Internal.

There is an issue in wallet-new/src/Cardano/Wallet/Orphans/Aeson.hs: it defines instance {From,To}JSON Coin, which is already defined in Pos.Aeson.Core. That wasn't a problem before as those instances had not been available to Cardano.Wallet.Orphans.Aeson, but now they have leaked through. I've commented out the lines defining the instances in Cardano.Wallet.Orphans.Aeson, but I believe we shouldn't merge commented-out code, and we'll have to find some solution instead.

Before everything else:

Fix build scripts (./b).
Run weeder on the project (please) and ensure you didn't introduce needless dependencies.

weeder reports that cardano-sl-block does not introduce any new weeds:
= Package cardano-sl-block =
No warnings

However, there are a lot of warnings regarding other projects. I've uploaded the full report here.

This PR introduces a new module called cardano-sl-block

It's called package, not module.

Btw,
[ 3 of 18] Cardano.Wallet.Orphans.Aeson

/home/gromak/Work/cardano-sl/wallet-new/src/Cardano/Wallet/Orphans/Aeson.hs:16:1: warning: [-Wunused-imports]
    The qualified import of ‘Pos.Core.Types’ is redundant
      except perhaps to import instances from ‘Pos.Core.Types’
    To import instances alone, use: import Pos.Core.Types()

@adinapoli-iohk here is a slightly cleaned-up and reformatted instance that is generated by deriveJSON defaultOptions ''Core.Coin:
instance ToJSON Coin where
    toJSON =
        \value_0 ->
            case value_0 of
                Coin arg1_1 ->
                    Data.Aeson.Types.Internal.object
                        [ Data.Aeson.TH.keyValuePairWith
                              toJSON
                              (Data.Text.pack "getCoin")
                              arg1_1
                        ]
    toEncoding =
        \value_2 ->
            case value_2 of
                Coin arg1_3 ->
                    Data.Aeson.Encoding.Internal.wrapObject
                        (Data.Aeson.Encoding.Internal.econcat
                             (Data.OldList.intersperse
                                  Data.Aeson.Encoding.Internal.comma
                                  [ Data.Aeson.Encoding.Internal.text
                                        (Data.Text.pack "getCoin") Data.Aeson.Encoding.Internal.><
                                    (Data.Aeson.Encoding.Internal.colon Data.Aeson.Encoding.Internal.><
                                     toEncoding arg1_3)
                                  ]))

instance FromJSON Coin where
    parseJSON =
        \value_4 ->
            case value_4 of
                Data.Aeson.Types.Internal.Object recObj_5 ->
                    Coin Data.Functor.<$>
                    Data.Aeson.TH.lookupField
                        parseJSON
                        "Coin"
                        "Coin"
                        recObj_5
                        (Data.Text.pack "getCoin")
                other_6 ->
                    Data.Aeson.TH.parseTypeMismatch'
                        "Coin"
                        "Coin"
                        "Object"
                        (Data.Aeson.TH.valueConName other_6)

Basically, this means that Coin {getCoin = 0} will be encoded as {"getCoin": 0.0}. However, the instance in Pos.Aeson.Core works in such way that Coin is encoded identically to Word64, that is, Coin {getCoin = 0} becomes 0.0.
I believe wallet-new must not use instances that differ from the ones in Core. Is the removal of the current instance from wallet-new going to break anything?

I believe wallet-new must not use instances that differ from the ones in Core. Is the removal of the current instance from wallet-new going to break anything?

@Pastafarianist Unfortunately it's not that simple. We want to offer a nice and clean API to exchanges and users, so we cannot reuse most instances from Core as-they-are, but we usually need to:

Write our own (orphaned) instances so we can expose a nicer API;

Write newtypes to completely customise the API at our own will in a safe way.

Is easier because 2. comes with the newtype wrapper overhead, but it's an acceptable tradeoff as that impact just the programmers and not the end users.

In general, be advised that the current version of the wallet uses a bunch of Core instances directly anyway (SoftwareUpdate is an example) so such changes will always break backward compatibility.
In general I don't think it's a good design for the middleware to depend directly from the Core instances, because it doesn't give us any protection against breaking changes.
As far as this PR goes, if there is no other way to have the orphans defined in wallet-new without clashes, I will be forced to go with option 2. 😉

Are you sure that deriveJSON defaultOptions ''Core.Coin is nicer and cleaner than the one defined in Core? The former exposes the implementation details (specifically, the name of the getCoin constructor), while the latter produces just a number.

Are you sure that deriveJSON defaultOptions ''Core.Coin is nicer or cleaner than the one defined in Core? The former exposes the implementation details (specifically, the name of the getCoin constructor), while the latter produces just a number.

Oh, don't get me wrong: in this case the latter is exactly what we need, Core.Coin should really be just an alias for a number. I was thinking more about the general case 😉

In the general case we'll probably have to go with newtype wrappers since the instances from Core are likely to leak anyway.
If this issue is resolved, can you approve the PR?


Table transformer enabling

What does this PR do?
This PR enables the table transformer detection model with one minor modification in the conv encoder module related to an indexing bug for certain tensors on the HPU.
Before submitting

[x] Did you make sure to update the documentation with your changes?
[x] Did you write any new necessary tests?

Performance benchmark setup:

Single example image batch x 5000 sequentially
Performance in average time (s) / batch

Performance (s)
A100
Gaudi2

BF16
0.06542
0.00210

FP32
0.06465
0.00222

@regisss
I think this PR is ready for your review. Thanks.

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.


add user invite audit logs and markpart client update

Description
add user invite audit logs and markpart client update
References

#0000

Codecov Report

Merging #1460 (f48d9ac) into main (e451de2) will increase coverage by 19.18%.
The diff coverage is 0.00%.

@@             Coverage Diff             @@
##             main    #1460       +/-   ##
===========================================
+ Coverage   47.48%   66.66%   +19.18%
===========================================
  Files          35       50       +15
  Lines         497      873      +376
  Branches       32        0       -32
===========================================
+ Hits          236      582      +346
- Misses        251      276       +25
- Partials       10       15        +5

Impacted Files
Coverage Δ

...trollers/MarketParticipant/Dto/UserAuditLogsDto.cs
0.00% <0.00%> (ø)

...ers/MarketParticipant/Dto/UserInviteAuditLogDto.cs
0.00% <0.00%> (ø)

...Api/Controllers/MarketParticipantUserController.cs
0.00% <0.00%> (ø)

...taHub.WebApi/Controllers/Wholesale/Dto/BatchDto.cs
0.00% <0.00%> (-100.00%)
:arrow_down:

...trollers/MarketParticipant/Dto/FilteredActorDto.cs
16.66% <0.00%> (-83.34%)
:arrow_down:

...gistration/HealthEndpointRegistrationExtensions.cs
45.45% <0.00%> (-36.37%)
:arrow_down:

...WebApi/RequireNonNullablePropertiesSchemaFilter.cs
80.00% <0.00%> (-8.00%)
:arrow_down:

apps/dh/api-dh/source/DataHub.WebApi/Startup.cs
94.25% <0.00%> (-1.15%)
:arrow_down:

...rce/DataHub.WebApi.Tests/Fixtures/WebApiFixture.cs
92.30% <0.00%> (ø)

...ce/DataHub.WebApi.Tests/Fixtures/WebApiTestBase.cs
100.00% <0.00%> (ø)

... and 13 more

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


Ability to present different initial screen/message.

Since our current app uses two different states - customer & supplier. We'd like to be able to present two different feedback routes. As a customer the initial feedback screen is acknowledgment of their completed order. However as a Supplier we'd like to present a message thanking them for providing service...

I've modified the Feedback storyboard & am using it as follows:
UIStoryboard * feedbackStoryboard = [UIStoryboard storyboardWithName:@"UserFeedback"
                                                              bundle:[NSBundle mainBundle]];
UIViewController * vc = [feedbackStoryboard instantiateInitialViewController];
[vc.view autoSetDimension:ALDimensionWidth toSize:280.0];

GFPopup * popup = [GFPopup popupWithContentView:vc.view];
[popup setRootViewController:vc];
[popup show];

For now I could create two different storyboards & instantiate the one I'd like to use...