Closed Glenn1986 closed 4 years ago
Thanks @Glenn1986! I am not sure how a sirene should be mapped in Home Assistant, how would you like to see it? Controllable as a switch (on/off) or something else?
Which other devices are currently not supported (or not working as expected). Could you please create separate issues per unsupported device, this will allow us to easier track unsupported devices and work on them one by one.
I think a switch would be fine. Oke I will make a sperate issue for the io blind. The other devices work fine at the moment.
Basic support has been added in https://github.com/iMicknl/ha-tahoma/pull/84, could you give it a try?
In order to add full support, support in Home Assistant for sirens would be required. https://github.com/home-assistant/architecture/issues/375
Oké I will try to test! Do I have to manually update the files of the hacs TaHoma component? It’s my first time 🙈
https://github.com/iMicknl/ha-tahoma/tree/refactor_sensor, press the green button and choose 'Download'. Then make sure you overwrite the tahoma folder in custom_components
with the tahoma folder you did download.
I think siren off should work, but I am not sure if siren on will work. It did require multiple params, but I couldn't find them..
I installed your new version but has errors. All my switches didn’t work anymore. I will post the errors later.
2020-06-24 09:24:56 ERROR (MainThread) [homeassistant.components.binary_sensor] Error while setting up tahoma platform for binary_sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 186, in _async_setup_platform
await asyncio.gather(*pending)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 292, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 381, in _async_add_entity
original_icon=entity.icon,
File "/config/custom_components/tahoma/binary_sensor.py", line 70, in icon
if self.device_class() == DEVICE_CLASS_RAIN:
TypeError: 'str' object is not callable
2020-06-24 09:24:56 ERROR (MainThread) [homeassistant.components.switch] Error while setting up tahoma platform for switch
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 186, in _async_setup_platform
await asyncio.gather(*pending)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 292, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 381, in _async_add_entity
original_icon=entity.icon,
File "/config/custom_components/tahoma/switch.py", line 61, in icon
if self.device_class() == DEVICE_CLASS_SIREN:
TypeError: 'str' object is not callable
should be fixed can you redownload the branch and install it?
Ok now i don't have errors after installation. I find the siren in my entities. But when clicking on the switch he gives an error. I'm trying to capture the error but with no luck at the moment. When i switching off the sirene I don't get an error.
Kan service switch/turn_on niet aanroepen Maximum number of consecutive retries reached. Error is: {"errorCode":"INCOMPATIBLE_VALUE","error":"ringWithSingleSimpleSequence() : Invalid value for command parameter p1 : expected multi-type value, one of [integer value between 100 and 204600 or string value in (defaultDuration, defaultSoundPattern)] but got no value"}
thanks, this helps a lot! I just pushed another fix, happy testing :)
Now I got the message: Kan service switch/turn_on niet aanroepen Maximum number of consecutive retries reached. Error is: {"errorCode":"RESOURCE_ACCESS_DENIED","error":"Not authenticated"} Never had problems with not authenticated.
This has happened to us as well once or twice, but we don't know what causes this at the moment. A restart of HA should fix it.
ok, i reboot the system. I tried again to switch sirene. Error: Kan service switch/turn_on niet aanroepen Maximum number of consecutive retries reached. Error is: {"errorCode":"INCOMPATIBLE_VALUE","error":"ringWithSingleSimpleSequence() : Invalid value for command parameter p2 : expected integer value between 0 and 100 but got no value"}
apparently 4 parameters are required.
"commandName": "ringWithSingleSimpleSequence",
"nparams": 4
would you have an idea of what they are from what you do in the tahoma dashboard for instance?
I did find something on tahoma siren.js file. I didn't find the params i think. fromAction: { ringWithSingleSimpleSequence: function (p1, p2, p3) { //fixme yet the only solution to tell if low bip or intrusion is the repeat time if (p1 === cons.INTRUSION_COMMAND_PARAMETERS[0] && p2 === cons.INTRUSION_COMMAND_PARAMETERS[1] && p3 === cons.INTRUSION_COMMAND_PARAMETERS[2]) { return { on: true } } else { return { lowBip: true, actionContext: ActionContext.IIT_PROGRAMMATION }
}
}
}
I think that the itrusion commands are the alarm settings of tahoma. I have total, zone 1, zone 2, deactivated in my settings of tahoma. So I can activate the alarm for zone 1 or 2 or total. That's what i think these params are but can't find it anywhere. So i am not sure.
https://github.com/octa22/org.openhab.binding.somfytahoma/issues/6#issuecomment-488663654 More information could also be found here.
shall we use those [120000, 75, 2, "memorizedVolume"]
as a first try, and see how it goes?
Good for me. Let me know if I can help testing.
just pushed it to branch refactor_sensor
happy testing
I just tested the sirene. Didn't get errors and tested the switch. It worked, but when I wanted to set it off i didn't. But i could not see any errors when set the sirene off. Great work guys! almost there. I also see that a lot of sensors of tahoma has battery level. RSSI:level or something like that. It would be great to also have these information so I can make an automation that notify me when battery is at low level. It's just a sugestion.
could you try to use the chrome dev panel as in Mick's link: https://github.com/iMicknl/ha-tahoma/issues/57#issuecomment-649357934 to investigate how the stop command is sent?
Regarding your suggestion, we have a branch to add lots of attributes to our entities.
Note that RSSI:level
isn't the battery level, it's the quality of the connection to the box.
I'm trying to search for the info that you want but I'm not sure what to look for. I did find something from the iosiren.js in chrome on somfy there website. @vlebourl @iMicknl
define("tahoma/view/secureKit/ioSiren", ["require", "dev/log", "core", "app", "./controller", "i18n!./nls/secureKit", "i18n!../../../vendor/somfy/io/siren/nls/siren", "i18n!tahoma/view/product/nls/product", "./view/ioSiren"], function(e) { var t = (e("dev/log")("IOSirenTestView", e), e("core")) , n = e("app") , i = (e("./controller"), e("i18n!./nls/secureKit"), e("i18n!../../../vendor/somfy/io/siren/nls/siren")) , s = e("i18n!tahoma/view/product/nls/product").actionLabel , o = e("./view/ioSiren"); return t.ViewController.extend({ View: o, viewOptions: { type: t.NavigationController.ViewType.POPUP, canClose: !1, canBackgroundClose: !1 }, initialize: function(e) { this.device = e.device, this.testInProgress = !1 }, loadData: function() { return t.Q.resolve() }, testSiren: function() { return n.api.execution.apply({ label: s.replace("${device}", this.device.label).replace("${action}", i.commands.test), shortcut: !1, internal: !1, actions: [{ deviceURL: this.device.deviceURL, commands: [{ name: "ringWithSingleSimpleSequence", parameters: [2e3, 50, 2, "memorizedVolume"] }] }] }).then(function(e) { return this.execid = e, n.execution.wait(e) } .bind(this)) }, stopRinging: function() { n.api.action.cancelExecution(this.execid) }, destroy: function() {} }) });
@Glenn1986 could you try https://github.com/iMicknl/ha-tahoma/tree/master? This should also allow you to turn it off. 👍
Hi Mick, I finally can test the alarm. I installed last version and the alarm works fine. On and off command works! Nice work, now I can build my own alarm while I'm waiting for the somfy intrusion to be implementing. Thanks!
@Glenn1986 are you in need for having internal:TSKAlarmComponent
supported as well? For me, the alarm part in Somfy is disabled, so I am not sure if that is your alarm controller.
If so; could you open a new issue for internal:TSKAlarmComponent
with some more information of your usecase.
Somfy Tahomo Box 2020.1.4-2 version
Device information Somfy Rollershutter RTS Somfy Contact Sensor IO Somfy Motion Sensor IO Somfy Temperature Sensor IO Somfy Lightsensor IO Somfy Blind IO (got error for this one) and a lot more see json output
Device details