MQTT + ESP8266 RF Blaster log warnings

I’m seeing a couple of warning in my log file, everything is working so I don’t know if I should worry about it or if a small change to my code will remove the warnings.

I have built a RF blaster using a ESP8266 that is connected to a Mosquito MQTT broker on the same windows machine that my openHAB runtime is on.

The way I have set it up is that the topic and payload work together to send all the RF Blaster.

eg.
myhome/blaster/rf/182/24 - 1381836

The ESP8266 then transmits 1381836 with a bitrate of 24 and a pulse length of 182.

The reason for doing it this way is so that when I add a new RF device I don;t have to hardcode any of the details into the ESP8266 I just add it into openHAB.

mqtt.things file

Bridge mqtt:broker:myUnsecureBroker [ host="192.168.2.3", secure=false ]
{
    Thing mqtt:topic:mything {
    Channels:
        Type switch : rfSocket1 "RF Socket 1" [ stateTopic="myhome/blaster/rf/182/24", commandTopic="myhome/blaster/rf/182/24", on="1381683", off="1381692" ]
        Type switch : rfSocket2 "RF Socket 2" [ stateTopic="myhome/blaster/rf/182/24", commandTopic="myhome/blaster/rf/182/24", on="1381827", off="1381836" ]
    }
}

OpenHAB log file

2019-01-27 14:57:25.265 [INFO ] [panel.internal.HABPanelDashboardTile] - Started HABPanel at /habpanel
2019-01-27 14:57:25.288 [INFO ] [ebuilder.internal.HomeBuilderServlet] - Started Home Builder at /homebuilder
2019-01-27 14:57:26.787 [INFO ] [io.openhabcloud.internal.CloudClient] - Connected to the openHAB Cloud service (UUID = 906e3d21-e0b8-40e4-bc9d-c8ae0d1bc443, base URL = http://localhost:8085)
2019-01-27 14:57:30.114 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'amazon.items'
2019-01-27 14:57:30.223 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'astro.items'
2019-01-27 14:57:30.263 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'heating.items'
2019-01-27 14:57:30.353 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'lights.items'
2019-01-27 14:57:30.447 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'mqtt.items'
2019-01-27 14:57:30.471 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'my.items'
2019-01-27 14:57:30.485 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'virtual.items'
2019-01-27 14:57:32.727 [INFO ] [thome.model.lsp.internal.ModelServer] - Started Language Server Protocol (LSP) service on port 5007
2019-01-27 14:57:34.227 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'presence.rules'
2019-01-27 14:57:35.257 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'demo.rules'
2019-01-27 14:57:35.803 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'demo.sitemap'
2019-01-27 14:57:36.142 [INFO ] [el.core.internal.ModelRepositoryImpl] - Validation issues found in configuration model 'mqtt.things', using it anyway:
Provide a thing type ID and a thing ID in this format:
 <thingTypeId> <thingId>
2019-01-27 14:57:36.147 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'mqtt.things'
2019-01-27 14:57:36.264 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'astro.things'
2019-01-27 14:57:36.891 [INFO ] [thome.binding.astro.internal.job.Job] - Scheduled Astro event-jobs for thing astro:sun:home
2019-01-27 14:57:37.001 [INFO ] [thome.binding.astro.internal.job.Job] - Scheduled Astro event-jobs for thing astro:moon:home
2019-01-27 14:57:38.148 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at http://192.168.2.3:8085
2019-01-27 14:57:38.151 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at https://192.168.2.3:8443
2019-01-27 14:57:38.459 [INFO ] [arthome.ui.paper.internal.PaperUIApp] - Started Paper UI at /paperui
2019-01-27 14:57:39.192 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '192.168.2.3' with clientid paho234607406832035 and file store 'C:\OpenHAB2\userdata\mqtt\192.168.2.3'
2019-01-27 14:57:45.447 [WARN ] [eneric.internal.generic.ChannelState] - Command '1381683' not supported by type 'OnOffValue': No enum constant org.eclipse.smarthome.core.library.types.OnOffType.1381683

mqtt.items

Group RF433

Switch RFSocket1 "RF Socket 1" (RF433) {channel="mqtt:topic:mything:rfSocket1"}
Switch RFSocket2 "RF Socket 2" (RF433) {channel="mqtt:topic:mything:rfSocket2"}

I am unsure of what is causing the Validation error with my mqtt.items file.

I have added these two switched to a simple sitemap, when I change the switch the RF gets transmitted and the sockets turn on and off as they should.

If I turn on one of the sockets then turn it off using a test MQTT client the switch state updates on the sitemap.

As I said everything is working as I would have expected it, should I ignore those warning message in the log file or do I need to make changed to my configuration.

I’ve only been using openHab for a couple days so apologies if I am missing something of I have left out any info you would need.

Any help appreciated.

Thanks.

I ran into similar issues when setting up mqtt2.4 via text files and what worked for me was removing the : from the Thing topic and adding the broker name to the item. I modified your files below if you want to give it a try and see if it works for your setup.

Note, you will need to restart OH after making a change to the mqtt things file before it will work.

Bridge mqtt:broker:myUnsecureBroker [ host="192.168.2.3", secure=false ]
{
    Thing topic mything {
    Channels:
        Type switch : rfSocket1 "RF Socket 1" [ stateTopic="myhome/blaster/rf/182/24", commandTopic="myhome/blaster/rf/182/24", on="1381683", off="1381692" ]
        Type switch : rfSocket2 "RF Socket 2" [ stateTopic="myhome/blaster/rf/182/24", commandTopic="myhome/blaster/rf/182/24", on="1381827", off="1381836" ]
    }
}
Switch RFSocket1 "RF Socket 1" (RF433) {channel="mqtt:topic:myUnsecureBroker:mything:rfSocket1"}
Switch RFSocket2 "RF Socket 2" (RF433) {channel="mqtt:topic:myUnsecureBroker:mything:rfSocket2"}

Well that solved the validation error, Thanks.

Any thoughts on the command warnings?

2019-01-27 15:50:17.967 [WARN ] [eneric.internal.generic.ChannelState] - Command '1381683' not supported by type 'OnOffValue': No enum constant org.eclipse.smarthome.core.library.types.OnOffType.1381683
2019-01-27 15:50:18.955 [WARN ] [eneric.internal.generic.ChannelState] - Command '1381827' not supported by type 'OnOffValue': No enum constant org.eclipse.smarthome.core.library.types.OnOffType.1381827
2019-01-27 15:50:19.734 [WARN ] [eneric.internal.generic.ChannelState] - Command '1381836' not supported by type 'OnOffValue': No enum constant org.eclipse.smarthome.core.library.types.OnOffType.1381836
2019-01-27 15:50:20.845 [WARN ] [eneric.internal.generic.ChannelState] - Command '1381692' not supported by type 'OnOffValue': No enum constant org.eclipse.smarthome.core.library.types.OnOffType.1381692

Good to hear.:+1:

Your item is a Switch which uses ON/OFF and not numbers. I doubt changing the item from a Switch to a Number will work but you can certainly give it a try. Your best bet is to use map transformation.

@gforce2010 after thinking more and searching the forum you may need to convert the channel to a string and use a rule to execute the command.

Untested example:

Thing

Type string : command "RF Socket" [ commandTopic="myhome/blaster/rf/182/24" ]

Item

String  RFSocket_Command  { channel="mqtt:topic:myUnsecureBroker:command }
Switch RFSocket1      "RF Socket 1" (gSwitch, RF433)             
Switch RFSocket2 "RF Socket 2" (gSwitch, RF433) 
rule "Switch"
when
    Member of gSwitch received command
then
    if (receivedCommand == ON) {
        switch triggeringItem.name.toString {
            case "Switch RFSocket1" : RFSocket_Command.sendCommand("1381692")
            case "Switch RFSocket2 " : RFSocket_Command.sendCommand("1381836")
        }
    } else {
        switch triggeringItem.name.toString {
            case "Switch Switch RFSocket1" : RFSocket_Command.sendCommand("1381683")
            case "Switch Switch RFSocket2" : RFSocket_Command.sendCommand("1381827")
        }
    }
end

Actually, no. A Mqtt switch channel supports custom on/off values. For some non obvious reason that doesn’t seem to work here.

Alternatively is there a way to send a command to one topic of on and another for off?

I’ve found examples of that but they all seem to be for a previous version of the MQTT binding.

Nope. That is not very MQTTish so I didn’t add that to the binding. mqtt1 can do that, yes. For mqtt2 you would need a rule. But as I said, custom on/off values should work. Are you on OH2.5?

I’m using 2.4.0 as that is listed as the stable release.

Manual install on windows if that makes a difference.

Mqtt debuted in OH 2.4 and quite some problems were found since then. You are better off with OH 2.5M1 for Mqtt. For oh 2.4 you can only use a rule as suggested, I guess.

I finally managed to upgrade to v2.5M1 but I am still getting the same warnings in the log file.

I am also getting some errors when OpenHAB starts but I don’t know if that would have any bearing on MQTT.

2019-01-28 16:42:27.962 [INFO ] [ebuilder.internal.HomeBuilderServlet] - Started Home Builder at /homebuilder
2019-01-28 16:42:28.021 [INFO ] [panel.internal.HABPanelDashboardTile] - Started HABPanel at /habpanel
2019-01-28 16:42:28.368 [ERROR] [org.eclipse.smarthome.core          ] - bundle org.eclipse.smarthome.core:0.11.0.oh250M1 (102)[org.eclipse.smarthome.core.internal.scheduler.PeriodicSchedulerImpl(88)] : doFindMethod: Suitable but non-accessible method found in class org.eclipse.smarthome.core.internal.scheduler.PeriodicSchedulerImpl
2019-01-28 16:42:28.369 [ERROR] [org.eclipse.smarthome.core          ] - bundle org.eclipse.smarthome.core:0.11.0.oh250M1 (102)[org.eclipse.smarthome.core.internal.scheduler.PeriodicSchedulerImpl(88)] : findMethod: Suitable but non-accessible method setScheduler found in class org.eclipse.smarthome.core.internal.scheduler.PeriodicSchedulerImpl, subclass of org.eclipse.smarthome.core.internal.scheduler.PeriodicSchedulerImpl
2019-01-28 16:42:28.370 [ERROR] [org.eclipse.smarthome.core          ] - bundle org.eclipse.smarthome.core:0.11.0.oh250M1 (102)[org.eclipse.smarthome.core.internal.scheduler.PeriodicSchedulerImpl(88)] : bind method [setScheduler] not found; Component will fail
2019-01-28 16:42:28.371 [ERROR] [org.eclipse.smarthome.core          ] - bundle org.eclipse.smarthome.core:0.11.0.oh250M1 (102)[org.eclipse.smarthome.core.internal.scheduler.PeriodicSchedulerImpl(88)] : bind method [setScheduler] not found
2019-01-28 16:42:28.372 [ERROR] [org.eclipse.smarthome.core          ] - bundle org.eclipse.smarthome.core:0.11.0.oh250M1 (102)[org.eclipse.smarthome.core.internal.scheduler.PeriodicSchedulerImpl(88)] : doFindMethod: Suitable but non-accessible method found in class org.eclipse.smarthome.core.internal.scheduler.PeriodicSchedulerImpl
2019-01-28 16:42:28.373 [ERROR] [org.eclipse.smarthome.core          ] - bundle org.eclipse.smarthome.core:0.11.0.oh250M1 (102)[org.eclipse.smarthome.core.internal.scheduler.PeriodicSchedulerImpl(88)] : findMethod: Suitable but non-accessible method unsetScheduler found in class org.eclipse.smarthome.core.internal.scheduler.PeriodicSchedulerImpl, subclass of org.eclipse.smarthome.core.internal.scheduler.PeriodicSchedulerImpl
2019-01-28 16:42:28.374 [ERROR] [org.eclipse.smarthome.core          ] - bundle org.eclipse.smarthome.core:0.11.0.oh250M1 (102)[org.eclipse.smarthome.core.internal.scheduler.PeriodicSchedulerImpl(88)] : unbind method [unsetScheduler] not found; Component will fail
2019-01-28 16:42:28.375 [ERROR] [org.eclipse.smarthome.core          ] - bundle org.eclipse.smarthome.core:0.11.0.oh250M1 (102)[org.eclipse.smarthome.core.internal.scheduler.PeriodicSchedulerImpl(88)] : unbind method [unsetScheduler] not found
2019-01-28 16:42:28.650 [INFO ] [io.openhabcloud.internal.CloudClient] - Connected to the openHAB Cloud service (UUID = 906e3d21-e0b8-40e4-bc9d-c8ae0d1bc443, base URL = http://localhost:8080)
2019-01-28 16:42:32.379 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'amazon.items'
2019-01-28 16:42:32.468 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'astro.items'
2019-01-28 16:42:32.506 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'heating.items'
2019-01-28 16:42:32.582 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'lights.items'
2019-01-28 16:42:32.654 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'mqtt.items'
2019-01-28 16:42:32.670 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'my.items'
2019-01-28 16:42:32.683 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'virtual.items'
2019-01-28 16:42:34.619 [INFO ] [thome.model.lsp.internal.ModelServer] - Started Language Server Protocol (LSP) service on port 5007
2019-01-28 16:42:35.906 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'presence.rules'
2019-01-28 16:42:36.806 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'demo.rules'
2019-01-28 16:42:37.255 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'demo.sitemap'
2019-01-28 16:42:37.499 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'mqtt.things'
2019-01-28 16:42:37.600 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'astro.things'
2019-01-28 16:42:38.276 [INFO ] [thome.binding.astro.internal.job.Job] - Scheduled Astro event-jobs for thing astro:sun:home
2019-01-28 16:42:38.906 [INFO ] [thome.binding.astro.internal.job.Job] - Scheduled Astro event-jobs for thing astro:moon:home
2019-01-28 16:42:39.305 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at http://192.168.2.3:8080
2019-01-28 16:42:39.306 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at https://192.168.2.3:8443
2019-01-28 16:42:39.706 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '192.168.2.3' with clientid paho3114944993317 and file store 'C:\OpenHAB2\userdata\mqtt\192.168.2.3'
2019-01-28 16:42:39.967 [INFO ] [arthome.ui.paper.internal.PaperUIApp] - Started Paper UI at /paperui
2019-01-28 16:42:54.027 [WARN ] [eneric.internal.generic.ChannelState] - Command '1381683' not supported by type 'OnOffValue': No enum constant org.eclipse.smarthome.core.library.types.OnOffType.1381683
2019-01-28 16:42:54.905 [WARN ] [eneric.internal.generic.ChannelState] - Command '1381692' not supported by type 'OnOffValue': No enum constant org.eclipse.smarthome.core.library.types.OnOffType.1381692
2019-01-28 16:42:55.923 [WARN ] [eneric.internal.generic.ChannelState] - Command '1381827' not supported by type 'OnOffValue': No enum constant org.eclipse.smarthome.core.library.types.OnOffType.1381827
2019-01-28 16:42:56.795 [WARN ] [eneric.internal.generic.ChannelState] - Command '1381836' not supported by type 'OnOffValue': No enum constant org.eclipse.smarthome.core.library.types.OnOffType.1381836

Nope, that is unrelated (https://github.com/openhab/openhab-core/issues/473).

Could you please verify in Paper UI that the switch channels custom on/off configuration attributes are set?

image

I had a quick lock at the code and this is a framework issue in TypeParser.parseCommand and not a mqtt binding problem :confused: Atm the custom on/off values will not work.

Right now I don’t want to touch the framework until everything has settled with the new buildsystem and reintegration of Eclipse smarthome.

OK.

I will just ignore the warnings in the log files as the functionality is working exactly how I want.

Thanks for your help.

Is there an issue we can follow?

As I haven’t tested with the latest openhab core I hesitate to open an issue just yet.

Hi
I have the same problem with “warnings” in my log file, i had the warnings in Openhab 2.4, i have upgrade to latest 2.5 stable without any change.

Everything works, but the errors i annoying

Is there any news regrading this ?

Im running a Sonoff RF bridge with Tasmota ver 8.1

The warning:

Command ‘4CC70E’ not supported by type ‘OnOffValue’: No enum constant org.eclipse.smarthome.core.library.types.OnOffType.4CC70E

Things:

    Thing mqtt:topic:433bridge01 "433mhz bridge 1" (mqtt:broker:32811816) {
    Channels:
        //Bro info, Sonoff 433Mhz -> WIFI bridge med tasmota 8.1 software
        Type string : reachable1           "Reachable"           [ stateTopic="tele/433bridge01/LWT" ]
        //Dør kontakter 433Mhz
        Type switch : backdoor1           "Bagdør"               [ stateTopic="tele/433bridge01/RESULT", transformationPattern="JSONPATH:$.RfReceived.Data", allowedStates="4A7A0E,4A7A0A", on="4A7A0E", off="4A7A0A" ]
        Type switch : frontdoor1          "Fordør"               [ stateTopic="tele/433bridge01/RESULT", transformationPattern="JSONPATH:$.RfReceived.Data", allowedStates="4CC70E,4CC70A", on="4CC70E", off="4CC70A" ]
        //Ringklokke 433Mhz
        Type switch : ringeklokke1        "Ringe klokke"         [ stateTopic="tele/433bridge01/RESULT", transformationPattern="JSONPATH:$.RfReceived.Data", allowedStates="541F54", on="541F54" ]

Items:

// Sonoff Brigde (433mhzbrigde01) med Tasmota
String	Reachable				"Reachable: [%s]"					<contactable>	(GF_Sonoff_RF)									{channel="mqtt:topic:433bridge01:reachable1"}
    //Dørkontakter
Switch	Backdoor				"Bagdør [MAP(doorwindow.map):%s]"	<door>			(g_hus_doorcontacts, g_all_doorcontacts)		{channel="mqtt:topic:433bridge01:backdoor1"}
Switch	Frontdoor				"Frontdør [MAP(doorwindow.map):%s]"	<door>			(g_hus_doorcontacts, g_all_doorcontacts)		{channel="mqtt:topic:433bridge01:frontdoor1"}
    // Ringklokke
Switch	Ringeklokke				"Ringeklokke"						<switch>		(gNoGroup)										{channel="mqtt:topic:433bridge01:ringeklokke1"}

Thanks Mads

Are there any news regarding this? I seem to have the same problem

Thanks Mads