Fixed with the new release.
This works for me, I would indeed double check your button address.
alias: test
description: ""
trigger:
- platform: event
event_type: nikobus_button_pressed_3
event_data:
address: A59B02
condition: []
action:
- service: switch.turn_on
metadata: {}
data: {}
target:
entity_id: switch.exterieur_parking
mode: single
Itās working now.
I added āmode: singleā and itās working.
Then I removed it back again, and itās still working
Is it correct that the action is executed when I release the button after 3 seconds? Maybe there was a confusion , because the things that are executed by nikobus after 3 sec, are done while pressing the button 3 sec. Here after releasing it. But that is no problem. Iām happy now.
@MarcVZ Could you give me an example ?
So If I get you right, nikobus starts to process the action as soon as the button is pressed for 3secs. The integration only after releasing the button. So basically in Nikobus you can keep pushing the button for multiple seconds, as soon as the press time is greater than 3secs, the action will start.
I can change the logic to add extra events:
3 like today, triggered after button release
nikobus_button_pressed_1
nikobus_button_pressed_2
nikobus_button_pressed_3
3 new ones triggered as soon as the 1, 2 or 3 seconds have passed regardless if the button is released or not.
nikobus_button_timer_1
nikobus_button_timer_2
nikobus_button_timer_3
Is that what you mean ?
@MarcVZ New release
The following events are fired as soon as the respective timer is reached
- nikobus_button_timer_1
- nikobus_button_timer_2
- nikobus_button_timer_3
Bug Fix
Stop cover was no longer possible since the introduction of feedback led support: Fixed
Found a project rbierman/nikobus: Nikobus to RS232 bridge (github.com)
About a Nikobus to RS232 bridge, so no need for PC-Link or Feedback Module etcā¦
Untested
Hello
First of all: many thanks for the Nikobus integration in HA! Until a few days ago I was using Openhab but did make the switch now to HA. I only have rollershutters connected to the Nikobus system. These are the modules I have:
I have some questions regarding this integration in combination with the Nikobus software. Can I use my current system (I mean then the installation through the Nikobus softwareā¦below you see mee current configuration for the rollershutter living room front (called ābureauā in HA) .
Image removed because I can upload only one image because I am new.
Do I need to delete this configuration through the Nikobus software?
For now I can control already the rollershutters through HA but I have a weird situation that I do need to click 2 times rapidly into HA to control a rollershutter:
Image removed because I can upload only one image because I am new.
Also, the following automation did not work either. I tried that when the sun goes down it should close the rollershutter of my work place ābureauā. I first tried without repeating but this didnāt work. Two times repeating does not work either:
Image removed because I can upload only one image because I am new.
Is there a way to control the rollershutter directly through the module instead of using the button?
I am very sorry for all these questions but at this moment I donāt get it to work correctly. Can/Will you give me some advise please?
Happy to get your setup going, but Iām on vacation till end August. Until then try to copy paste the automation code vs a picture. ?
Thanks a lot for you fast response on your vacation. No problem, I can wait until the end of august. I will try some things to see if I can get a little bit further.
Meanwhileā¦just enjoy your vacation and we hear eachother in september.
Hi,
I did not had the time to explore all possibilities of the integration. I e.g. did not update the button configuration file, and Iām also still lost how to get the feedback buttons to work. I need to add some addresses in the config, but not sure how to find them. As I only have a few of those, itās not a big deal but the fact that home assistant did not update the correct status was kinda annoying.
Most of my buttons were automatically discovered, and as I wanted to give it a meaningful name and get the refresh up to date, so I tried to figure out which button corresponds to what address.
I guess I could do it by exploring them one by one, but to make my life easier I googled if there was some logic in order to obtain the Home Assistant address from the button based on the Nikobus address from the software.
It turns out that via this Link someone tried it already in OpenHab.
He summarized it as:
- Convert to binary representation
- Take bits 2 till 22
- Prepend 3 bits for the button.
- Reverse the order
- Convert back to hex
- Prepend ā#N#ā
After some trial and error, I think I figured it out.
Itās not an absolute proof, but It matches with all switches I have. For the shared (last 5) characters of the switches, Iām rather sure, and it almost corresponds to the method as explained for OpenHab. (the only difference is that bit 3 till 22 are used)
The first character of the address is specific for the button number, and that was certainly not as explained above. In my opinion, the last two bits are used for those. (or to be correct, the last two for the 4-button and just one for the 8-button)
For all buttons I own, all addresses match (To be complete, I did not double-check if the order of the 4-buttons is correct).
For the 2-buttons, Iām lost. I do not have them, so I canāt verify.
Iāve made myself an Excel file.
Please check it out so you can have a look and confirm my logic (and maybe expand to the 2-buttons.)
Some of the formulaās might look complicated; (I use Excel quite often, and tend to use formulaās that not everybody understands )
The file contains some extra comments and details of how it works. (I hope it is clear.).
(links to my OneDrive and is read only, pls let me know if you can open it.)
PS
In the end, it certainly would have been faster to do it manually, but maybe it is of some value for others and I also had some fun.
Great find! A quick note, first thing first you need you configuration file Ā« button Ā» fully completed. Why ? The integration relies on scheduled refresh and button press to get latest status.
So let say you turn on a light with a physical button and this button has no Ā« impacted module Ā« defined in the button config_file then nikobus and HA will be out of sync till next integration based module refresh.
On the feedback, you need only one of the button address that triggers the led on/off defined in the modules configuration file. So the integration will mimic a button press for the led to be turned on/off.
More details as I returnā¦
The fact that it was out of sync was the reason I tried to update the button config file.
Regarding the Led and button address I assume it is the HA-address of the button?
I will check it out.
Kurt
if you are still busy with button definition, You could use a notification to your mobile device everytime a button is pushed. Thatās how I did it, going around the house, pushing each physical button one by one and taking note of the address / purpose and then updating the config file accordingly.
alias: Nikobus Button Press
description: Perform actions when a Nikobus button is reported as pressed.
trigger:
- platform: event
event_type: nikobus_button_pressed
action:
- data:
message: "{{ trigger.event.data.address }}"
action: notify.mobile_app_iphone
Hi everyone,
Iām looking for feedback on shutter behavior, does it work for you ? specifically looking at is HA and Nikobus in sync ? when a shutter is physically opened or closed is it the reflected state in HA ?
If yes or no, let me know together with your specific setup. how are you connected to HA do you have a feedback module, etcā¦ and if you know, when does it happen to be out of sync ?
Thanks for your feedback, will help me make the information more robust.
Iāve also a guessing game
Shutter can have a state of 0x00 stopped / 0x01 opening / 0x02 closing, Iāve found sometimes in Nikobus that a shutter can have a state of 0x03, which is not manage by the integration, so you will get your shutter out of sync.
Could one guess a 0x03 status could be ? itās detectable by looking at the debug log and a shutter in a 0x03 state will require you press 3 times a physical button to get it into movement.
Hello fdebrus,
Thx for making the Nikobus integration possible.
I have a question:
Is it possible to use /dev/serial/by-id/ā¦ instead of /dev/ttyUSB0?
No, why ? /dev/ttyUSB1 not persistant over reboot ?
How have you installed HA ? Docker ? Other ? I can help making ttyUSB persistant, but it depends on the way HA is installed
example
udevadm info --name=/dev/ttyUSB1 --attribute-walk
sudo nano /etc/udev/rules.d/99-usb-serial.rules
SUBSYSTEM==āttyā, ATTRS{idVendor}==ā067bā, ATTRS{idProduct}==ā2303ā, SYMLINK+=āttyUSB1ā
sudo udevadm control --reload-rules
sudo udevadm trigger
Indeed to make it persistant
Install: ha image on micro sd on Pi
run this as root, let me know the output. You need /dev/ttyUSB1 to exist, or do you never get a USB1 device ? if so what adapter are you using to connect Nikobus ?
udevadm info -a -p $(udevadm info -q path -n /dev/ttyUSB1)
your /dev/serial/by-id/ā¦ should be a symlink to /dev/tty*** so if you have a /dev/serial/by-id/ā¦ a /dev/ttyUSB* shall exist, or else it could be that the driver for the adapter is not loaded.
I can not test this for the moment, not at home
the nikobus is working with the /dev/ttyUSB1
But when i reboot it changes to /dev/ttyUSB0.
I thought it would be better to use a link to the divice instead of the usb port.
Just starting with OH.