Nikobus: oldest version (1998) - 05-000-01 modules - no persistancy possible

144 views
Skip to first unread message

Chris van Aalst

unread,
Jan 1, 2015, 3:13:24 PM1/1/15
to ope...@googlegroups.com
Hi I am a newby with OpenHAB;

I am currently using an early version of the Nikobus domotica-system (module 05-000-01); the pc-link module (05-200) to connect OpenHAB (via serial-port) to NikoBus, should not work with my early version of the NikoBus (according to the Niko technical services) - I did some testing and I can get it to work !
But there is a limitation; I can only simulated push-buttons; I cannot read the status of a channel ! I do not know when power is switched On or Off.

Currently I defined all channels on every Niko module twice:


---items----
/*Niko module Kanalen */
/*Schakel Module 1 - PROGRAMMED */
Switch Niko_Mod01_Chan01A "Mod 1 Kanaal 1 Aan" (Niko_Mod01, LichtenA) {nikobus="#N01010A"}  //this is to switch Module 1 Channel 1 ON
Switch Niko_Mod01_Chan01U "Mod 1 Kanaal 1 Uit" (Niko_Mod01, LichtenU) {nikobus="#N010100"}  //this is to switch Module 1 Channel 2 OFF
Switch Niko_Mod01_Chan02A "Mod 1 Kanaal 2 Aan" (Niko_Mod01, LichtenA) {nikobus="#N01020A"}
Switch Niko_Mod01_Chan02U "Mod 1 Kanaal 2 Uit" (Niko_Mod01, LichtenU) {nikobus="#N010200"}
....


---sitemap ----
Frame label="NikoBus with mappings" {
Text label="Niko Module 01"icon="nikobus"{
Switch item=Niko_Mod01_Chan01A label="Slaapkamer - voor raam" mappings=[ON=Aan]  //switch ON
Switch item=Niko_Mod01_Chan01U label="- Uit" mappings=[ON=Uit]   //switch OFF
Switch item=Niko_Mod01_Chan02A label="Slaapkamer - achter raam" mappings=[ON=Aan]
Switch item=Niko_Mod01_Chan02U label="- Uit" mappings=[ON=Uit]
....


I started from the existing demo sitemap and started deleting what I did not need; I kept everything what was in the persitence directory (did not edit anything).

The behaviour I want is no persistency; I just want to be able to switch a Channel on or off, whatever the current state  .... The current behaviour is that because the persistency-mechanisme is working, it is not always reacting to a command, because it thinks it is already off or on (I think) - and the buttons will change color indicating the state .

How can I disable this and get the behaviour I want ? 

regards


Chris

Davy Vanherbergen

unread,
Jan 2, 2015, 3:42:43 AM1/2/15
to ope...@googlegroups.com, dirk....@gmail.com
Hi Chris,

The best way to achieve that would be to define a new 'virtual' button in openHAB. You can choose any button address, e.g.

Switch Niko_Mod01_Chan01                       "Mod 1 Kanaal 1 Aan/Uit"                    (Niko_Mod01, LichtenA) {nikobus="#N900001"}

Next, add this as a push button to the UI:

Switch item=Niko_Mod01_Chan01 label="Slaapkamer - voor raam"                   mappings=[ON=Aan-Uit]  //switch ON/OFF

Once you have this setup, place your nikobus switch module in programming mode, select the first channel and switch type M5 (impulse). Then press the button on the UI to program your nikobus module to listen to this virtual button.

After this, you should be able to switch the light on/off with the openHab UI.

If you want to get more functionality, there may also be an alternative solution. Dirk (in cc) has created a custom board as an alternative to the pclink.

Dirk, can you confirm if your board would provide the same functionality (keeping track of channel status) for the older modules as the pclink does?

Kind regards,

Davy

Chris van Aalst

unread,
Jan 2, 2015, 5:34:46 AM1/2/15
to ope...@googlegroups.com, dirk....@gmail.com
Davy,

I did that already, I've created virtual buttons for each module Channel combination - well I created two virtual buttons per Module Channel (#N01010A) & (#N010100) - format is (#N<module><channel><0A/00>) - I link '0A' to an M2 ON command on the Niko-module and '00' to the M3 OFF command.
This works better then the M5-toggle, because with the toggle I do not know whether I switch it On or Off !?
But because of the persistence OpenHab does not always react the first time - that is what I think is happening! The buttons always have a certain status on the UI ! 
So I was trying to figure out how to deactivate it ? Or set them always to Off ?
I hope you understand my issue ?

Best regards,

Chris 


Verstuurd vanaf mijn iPhone
--
You received this message because you are subscribed to a topic in the Google Groups "openhab" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openhab/EHOfvfgtZrU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openhab+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.
Visit this group at http://groups.google.com/group/openhab.
To view this discussion on the web visit https://groups.google.com/d/msgid/openhab/be655393-7e30-4da2-94de-cd78779f6494%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Davy Vanherbergen

unread,
Jan 2, 2015, 6:57:31 AM1/2/15
to ope...@googlegroups.com, dirk....@gmail.com
Chris,

In the UI, there are 2 types of buttons, switch style buttons and push buttons. If you don't know the state of your channel, then the best way to set this up is to only use push buttons which don't show state and combine those with the M5 toggle. That will result in your lights always switching when the button is pressed. You could call your button something like 'Licht Slaapkamer'. When you press it, the lights will go on if they were off and switch off if they were on.

Alternatively you could track all channel states in openHAB. To do this, you would have to reset your nikobus modules and reprogram them with only virtual buttons. Then configure rules in openHAB to listen to your real wall switches, so that when a wall switch is pressed, openHAB will then send the correct ON/OFF virtual button command to the nikobus.
The downside of this solution is that your lights won't work if openHAB is not running... 

And a third option, could be to try to replace your modules with a more recent (002) version. If I remember correctly it is possible to upgrade them via niko, but I don't remember the associated cost. Sometimes you can find recent ones relatively cheap (250 euro) on second hand sites.

Davy

Chris van Aalst

unread,
Jan 2, 2015, 11:08:01 AM1/2/15
to ope...@googlegroups.com

Update: I did a few extra tests and discovered that the behaviour of the Web-client is different from the IOS-app;if you take my example (iterms & sitemap) in my initial mail:
in the Web-client:
the button to push 'Aan' or 'Uit' will always be blue and depend on the state (according to OpenHab) the icon of the lamp will be lit or not
If I push a button, it will always result in a command being sent to the NikoBus; the lamp-icon will be lit and it will remain lit, because I can only send an 'ON'-command (cfr mapping used)
in the IOS-app:
apart form the lamp-icon, the button it-self can be blue or white (on or off); the app itself will NOT send an ON-command when the button-state is 'blue"; the button-state will go to white; if I push again, the command is sent ....
I assume some intelligence has been included to optimize traffic and to prevent from sending unwanted commands (not sending an 'On' command when the state is already 'On')
 But because persistence is not working, this is an unwanted feature for me ....

So how can I force the status of all butons/iteams to OFF; this should solve my problem !

regards,

Chris 
 
 


Op donderdag 1 januari 2015 21:13:24 UTC+1 schreef Chris van Aalst:

Davy Vanherbergen

unread,
Jan 3, 2015, 4:49:56 AM1/3/15
to ope...@googlegroups.com
You could use a rule, which listens to the ON command being sent for an item and then sets it back to OFF.


--
You received this message because you are subscribed to a topic in the Google Groups "openhab" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openhab/EHOfvfgtZrU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openhab+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.
Visit this group at http://groups.google.com/group/openhab.

Marc Sauveur

unread,
Jan 3, 2015, 9:23:22 AM1/3/15
to ope...@googlegroups.com
Hi Chris

Perhaps can you try a similar rule

when
Item Light_GF_Salon_2 receive command
then
sendCommand(Light_GF_Salon_2, if(Light_GF_Salon_2.state==ON) {ON} else {OFF})
end
Reply all
Reply to author
Forward
0 new messages