With feedback module unchecked, the states are correct.
When the state is updated by the feedback module,
you are always considering the message as a group-1 message, also when it is a group-2 one.
As you are directly connected to feedback module, this command is not shared on the bus. Do you have a pc-link ? then move the connection towards the pc-link module or else 2 options
a- keep using integration refresh rate
b- I need to find a way to understand if the refresh if for group 1 or 2 without having the refresh command input.
So, will be trying to force the feedback module to share this data in the bus or else if you do not have pc-link I need to adapt the code so you can have a custom refresh rate and a feedback-module. using the custom refresh rate today disables the feedback module so your feedback led will not work.
I donāt have a pc link module. However, there is a distinction in the last 6 characters of the received message, so you can know that it is for an other group.
In my example, it is like this (based on real situation with the lights right now):
message ends with 83465C: first 6 outputs
message ends with 4C251A: last 6 outputs
So a quick-n-dirty solution can be an optional suffix in the config of the controller.
On the other hand, I think this is working fine in the nikobus binding in openhab, Iāll test that in a bit. Perhaps we can āborrowā some logic overthereā¦
As a new user on this forum, I canāt add any more new replies in this topicā¦
So I edit this one:
Meanwhile I have added all my nikobus buttons to the config.
Indeed, the system with loading only the impacted modules works really great!
I have configured HA in combination with Nikobus almost completely as I like it now.
I had a look at the led functionality, but Iām not sure what it should doā¦ At the moment, the leds are controlled by the nikobus hardware/software, what exactly should the HA Integration do with that?
yet, the checksum will vary from one install to another as module addresses are differents, so it could be done but complex.
I was thinking to ask the user at integration setup time what connectivity is used. based on user input (pc link, feedback module) I can then change the logic towards
Connected to PC-LINK without FEEDBACK
Custom refresh only
Connected to PC-LINK with FEEDBACK
Custom
or
Feedback
Connected to FEEDBACK
Custom refresh only but still enables the LED logic for the modules outputs, which is not the case today.
Everything is working file. I can switch everything from HA and I get all feedbacks to HA is a button is pressed.
Now I wanted to add an automation when a Nikobus-button is pressed 3 seconds.
How exactly can I configure this.
I can only select if the button is ON, OFF or pressed.
alias: "React to Nikobus Button Push"
description: "Perform actions when a Nikobus button is reported as pressed."
trigger:
- platform: event
event_type: **nikobus_button_pressed**
event_data:
address: **"specific_button_address"** # Optional: Specify to react to a specific button
action:
- service: homeassistant.toggle
entity_id: light.example_light
In this code, you can replace nikobus_button_pressed with any of the below
Alternativly your can use the defined button sensor to detect a press, but I recommand using the above as it use the home assistant event bus and much more flexible. Itās up to your use case to go for one or the other, for a 3 sec event press detection go for the event bus.
So if you take action on defined button in HA, or on physical Nikobus button, LED will behave accordingly.
Now, if you go to a module page where all outputs are defined, you can also take action on those button and it will trigger the LED if you have defined a ON/OFF address in the module_config.json file.
itās a RTFM situation You need to update your module_config file.
Sorry, this is a breaking change to support button with feedback led, even if you do not have any, module_config file has to be updated
New Feature
Feedback led management: Feedback led are now managed when trigering modules outputs. Update your module.json config file according the readme for this to work.
Fix
For users having a Feedback Module:
If you are connected to the Feedback Module without a PC-Link in the installation setup or later in configuration, leave the box unchecked.
If you are connected to a PC-Link and have a Feedback Module, check the box either during setup or later through the configuration option (refer to the readme for details).
Thank you, now I can control the switch modules again.
I noticed an error in the log-file.
I donāt have any dimmer-modules in my configuration
Error while setting up nikobus platform for light
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 366, in _async_setup_platform
await asyncio.shield(awaitable)
File "/config/custom_components/nikobus/light.py", line 23, in async_setup_entry
for address, dimmer_module_data in dataservice.api.dict_module_data['dimmer_module'].items()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
KeyError: 'dimmer_module'
The reason why I updated the addin is because I wanted to test the 3sec press.
Unfortely, it didnāt work.
this is the yaml
alias: Alles uit aan inkom
description: Alles uit aan inkom
trigger:
- platform: event
event_type: nikobus_button_pressed_3
event_data:
address: DE4AD2
action:
- service: switch.turn_on
metadata: {}
data: {}
target:
entity_id: switch.s2_06
If I run it manualy, the light goes on.
Even the time in the automation screen is updated, but light stays out
I was thinking that I wade a bad test, because I wanted to switch on a nikobus-item with a nikobus-button with HA. Normaly you donāt do that , because that is configured into Nikobus. Olso, the bus will be occopied by pressing 3 sec a button, so you canāt send a nokobus event.
Thats why a made another test. I wanted to swith a āHelperā-swith on.
Unfortunately this didnāt work either
alias: Alles uit aan inkom
description: Alles uit aan inkom
trigger:
- platform: event
event_type: nikobus_button_pressed_3
event_data:
address: DE4AD2
action:
- service: input_boolean.turn_on
metadata: {}
data: {}
target:
entity_id: input_boolean.sfeer