Need help troubleshooting persistence after wifi change

  • Platform information:
    • Hardware: Raspberry Pi Nano
    • OS: Rasbian image from openHABian
    • Java Runtime Environment: Zulu Embedded OpenJDK Java 8on_
    • openHAB version: 2
  • Issue of the topic: Need help troubleshooting persistence after wifi change
  • Please post configurations (if applicable):
    • Items configuration related to the issue
    • Sitemap configuration related to the issue
    • Rules code related to the issue
    • Services configuration related to the issue
  • If logs where generated please post these here using code fences:

I recently changed my wifi router, so the DHCP reservation got removed. As a work-a-round, I set a static IP on the Raspberry Pi Nano. So HABPanel works but there’s no new data logged. Prior to this persistence has worked for weeks. I confirmed that mysql service is running. And I’ve tried restarting that service. I connected to the mysql persistence database and I don’t see any records with recent time stamps when I query the item1 table after I changed my wifi router.

SELECT * FROM OpenHAB.Item1
where time > ‘2018-02-26 16:30:49’;

Not sure what to do next.

Figured out that my hue bridge ip had changed.

problem solved.

edit: ok saw your edit with the hue bridge… I let the answer stay here - in case somebody else finds it with similar issues.
(it was my second guess the items didn’t get updated in the first place)


I’m not so sure what your problem is…? :wink:

first of all, if you change your IP adress or something, openHAB will just use the new one. It doesn’t have any effect on what’s happening within openHAB - except the bindings and or integrations which rely on configured ip-adresses.
that being said: if openHAB gets item updates - it will persist them as you have configured in mysql.persist. So, if there’s no persistence anymore:

  • you either don’t have Access to your mysql anymore (as you configured your mysql-server to only accept know ip-adresses
  • your item-updates for openHAB don’t work anymore, because your e.g. REST-API updates connect to the old ip-adress

in both ways: have a look in the logfiles - they will tell you, what happens: either no item-updates in events.log or an error connecting to mysql in openhab.log.

Hello,
In your configuration, you didn’t specify where your mysql is set up.
Is it internal with OH in the pi zero?
If yes, is your persistence mysql IP configured as localhost or 127.0.0.1 in your mysql.cfg?

If your mssql is running on another machine, this machine might have been assigned another IP address after updating your DCHP server. Find that IP and update your mysql.cfg file.

Regards