MQTT problem with OpenHAB on Synology

Hi, i have the following problem. I am using openhab since 2017 on a raspberry, and I am using it principally to control 2 Philips Hue light, to toggle it via an Arduino board that I have made (it is only a simple botton). Now I want to transfer all openhab on my Synology nas. I have done all the installation of openhab properly, and the lights switch on/off via the sitemaps (so at least the Philips binding and the sitemaps button works), but I can’t figure how to make work the button. I have flashed the same program on it but only with the ip address modified with the one of the Synology. I see that it works, because I see the “TOOGLE” command via MQTT.fx, but the lights doesn’t react, and neither the button on the sitemaps. All the files, sitemaps, item, rules…have been copied from raspberry. I haven’t install all the package that I have on my raspberry, but at least the ones to make the button works…like MQTT bindings 1 and 2. I have also installed the Mosquitto from SynoCommunity…
Please, some help me. I can’t understand were a was making a mistake. Thanks.
I hope to have uploaded all needed information

Platform information:
Hardware: Synology DS218
OS: DSM 6.2.2
Java Runtime Environment: Java8 1.8.0_241
openHAB version: 2.5.2
Issue of the topic: please be detailed explaining your issue
Please post configurations (if applicable):
Items:

//This is the Items File

String pulsante {mqtt="<[broker:Tommy SmartHouse/utilities/pulsante:command:TOOGLE]"}

Switch Philips_Switch "Lampadario" <light>  { channel="hue:0100:ecb5fa0097f5:4:brightness" }
Switch Philips_Switch "Lampadario" <light> { channel="hue:0100:ecb5fa0097f5:6:brightness" }

Sitemap:

sitemap home label="Tommy SmartHouse"
{
       Frame label="Philips"
       {
            Switch item=Philips_Switch
       }
}

Rules:

//This is the rules file
rule "update pulsante"
when 
    Item pulsante received command TOOGLE
then
    if(Philips_Switch.state == ON) sendCommand(Philips_Switch, OFF)
    else sendCommand(Philips_Switch, ON)
end

openhab.log:

2020-03-31 16:53:15.291 [WARN ] [cTransformationWhitelistWatchService] - Cannot read whitelist file, exec transformations won't be processed: /volume1/@appstore/openHAB/conf/misc/exec.whitelist
2020-03-31 16:53:33.846 [INFO ] [el.core.internal.ModelRepositoryImpl] - Validation issues found in configuration model 'home.items', using it anyway:
Duplicate ModelItem 'Philips_Switch'
Duplicate ModelItem 'Philips_Switch'
2020-03-31 16:53:33.870 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'home.items'
2020-03-31 16:53:34.950 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'rrd4j.persist'
2020-03-31 16:53:36.706 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'home.sitemap'
2020-03-31 16:53:37.308 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'home.things'
2020-03-31 16:53:46.950 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'home.rules'
2020-03-31 16:53:47.588 [INFO ] [thome.model.lsp.internal.ModelServer] - Started Language Server Protocol (LSP) service on port 5007
2020-03-31 16:53:48.442 [WARN ] [el.core.internal.ModelRepositoryImpl] - Configuration model 'home.things' is either empty or cannot be parsed correctly!
2020-03-31 16:53:49.611 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at http://192.168.1.47:8080
2020-03-31 16:53:49.614 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at https://192.168.1.47:8443
2020-03-31 16:53:49.946 [INFO ] [penhab.io.transport.mqtt.MqttService] - MQTT Service initialization completed.
2020-03-31 16:53:49.955 [INFO ] [t.mqtt.internal.MqttBrokerConnection] - Starting MQTT broker connection 'broker'
2020-03-31 16:53:52.643 [INFO ] [ui.habmin.internal.servlet.HABminApp] - Started HABmin servlet at /habmin
2020-03-31 16:53:53.050 [INFO ] [panel.internal.HABPanelDashboardTile] - Started HABPanel at /habpanel
2020-03-31 16:53:53.341 [INFO ] [openhab.ui.paper.internal.PaperUIApp] - Started Paper UI at /paperui
2020-03-31 23:06:03.363 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Location set to '43.79466342298849,11.150407094690491'.
2020-03-31 23:19:43.018 [INFO ] [el.core.internal.ModelRepositoryImpl] - Validation issues found in configuration model 'home.items', using it anyway:
Duplicate ModelItem 'Philips_Switch'
Duplicate ModelItem 'Philips_Switch'
2020-03-31 23:19:43.024 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'home.items'
2020-03-31 23:20:52.476 [INFO ] [el.core.internal.ModelRepositoryImpl] - Validation issues found in configuration model 'home.items', using it anyway:
Duplicate ModelItem 'Philips_Switch'
Duplicate ModelItem 'Philips_Switch'
2020-03-31 23:20:52.479 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'home.items'
2020-03-31 23:22:47.454 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'home.rules'

events.log:

2020-03-31 14:38:55.732 [thome.event.ExtensionEvent] - Extension 'package-expert' has been installed.
2020-03-31 14:40:06.732 [thome.event.ExtensionEvent] - Extension 'transformation-javascript' has been installed.
2020-03-31 14:40:06.751 [thome.event.ExtensionEvent] - Extension 'transformation-regex' has been installed.
2020-03-31 14:40:06.754 [thome.event.ExtensionEvent] - Extension 'ui-habpanel' has been installed.
2020-03-31 14:40:06.755 [thome.event.ExtensionEvent] - Extension 'transformation-jsonpath' has been installed.
2020-03-31 14:40:06.757 [thome.event.ExtensionEvent] - Extension 'transformation-xpath' has been installed.
2020-03-31 14:40:06.759 [thome.event.ExtensionEvent] - Extension 'ui-restdocs' has been installed.
2020-03-31 14:40:06.761 [thome.event.ExtensionEvent] - Extension 'transformation-map' has been installed.
2020-03-31 14:40:06.763 [thome.event.ExtensionEvent] - Extension 'ui-basic' has been installed.
2020-03-31 14:40:06.765 [thome.event.ExtensionEvent] - Extension 'ui-classic' has been installed.
2020-03-31 14:40:06.767 [thome.event.ExtensionEvent] - Extension 'ui-habmin' has been installed.
2020-03-31 14:40:06.770 [thome.event.ExtensionEvent] - Extension 'transformation-xslt' has been installed.
2020-03-31 14:40:06.772 [thome.event.ExtensionEvent] - Extension 'transformation-exec' has been installed.
2020-03-31 14:40:06.774 [thome.event.ExtensionEvent] - Extension 'ui-paper' has been installed.
2020-03-31 14:40:06.776 [thome.event.ExtensionEvent] - Extension 'transformation-scale' has been installed.
2020-03-31 15:53:51.160 [.ItemChannelLinkAddedEvent] - Link 'Philips_Switch-hue:0100:ecb5fa0097f5:4:brightness' has been added.
2020-03-31 15:53:51.162 [.ItemChannelLinkAddedEvent] - Link 'Philips_Switch-hue:0100:ecb5fa0097f5:6:brightness' has been added.
2020-03-31 15:55:20.683 [ome.event.ItemCommandEvent] - Item 'Philips_Switch' received command ON
2020-03-31 15:55:20.704 [nt.ItemStatePredictedEvent] - Philips_Switch predicted to become NULL
2020-03-31 15:55:21.830 [ome.event.ItemCommandEvent] - Item 'Philips_Switch' received command OFF
2020-03-31 15:55:21.835 [nt.ItemStatePredictedEvent] - Philips_Switch predicted to become NULL
2020-03-31 16:02:44.285 [ome.event.ItemCommandEvent] - Item 'Philips_Switch' received command ON
2020-03-31 16:02:44.292 [nt.ItemStatePredictedEvent] - Philips_Switch predicted to become NULL
2020-03-31 16:02:45.047 [ome.event.ItemCommandEvent] - Item 'Philips_Switch' received command OFF
2020-03-31 16:02:45.054 [nt.ItemStatePredictedEvent] - Philips_Switch predicted to become NULL
2020-03-31 16:05:21.273 [home.event.InboxAddedEvent] - Discovery Result with UID 'hue:bridge:ecb5fa0097f5' has been added.
2020-03-31 16:05:21.746 [thome.event.ExtensionEvent] - Extension 'binding-hue' has been installed.
2020-03-31 16:08:43.344 [me.event.InboxRemovedEvent] - Discovery Result with UID 'hue:bridge:ecb5fa0097f5' has been removed.
2020-03-31 16:08:43.395 [hingStatusInfoChangedEvent] - 'hue:bridge:ecb5fa0097f5' changed from UNINITIALIZED to INITIALIZING
2020-03-31 16:08:43.559 [hingStatusInfoChangedEvent] - 'hue:bridge:ecb5fa0097f5' changed from INITIALIZING to OFFLINE (CONFIGURATION_ERROR): Not authenticated. Press pairing button on the Hue bridge or set a valid user name in configuration.
2020-03-31 16:08:53.617 [me.event.ThingUpdatedEvent] - Thing 'hue:bridge:ecb5fa0097f5' has been updated.
2020-03-31 16:08:53.630 [vent.ConfigStatusInfoEvent] - ConfigStatusInfo [configStatusMessages=[]]
2020-03-31 16:08:54.218 [me.event.ThingUpdatedEvent] - Thing 'hue:bridge:ecb5fa0097f5' has been updated.
2020-03-31 16:08:54.223 [hingStatusInfoChangedEvent] - 'hue:bridge:ecb5fa0097f5' changed from OFFLINE (CONFIGURATION_ERROR): Not authenticated. Press pairing button on the Hue bridge or set a valid user name in configuration. to ONLINE
2020-03-31 16:08:54.244 [home.event.InboxAddedEvent] - Discovery Result with UID 'hue:0850:ecb5fa0097f5:5' has been added.
2020-03-31 16:08:54.250 [home.event.InboxAddedEvent] - Discovery Result with UID 'hue:0820:ecb5fa0097f5:7' has been added.
2020-03-31 16:08:54.260 [home.event.InboxAddedEvent] - Discovery Result with UID 'hue:0840:ecb5fa0097f5:8' has been added.
2020-03-31 16:08:54.564 [home.event.InboxAddedEvent] - Discovery Result with UID 'hue:0100:ecb5fa0097f5:4' has been added.
2020-03-31 16:08:54.569 [home.event.InboxAddedEvent] - Discovery Result with UID 'hue:0100:ecb5fa0097f5:6' has been added.
2020-03-31 16:08:54.576 [home.event.InboxAddedEvent] - Discovery Result with UID 'hue:0210:ecb5fa0097f5:7' has been added.
2020-03-31 16:09:33.470 [me.event.InboxRemovedEvent] - Discovery Result with UID 'hue:0100:ecb5fa0097f5:4' has been removed.
2020-03-31 16:09:33.502 [hingStatusInfoChangedEvent] - 'hue:0100:ecb5fa0097f5:4' changed from UNINITIALIZED to INITIALIZING
2020-03-31 16:09:33.534 [me.event.ThingUpdatedEvent] - Thing 'hue:0100:ecb5fa0097f5:4' has been updated.
2020-03-31 16:09:33.536 [hingStatusInfoChangedEvent] - 'hue:0100:ecb5fa0097f5:4' changed from INITIALIZING to ONLINE
2020-03-31 16:09:33.577 [vent.ItemStateChangedEvent] - Philips_Switch changed from NULL to OFF
2020-03-31 16:09:44.618 [me.event.InboxRemovedEvent] - Discovery Result with UID 'hue:0100:ecb5fa0097f5:6' has been removed.
2020-03-31 16:09:44.633 [hingStatusInfoChangedEvent] - 'hue:0100:ecb5fa0097f5:6' changed from UNINITIALIZED to INITIALIZING
2020-03-31 16:09:44.666 [me.event.ThingUpdatedEvent] - Thing 'hue:0100:ecb5fa0097f5:6' has been updated.
2020-03-31 16:09:44.668 [hingStatusInfoChangedEvent] - 'hue:0100:ecb5fa0097f5:6' changed from INITIALIZING to ONLINE
2020-03-31 16:10:28.685 [ome.event.ItemCommandEvent] - Item 'Philips_Switch' received command ON
2020-03-31 16:10:28.706 [nt.ItemStatePredictedEvent] - Philips_Switch predicted to become ON
2020-03-31 16:10:28.747 [vent.ItemStateChangedEvent] - Philips_Switch changed from OFF to ON
2020-03-31 16:10:30.439 [ome.event.ItemCommandEvent] - Item 'Philips_Switch' received command OFF
2020-03-31 16:10:30.460 [nt.ItemStatePredictedEvent] - Philips_Switch predicted to become OFF
2020-03-31 16:10:30.486 [vent.ItemStateChangedEvent] - Philips_Switch changed from ON to OFF
2020-03-31 16:11:18.261 [thome.event.ExtensionEvent] - Extension 'binding-mqtt' has been installed.
2020-03-31 16:11:44.268 [thome.event.ExtensionEvent] - Extension 'binding-mqtt1' has been installed.
2020-03-31 16:52:42.797 [hingStatusInfoChangedEvent] - 'hue:0100:ecb5fa0097f5:6' changed from ONLINE to UNINITIALIZED
2020-03-31 16:52:42.827 [hingStatusInfoChangedEvent] - 'hue:0100:ecb5fa0097f5:6' changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)
2020-03-31 16:52:42.828 [hingStatusInfoChangedEvent] - 'hue:0100:ecb5fa0097f5:4' changed from ONLINE to UNINITIALIZED
2020-03-31 16:52:42.849 [hingStatusInfoChangedEvent] - 'hue:0100:ecb5fa0097f5:4' changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)
2020-03-31 16:52:42.851 [hingStatusInfoChangedEvent] - 'hue:bridge:ecb5fa0097f5' changed from ONLINE to UNINITIALIZED
2020-03-31 16:52:42.873 [hingStatusInfoChangedEvent] - 'hue:bridge:ecb5fa0097f5' changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)
2020-03-31 16:52:43.066 [temChannelLinkRemovedEvent] - Link 'Philips_Switch => hue:0100:ecb5fa0097f5:6:brightness' has been removed.
2020-03-31 16:52:43.067 [temChannelLinkRemovedEvent] - Link 'Philips_Switch => hue:0100:ecb5fa0097f5:4:brightness' has been removed.
2020-03-31 16:53:57.936 [hingStatusInfoChangedEvent] - 'hue:0100:ecb5fa0097f5:4' changed from UNINITIALIZED to UNINITIALIZED (BRIDGE_UNINITIALIZED)
2020-03-31 16:53:57.939 [hingStatusInfoChangedEvent] - 'hue:0100:ecb5fa0097f5:6' changed from UNINITIALIZED to UNINITIALIZED (BRIDGE_UNINITIALIZED)
2020-03-31 16:53:58.399 [hingStatusInfoChangedEvent] - 'hue:bridge:ecb5fa0097f5' changed from UNINITIALIZED to INITIALIZING
2020-03-31 16:53:59.849 [hingStatusInfoChangedEvent] - 'hue:bridge:ecb5fa0097f5' changed from INITIALIZING to ONLINE
2020-03-31 16:53:59.962 [hingStatusInfoChangedEvent] - 'hue:0100:ecb5fa0097f5:6' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING
2020-03-31 16:53:59.977 [hingStatusInfoChangedEvent] - 'hue:0100:ecb5fa0097f5:4' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING
2020-03-31 16:54:00.021 [hingStatusInfoChangedEvent] - 'hue:0100:ecb5fa0097f5:6' changed from INITIALIZING to ONLINE
2020-03-31 16:54:00.029 [hingStatusInfoChangedEvent] - 'hue:0100:ecb5fa0097f5:4' changed from INITIALIZING to ONLINE
2020-03-31 16:54:00.284 [vent.ItemStateChangedEvent] - Philips_Switch changed from NULL to OFF
2020-03-31 16:54:14.399 [ome.event.ItemCommandEvent] - Item 'Philips_Switch' received command ON
2020-03-31 16:54:14.432 [nt.ItemStatePredictedEvent] - Philips_Switch predicted to become ON
2020-03-31 16:54:14.456 [vent.ItemStateChangedEvent] - Philips_Switch changed from OFF to ON
2020-03-31 16:54:15.097 [ome.event.ItemCommandEvent] - Item 'Philips_Switch' received command OFF
2020-03-31 16:54:15.119 [nt.ItemStatePredictedEvent] - Philips_Switch predicted to become OFF
2020-03-31 16:54:15.149 [vent.ItemStateChangedEvent] - Philips_Switch changed from ON to OFF
2020-03-31 16:54:43.197 [ome.event.ItemCommandEvent] - Item 'Philips_Switch' received command ON
2020-03-31 16:54:43.226 [nt.ItemStatePredictedEvent] - Philips_Switch predicted to become ON
2020-03-31 16:54:43.256 [vent.ItemStateChangedEvent] - Philips_Switch changed from OFF to ON
2020-03-31 16:54:44.105 [ome.event.ItemCommandEvent] - Item 'Philips_Switch' received command OFF
2020-03-31 16:54:44.130 [nt.ItemStatePredictedEvent] - Philips_Switch predicted to become OFF
2020-03-31 16:54:44.151 [vent.ItemStateChangedEvent] - Philips_Switch changed from ON to OFF
2020-03-31 18:02:05.920 [vent.ItemStateChangedEvent] - Philips_Switch changed from OFF to ON
2020-03-31 19:10:58.539 [ome.event.ItemCommandEvent] - Item 'pulsante' received command TOGGLE
2020-03-31 19:10:58.551 [vent.ItemStateChangedEvent] - pulsante changed from NULL to TOGGLE
2020-03-31 19:11:00.099 [ome.event.ItemCommandEvent] - Item 'Philips_Switch' received command OFF
2020-03-31 19:11:00.138 [nt.ItemStatePredictedEvent] - Philips_Switch predicted to become OFF
2020-03-31 19:11:00.163 [vent.ItemStateChangedEvent] - Philips_Switch changed from ON to OFF
2020-03-31 19:57:59.880 [ome.event.ItemCommandEvent] - Item 'pulsante' received command TOGGLE
2020-03-31 19:57:59.890 [ome.event.ItemCommandEvent] - Item 'Philips_Switch' received command ON
2020-03-31 19:57:59.915 [nt.ItemStatePredictedEvent] - Philips_Switch predicted to become ON
2020-03-31 19:57:59.936 [vent.ItemStateChangedEvent] - Philips_Switch changed from OFF to ON
2020-03-31 20:34:06.456 [ome.event.ItemCommandEvent] - Item 'pulsante' received command TOGGLE
2020-03-31 20:34:06.466 [ome.event.ItemCommandEvent] - Item 'Philips_Switch' received command OFF
2020-03-31 20:34:06.493 [nt.ItemStatePredictedEvent] - Philips_Switch predicted to become OFF
2020-03-31 20:34:06.518 [vent.ItemStateChangedEvent] - Philips_Switch changed from ON to OFF
2020-03-31 21:25:44.482 [ome.event.ItemCommandEvent] - Item 'pulsante' received command TOGGLE
2020-03-31 21:25:44.495 [ome.event.ItemCommandEvent] - Item 'Philips_Switch' received command ON
2020-03-31 21:25:44.523 [nt.ItemStatePredictedEvent] - Philips_Switch predicted to become ON
2020-03-31 21:25:44.548 [vent.ItemStateChangedEvent] - Philips_Switch changed from OFF to ON
2020-03-31 22:57:36.255 [ome.event.ItemCommandEvent] - Item 'pulsante' received command TOGGLE
2020-03-31 22:57:36.265 [ome.event.ItemCommandEvent] - Item 'Philips_Switch' received command OFF
2020-03-31 22:57:36.293 [nt.ItemStatePredictedEvent] - Philips_Switch predicted to become OFF
2020-03-31 22:57:36.315 [vent.ItemStateChangedEvent] - Philips_Switch changed from ON to OFF
2020-03-31 22:57:38.468 [ome.event.ItemCommandEvent] - Item 'pulsante' received command TOGGLE
2020-03-31 22:57:38.478 [ome.event.ItemCommandEvent] - Item 'Philips_Switch' received command ON
2020-03-31 22:57:38.505 [nt.ItemStatePredictedEvent] - Philips_Switch predicted to become ON
2020-03-31 22:57:38.527 [vent.ItemStateChangedEvent] - Philips_Switch changed from OFF to ON
2020-03-31 23:26:23.289 [ome.event.ItemCommandEvent] - Item 'Philips_Switch' received command OFF
2020-03-31 23:26:23.333 [nt.ItemStatePredictedEvent] - Philips_Switch predicted to become OFF
2020-03-31 23:26:23.404 [vent.ItemStateChangedEvent] - Philips_Switch changed from ON to OFF
2020-03-31 23:26:24.432 [ome.event.ItemCommandEvent] - Item 'Philips_Switch' received command ON
2020-03-31 23:26:24.458 [nt.ItemStatePredictedEvent] - Philips_Switch predicted to become ON
2020-03-31 23:26:24.493 [vent.ItemStateChangedEvent] - Philips_Switch changed from OFF to ON
2020-03-31 23:26:31.716 [ome.event.ItemCommandEvent] - Item 'Philips_Switch' received command OFF
2020-03-31 23:26:31.743 [nt.ItemStatePredictedEvent] - Philips_Switch predicted to become OFF
2020-03-31 23:26:31.789 [vent.ItemStateChangedEvent] - Philips_Switch changed from ON to OFF
2020-03-31 23:26:32.710 [ome.event.ItemCommandEvent] - Item 'Philips_Switch' received command ON
2020-03-31 23:26:32.742 [nt.ItemStatePredictedEvent] - Philips_Switch predicted to become ON
2020-03-31 23:26:32.787 [vent.ItemStateChangedEvent] - Philips_Switch changed from OFF to ON

Arduino program:

#include <ESP8266WiFi.h>
#include <MQTTClient.h>
#include <ESP8266WebServer.h>
#include <ESP8266mDNS.h>
#include <ESP8266HTTPUpdateServer.h>

/* WIFI Settings */
// Name of wifi network
const char* ssid = "*******";

// Password to wifi network
const char* password = "*******"; 

/* Web Updater Settings */
// Host Name of Device
const char* host = "pulsante";

// Path to access firmware update page (Not Neccessary to change)
const char* update_path = "/firmware";

// Username to access the web update page
const char* update_username = "admin";

// Password to access the web update page
const char* update_password = "password";

/* MQTT Settings */
// Topic which listens for commands
char* subscribeTopic = "Tommy SmartHouse/utilities/pulsante"; 

//MQTT Server IP Address
const char* server = "192.168.1.47";

//Unique device ID 
const char* mqttDeviceID = "Tommy_SmartHouseDevice1"; 

int pulsante;
int ultimo_stato;

ESP8266WebServer httpServer(80);
ESP8266HTTPUpdateServer httpUpdater;

WiFiClient net;
MQTTClient client;

unsigned long lastMillis = 0;

void connect();

void setup() 
{
  Serial.begin(19200);
  
  WiFi.mode(WIFI_STA);
  
  WiFi.begin(ssid, password);
  client.begin(server, net);
  client.onMessage(messageReceived);

  connect();

  MDNS.begin(host);

  httpUpdater.setup(&httpServer, update_path, update_username, update_password);
  httpServer.begin();

  MDNS.addService("http", "tcp", 80);

  pinMode(pulsante, INPUT);
}

void connect() 
{
  while (WiFi.status() != WL_CONNECTED) 
  {
    delay(1000);
  }

  while (!client.connect(mqttDeviceID)) 
  {
    delay(1000);
  }
  client.subscribe(subscribeTopic);
}

void loop() 
{
  client.loop();
  delay(10);

  if(!client.connected()) 
  {
    connect();
  }

  httpServer.handleClient();

  pulsante=digitalRead(0);
  if(pulsante==ultimo_stato){
  }
  else{
    client.publish("Tommy SmartHouse/utilities/pulsante", "TOOGLE");
  }
  delay (100);
  ultimo_stato=pulsante;
}

void messageReceived(String &topic, String &payload) 
{

}

This looks like a relevant problem. For some reason it thinks you have Philips_Switch defined twice in home.items.

so, what can I do?

Look in your .items file for two Items named Phillips_Switch would be a start.

The item file that I have is the same that I already have in the raspberry (working) and the same that I have publish here. There are 2 items called Philips_Switch because, how you can see, I want to control 2 different light from the same command/switch.

Every Item must have a unique name. From the docs:

The Item name is used to uniquely identify an Item. The name must be unique across all .items files in your openHAB configuration.

You cannot have two Items with the same name. This has always been the case so I doubt it worked on the RPi.

I you want to control two lights from one Item you can:

  • Link both Channels to a single Item
  • Link each Channel to it’s own Item and put the Items into a Group
  • Create a proxy Item and a Rule to synchronize the Proxy Item with the two Items linked to the Channels.

How can I link both lamp to a single item?

Switch Philips_Switch "Lampadario" <light>  { channel="hue:0100:ecb5fa0097f5:4:brightness" }; { channel="hue:0100:ecb5fa0097f5:6:brightness" }

Like this?

That’s not what the docs say. Though the examples in the section I linked to should be updated to show channels, not just v1.x bindings.

Put a comma between them

{ channel=“hue:0100:ecb5fa0097f5:4:brightness”, channel=“hue:0100:ecb5fa0097f5:6:brightness” }

Ah ok thanks. I try it and then I’ll let you know if it works

Now doesn’t work at all. On the sitemap the lamp icon is a general switch icon, and if I press the switch, nothing appena to the lights…

2020-04-01 17:41:40.612 [WARN ] [basic.internal.render.SwitchRenderer] - Cannot determine item type of 'Philips_Switch'
org.eclipse.smarthome.core.items.ItemNotFoundException: Item 'Philips_Switch' could not be found in the item registry
	at org.eclipse.smarthome.core.internal.items.ItemRegistryImpl.getItem(ItemRegistryImpl.java:85) ~[?:?]
	at org.eclipse.smarthome.ui.internal.items.ItemUIRegistryImpl.getItem(ItemUIRegistryImpl.java:837) ~[?:?]
	at org.openhab.ui.basic.internal.render.SwitchRenderer.renderWidget(SwitchRenderer.java:85) [bundleFile:?]
	at org.openhab.ui.basic.internal.render.PageRenderer.renderWidget(PageRenderer.java:194) [bundleFile:?]
	at org.openhab.ui.basic.internal.render.PageRenderer.processChildren(PageRenderer.java:160) [bundleFile:?]
	at org.openhab.ui.basic.internal.render.PageRenderer.processChildren(PageRenderer.java:181) [bundleFile:?]
	at org.openhab.ui.basic.internal.render.PageRenderer.processPage(PageRenderer.java:124) [bundleFile:?]
	at org.openhab.ui.basic.internal.servlet.WebAppServlet.service(WebAppServlet.java:189) [bundleFile:?]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [bundleFile:3.1.0]
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:852) [bundleFile:9.4.20.v20190813]
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:544) [bundleFile:9.4.20.v20190813]
	at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71) [bundleFile:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) [bundleFile:9.4.20.v20190813]
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:536) [bundleFile:9.4.20.v20190813]
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) [bundleFile:9.4.20.v20190813]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235) [bundleFile:9.4.20.v20190813]
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1581) [bundleFile:9.4.20.v20190813]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) [bundleFile:9.4.20.v20190813]
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1307) [bundleFile:9.4.20.v20190813]
	at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:293) [bundleFile:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188) [bundleFile:9.4.20.v20190813]
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:482) [bundleFile:9.4.20.v20190813]
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1549) [bundleFile:9.4.20.v20190813]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186) [bundleFile:9.4.20.v20190813]
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1204) [bundleFile:9.4.20.v20190813]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [bundleFile:9.4.20.v20190813]
	at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80) [bundleFile:?]
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) [bundleFile:9.4.20.v20190813]
	at org.eclipse.jetty.server.Server.handle(Server.java:494) [bundleFile:9.4.20.v20190813]
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:374) [bundleFile:9.4.20.v20190813]
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:268) [bundleFile:9.4.20.v20190813]
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) [bundleFile:9.4.20.v20190813]
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) [bundleFile:9.4.20.v20190813]
	at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117) [bundleFile:9.4.20.v20190813]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336) [bundleFile:9.4.20.v20190813]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313) [bundleFile:9.4.20.v20190813]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171) [bundleFile:9.4.20.v20190813]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129) [bundleFile:9.4.20.v20190813]
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:367) [bundleFile:9.4.20.v20190813]
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:782) [bundleFile:9.4.20.v20190813]
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:918) [bundleFile:9.4.20.v20190813]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_241]
2020-04-01 17:41:40.625 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'Philips_Switch' for widget org.eclipse.smarthome.model.sitemap.sitemap.Switch
2020-04-01 17:41:40.626 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.sitemap.Switch
2020-04-01 17:41:40.628 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'Philips_Switch' for widget org.eclipse.smarthome.model.sitemap.sitemap.Switch
2020-04-01 17:41:40.629 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'Philips_Switch' for widget org.eclipse.smarthome.model.sitemap.sitemap.Switch
2020-04-01 17:41:40.630 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'Philips_Switch' for widget org.eclipse.smarthome.model.sitemap.sitemap.Switch
2020-04-01 17:41:41.751 [INFO ] [rest.core.internal.item.ItemResource] - Received HTTP POST request at 'items/Philips_Switch' for the unknown item 'Philips_Switch'.
2020-04-01 17:41:42.367 [INFO ] [rest.core.internal.item.ItemResource] - Received HTTP POST request at 'items/Philips_Switch' for the unknown item 'Philips_Switch'.

You very likely have a syntax error for the Item. I’ll bet there is an error before this line indicating that it couldn’t parse your .items file.

//This is the Items File

//Lampada
String pulsante {mqtt="<[broker:Tommy SmartHouse/utilities/pulsante:command:TOOGLE]"}

Switch Philips_Switch "Lampadario" <light>  { channel=“hue:0100:ecb5fa0097f5:4:brightness”, channel=“hue:0100:ecb5fa0097f5:6:brightness” }




Check your quotes. You have “” where "" is required.

Ok, now the lamps work again, but they doesn’t react to the MQTT message

Do the logs show that the message is received? Add logging to your Rule so you can see whether or not it’s being triggered. Double check that the mqtt1 binding is installed. Use an MQTT client to verify that the MQTT message is being sent to the broker.

I am using MQTTfx to verify that the message is sent, but I from what I can see from the log the message in not received. What I have to add to Rule?

Nothing. The problem isn’t the Rule assuming you are looking at the right logs. If you don’t see pulsante changing in events.log than the problem is with your MQTT1 binding configuration. It’s been nearly two years since I last did anything with that binding so won’t be much help debugging that.

But it’s always good to add logging to rule to see when it runs and what Items and variables are set to inside it. https://www.openhab.org/docs/administration/logging.html#create-log-entries-in-rules