The Items file appears like this… one is subscribing to the topic “readgaragecontactstatus” and working as expected. The other is trying to send or publish “pressgaragebutton”. If I publish pressgaragebutton from another client, the garage door opens or closed as expected.
When I click the CLOSE on the WEB GUI, I see this in the log:
2018-08-13 11:14:16.416 [WARN ] [.classic.internal.servlet.CmdServlet] - Received unknown command ‘ON’ for item ‘garagedoor’
What defines the action on the sitemap when I click “CLOSE” ?
Should this be a rule or is the MQTT setup improperly that publishes pressgaragebutton ?
(I’m not super-good with rules syntax yet)
‘garagedoor’ is a Contact type Item. Contact Items don’t accept commands (they are considered to be sensors).
Presenting ‘garagedoor’ on your Sitemap as a Switch type doesn’t change the underlying Item, but it does allow the display of Switch-type buttons. Clicking a button sends a Switch-type command to the Item - which rejects it, as it’sa Contact Item.
I had that set as Switch… but I kept getting a NULL event for that item.
When I changed to Contact, the NULL went away and the status of OPEN or CLOSED would appear in the WEB GUI… (Basic and iPhone app) and the Event Log
How do I correct that?
There REALLY is no way to click on a button in the GUI and have it send the publishtopic command?
I can imagine sharing a bunch of this stuff with folks attempting to do the same things that I’m doing.
Using a secondary or “thirdary” Pi that is connected to sensors that grabs the required info via a Python script and allowing it to communicate with the 3rd Pi that is running the Broker and OpenHAB2.
I created a cool little sensor (not yet installed… too hot during the day… too lazy at night ) that sticks up into the Electric meter and senses the rotations of the kilowatt wheel. My research has shown that 1 rotation equates to 1 Watt? 1 kilowatt? can’t recall right now
But, the Python script will count the rotations per second or minute and convert to how much power is being used.
But, I want to get past this garage door thingy first.
I ask again… there is no way to tie a button to what is presented in the WEB GUI or Phone app directly?
(Sorry, too much verbiage for this original topic)
You got the sensor and actuator backwards. The item needs to be the actuator, not the sensor. The visibility part is right though. You want to control the visibility based on the states of the sensor Item.