homey-arduino-library
homey-arduino-library copied to clipboard
Using the same capability more than once
For a normal app you state:
Using the same capability more than once
In certain cases it might occur that a device should use a capability more than once. An example would be a device with an outside and inside temperature sensor. Simply append a dot followed by an identifier after the capability string during in your driver, e.g. measure_temperature.inside & measure_temperature.outside.
https://apps.developer.athom.com/tutorial-Drivers-Capabilities.html
However, this does not seem to work with this library. the ".name" gets ignored and just overwrites the first capability type.
As far as I can see in the documentation there is no other way to name a capability on the Arduino. The example codes do not have this challenge since all of them are unique.
Could you explain if it should work with this library or would this be a feature request?
Thanks
any news on this issue?
(i just run into this problem when i was coding for my sonoff dual, which has two onoff capability)
I am currently busy with my graduation internship, because of this I do not have time to look any further into the issue you are experiencing.
(My internship at Athom has ended over a month ago...)
Same here,
Homey.addCapability("measure_temperature.outside");
is not working. Could someone from Athom fix this?
This would be a useful feature for better integration with home security systems. For example, DSC security systems support multiple partitions, each of which has its own set of status states (armed/disarmed/triggered, etc) that would need to be mapped to the homealarm_state capability.
At the moment, it seems that only one partition can be exposed to Homey using this library.
This needs a fix! I have it all working in SmartThings and this is one og two issues stopping me from a 100% conversion. I have four relays needed to be controlled as four different switches. It is controlling a ventilation system.
@jeroenvollenbrock could you assign someone who currently works for Athom? Renze is no longer available he says and he removed his assignment.
Thanks
the problem is when you define a capability/action it creates a function and web endpoint with that name. since identifier can only consist of letters, digits or underscore, using anything else (dot or space etc) causes the issue.
my simply/fast hack solution was use the upper case X instead of . (dot). then when needed replace it back;
s->print(",\"api\":[");
HomeyFunction *item = firstHomeyFunction;
while (item != NULL) {
s->print("{\"name\":\"");
String fooname = item->name;
fooname.replace("X", ".");
s->print(fooname);
...
for (;position<_request.endpoint.length();position++) {
if (_request.endpoint.charAt(position) == '/') break;
}
String type = _request.endpoint.substring(0, position);
String name = _request.endpoint.substring(position+1);
name.replace(".","X");
...
/* Execute request */
CLIENT_TYPE client;
if (client.connect(_master_host, _master_port)) {
String fooname = name;
fooname.replace("X", ".");
client.print("POST /emit/");
client.print(evType);
client.print('/');
client.print(fooname);
@gn0st1c can you confirm where you made these changes so I can copy?
@konradwalsh: sorry, i didn't get notice for the mention. (maybe because you edited the comment). i'll fork these repos and apply my patches. i'll let you know when i'm done.
cheers,
@konradwalsh : you can get it from https://github.com/gn0st1c
@gn0st1c very kind of you.. thanks
Hi! I tried @gn0st1c fork, but is still not able to add multiple capabillities. Has anyone else had success?
Would love to get this working, has anyone had any luck?
@gn0st1c I tried your changes to the homey.cpp file but had no luck? Any advice, I noticed your fork is no longer there?
Earth to @WeeJeWel?
Are any updates on this?
Hey guys, we cannot give support on this project, as it's aimed towards hobbyists. All code is open source so you're free to fork is as you'd like.
Hey guys, we cannot give support on this project, as it's aimed towards hobbyists. All code is open source so you're free to fork is as you'd like.
OK, understood... but if this one thing was fixed..
we clearly dont know how to and the early post seems to suggest how to
https://github.com/athombv/homey-arduino-library/issues/41#issuecomment-410845129
Hey guys, we cannot give support on this project, as it's aimed towards hobbyists. All code is open source so you're free to fork is as you'd like.
I thought the whole homey ecosystem is aimed towards hobbyists.
Im also facing this problem. Fix of @gn0st1c does not work, or i implemented it wrongly.
Can we get a fix for this? want to make a Pool controller but need 3 temp sensors and 2 relay sockets for that.
Hi, is there still nobody who can fix this? Tried the fix of @gn0st1c from the fork of @guestus but it's not working for me. I would like to have 2 temp sensors and a temp difference on 1 arduino.