-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Send a switch on command to a Plug Adapter #13
Comments
Please post the full code, with the device IDs. |
Here you are :
|
You're not setting optional data, which should include the destination ID. Therefore the packet is handled as a broadcast message -> every switch in range reacts to it. Please let me know, if this fixes your issue :) |
I've now created the method discussed in #14. However, one issue remains: Selecting the correct sender ID. (At least) in the perfect world this should be the module sending the message for real (so, an USB-adapter or the Raspberry Pi -module). For this, I used the existing example structure to request the ID of module before sending any packages. It's untested at the moment, and as the example was created so long time ago, I have no recollection if it actually ever worked 😛 |
Moving discussion back to this issue from #14. Hmm, actually according to this document, if correctly translated by Google, you should be able to use other profiles as well. There's a description of the learn process. p = Packet.create(
type=PACKET.RADIO,
rorg=0xF6, func=0x02, type=0x02,
destination=[0x01, 0x03, 0x02, 0x13],
R1='Button AI',
EBO='pressed',
T21=True,
NU=True,
)
c.send(p) Not entirely sure of the T21 and NU -values though. They're also only supported since the last batch of commits. |
Thanks a lot, @kipe I will test this on monday ! |
[SOLVED] Ok i found out. I used parse_eep with 2 param (0x02, 0x04). But, there is no func=0x02, type=0x04 in EEP.xml. I don't know why it used to work before ? Nevertheless, it works now... The only thing is that i can't find what EEP these devices used ?? Sorry for this useless issue. |
The code you give works !
I need T21 and NU to switch on the plug. Thanks @kipe |
Well, if it works, don't fix it ;) Furthermore, you can make it even a bit simpler by using p = RadioPacket.create(
rorg=0xF6, func=0x02, type=0x02,
destination=[0x01, 0x03, 0x02, 0x13],
R1='Button AI',
EBO='pressed',
T21=True,
NU=True,
)
c.send(p) What this does, is create a I'm not sure if we should allow integer values to |
I think it would be a valuable improvement if enums could also be set by value and not only by the description tag. I.e. for the boolean enums like in EEP A5-20-01 it would be nicer to specifiy |
The issue is that the enum values can basically be anything in the XML. |
Yes, you are right. And this is still an improvement from my perspective. |
Hi. Maybe i do something wrong : I try to find out the id of an object by using the Communicator. Here is my test code
I probably me, but i am a little lost.. |
As said before, this might require the implementation of |
Hi @kipe |
v0.40 will be released, once issue #13 is closed.
Damn, I may have found the issue! Ping also to #14. //Edit: And to be honest, this is a stupid mistake 😊 |
Great ! Thanks @kipe 😃 |
Well, it wasn't the issue I was thinking of... I still think that In my mind (do remember, I haven't tested sending to any device yet) it should work like this:
@romor comments, as you seem to be the most knowledgeable regarding the teach-ins? It will need additions to the |
I think this extension is a good idea and makes sense as you describe. Up to now I am just aware of the teach-in for 4BS packet types. Please refer to There are 3 variations of the teach-in, specified by As I understand, these teach-in bits are equal for all 4BS profiles and currently not contained in |
Thanks, I'll look into this more, once I manage to set everything up (don't even have a transceiver available for the development atm, need to take one from my daily usage :P) |
I received the plugs sent by @sylvaincherrier today, thank you very much 😄 |
@kipe You're welcome :-) I have some fun with this library, so, i will enjoy if you find out how to drive each actuator one by one ;-) |
Ok, some (minor) progress already. The device is meant to be taught by using Universal Uni- and Bidirectional Teach-in So now it's just the matter of writing a parser for |
- Currently parses an incoming teach-in request from D2-01-01. - Still requires a response packet creation.
To be honest, I think this might be the same case as @romor and Micropelt described in #15 (comment). |
I've made some minor progress with this and the latest commits in send_vld -branch. |
Oh, forgot to mention that in my opinion this depends on issue #26, so I'm likely to implement that when creating trying to tackle this once and for all... |
SUCCESS \o/ Commits coming to send_vld in a moment, needs a bit of clean-up first... |
@sylvaincherrier Can you test the |
Hi Kipe ! It works great. Thx ! |
Can you also control the devices as the example functions describe? |
Ok... i make the change in example_D021-118-E.py to check if i can switch on an off... |
Well... Only the last appaired device seems to react... I got 3 devices, one was working. I have added the two new devices. Now, only the last once obey to my turn_on command. |
As I observed, a second teach-in procedure seems to clear the previous teach-in. |
Ok... I test this way. |
Have you succeed in having two devices connected ? It's weird, it seems i can have two devices at the same time. Only one can be paired... Sometimes, i can pair a device with my raspberry or my usb stick, but then, i can't add another one, even if i stop the program, and start again for the second device. |
Yes, I have. My procedure (when both devices are cleared):
|
I have written a small test program, in order to test my 3 devices. I think that maybe on of my g-media D021 is out of order... i can't make it pair with my usbStick, or my TCM310 shield for raspberry... The second one is paired, sometimes (following you procedure....) By the first one is never paired, even after a clear, and when i get the message : New device learned! The ID is 01:89:D9:78. I can't make my last device be paired ? it is a ubiwizz ubid1502. I can't clear its config (the doc is really not clear, they say i must hold the button until the red ligth appears), but then nothing happens. http://my-domotique.com/store/enocean/901-prise-commandee-enocean.html |
For information, my test program :
|
..... I'm wondering if teaching is the same way with a G-Media SD01 and a Ubiwizz 1502... I can't find if it is the same EEP ? |
Okay, i got it : the ubizwii 1502 has eep D2-02-0B I think i must update this line : |
I think 02 function is missing in EEP.xml |
I made a test : i added in the EEP.xml files lines for D2-02-0B
) Then i restart the test : |
Hmmmm, D2-02 -series should be sensors, so that cannot be correct. According to the table in documentation, it should allow switching, local control, energy and power measurements. The exact EEP (RORG, FUNC and TYPE) are sent in the teach-in message, but stupid of me, not printed... So Hopefully this all goes away, once I get the storage implemented, so the stuff is actually learned and stored somewhere. In the meanwhile, can you post messages this switch type sends on a regular basis (I think it should send the energy measurement information), so I can also write parsing for that... |
It's weird, because it seems that they use this EEP http://www.imagidee-cms.com/medias150/PDF/UBID1502.pdf or http://my-domotique.com/store/enocean/901-prise-commandee-enocean.html (end of the page) |
Hi, Just made a test this morning this answer for my devices D021 is : D2-1-1 I have also scanned the exchanges for this device (01:89:d9:78)
|
I don't understand the values i get : D2-1-A : I thought it was D2-02-0B as written in the user manual... But you were right, these are not the values i get... but why D2-1-A ? (your last message says it could be D1-01-0B, but it doesn't match too) |
I can't seem to fake the SenderID. I am doing some testing and want to use a different SenderID. But not matter what I do Tried to change this but it persists to same sender address it shows: but I get |
@snmathur4 you can only set a 'fake' senderID in the range of |
Hi, I am trying to send a RPS (F6) packet out USB300 EnOcean USB. If I send out [0x15] user data, I instead get [0x10]. Seems the 2nd part of byte is always changed to 0. Could this be a bug in USB transmitter? |
Hi,
I use this python library, and it works well. But i have a problem.
I have 3 plug adapters (2 ubiwizz DO21-11B-E and 1 another, i can't find its reference).
I pair each device with my enocean controler of my raspberry.
When i send a packet (i build the packet with the enocean ID), all the plug switch on !
I can't find how to select only one...
this is my code : i try to reproduce the on - released message send by a button :
Building my two messages :
Then i set the communication (self.p is a Packet, self.c is a Communicator)
Ok, just send the message
Then, all light switch on ! (but self.id contains only the specific id of the target)
Thanks if you can help.
The text was updated successfully, but these errors were encountered: