For several months, eedomus controller can run php scripts. The entire list of php librairies is not installed on eedomus, meaning that Djmomo scripts can’t be run directly on eedomus. I then propose an adapted version of it which is compatible with eedomus.

Creating virtual sensors

We have now to retrieve the values contained into xml and store them in virtual sensors, called “http sensors”. Those sensors will be available for display and to trigger rules. For each interesting value into xml, we have to create one http sensor. To add this sensor, use option “Add or remove a peripheral” into configuration page.

Select “Add another type of sensor”, this one being an HTTP sensor with this icon :

Here are the parameters to be set in one of those sensors for edf tempo option :

The “Xpath” can have those values :

Firstly, for ejp option which depends on location :

/ejptempo/nord/aujourdhui

/ejptempo/paca/aujourdhui

/ejptempo/ouest/aujourdhui

/ejptempo/sud/aujourdhui

/ejptempo/nord/demain

/ejptempo/paca/demain

/ejptempo/ouest/demain

/ejptempo/sud/demain

/ejptempo/nord/jours_restants

/ejptempo/paca/jours_restants

/ejptempo/ouest/jours_restants

/ejptempo/sud/jours_restants

then for tempo option :

/ejp_tempo/tempo/aujourdhui

/ejptempo/tempo/bleu_restant

/ejptempo/tempo/blanc_restant

/ejptempo/tempo/rouge_restant

/ejp_tempo/tempo/demain

/ejptempo/tempo/bleu_total

/ejptempo/tempo/blanc_total

/ejptempo/tempo/rouge_total

The numerical type sensors ( example : …/jours_restants) will have to have type equal to “Decimal number”. For the other values, you must define all accepted values in the list of values associated to the sensor. Here are the values corresponding to /ejp_tempo/tempo/aujourdhui xpath :

Update of http sensor

It’s possible to setup a delay between updates for each sensor. Proposed php script is using quite a big amount of resources from eedomus, computing is taking several seconds. It’s then not possible to update all sensors too quickly, we shoud set long refresh time, or no automatic update.

Sensor update can be triggered by a rule at the best period of time. In this case, we know that values are changing after 5PM and after midnight, and we want to be sure to have updated values at lunch. A rule will then trigger the updates at selected period.

You can see that I update several times the value in the critical periods to prevent unexpected problem ( server overload, adsl overload, …)

Conclusion

It’s now possible to have electricity pricing conditions for edf ejp or tempo options available on our smarthome controller, without investment in some hardware. A personal server is not necessary although, the script being launched by eedomus. Be careful however, this script is analysing a web page on EDF website and retrieves values from there. This is an heavy task, then using a personnal server is still the prefered solution if one is available.