ngy
Junior Member
Posts: 58
|
Post by ngy on Nov 7, 2018 14:55:50 GMT
Hi all, I've been following the following thread: homeautomation.proboards.com/thread/149/garage-door-window-end-nodes to create a garage door opener node. I've previously had success on creating a DHT node and communicating with openHAB. For some reason, I cannot get this garage door node to communicate with openHAB. Not even the basic RSSI reporting. my items file: //Light items Dimmer LIVINGDIM "Living Room Lights" ["Lighting"] {channel="zwave:device:537432cf:node3:switch_dimmer"} Dimmer DININGDIM "Dining Room Lights" ["Lighting"] {channel="zwave:device:537432cf:node5:switch_dimmer"} Dimmer KITCHENDIM "Kitchen Lights" ["Lighting"] {channel="zwave:device:537432cf:node6:switch_dimmer"} Dimmer BREAKFASTDIM "Breakfast Bar Lights" ["Lighting"] {channel="zwave:device:537432cf:node4:switch_dimmer"} Dimmer STAIRSDIM "Stairs Lights" ["Lighting"] {channel="zwave:device:537432cf:node8:switch_dimmer"} Dimmer MASTERSDIM "Master Bedroom Lights" ["Lighting"] {channel="zwave:device:537432cf:node2:switch_dimmer"} Dimmer OFFICEDIM "Office Lights" ["Lighting"] {channel="zwave:device:537432cf:node10:switch_dimmer"} Dimmer GUESTDIM "Guest Room Lights" ["Lighting"] {channel="zwave:device:537432cf:node12:switch_dimmer"}
//Garage items Switch Act_Node03 <PushBtn> {mqtt=">[mosquitto:home/rfm_gw/sb/node03/dev16:command:ON:ON],>[mosquitto:home/rfm_gw/sb/node03/dev16:command:OFF:OFF]", autoupdate="false"} Number Node03Rssi "Grg_Open_03_RSSI [%.3f db]" <network> (Nodes) {mqtt="<[mosquitto:home/rfm_gw/nb/node03/dev02:state:default]"} my sitemap: sitemap home label="Home" { Frame label="Garage" { Text item=Node03Rssi Switch item=Act_Node03 label="Gdoor03_Opener" } Frame label="First Floor" { Switch item=LIVINGDIM Slider item=LIVINGDIM Switch item=DININGDIM Slider item=DININGDIM Switch item=KITCHENDIM Slider item=KITCHENDIM Switch item=BREAKFASTDIM Slider item=BREAKFASTDIM } Frame label="Second Floor" { Switch item=STAIRSDIM Slider item=STAIRSDIM Switch item=MASTERSDIM Slider item=MASTERSDIM Switch item=OFFICEDIM Slider item=OFFICEDIM Switch item=GUESTDIM Slider item=GUESTDIM } } openhab log when I press the "Gdoor03_Opener" switch in BasicUI (switch does not behave like button, even with autoupdate=false) 2018-11-07 09:40:59.559 [ome.event.ItemCommandEvent] - Item 'Act_Node03' received command ON
2018-11-07 09:41:01.022 [ome.event.ItemCommandEvent] - Item 'Act_Node03' received command OFF and lastly, my arduino serial monitor on the garage door node: Node 3 Version 2.2MhC GOpen GW2.5.1
Transmitting at 915 Mhz...
Node: 3 dev: 99 cmd: 0 Ival: 0 Fval: 0.00 RSSI: -78
Node: 3 dev: 2 cmd: 0 Ival: 0 Fval: 0.00 RSSI: -78
Node: 3 dev: 4 cmd: 0 Ival: 0 Fval: 3.30 RSSI: -78
Node: 3 dev: 9 cmd: 0 Ival: 1 Fval: 3.30 RSSI: -78
Node: 3 dev: 16 cmd: 0 Ival: 0 Fval: 3.30 RSSI: -78
Node: 3 dev: 2 cmd: 0 Ival: 0 Fval: 0.00 RSSI: -78
Node: 3 dev: 4 cmd: 0 Ival: 0 Fval: 3.30 RSSI: -79
Node: 3 dev: 9 cmd: 0 Ival: 1 Fval: 3.30 RSSI: -78
Node: 3 dev: 16 cmd: 0 Ival: 0 Fval: 3.30 RSSI: -78
any help would be greatly appreciated!
|
|
|
Post by papa on Nov 7, 2018 15:57:00 GMT
Thanks, ngy, for finding that problem.
Delete this version of the Garage Opener item: Switch Act_Node03 <PushBtn> {mqtt=">[mosquitto:home/rfm_gw/sb/node03/dev16:command:ON:ON],>[mosquitto:home/rfm_gw/sb/node03/dev16:command:OFF:OFF]", autoupdate="false"} Try this version of the Garage Opener item, which is what works for me now:Switch Act_Node03 <PushBtn> { mqtt="<[mosquitto:home/rfm_gw/nb/node03/dev16:state:default::]", mqtt=">[mosquitto:home/rfm_gw/sb/node03/dev16:command:*:default]" } I have updated this Garage Opener post to include the above change. PS I believe the autoupdate="false" trick stopped working a while back.
|
|
ngy
Junior Member
Posts: 58
|
Post by ngy on Nov 7, 2018 16:13:08 GMT
Hi papa,
Thanks again for your help. I just updated the items file, and the log file from openhab now shows some action:
2018-11-07 11:10:27.781 [ome.event.ItemCommandEvent] - Item 'Act_Node02' received command ON
2018-11-07 11:10:27.796 [vent.ItemStateChangedEvent] - Act_Node02 changed from OFF to ON
2018-11-07 11:11:07.418 [ome.event.ItemCommandEvent] - Item 'Act_Node02' received command OFF
2018-11-07 11:11:07.428 [vent.ItemStateChangedEvent] - Act_Node02 changed from ON to OFF However, on the node side, doesn't seem like anything has changed:
Node: 2 dev: 2 cmd: 0 Ival: -77 Fval: 0.00 RSSI: -76
Node: 2 dev: 4 cmd: 0 Ival: 0 Fval: 3.30 RSSI: -77
Node: 2 dev: 9 cmd: 0 Ival: 1 Fval: 3.30 RSSI: -76
Node: 2 dev: 16 cmd: 0 Ival: 0 Fval: 3.30 RSSI: -77
Node: 2 dev: 2 cmd: 0 Ival: -77 Fval: 0.00 RSSI: -76
Node: 2 dev: 4 cmd: 0 Ival: 0 Fval: 3.30 RSSI: -77
Node: 2 dev: 9 cmd: 0 Ival: 1 Fval: 3.30 RSSI: -76
Node: 2 dev: 16 cmd: 0 Ival: 0 Fval: 3.30 RSSI: -76
Node: 2 dev: 2 cmd: 0 Ival: -77 Fval: 0.00 RSSI: -76
Node: 2 dev: 4 cmd: 0 Ival: 0 Fval: 3.30 RSSI: -76
Node: 2 dev: 9 cmd: 0 Ival: 1 Fval: 3.30 RSSI: -76
Node: 2 dev: 16 cmd: 0 Ival: 0 Fval: 3.30 RSSI: -76
also the RSSI of the node still is not being reported, which leads me to think there is some additional connectivity issues with mosquitto.
|
|
ngy
Junior Member
Posts: 58
|
Post by ngy on Nov 7, 2018 16:15:09 GMT
also, the button is still behaving like a switch on the webconsole, it does not revert back to the off state. I need to press it again.
|
|
|
Post by papa on Nov 7, 2018 16:32:36 GMT
I'm short of time at the moment, but will try to consider this later.
One thing I wonder: Earlier you reported results from Node03. The last posts reported from Node02. Did you change the NODEID in the sketch & in the OpenHAB config entries?
|
|
ngy
Junior Member
Posts: 58
|
Post by ngy on Nov 7, 2018 16:38:06 GMT
I updated my mosquitto using openhabian-config, and reinstalled MQTT Binding, and looks like i'm getting a response now. RSSI is showing again, and the node is able to receive the signals.
Last challenge is now to have the garage door switch behave like a button. this is how the logs look like so far:
on the openhab log:
2018-11-07 11:34:13.174 [ome.event.ItemCommandEvent] - Item 'Act_Node02' received command ON
2018-11-07 11:34:13.183 [vent.ItemStateChangedEvent] - Act_Node02 changed from OFF to ON
2018-11-07 11:34:14.066 [ome.event.ItemCommandEvent] - Item 'Act_Node02' received command OFF
2018-11-07 11:34:14.072 [vent.ItemStateChangedEvent] - Act_Node02 changed from ON to OFF
2018-11-07 11:34:16.391 [ome.event.ItemCommandEvent] - Item 'Act_Node02' received command ON
2018-11-07 11:34:16.401 [vent.ItemStateChangedEvent] - Act_Node02 changed from OFF to ON
2018-11-07 11:34:34.007 [vent.ItemStateChangedEvent] - Node02Rssi changed from NULL to -71
2018-11-07 11:34:40.992 [ome.event.ItemCommandEvent] - Item 'Act_Node02' received command OFF
2018-11-07 11:34:41.005 [vent.ItemStateChangedEvent] - Act_Node02 changed from ON to OFF node serial monitor:
Node: 1
Flashed Relay/Garage Opener
Node: 2 dev: 16 cmd: 0 Ival: 1 Fval: 0.00 RSSI: -76
16, 0, 0, 0.00, RSSI= -78
Node: 1
Flashed Relay/Garage Opener
Node: 2 dev: 16 cmd: 0 Ival: 0 Fval: 0.00 RSSI: -76
16, 0, 1, 0.00, RSSI= -77
Node: 1
Flashed Relay/Garage Opener
Node: 2 dev: 16 cmd: 0 Ival: 1 Fval: 0.00 RSSI: -77
16, 0, 0, 0.00, RSSI= -77
Node: 1
Flashed Relay/Garage Opener
Node: 2 dev: 16 cmd: 0 Ival: 0 Fval: 0.00 RSSI: -76
16, 0, 1, 0.00, RSSI= -77
Node: 1
Flashed Relay/Garage Opener
Node: 2 dev: 16 cmd: 0 Ival: 1 Fval: 0.00 RSSI: -77
Node: 2 dev: 2 cmd: 0 Ival: -77 Fval: 0.00 RSSI: -76
Node: 2 dev: 4 cmd: 0 Ival: 0 Fval: 3.30 RSSI: -76
Node: 2 dev: 9 cmd: 0 Ival: 1 Fval: 3.30 RSSI: -77
Node: 2 dev: 16 cmd: 0 Ival: 1 Fval: 3.30 RSSI: -76
16, 0, 0, 0.00, RSSI= -77
Node: 1
Flashed Relay/Garage Opener
Node: 2 dev: 16 cmd: 0 Ival: 0 Fval: 0.00 RSSI: -76
Node: 2 dev: 2 cmd: 0 Ival: -77 Fval: 0.00 RSSI: -76
Node: 2 dev: 4 cmd: 0 Ival: 0 Fval: 3.30 RSSI: -76
Node: 2 dev: 9 cmd: 0 Ival: 1 Fval: 3.30 RSSI: -76
Node: 2 dev: 16 cmd: 0 Ival: 0 Fval: 3.30 RSSI: -76
|
|
ngy
Junior Member
Posts: 58
|
Post by ngy on Nov 7, 2018 16:38:52 GMT
I'm short of time at the moment, but will try to consider this later. One thing I wonder: Earlier you reported results from Node03. The last posts reported from Node02. Did you change the NODEID in the sketch & in the OpenHAB config entries? Hi papa, no problem, take your time. I will keep diagnosing. yes, i just swapped it to Node02. I updated all the config entries
|
|
|
Post by papa on Nov 7, 2018 17:23:29 GMT
ngy: "Last challenge is now to have the garage door switch behave like a button Quick thought ... In the sketch, find this section: #ifdef GOPENER digitalWrite(ACT1, HIGH); // Pulse relay for Garage Door Opener delay (100); // new digitalWrite(ACT1, LOW); // new #endif // ifdef GOPENER Try changing the section to read (add the bold faced line):
#ifdef GOPENER digitalWrite(ACT1, HIGH); // Pulse relay for Garage Door Opener delay (100); // new digitalWrite(ACT1, LOW); // new send16 = true; // clear switch button on UI ??#endif // ifdef GOPENER
|
|
ngy
Junior Member
Posts: 58
|
Post by ngy on Nov 7, 2018 18:02:24 GMT
ngy: "Last challenge is now to have the garage door switch behave like a button Quick thought ... In the sketch, find this section: #ifdef GOPENER digitalWrite(ACT1, HIGH); // Pulse relay for Garage Door Opener delay (100); // new digitalWrite(ACT1, LOW); // new #endif // ifdef GOPENER Try changing the section to read (add the bold faced line):
#ifdef GOPENER digitalWrite(ACT1, HIGH); // Pulse relay for Garage Door Opener delay (100); // new digitalWrite(ACT1, LOW); // new send16 = true; // clear switch button on UI ??#endif // ifdef GOPENER hmm, that doesn't seem to have much of an effect. is the node supposed to receive an 'off' command? or is the sketch already providing the 'off' signal? I see that there's a 100ms delay before sending (ACT1, LOW). On another note. I found a push button code: if you add "mappings=[ON="Click"]" to the end of the switch item in the sitemap, it no longer becomes a toggle switch. Switch item=Act_Node02 label="Gdoor02_Opener" mappings=[ON="Click"]
|
|
ngy
Junior Member
Posts: 58
|
Post by ngy on Nov 7, 2018 18:10:03 GMT
Seems like without the "OFF" command sending, the node stays "ON"
Node: 2 dev: 2 cmd: 0 Ival: -73 Fval: 0.00 RSSI: -72
Node: 2 dev: 4 cmd: 0 Ival: 0 Fval: 3.29 RSSI: -72
Node: 2 dev: 9 cmd: 0 Ival: 1 Fval: 3.29 RSSI: -72
Node: 2 dev: 16 cmd: 0 Ival: 1 Fval: 3.29 RSSI: -72
Node: 2 dev: 2 cmd: 0 Ival: -73 Fval: 0.00 RSSI: -69
Node: 2 dev: 4 cmd: 0 Ival: 0 Fval: 3.30 RSSI: -68
Node: 2 dev: 9 cmd: 0 Ival: 1 Fval: 3.30 RSSI: -68
Node: 2 dev: 16 cmd: 0 Ival: 1 Fval: 3.30 RSSI: -68
16, 0, 1, 0.00, RSSI= -73
Node: 1
Flashed Relay/Garage Opener
Node: 2 dev: 16 cmd: 0 Ival: 1 Fval: 0.00 RSSI: -73
16, 0, 1, 0.00, RSSI= -72
Node: 1
Flashed Relay/Garage Opener
Node: 2 dev: 16 cmd: 0 Ival: 1 Fval: 0.00 RSSI: -71
16, 0, 1, 0.00, RSSI= -71
Node: 1
Flashed Relay/Garage Opener
Node: 2 dev: 16 cmd: 0 Ival: 1 Fval: 0.00 RSSI: -70
Node: 2 dev: 2 cmd: 0 Ival: -71 Fval: 0.00 RSSI: -73
Node: 2 dev: 4 cmd: 0 Ival: 0 Fval: 3.30 RSSI: -74
Node: 2 dev: 9 cmd: 0 Ival: 1 Fval: 3.30 RSSI: -74
Node: 2 dev: 16 cmd: 0 Ival: 1 Fval: 3.30 RSSI: -74
|
|
ngy
Junior Member
Posts: 58
|
Post by ngy on Nov 8, 2018 16:05:18 GMT
I have another idea about clearing the UI Switch for the Garage Door Opener Node. Will try it later today. Great, thanks. So looks like the Node will only pulse the relay once every time the button is pressed, and does not stay on or keep pulsing (which is good). Using the 'mappings' function as a button is also working well.
|
|
|
Post by papa on Nov 8, 2018 17:15:01 GMT
Change GOpener code so UI switch is cleared after the relay is pulsed on & offMy idea in this above post was on the right track. I just did not take it far enough. In the sketch, find this section: #ifdef GOPENER digitalWrite(ACT1, HIGH); // Pulse relay for Garage Door Opener delay (100); // new digitalWrite(ACT1, LOW); // new #endif // ifdef GOPENER Try changing ^^ the section to read ( change the bold faced areas): #ifdef GOPENER ACT1State = HIGH ; digitalWrite(ACT1, ACT1State); // Pulse relay for Garage Door Opener delay (100); // actuator on long enough to start garage opener motor ACT1State = LOW ; digitalWrite(ACT1, ACT1State); // turn off actuator send16 = true; // new, clear UI switch #endif // ifdef GOPENER
Notes: "send16 = true" tells the node to send device 16 data immediately & not wait for the periodic transmission every xx seconds. However, send16 must have the current ACT1State to be sent. Hence other additions to the code section above.
Between the item change above (even without mappings=[ON="Click"] ) & these code changes, this is working well for me: The relay is pulsed to trigger the garage door opener motor, but now the UI switch is usually cleared to OFF immediately. Occasionally it hangs ON briefly then clears.
New to me is changing the sitemap entry to: Switch item=Act_Node02 label="Gdoor02_Opener" mappings=[ON="Click"] Looks like that would work with or without the code changes I made. (I believe the sketch code is better with the changes.)
Thanks again, ngy, for bring this issue & the sitemap trick to our attention.
|
|
ngy
Junior Member
Posts: 58
|
Post by ngy on Nov 21, 2018 17:08:17 GMT
Hi papa,
I noticed why my openhab interface does not refresh, every time there is an update to the items or sitemap files, openhab needs to be restarted, or else the interface may not refresh, especially on chrome/firefox.
I got everything working now, with the exception of the garage door logo not appearing AND not updating when I open and close the door. I only have a single switch, detecting when the door is closed. Currently, I can display text 'open/closed', and it does update, but the icons do not. I've copied both icon files, and have them named appropriately (gdoor-open.png, gdoor-closed.png).
Any thoughts?
|
|
|
Post by papa on Nov 21, 2018 19:31:14 GMT
ngy: "every time there is an update to the items or sitemap files, openhab needs to be restarted, or else the interface may not refresh, especially on chrome/firefox." papa: I'm not sure about "every time." However, if the user interface is not changing when it should, restarting OpenHAB could likely fix the problem.
ngy: "I got everything working now..." papa: Congratulations on making great progress.
ngy: "I got everything working now, with the exception of the garage door logo not appearing AND not updating when I open and close the door." papa: My apology. I previously missed updating the .svg icons that OpenHAB 2 uses. See this updated post where the needed changes are flagged in blue text.
Thanks, ngy, for reporting this issue.
|
|
ngy
Junior Member
Posts: 58
|
Post by ngy on Nov 23, 2018 21:19:07 GMT
ngy: "every time there is an update to the items or sitemap files, openhab needs to be restarted, or else the interface may not refresh, especially on chrome/firefox." papa: I'm not sure about "every time." However, if the user interface is not changing when it should, restarting OpenHAB could likely fix the problem.
ngy: "I got everything working now..." papa: Congratulations on making great progress.
ngy: "I got everything working now, with the exception of the garage door logo not appearing AND not updating when I open and close the door." papa: My apology. I previously missed updating the .svg icons that OpenHAB 2 uses. See this updated post where the needed changes are flagged in blue text.
Thanks, ngy, for reporting this issue. Hi papa, I copied the .svg icons over and saved it under both file names, and followed the changes in the blue text, but still for some reason, am unable to get the icon to show up. It is just blank for me in the BasicUI. My sitemap: Frame label="Garage" { Text item=Node02Rssi Text item=Node03Rssi Switch item=Act_Node02 label="Garage Door" mappings=[ON="OPEN/CLOSE"] Text item=gCarDr03 Text item=Temperature_Node03 Text item=Humidity_Node03 } My item: Contact gCarDr03 "Garage Door Status [%s]" <gdoor> {mqtt="<[mosquitto:home/rfm_gw/nb/node03/dev43:state:OPEN:OFF],<[mosquitto:home/rfm_gw/nb/node03/dev43:state:CLOSED:ON]"}
|
|
|
Post by papa on Nov 24, 2018 2:36:17 GMT
ngy: "still for some reason, am unable to get the icon to show up. It is just blank for me in the BasicUI."
papa: Does the User Interface still display OPEN & CLOSED properly?
It looks like your OpenHAB config entries are correct.
I assume you saved the icons to OpenHAB 2's \conf\icons\classic folder, correct? Did you try stopping & restarting OpenHAB 2
Did you try restarting your browser?
|
|
ngy
Junior Member
Posts: 58
|
Post by ngy on Nov 24, 2018 21:31:20 GMT
ngy: "still for some reason, am unable to get the icon to show up. It is just blank for me in the BasicUI."
papa: Does the User Interface still display OPEN & CLOSED properly?
It looks like your OpenHAB config entries are correct.
I assume you saved the icons to OpenHAB 2's \conf\icons\classic folder, correct? Did you try stopping & restarting OpenHAB 2
Did you try restarting your browser? unfortunately, yes to all the above. not quite sure what else i'm missing. the text does say OPEN and CLOSED correctly too.
|
|
|
Post by papa on Nov 25, 2018 22:07:58 GMT
ngy, thanks for answering my questions. icons are neat OpenHAB features, but can be frustrating. I've looked over your information again & I don't see anything suspicious so far. Some thoughts ... Try opening the gdoor...svg icons as a file all by themselves in a browser (not in a user interface). Do they display correctly? If not, it may be a corrupted download. (I checked the files I posted. They are OK.) If your files are corrupt, delete them. Download each file again & save them twice with the two names. However, I now suspect the problem may be more related to the following ... I'm doing some experimenting with .svg icons & user interfaces. I primarily use basicui. When I tried opening my sitemap with classicui, the pushbtn icon showed fine, but the gdoor icons did NOT display. All three icons were converted the same day with the same online service to convert from a .png file to an .svg file. When I used notepad++ to compare the metadata of the pushbtn.svg file with that of a gdoor file, I could see no differences other than those specific to each file (name, image size, etc). I do remember that some icons display fine on my computer browser, but maybe not in the openhab app on my iPhone. That makes more sense now that I realize the app uses the classicui which is in one column of entries while basicui makes two columns. Icons not displaying in classicui or the app are the icons I created by converting from .png to .svg. Weird: Instead of leaving one self-created icon space blank classicui & the app display a icon I created earlier (& according to the file's metadata, I used a different method of conversion.) I vaguely remember that when I was creating icons by conversion, they may not have displayed at first, but after trying over & over, they finally displayed correctly. More than I remember with OpenHAB 1.x, OpenHAB 2 seems persistent & "clingy." I mean that once OpenHAB 2 stores one configuration (where I don't know & cannot find so far), it may resist our editing that configuration. Just my suspicions from experiences like this. Where does that leave you & me about icons? If possible, it's probably better to use icons installed with openhab (buried in a .file in a folder under "iconset" OR existing .svg files we find online. See here for the installed icon set. Hover over the images to see the file names represented.
What if we cannot find the icons we want? MAYBE after a while the present gdoor icons will display correctly. MAYBE if I try a different conversion service to create them, I will make icons that work early on. I'll post on the form if I learn or suspect more. Anyone else have wisdom on OpenHAB 2 icons & user interfaces?
|
|
|
Post by papa on Nov 26, 2018 3:02:26 GMT
ngy, see my thoughts in the previous post. I fussed more with this icon stuff. I believe that my custom gdoor icons would eventually display for you, but it may take a long frustrating time. We're supposed to be able to put our own icons into the /conf/icons/classic folder, but in my experience, OpenHAB 2 (at least my current version of 2.1.0) resists using them.
Update, Feb. 9, 2019: Custom icons seem to work better with OpenHAB 2.5.0.M1.
Things seem to work easier if we can use the installed icon set. Again, see this site for the installed icon set. Hover over the images to see the file names represented. At that site, under "Things" you can see an image labelled "garagedoor" Hover the mouse pointer over that image & see a list of related files, including garagedoor-open & garagedoor-closed. I believe my custom icons look better, but it may not be worth the time & trouble to get them to work. So... ngy, what seems a quicker fix (but less attractive ?) is to use those garagedoor icons built into OpenHAB2, that is change your item to: Contact gCarDr03 "Garage Door Status [%s]" < garagedoor> {mqtt="<[mosquitto:home/rfm_gw/nb/node03/dev43:state:OPEN:OFF],<[mosquitto:home/rfm_gw/nb/node03/dev43:state:CLOSED:ON]"} If I discover a better way, I'll post it, but it's eaten enough time & frustration for now. One of these days, I'll upgrade to a more recent version of OpenHAB 2 & see how well that works.
|
|
ngy
Junior Member
Posts: 58
|
Post by ngy on Nov 27, 2018 20:02:27 GMT
ngy, see my thoughts in the previous post. I fussed more with this icon stuff. I believe that my custom gdoor icons would eventually display for you, but it may take a long frustrating time. We're supposed to be able to put our own icons into the /conf/icons/classic folder, but in my experience, OpenHAB 2 (at least my current version of 2.1.0) resists using them. Things seem to work easier if we can use the installed icon set. Again, see this site for the installed icon set. Hover over the images to see the file names represented. At that site, under "Things" you can see an image labelled "garagedoor" Hover the mouse pointer over that image & see a list of related files, including garagedoor-open & garagedoor-closed. I believe my custom icons look better, but it may not be worth the time & trouble to get them to work. So... ngy, what seems a quicker fix (but less attractive ?) is to use those garagedoor icons built into OpenHAB2, that is change your item to: Contact gCarDr03 "Garage Door Status [%s]" < garagedoor> {mqtt="<[mosquitto:home/rfm_gw/nb/node03/dev43:state:OPEN:OFF],<[mosquitto:home/rfm_gw/nb/node03/dev43:state:CLOSED:ON]"} If I discover a better way, I'll post it, but it's eaten enough time & frustration for now. One of these days, I'll upgrade to a more recent version of OpenHAB 2 & see how well that works. Hi papa Looks like switching it to the built in icons <garagedoor> works. Strange that even after rebooting, etc, it doesn't like the custom Icons. I'll have to live with the built in icons. Thanks for your support on this. I've got another issue that just popped up last night.... I rebooted my system, and I notice that every time I reboot either my router, or the openhab server, it triggers my garage door to open. Is there a way to prevent this? Thanks,
|
|
|
Post by papa on Nov 27, 2018 21:41:58 GMT
;-) ngy, you really run a sketch through its paces. ngy: Looks like switching it to the built in icons <garagedoor> works. Strange that even after rebooting, etc, it doesn't like the custom Icons. I'll have to live with the built in icons. Thanks for your support on this. papa: glad that fix worked. Yes, strange. Like I said, OpenHAB 2 stores initial configs in some place unknown to me & then resists changes. More forgiving about its built-in icons, especially maybe for dynamic icons. ngy: I've got another issue that just popped up last night.... I rebooted my system, and I notice that every time I reboot either my router or the openhab server, it triggers my garage door to open. Is there a way to prevent this? papa: I don't believe I've ever had this problem. I'm surprised system restart would activate the garage door opener motor. Dealing with missing user interface icons, I stopped & re-started OpenHAB several times recently & never opened my garage door.
1) Question: When you say "openhab server," do you mean the computer (including possibly a raspberry pi) where OpenHAB runs or restarting the OpenHAB service? 2) Question: when you say "it triggers my garage door to open" do you mean that it actually opens the garage door or that you see a flash of the [CLICK] on the user interface? 3) Question: If the door actually opens, does that also happen if you remove power from the node & then re-power the node? 4) Question: Related to the Garage Door Opener node, did you add other items or rules? If so please post here. 5) Question: Have you configured any persistence method for OpenHAB, especially mapdb.
Again, I'm surprised. I have a few ideas on addressing what you say is happening, but first I'd like responses to the above questions.
|
|
ngy
Junior Member
Posts: 58
|
Post by ngy on Nov 29, 2018 18:42:49 GMT
sorry for the late reply, hahaha yeah i'm sure I do put the sketch through it's paces... I'm an engineer by trade, and like to push things to the limit. anyways, I really appreciate your help! here's my answers:
1) Question: When you say "openhab server," do you mean the computer (including possibly a raspberry pi) where OpenHAB runs or restarting the OpenHAB service? the rasperrypi itself. i reboot it using the command 'sudo reboot' from putty
2) Question: when you say "it triggers my garage door to open" do you mean that it actually opens the garage door or that you see a flash of the [CLICK] on the user interface? yes, i mean it actually opens the garage door. We had a powerout one day and so when I came home, I noticed my garage door was opened. I don't have it hooked up thru the serial monitor to see the interface, cause its installed next to my garage door opener at the moment.
3) Question: If the door actually opens, does that also happen if you remove power from the node & then re-power the node? If I remove power from just the node, then no, I don't think so. I'll get back to you on that. I know however, if I reboot the raspberrypi, it will actually open the garage door.
4) Question: Related to the Garage Door Opener node, did you add other items or rules? If so please post here. no other items or rules. only have the garage door opener node, and the door sensor node.
5) Question: Have you configured any persistence method for OpenHAB, especially mapdb. no persistence method configured for openhab.
|
|
|
Post by papa on Nov 29, 2018 22:31:21 GMT
Thanks, ngy, for answering my questions to help diagnosis & possible solutions. I'm thinking the issue might be your answer to #5, no persistence method. Persistence helps OpenHAB remember item values for various purposes, including restoring the last value before restart. mapdb is a simple persistence method which works for restoring values from prior to reboot, but is not helpful for other purposes like graphing values. (mapdb only remembers an item's last value). It's been a while since I did a persist method on my own system (not mapdb) I assume (like me) you configure with text files not PaperUI. If not, figure out how to do same in PaperUI. Here's how I believe you can set up mapdb persistence that may help your garage door opener issue & perhaps prevent other issues later. In OpenHAB's conf\ services folder, find & open addons.cfg If you have no such file, use PaperUI. Find the line with persistence = change the line to persistence = mapdb (& no # at the start) Maybe reboot OpenHAB In same folder, find the line with org.eclipse.smarthome.persistence:default= Change the line to ( no # at the start): org.eclipse.smarthome.persistence:default= mapdb Maybe reboot OpenHAB In OpenHAB's \conf\ persistence folder, find & open the file: mapdb.perist Make sure the Strategies section of mapdb.persist has at least ... (including no # before default ...) Strategies {
// if no strategy is specified for an item entry below, the default list will be used default = everyChange } Make sure the Items section has at least .. Items { // to store EVERYTHING, uncomment next line * : strategy = everyChange, restoreOnStartup } Maybe reboot OpenHAB
Either thru config text files or in a parallel way thru PaperUI, I believe the above will get you a minimal persistence method.
Added, Nov. 30, 2018: You may need to activate the garage door opener so that item will first set (from NULL) to ON then OFF.
See if that helps. Watch the log just after OpenHAB reboots the next time (your opener item will probably start with NULL which probably causes the problem) Watch for persistence to change the item state to the OFF it had before rebooting. After persistence is working, I still want an answer for question 3) . If rebooting the node opens the garage door, I have a fix to propose for that.
|
|
ngy
Junior Member
Posts: 58
|
Post by ngy on Dec 2, 2018 21:30:35 GMT
Hi papa,
I haven't had a chance to look into persistence yet, but i just pulled the node from the garage door. indeed does get flashed when the rasperrypi reboots. see the log below:
Node: 2 dev: 2 cmd: 0 Ival: 0 Fval: 0.00 RSSI: -68
Node: 2 dev: 4 cmd: 0 Ival: 0 Fval: 3.30 RSSI: -69
Node: 2 dev: 9 cmd: 0 Ival: 1 Fval: 3.30 RSSI: -68
Node: 2 dev: 16 cmd: 0 Ival: 0 Fval: 3.30 RSSI: -68
Node: 2 dev: 2 cmd: 0 Ival: 0 Fval: 0.00 RSSI: -68
Node: 2 dev: 4 cmd: 0 Ival: 0 Fval: 3.30 RSSI: -68
Node: 2 dev: 9 cmd: 0 Ival: 1 Fval: 3.30 RSSI: -68
Node: 2 dev: 16 cmd: 0 Ival: 0 Fval: 3.30 RSSI: -68
No connection... here i was rebooting No connection...
No connection...
No connection...
16, 0, 1, 0.00, RSSI= -79
Node: 1
Flashed Relay/Garage Opener
Node: 2 dev: 16 cmd: 0 Ival: 0 Fval: 0.00 RSSI: -78
Node: 2 dev: 2 cmd: 0 Ival: -79 Fval: 0.00 RSSI: -69
Node: 2 dev: 4 cmd: 0 Ival: 0 Fval: 3.30 RSSI: -69
Node: 2 dev: 9 cmd: 0 Ival: 1 Fval: 3.30 RSSI: -69
Node: 2 dev: 16 cmd: 0 Ival: 0 Fval: 3.30 RSSI: -69
Node: 2 dev: 2 cmd: 0 Ival: -79 Fval: 0.00 RSSI: -67
Node: 2 dev: 4 cmd: 0 Ival: 0 Fval: 3.30 RSSI: -67
Node: 2 dev: 9 cmd: 0 Ival: 1 Fval: 3.30 RSSI: -67
Node: 2 dev: 16 cmd: 0 Ival: 0 Fval: 3.30 RSSI: -67
i'll look into your other suggestions tomorrow.
|
|
ngy
Junior Member
Posts: 58
|
Post by ngy on Dec 3, 2018 16:50:28 GMT
I think I fixed it! I installed mapdb persistence, but that alone did not fix the issue. After a few reboots to test, I believe the issue has been resolved. The fix was in my items file, old switch item was:
Switch Act_Node02 "Garage Door" <garage3> ["Switchable"] {mqtt=">[mosquitto:home/rfm_gw/sb/node02/dev16:command:ON:ON],>[mosquitto:home/rfm_gw/sb/node02/dev16:command:OFF:OFF]", autoupdate="false"} However, I noticed in the log it only says 'Item 'Act_Node02' received command ON', and nothing about the state of the switch. Once I changed the switch item to (I missed it the first time around):
Switch Act_Node02 "Garage Door" <garage3> ["Switchable"] { mqtt="<[mosquitto:home/rfm_gw/nb/node02/dev16:state:default::]", mqtt=">[mosquitto:home/rfm_gw/sb/node02/dev16:command:*:default]" }
The log now shows:
2018-12-03 11:35:55.012 [ome.event.ItemCommandEvent] - Item 'Act_Node02' received command ON
2018-12-03 11:35:55.040 [vent.ItemStateChangedEvent] - Act_Node02 changed from OFF to ON
2018-12-03 11:35:55.174 [vent.ItemStateChangedEvent] - Act_Node02 changed from ON to OFF Act_Node02 goes back to the OFF state, so on next reboot, (I believe) it stays off. No more random opening garage doors!
Thanks again papa.
UGH nevermind. it still flashes.
|
|
|
Post by papa on Dec 3, 2018 20:17:19 GMT
Oh well, installing mapdb persistence should reduce NULL values showing up in your User Interface.
Nov 7, 2018, papa said: "Earlier you reported results from Node03. The last posts reported from Node02. Did you change the NODEID in the sketch & in the OpenHAB config entries?" ngy: yes, i just swapped it to Node02. I updated all the config entries. papa followup: Did you keep a SEPARATE node that monitors garage door state (OPEN or CLOSED) & swap its NODEID to Node03? (Probably due to inadequate current supply, I got erratic results when I tried to combine Garage OPENER functions with Garage Door MONITOR functions.) ================================ Beyond the above, we need to diagnose ... That is, diagnose: When OpenHAB reboots, why is the Gateway (Node 1) sending an ON command to the Garage Opener Node? Which Gateway sketch are you using?
|
|
ngy
Junior Member
Posts: 58
|
Post by ngy on Dec 3, 2018 20:30:29 GMT
Oh well, installing mapdb persistence should reduce NULL values showing up in your User Interface.
Nov 7, 2018, papa said: "Earlier you reported results from Node03. The last posts reported from Node02. Did you change the NODEID in the sketch & in the OpenHAB config entries?" ngy: yes, i just swapped it to Node02. I updated all the config entries. papa followup: Did you keep a SEPARATE node that monitors garage door state (OPEN or CLOSED) & swap its NODEID to Node03? (Probably due to inadequate current supply, I got erratic results when I tried to combine Garage OPENER functions with Garage Door MONITOR functions.) ================================ Beyond the above, we need to diagnose ... That is, diagnose: When OpenHAB reboots, why is the Gateway (Node 1) sending an ON command to the Garage Opener Node? Which Gateway sketch are you using?Hi papa, yes I have separate nodes for opener and sensor. Opener is node 02, Sensor is node 03. I believe gateway (node 1) is RFM_MQTT_GW_25.1_pub1.ino
|
|
ngy
Junior Member
Posts: 58
|
Post by ngy on Dec 3, 2018 20:37:12 GMT
My logs also show this upon reboot:
2018-12-03 15:34:47.621 [vent.ItemStateChangedEvent] - Upstairs changed from NULL to 100
2018-12-03 15:34:47.632 [vent.ItemStateChangedEvent] - ZWaveNode6GE14294ZW3005InWallDimmerSwitch_Dimmer changed from NULL to 0
2018-12-03 15:34:47.653 [vent.ItemStateChangedEvent] - ZWaveNode3_Dimmer changed from NULL to 50
2018-12-03 15:34:47.658 [vent.ItemStateChangedEvent] - ZWaveNode2_Dimmer changed from NULL to 0
2018-12-03 15:34:47.669 [vent.ItemStateChangedEvent] - ZWaveNode5_Dimmer changed from NULL to 0
2018-12-03 15:34:47.682 [vent.ItemStateChangedEvent] - Office changed from NULL to 0
2018-12-03 15:34:47.697 [GroupItemStateChangedEvent] - Second_Floor_Lights changed from NULL to OFF through Office
2018-12-03 15:34:47.702 [GroupItemStateChangedEvent] - inLights changed from NULL to ON through Office
2018-12-03 15:34:47.728 [vent.ItemStateChangedEvent] - ZWaveNode4_Dimmer changed from NULL to 0
2018-12-03 15:34:47.734 [vent.ItemStateChangedEvent] - LIVINGDIM changed from NULL to 50
2018-12-03 15:34:47.745 [vent.ItemStateChangedEvent] - DININGDIM changed from NULL to 0
2018-12-03 15:34:47.756 [GroupItemStateChangedEvent] - inLights changed from ON to OFF through ZWaveNode4_Dimmer
2018-12-03 15:34:47.762 [vent.ItemStateChangedEvent] - KITCHENDIM changed from NULL to 0
2018-12-03 15:34:47.769 [vent.ItemStateChangedEvent] - BREAKFASTDIM changed from NULL to 0
2018-12-03 15:34:47.777 [vent.ItemStateChangedEvent] - STAIRSDIM changed from NULL to 100
2018-12-03 15:34:47.785 [vent.ItemStateChangedEvent] - MASTERSDIM changed from NULL to 0
2018-12-03 15:34:47.799 [vent.ItemStateChangedEvent] - OFFICEDIM changed from NULL to 0
2018-12-03 15:34:47.806 [vent.ItemStateChangedEvent] - GUESTDIM changed from NULL to 0
2018-12-03 15:34:47.814 [vent.ItemStateChangedEvent] - Act_Node02 changed from NULL to OFF
2018-12-03 15:34:47.822 [vent.ItemStateChangedEvent] - Node02Rssi changed from NULL to -66
2018-12-03 15:34:47.835 [vent.ItemStateChangedEvent] - Node03Rssi changed from NULL to -65
2018-12-03 15:34:47.838 [vent.ItemStateChangedEvent] - Temperature_Node03 changed from NULL to 12.00
2018-12-03 15:34:47.847 [vent.ItemStateChangedEvent] - Humidity_Node03 changed from NULL to 67.00
2018-12-03 15:34:47.854 [vent.ItemStateChangedEvent] - gCarDr03 changed from NULL to CLOSED does this indicate that mapdb is not configured properly?
|
|
|
Post by papa on Dec 4, 2018 20:14:16 GMT
ngy: does this log indicate that mapdb is not configured properly?
papa: The log looks good after rebooting OpenHAB: showing items starting as NULL (because of reboot), but mapdb persistence works to change the items' NULL to the last value mapdb stored for each item. As I wrote earlier, having mapdb persistence will at least reduce NULL values in your user interface & reduce rules from balking at NULL values.
Act_Node02 changed from NULL to OFF [ ^^ Log Entry shows that Garage Door Opener item started as NULL, but persistence changed it to OFF, last value stored]
With mapdb persistence working for Node02, does Node02 still open the garage door when you reboot the Pi/OpenHAB?
|
|
ngy
Junior Member
Posts: 58
|
Post by ngy on Dec 4, 2018 21:42:07 GMT
Hi papa,
Good to know that the persist is working properly. Unfortunately, it does not solve the issue. Watching the log as I reboot the Pi, I notice it triggers Node02 to flash very soon after the reboot (so before mapdb restores the values). Somehow, the gateway sends a signal to Node02 to trigger during the boot sequence. Does it have anything to do with my item/sitemap settings?
Items:
Switch Act_Node02 "Garage Door" <garage3> ["Switchable"] { mqtt="<[mosquitto:home/rfm_gw/nb/node02/dev16:state:default::]", mqtt=">[mosquitto:home/rfm_gw/sb/node02/dev16:command:*:default]" } Number Node02Rssi "Garage Opener RSSI [%.0f db]" <network> (Nodes) {mqtt="<[mosquitto:home/rfm_gw/nb/node02/dev02:state:default]" }
Number Node03Rssi "Garage Sensor RSSI [%.0f db]" <network> (Nodes) {mqtt="<[mosquitto:home/rfm_gw/nb/node03/dev02:state:default]" } Number Temperature_Node03 "Garage Temperature [%.1f °C]" <temperature> {mqtt="<[mosquitto:home/rfm_gw/nb/node03/dev48:state:default]"} Number Humidity_Node03 "Garage Humidity [%d %%]" <humidity> {mqtt="<[mosquitto:home/rfm_gw/nb/node03/dev49:state:default]"} Contact gCarDr03 "Garage Door Status [%s]" <garagedoor> {mqtt="<[mosquitto:home/rfm_gw/nb/node03/dev43:state:OPEN:OFF],<[mosquitto:home/rfm_gw/nb/node03/dev43:state:CLOSED:ON]"}
Sitemap:
Frame label="Garage" { Text item=Node02Rssi Text item=Node03Rssi Switch item=Act_Node02 label="Garage Door" mappings=[ON="OPEN/CLOSE"] Text item=gCarDr03 Text item=Temperature_Node03 Text item=Humidity_Node03 }
|
|