Simple rules question: How to combine Sonos and hue light?

Dear community

I installed my bunch of devices in Openhab and now want to start with some rules. One of my tasks is to establish a kind of “control mechanism” against children listen to music the whole night insted of sleeping.

The very simple idea is to have a rule that turns a HUE light on in color red as soon if a specified sonos player is playing something (music or radio). A little bit more sophisticated version would do this only between 10pm and 6am and/or has a switch to turn the rule on or off.

However, this is still far to go. I am already strugging with the very basic rule


rule "Tochter hoert zu spaet Musik"

    Item P1FIO_Sonos_Control changed to PLAY
        sendCommand(HUE_Balkontuere_Dimmer, ON)
        sendCommand(HUE_Balkontuere_Farbe, "100,0,0")

The log files tells me this:

18-02-09 14:31:33.764 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'sonos_control.rules'

2018-02-09 14:31:33.771 [WARN ] [el.core.internal.ModelRepositoryImpl] - Configuration model 'sonos_control.rules' is either empty or cannot be parsed correctly!

2018-02-09 14:31:34.314 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'sonos_control.rules'

What is wrong?
Did somebody else realize something similiar already (I assume)?

Best regards and thanks

  • Platform information:
    • Hardware: _Pi3
    • openHAB version: 2

this behaviour is common, if you access your config-files via SMB or (S)FTP. nothing to worry.

Long Story:
the first WARN happens as the file is touched (and empty), the second INFO is then, when the file was written again and could be parsed.

Try to delete the extra line between rule and when :slight_smile:

Thanks for the fast help, I will try, see and continue.