profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/bgbraga/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Bruno Braga bgbraga Hotmart Belo Horizonte / MG / Brazil https://www.linkedin.com/in/bgbraga Hotmart Technology Manager

ibmtjbot/tjbot 452

IBM TJBot

ibmtjbot/tjbotlib 28

Node.js library that abstracts basic functions for TJBot.

bgbraga/homeassistant-apsystems 1

An APsystems Sensor for Home Assistant

bgbraga/javaee7-angular 0

Java EE 7 with Angular

bgbraga/matrix 0

#matrix is the online open-source workplace inspired in sococo.com for distributed teams to have the experience of work together each day, side-by-side. No matter where team members might be. Working in an online workplace is even more productive when people feeling in the same space.

bgbraga/sensor.fronius 0

A Fronius Sensor for Home Assistant

bgbraga/tjbotlib 0

Node.js library that abstracts basic functions for TJBot.

issue openedbgbraga/homeassistant-apsystems

Component Not Starting - Errorcode 500 on Data Pull

Hi there,

During the init of HomeAssistant there seems to be an error thrown (HTTP 500).

2021-06-06 10:02:40 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.apsystems
2021-06-06 10:02:41 DEBUG (MainThread) [custom_components.apsystems.sensor] Sensor is running. Start/Stop time: 2021-06-06 05:14:31.516857-07:00, 2021-06-06 21:23:23.045027-07:00
2021-06-06 10:02:41 DEBUG (MainThread) [custom_components.apsystems.sensor] Sensor is running. Start/Stop time: 2021-06-06 05:14:31.516857-07:00, 2021-06-06 21:23:23.045027-07:00
2021-06-06 10:02:41 DEBUG (MainThread) [custom_components.apsystems.sensor] Sensor is running. Start/Stop time: 2021-06-06 05:14:31.516857-07:00, 2021-06-06 21:23:23.045027-07:00
2021-06-06 10:02:41 DEBUG (MainThread) [custom_components.apsystems.sensor] Sensor is running. Start/Stop time: 2021-06-06 05:14:31.516857-07:00, 2021-06-06 21:23:23.045027-07:00
2021-06-06 10:02:41 DEBUG (MainThread) [custom_components.apsystems.sensor] Sensor is running. Start/Stop time: 2021-06-06 05:14:31.516857-07:00, 2021-06-06 21:23:23.045027-07:00
2021-06-06 10:02:42 DEBUG (MainThread) [custom_components.apsystems.sensor] status code login: 200
2021-06-06 10:02:42 DEBUG (MainThread) [custom_components.apsystems.sensor] post_data:
2021-06-06 10:02:42 DEBUG (MainThread) [custom_components.apsystems.sensor] {'queryDate': '20210606', 'selectedValue': 'XXXX', 'systemId': 'XXXXX'}
2021-06-06 10:02:42 DEBUG (MainThread) [custom_components.apsystems.sensor] starting: 2021-06-06 10:02:42
2021-06-06 10:02:42 DEBUG (MainThread) [custom_components.apsystems.sensor] status code data: 500
2021-06-06 10:02:42 DEBUG (MainThread) [custom_components.apsystems.sensor] <Response [500]>
2021-06-06 10:02:42 ERROR (MainThread) [homeassistant.components.sensor] apsystems: Error on device update!
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 432, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 550, in async_device_update
await task
File "/config/custom_components/apsystems/sensor.py", line 143, in async_update
ap_data = await self._fetcher.data()
File "/config/custom_components/apsystems/sensor.py", line 249, in data
await self.run()
File "/config/custom_components/apsystems/sensor.py", line 238, in run
self.cache = result_data.json()
File "/usr/local/lib/python3.8/site-packages/requests/models.py", line 900, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/local/lib/python3.8/site-packages/simplejson/__init__.py", line 525, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.8/site-packages/simplejson/decoder.py", line 370, in decode
obj, end = self.raw_decode(s)
File "/usr/local/lib/python3.8/site-packages/simplejson/decoder.py", line 400, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

created time in 8 days

issue commentbgbraga/homeassistant-apsystems

all sensors show unavailable

Take a look at line 208. The ECU-ID variable is fixed and not applicable for others. It should be made variable for generic usage.

I changed that value, but still sensors showing unavailable!!!

Oliv3rDog

comment created time in a month

issue commentbgbraga/homeassistant-apsystems

all sensors show unavailable

Enclosed in single or double quotes, it doesn't matter. In both cases the variable gets assigned as type str.

Oliv3rDog

comment created time in a month

issue commentbgbraga/homeassistant-apsystems

all sensors show unavailable

OK, I see. I will change that value to match my ecu. Thanks!!!

Could you tell me if these data need "" or ' ' or nothing?

  • platform: apsystems username: fernandoireis password: mypassword systemId: ##########################
Oliv3rDog

comment created time in a month

issue commentbgbraga/homeassistant-apsystems

all sensors show unavailable

Take a look at line 208. The ECU-ID variable is fixed and not applicable for others. It should be made variable for generic usage.

Oliv3rDog

comment created time in a month

issue openedbgbraga/homeassistant-apsystems

all sensors show unavailable

Captura de Tela 2021-05-05 às 19 57 31

I tried two ways on configuration.yaml. With '' and without them... I Got all apsema data, including systemid

I have two entries on Log:

Setup of sensor platform apsystems is taking over 10 seconds. 16:13:16 – (WARNING) Sensor - a mensagem ocorreu pela primeira às 16:13:14 e apareceu 3 vezes

and

Logger: homeassistant.loader Source: loader.py:783 First occurred: 16:13:01 (1 occurrences) Last logged: 16:13:01

You are using a custom integration apsystems which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant

created time in a month

issue commentschollz/howmanypeoplearearound

What is legality of monitoring traffic for mac addresses

Hi @kootenpv! Thanks for that. Do you know any legal precedent that this type of sniffing violates Section 18 U.S. Code § 2511?

I don't need legal advice. I'm just curious whether "to intercept...electronic communication" applies to this since it is only looking at mac addresses and signal strengths and not actually investigating any of the packet contents (meta-data vs data?).

I see that Google got in trouble for something like this in 2013 but Google went so far as to collect fragments of data (sometimes email/passwords) which is more the definition of "electronic communication" than mac addresses and signal strengths.

Title 18, 2511 is 100% your friend in this regard. Depending on where in the USA you may reside at I would read the opinion of Joffe v Google for guidance as to how the Ninth Circuit views this.

kootenpv

comment created time in a month

issue commentschollz/howmanypeoplearearound

What is legality of monitoring traffic for mac addresses

Hey, nice job on this :) I just wanted to mention that in case you are not aware, it is against the law to sniff packets. The only exception is to sniff on your own network, and only to protect it.

It is unfortunate, otherwise it would be really nice to come up with ways to use it!

At least you should put a "big fat" warning that the use of sniffing is most likely be illegal.

You are absolutely 100% incorrect with this statement. The legality or illegality of such matters depends on the Country, State and Locality. I as an example live in America and very far from the Ninth Circuit. I can sniff all the packets I want, all day long. Management, Control and Data, 100% there for the taking.

What matters in this regard is that I do not attempt to decrypt that which I do not "own".

kootenpv

comment created time in a month

issue commentschollz/howmanypeoplearearound

What is legality of monitoring traffic for mac addresses

If you can read Dutch here the Dutch Data Protection Authority describes some of the conditions (such as that a hash and a salt are insufficient).

The company behind this had this statement. Here they stated that they do this since 2017 when there was no regulation for this. Since a year they are not storing for longer than 24 hours.

They state that the fine was based on the behavior before that time. They have a privacy policy online targeted to exactly this application. This mentions:

  • The ability to count the number of unique passers-by per day. Hence, they have to track over the full 24 hours for this.
  • The average stay per visitor per day. Also, for this they have to track over the full 24 hours.

Hence, I think you're right. If you're scanning for short enough times it seems to be okay.

Opt-out Note that they have a very interesting opt-out function, that requires you to give them your MAC address: https://www.citytraffic.nl/opt-out-register/

mac_wifi=$(apg -a 1 -M nl -m12 -n 1 -E ghijklmnopqrstuvwxyz | sed 's/../&:/g;s/:$//')
echo $mac_wifi
curl -X POST -F "mac-wifi=$mac_wifi" https://www.citytraffic.nl/wp-json/contact-form-7/v1/contact-forms/1030/feedback 

You'll get a response like

{"into":"#","status":"mail_sent","message":"Bedankt voor de afmelding; het is verzonden.","posted_data_hash":"578195650c08e4fc146b6d6c165fa637"}
kootenpv

comment created time in a month

issue commentschollz/howmanypeoplearearound

What is legality of monitoring traffic for mac addresses

@mrquincle very interesting... This article said " It does let us know that the method has now been adjusted, so that data, among other things, is not stored for longer than 24 hours." - was their data being store for more than 24 hours before?

Is this is also a function of time - i.e. maybe the 60 second scanning time wouldn't be subject to this issue?

kootenpv

comment created time in a month

issue commentschollz/howmanypeoplearearound

What is legality of monitoring traffic for mac addresses

Old issue, but perhaps still nice to know.

A municipality (Enschede, Netherlands) got fined 600.000 euro for using MAC addresses to do crowd monitoring. The MAC addresses where not only hashed, but also salted and stored for limited time duration. According to the Dutch Data Protection Authority it doesn't matter because the company might know the hash function and salt and can bruteforce stuff.

I don't know how to it "right". It's not that homomorphic encryption or functional encryption would solve this. I think it must go in the direction of the following:

  • Enforce device manufacturers to allow people to set a rotation scheme for their phones (or other devices) and make sure device manufacturers use privacy-sensitive defaults. Similar to the exposure notification framework for covid, but then with more legal pressure.
  • Enforce a "privacy bit" in any protocol that does/requires broadcasting (of course this can a bit, opcode, etc, all depending on the protocol). This bit must be user-configurable: the user must have the final choice.
  • Optionally, prescribe a "report bit". If set, people have to be updated that they have been tracked. For example, in Estonia you get a notification if a police officer scans your number plate. Naturally, there's then a notification mechanism in-place which is on itself "vulnerable" to legal compliance.

In general it wouldn't be so weird to think that there will be a transition towards privacy-aware protocols just as we saw with the rise of more security protocols (even if they incur overhead).

kootenpv

comment created time in a month

startedbgbraga/homeassistant-apsystems

started time in a month

issue commentksheumaker/homeassistant-apsystems_ecur

Yc1000 compatibility / ECU-C support

I noticed that the signal is zero on all inverters. Same goes for that part I guess.

Shadyville08

comment created time in 2 months

issue commentksheumaker/homeassistant-apsystems_ecur

Yc1000 compatibility / ECU-C support

The string containing the hex data is ultimately much larger after conversion of the received data than should be. So the checksum fails. Somewhere the conversion of the received data to hex data is not going well for all pairs in case of the ECU-C.

What is being received: APS11032600020001\00\0b !\04\14\158\05P \00\00b#\0102\01\f5\00\89\00j\00\e6\00j\00\e7\00i\00\e3\00hP ..... etc What is being converted by the integration: 41 50 53 31 31 30 33 32 36 30 30 30 32 30 30 30 31 00 00 62 ..... etc What it should be (and how Packet Sender converts it): 41 50 53 31 31 30 33 32 36 30 30 30 32 30 30 30 31 00 0B ..... etc

Somewhere down the line of binascii.b2a_hex things must go wrong.

Shadyville08

comment created time in 2 months

issue commentksheumaker/homeassistant-apsystems_ecur

Yc1000 compatibility / ECU-C support

The tests previously done by Hakan of sending the commands to the ECU-C prove that querying the ECU-C works with the same commands. The query on the ECU brought valid data which I analyzed to check that. It turns out that there are 11 YC1000 inverters (44 panels) configured in the ECU-C. As a result, the string length of inverter_raw_data becomes 326 bytes. The data frame also meets all the requirements of the integration on part of the YC1000 dataframe specs. Actually, it should work. Is it likely that the data arrives fragmented and is therefore incomplete? Of course it is not much, but TCP transfers can still be fragmented to smaller chunks of data [code line: self.ecu_raw_data = sock.recv(self.recv_size)]. More on receive methods can be found here: https://stackoverflow.com/questions/17667903/python-socket-receive-large-amount-of-data

Here is the raw data converted to hex. To debug, I think assigning this to ecu_raw_data would prove that the data can be interpreted by the integration. 4150533131303332363030303230303031000B2021041415380550200000622301303201F50089006A00E6006A00E7006900E3006850200000671501303201F40085006500E7006600E8006200E5006350200000695501303201F4008E006700E7006500E9006500E4006450200000727301303201F4008C006900E7006900E9006900E4006850200000834901303201F50092006800E7006800E9006600E5006650200000872901303201F4008B006600E7006700E8006400E4006450200000634201303201F40089006700E8006900E9006800E4006550200000675701303201F40089006800E8006900E8006600E4006550200000726301303201F5008E006900E7006900E8006800E4006750200000743201303201F40087006A00E8006900E9006800E4006750200000854101303201F50089006500E8006500EA006400E40064454E440A

Shadyville08

comment created time in 2 months

push eventksheumaker/homeassistant-apsystems_ecur

Edwin

commit sha 3d8a9df29e8546aab369687fcf1cee4b918f46ba

Update README.md

view details

ksheumaker

commit sha 4d90b2543b96d6c00e35bed2bb1857c3cdc101f1

Merge pull request #10 from HAEdwin/patch-1 Update README.md

view details

push time in 2 months

IssuesEvent

issue commentksheumaker/homeassistant-apsystems_ecur

Yc1000 compatibility

Ok, thanks - I will have to analyze this data so see if it matches up with what we would expect. It'll take some time.

Shadyville08

comment created time in 2 months

issue commentksheumaker/homeassistant-apsystems_ecur

Yc1000 compatibility

Ok, sorry.. for interpretation I now need the hex data, not the ASCII data. I think it's easier to save the log and post that here.

Shadyville08

comment created time in 2 months

issue commentksheumaker/homeassistant-apsystems_ecur

Yc1000 compatibility

APS11032600020001\00\0b !\04\14\15\08\05P \00\00b#\0102\01\f5\00\8c\01\02\00\ec\01\01\00\ee\00\fe\00\ea\00\fdP \00\00g\15\0102\01\f4\00\8b\01\02\00\ed\01\02\00\ef\00\f9\00\ed\00\fcP \00\00iU\0102\01\f4\00\92\00\fe\00\ed\00\fa\00\ef\00\f9\00\ea\00\f8P \00\00rs\0102\01\f3\00\8f\00\fe\00\ec\01\01\00\ef\01\02\00\eb\01\00P \00\00\83I\0102\01\f4\00\97\00\fc\00\eb\01\00\00\ef\00\fb\00\eb\00\fbP \00\00\87)\0102\01\f4\00\8d\00\fa\00\ec\00\fc\00\ee\00\f7\00\ea\00\f8P \00\00cB\0102\01\f4\00\8d\00\fa\00\ee\01\02\00\f0\01\00\00\ec\00\f9P \00\00gW\0102\01\f4\00\8f\01\01\00\ed\01\07\00\ee\00\fd\00\ec\00\faP \00\00rc\0102\01\f4\00\92\01\01\00\ee\01\03\00\ee\01\00\00\ec\00\feP \00\00t2\0102\01\f3\00\8a\01\04\00\ed\01\05\00\ee\01\01\00\eb\00\feP \00\00\85A\0102\01\f4\00\8c\00\e9\00\ed\00\ed\00\f0\00\e3\00\ec\00\e4END\n

Shadyville08

comment created time in 2 months

issue commentksheumaker/homeassistant-apsystems_ecur

Yc1000 compatibility

Great! Your ECUC-ID = 215000003925 Now try to send this command to query the ECU-C for registered inverters: APS1100280002215000003925END Can you post me the results again?

Shadyville08

comment created time in 2 months

issue commentksheumaker/homeassistant-apsystems_ecur

Yc1000 compatibility

APS120115000121500000392501\00\02@\c4\00\00$\e4\00\00\14\f2 !\04\14\13GW\00\0b\00\0b10014ECU-C-Z_C1.1.8016Europe/Stockholm\80\97\1b\01b\15`\c5\a8\e6\d5\fc00\00\00\00\00\00\00\00\00\00\00END\n

Den tis 13 apr. 2021 kl 23:13 skrev Edwin ***@***.***>:

Image is missing, could you post the entire string in response to string APS1100160001END? That string should start with: APS11009.... and ends with END

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ksheumaker/homeassistant-apsystems_ecur/issues/6#issuecomment-819058907, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAYPXAY553CXPEJOG7MEEOLTISXYDANCNFSM42LGLMHQ .

-- Håkan Gundstedt mobilnr: 0735-64 34 58 epost: @***.

Shadyville08

comment created time in 2 months

issue commentksheumaker/homeassistant-apsystems_ecur

Yc1000 compatibility

Oh, I forgot to warn you! Don't try random commands here. It can really mess up the ECU configuration.

Shadyville08

comment created time in 2 months

issue commentksheumaker/homeassistant-apsystems_ecur

Yc1000 compatibility

Image is missing, could you post the entire string in response to string APS1100160001END? That string should start with: APS11009.... and ends with END

Shadyville08

comment created time in 2 months

issue commentksheumaker/homeassistant-apsystems_ecur

Yc1000 compatibility

It works! [image: image.png]

Den tis 13 apr. 2021 kl 21:53 skrev Edwin ***@***.***>:

@86hakan https://github.com/86hakan You could try the following: Download and install packet sender (packetsender.com) on windows. Add the following parameters [image: image] https://user-images.githubusercontent.com/82239374/114612359-5636d080-9ca2-11eb-8953-73be1708722e.png Then press [send]. You should get te following: [image: image] https://user-images.githubusercontent.com/82239374/114612554-926a3100-9ca2-11eb-8089-0f094735cbbc.png Does this work for you until this stage?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ksheumaker/homeassistant-apsystems_ecur/issues/6#issuecomment-819010755, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAYPXA2MX5O7JUYSG6K3OA3TISOLDANCNFSM42LGLMHQ .

-- Håkan Gundstedt mobilnr: 0735-64 34 58 epost: @***.

Shadyville08

comment created time in 2 months

issue commentksheumaker/homeassistant-apsystems_ecur

Yc1000 compatibility

@86hakan You could try the following: Download and install packet sender (packetsender.com) on windows. Add the following parameters image Then press [send]. You should get te following: image Does this work for you until this stage?

Shadyville08

comment created time in 2 months

issue commentksheumaker/homeassistant-apsystems_ecur

Yc1000 compatibility

@86hakan Too bad, that does surprise me because the compatibility table and the use of the same ECUapp to configure the ECU-R or ECU-C suggest otherwise. image

If all requirements have been met, we conclude that this ECU-R integration does not work for the ECU-C, thank you for testing. This ECU-R integration was made possible because contributers all own a ECU-R (and a YC600, QS1 or YC1000).

However, I do want to help you, which is why I am raising this in the HA forum. it seems to me the appropriate medium for now to investigate this new wish. Feel free to discuss and contribute to that discussion: https://community.home-assistant.io/t/apsystems-aps-ecu-r-local-inverters-data-pull/260835 Because this issue in Github is officially closed I'll continue in the HA forum.

Shadyville08

comment created time in 2 months