jlama / powertagd

15 stars 7 forks source link

[Questions] PowerTag Direction, Finding Powertag and more #9

Closed Sany-IO closed 1 year ago

Sany-IO commented 1 year ago

Hello!

I working with your Code and implement MQTT support, but actually i have some questions.

  1. how can i configure the direction bit of the powertag? (Up or Down Direction) ?
  2. how can i send a blink bit to the powertag to find it where it is? is there a option?
  3. powertag,id=0xe201b4d1 power_factor=-72,energy_delivered=1.13,0x4000=330,energy_p1_tx=0.00,0x410d=0,energy_p2_tx=0.00,0x420d=0,energy_p3_tx=1.13,0x430d=330

powertag,id=0xe201b4d1 voltage_p1=220.00,voltage_p2=222.30,voltage_p3=221.40,voltage_phase_ab=382.90,voltage_phase_bc=383.20,voltage_phase_ac=383.40,current_p1=1.90,current_p2=0.21,current_p3=0.41,total_power_active=-407,power_p1_active=-370,power_p2_active=-15,power_p3_active=-20,total_power_apparent=558,

i think, while the direction is not correctly set, my powertags says a power_factory with minus? what are total_power_active ? Watts?

thank you :)

jlama commented 1 year ago

Hi,

  1. and 2. are on my TODO list, so not yet implemented. This needs some firmware changes.

  2. Yes power units are Watts.

Sany-IO commented 1 year ago

Hi,

thanks, you mean changes in the firmware of the sonoff dongle on this source? i found out, the direction bit is set by pairing/config of the powertag..

do you know the command for ping the powertags, that i must transmit to the powertags?

jlama commented 1 year ago

The firmware needs to be updated to support sending "Write attributes" commands to the PowerTags. Setting the current flow direction and "ping" are both "Write attributes" commands.

The "ping" is the standard ZigBee "Identify" cluster ID (0x0003). Here's one for example: identify_cmd

By the way, please let me know if you figure out what the unknown 0x4xxx values are.

Sany-IO commented 1 year ago

How can I get the firmware source?Am 29.01.2023 um 14:52 schrieb jlama @.***>: The firmware needs to be updated to supporte sending "Write attributes" commands to the PowerTags. Setting the current flow direction and "ping" are both "Write attributes" commands. The "ping" is the standard ZigBee "Identify" cluster ID (0x0003).

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

jlama commented 1 year ago

I added the firmware sources to the repo, but you'll have to figure out how to build them with "Simplicity Studio" (which is anything but simple...)

Also I already implemented the required changes in the firmware to support the "Write Attributes" commands, I just didn't remember :)

jlama commented 1 year ago

I added support to change the flow direction. You can run:

powertagctl -d /dev/xxx invert-flow 0x12345678

Where 0x12345678 is the PowerTag device ID.

Sany-IO commented 1 year ago

Hey,

Thank you, sorry i have too much work at the moment, i test it, i must merge my mqtt integration :)