openHAB 3.0 Release discussion

Maybe the question about the comment should be another: How to mark comments in yaml?

YAML only supports inline comments using the number (#) symbol.

ie.

# This is a comment
config:
  label: Page Label
  sidebar: true
  order: "1"
blocks:
  - component: oh-block   # This is another comment

I think the root problem is the UI is transforming between YAML and JSON and that conversion is unable to handle the comments so the comments get stripped out. Yannick posted a comment about that somewhere I canā€™t find anymore. Itā€™s a technical challenge that has not been solved yet.

Ah, sounds reasonable.

Thanks for the quick reply.

As far as I can see there is currently no dynamic syntax check in the rules (so that errors are highlighted in red) and no IntelliSense in the main UI rule editor. This currently only seems to work with Visual Studio Code. If this should work then maybe there is something wrong with my installation?

Regarding the Sitemap comments. When I create a sitemap in the main UI the code is shown in Javascript just like in the sitemap files and not as YAML. So I was able to just copy & paste my sitemap file in there.
Iā€™ve commented out elements in the sitemap using the // characters. The advantage of the main ui editor would be that I can change the sitemap from a browser and get a nice hierarchical view of the sitemap which would help sometimes because my sitemap has grown quite large.

Iā€™ve upgraded from 2.5 to 3.0 a week ago and everything went well. The upgrade procedure is really excellent, well done!
The only thing that does not work: I canā€™t open the rules page in the UI.
It just hangs while loading:

I canā€™t see anything in the logs nor is there anything in the browser console.
Iā€™ve tried with Chrome (including incognito mode), Edge, Firefox and even IE11, at no avail.
Cleared the cache: no change.
rules GET in the API Explore returns the complete list of rules, so they are there. They actually even wor but unfortunately I cannot edit them.
Iā€™m at the end of my wits.
Has anybody else seen such issues or does anybody have an idea what may have gone wrong?

There is for JavaScript. I assumed it worked for Rules DSL too.

I noticed something strange, maybe is a fault in my code but I cant find it. This rule wasnā€™t fired couple of minutes ago. So i added a logInfo in my rule to check what was going on, and the rule was suddenly fired. I removed the logInfo and the rule is fired again. But it just out of the blue didnā€™t trigger without any errors in the normal log. I canā€™t reproduce it again but it happend more often, but when bugfixing you save the file and the problem is goneā€¦

rule "1 - Volume control for Radio and Google audio"
when
    Item GlobalVolume received command or
    Item RadioVolume changed or
    Item GoogleVolume changed or
    Item RadioPlay changed or
    Item GoogleControl changed
then
    if (triggeringItemName == "RadioPlay"){
        if (RadioPlay.state == PLAY){
            GlobalVolume.postUpdate(RadioVolume.state.toString())
        }
    }

    if (triggeringItemName == "GoogleControl"){
        if (GoogleControl.state == PLAY){
            GlobalVolume.postUpdate(GoogleVolume.state.toString())
        }
    }

    if (triggeringItemName == "RadioVolume"){
        GlobalVolume.postUpdate(RadioVolume.state.toString())
    }

    if (triggeringItemName == "GoogleVolume"){
        GlobalVolume.postUpdate(GoogleVolume.state.toString())
    }

    if (triggeringItemName == "GlobalVolume"){
        if (GoogleControl.state == PLAY){
            GoogleVolume.sendCommand(GlobalVolume.state.toString())
        } else {

            RadioVolume.sendCommand(GlobalVolume.state.toString())
        }
    }
end

So the strange thing is, that this rule works perfectly at the moment, and also did in OH 2.5.10. But it just didnā€™t work when I changed the GlobalVolume from habpanel or sitemap.

these are my items.

Dimmer      GlobalVolume                "Openhab Volume [%s %%]"                                            { ga="speaker" }
Dimmer      RadioVolume                 "Radio Volume [%s %%]"                             (gRadioVolume)   { channel = "mpd:mpd:keuken:volume" }
Dimmer      GoogleVolume                "Google Audio Volume"                               (gRadioVolume)  { channel="chromecast:audiogroup:Muziek:volume" }

btw i use > { ga=ā€œspeakerā€ } but that doesnā€™t work, also didnā€™t work in OH2.5 unfortunately.

[edit]

Happend again in another ruleā€¦ exactly the same. The heating didnā€™t turn on, after putting a logInfo to check the state of a string, I saved the file and afterwards everything works as it shouldā€¦

Can anyone confirm the rules arenā€™t fired randomly? Iā€™m using the Stable version of Openhab 3.0 on a raspberry pi 4b with openhabian 64bit version (because of the possibility to boot from SSD). I donā€™t use the new UI for now, only files.

Same again, simple rule. Used to work, now it doesnā€™t. Itā€™s the same file as the problem with the volume above:

rule "6 - Radio in en uitschakelen"
when
    Item Radio received command
then
    if (receivedCommand == ON){
        logInfo("radio.rules", "woonkamerradio wordt ingeschakeld")
        RadioPlay.sendCommand(PLAY)
    }

    if (receivedCommand == OFF){
        logInfo("radio.rules", "woonkamerradio wordt ingeschakeld")
        RadioPlay.sendCommand(PAUSE)
    }
end

Just added an extra line in the file and saved it, now it works but the log shows something strange:

Hope iā€™m not the only one with this problem because this isnā€™t solvable in my opiniumā€¦

Not sure if upgrading to 3.1 unstable is smart or more unstableā€¦

[edit] - For now it looks like a onetime only after reboot of openhab, as if some files arenā€™t loaded correctly. I have around 32 rules files with 227 rules, not sure if that has anything to do with it.

When is the next version planned to be released??

If I remember correct, it is planned to have monthly milestone releases and 3.1 stable should be ready by mid of the year.

1 Like

Will the DSL rules still valid for the next releases or do I need to migrate all of my rules?

Yes, they will remain valid.

Also in OH4 than later?

Who knows?
openHAB 4 is far far away, we are heading 3.1, then 3.2 etcā€¦

1 Like

Firstly, I love OH3, great job to those involved!

Iā€™m having a bit of trouble and to be honest Iā€™m not quite sure it is OH3 relatedā€¦

I have added a Web Frame Card to my Overview page which contains a frequently updating website page. On my iphone Iā€™ve added xxx.xxx:8080 to my home screen for easy access. The issue is that the frame does not update as the website does.

I tried deleting the cache in my Safari & Google settings which does not work.

What does work is when I delete the link on my home screen and start again.

Any way of forcing a page re-cache so this does not happen?

Hi guys,

Does anyone know where in the OH2 > OH3 changes was the code edited to stop pushing item states to OH cloud? Asking because Iā€™m running a private OH cloud instance and Iā€™m still not seeing any item state updates being sent (no incoming updates in nginx logs) even after commenting away the OH cloud side item state updates.

Thanks

Issue with Backup / Restore OH3.0

Hey allā€¦
I have a working OH 3.0 stable running on my PI system.
There I have done an backup which is located in the /var/lib/openhab/backups

For testing I have copied the backup file on an other ā€œfreshā€ PI system which is running under OH 3.0 testing release.

When I try to restore the backup from the ā€œstableā€ machine, on the ā€œtestingā€ machine I get a error, that the backup was unable to restore.

What is going wrong? Any idea?

BR
Scheuerer

PS: This happend with the trail to restore this backup under OH3 snapshot 2148

This happened a long time before OH 3 was released. Itā€™s possible that the OH 3 binding was updated to no longer push Item states to the cloud. I wouldnā€™t be surprised since the only service that needs it is IFTTT and with their new model of charging users for recipes the demand for that integration has greatly reduced. And you can use the webhook task instead of the OH task anyway, which is what I would recommend if you are looking to integrate with IFTTT. If you are not looking to integrate with IFTTT, then you donā€™t need that feature anyway.

I found a lot of widgets here around in the community. Is it planned to have a widget library? So that someone donā€™t need luck to find a cool widget?

3 Likes